:root {
 --bg-dark: #1a1a1a;
 --bg-light: #f6f6f6;
 --bg-white: #fff;
 --text-dark: #222;
 --text-light: #eee;
 --text-muted: #525252;
 --accent-color: #007BFF;
 --accent-hover: #0056b3;
 --border-color: #e2e2e2;
 --font-heading: 'League Spartan', sans-serif;
 --font-body: 'Poppins', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background-color: var(--bg-light); color: var(--text-dark); line-height: 1.7; -webkit-font-smoothing: antialiased; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; }
.section-heading { font-family: var(--font-heading); font-size: 2.5rem; text-transform: uppercase; text-align: center; margin-bottom: 60px; letter-spacing: 1px; color: var(--text-dark); }
.btn { display: inline-block; padding: 14px 32px; font-family: var(--font-heading); font-size: 1rem; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: 1px; border-radius: 4px; transition: background-color .3s ease, transform .2s ease; }
.btn-primary { background-color: var(--accent-color); color: var(--bg-white); }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-2px); }
.btn-secondary { background-color: transparent; color: var(--text-dark); border: 2px solid var(--text-dark); }
.btn-secondary:hover { background-color: var(--text-dark); color: var(--bg-white); transform: translateY(-2px); }
.top-bar { background-color: var(--bg-white); color: var(--text-dark); text-align: center; padding: 12px 0; font-family: var(--font-heading); font-size: 1.5rem; letter-spacing: .5px; position: relative; z-index: 2; border-bottom: 1px solid #eee; }
.top-bar::after { content: ''; position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 25px solid transparent; border-right: 25px solid transparent; border-top: 20px solid var(--bg-white); }

/* --- HERO SECTION: MODIFIED STYLES --- */
.hero { position: relative; display: flex; justify-content: center; align-items: flex-start; padding-top: 40px; color: var(--text-light); overflow: hidden; height: 85vh; min-height: 600px; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; background-image: url('hero.jpg'); background-size: contain; background-position: center top; background-repeat: no-repeat; }
.hero-content { text-align: center; max-width: 90%; padding: 0; }

/* --- NEW ---: Wrapper for text background */
.hero-text-wrapper {
  display: inline-block; /* Makes the box wrap the text, respecting the parent's text-align */
  background-color: rgba(26, 26, 26, 0.6); /* Semi-transparent dark background */
  padding: 1rem 1rem;   /* Adds space between the text and the background's edge */
  border-radius: 8px;     /* Softens the corners of the background box */
  margin-bottom: 30px;    /* Adds space between this box and the button */
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2); /* Optional: Adds a subtle shadow for depth */
}

/* --- MODIFIED ---: Removed text-shadow */
.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  line-height: 1.2;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* --- MODIFIED ---: Removed text-shadow */
.hero h2 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  margin-top: -15px;
}
/* --- END OF HERO SECTION MODIFICATIONS --- */

.about-grid { display: grid; grid-template-columns: 1fr; gap: 60px; align-items: flex-start; }
.about-grid h3 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 15px; }
.skills-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.skills-list li { background-color: #e0e0e0; padding: 8px 16px; border-radius: 20px; font-size: .9rem; font-weight: 500; position: relative; cursor: help; transition: background-color .2s ease; }
#skill-popover { display: none; position: absolute; background-color: #2c3e50; color: var(--text-light); padding: 15px; border-radius: 6px; box-shadow: 0 5px 15px rgba(0, 0, 0, .2); max-width: 300px; font-size: .9rem; line-height: 1.5; z-index: 1000; pointer-events: none; text-align: left; }
#skill-popover::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-width: 8px; border-style: solid; border-color: #2c3e50 transparent transparent transparent; }
.video-wrapper { position: relative; width: 100%; max-width: 800px; margin: 0 auto; aspect-ratio: 16 / 9; box-shadow: 0 10px 30px rgba(0, 0, 0, .1); border-radius: 8px; overflow: hidden; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
#projects { background-color: var(--bg-white); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.project-card { background-color: var(--bg-white); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, .05); text-decoration: none; color: var(--text-dark); transition: transform .3s ease, box-shadow .3s ease; }
.project-card:hover { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(0, 0, 0, .1); }
.project-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.project-card h3 { padding: 20px; font-size: 1.2rem; font-weight: 600; text-align: center; }
.project-link-wrapper { text-align: center; margin-top: 60px; }
.resume-download-link { text-align: center; margin-bottom: 60px; }
.timeline { max-width: 800px; margin: 0 auto; }
.timeline-item { padding-left: 40px; border-left: 3px solid var(--border-color); position: relative; margin-bottom: 50px; }
.timeline-item::before { content: ''; position: absolute; left: -11px; top: 0; width: 20px; height: 20px; border-radius: 50%; background-color: var(--accent-color); border: 3px solid var(--bg-light); }
.timeline-item h3 { font-family: var(--font-heading); font-size: 1.4rem; }
.timeline-item h4 { font-size: 1rem; font-weight: 500; color: var(--text-muted); margin-bottom: 15px; }
.timeline-item ul { padding-left: 20px; }
#experience .timeline-item:last-child { margin-bottom: 0; }
#contact { background-color: var(--bg-white); }
.contact-wrapper { max-width: 700px; margin: 0 auto; }
.form-group { position: relative; margin-bottom: 35px; }
.form-input { width: 100%; border: none; border-bottom: 2px solid var(--border-color); padding: 10px 0; background-color: transparent; font-size: 1rem; font-family: var(--font-body); color: var(--text-dark); transition: border-color .3s; }
.form-input:focus { outline: none; border-color: var(--accent-color); }
.form-label { position: absolute; top: 10px; left: 0; color: var(--text-muted); pointer-events: none; transition: all .3s ease; }
.form-input:focus+.form-label, .form-input:not(:placeholder-shown)+.form-label { top: -15px; font-size: .8rem; color: var(--accent-color); }
.contact-wrapper .btn, #chat-widget .btn { width: 100%; background-color: var(--accent-color); color: var(--bg-white); border: none; transition: background-color .3s ease, transform .3s ease, box-shadow .3s ease; }
.contact-wrapper .btn:hover, #chat-widget .btn:hover { background-color: var(--accent-hover); transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0, 123, 255, .4); }
.main-footer { background-color: var(--bg-dark); color: var(--text-light); padding: 40px 0; text-align: center; }
.social-links a { color: var(--text-light); text-decoration: none; margin: 0 15px; font-size: 1.2rem; transition: color .3s; }
.social-links a:hover { color: var(--accent-color); }
.footer-copyright { margin-top: 20px; font-size: .9rem; color: var(--text-muted); }
#chat-widget-container { position: fixed; bottom: 25px; right: 25px; z-index: 999; }
#chat-toggle-btn { width: 60px; height: 60px; background-color: var(--accent-color); color: var(--bg-white); border-radius: 50%; border: none; cursor: pointer; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); transition: transform .2s ease, background-color .2s ease; }
#chat-toggle-btn:hover { background-color: var(--accent-hover); transform: scale(1.1); }
#chat-toggle-btn svg { width: 32px; height: 32px; transition: transform .3s ease, opacity .3s ease; }
.chat-hover-label { position: absolute; right: 75px; top: 50%; transform: translateY(-50%) translateX(10px); background-color: var(--bg-dark); color: var(--bg-white); padding: 6px 12px; border-radius: 6px; font-size: .9rem; white-space: nowrap; opacity: 0; visibility: hidden; transition: all .2s ease-in-out; pointer-events: none; }
#chat-widget-container:hover .chat-hover-label { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
#chat-widget { position: fixed; bottom: 100px; right: 25px; width: 90%; max-width: 370px; background: var(--bg-white); border-radius: 8px; box-shadow: 0 8px 25px rgba(0, 0, 0, .2); z-index: 1000; opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .3s ease, transform .3s ease; display: flex; flex-direction: column; }
#chat-widget.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.chat-widget-header { background-color: var(--accent-color); color: var(--bg-white); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.chat-widget-header h3 { margin: 0; font-size: 1.1rem; font-family: var(--font-heading); }
#chat-close-btn { background: none; border: none; color: var(--bg-white); cursor: pointer; padding: 0; }
#chat-close-btn svg { width: 24px; height: 24px; }
.chat-widget-body { padding: 25px 20px; overflow-y: auto; flex: 1; }
.chat-widget .form-group { margin-bottom: 25px; }
#chat-widget.is-open + #chat-widget-container #chat-icon-open { transform: rotate(90deg) scale(0); opacity: 0; }
#chat-widget.is-open + #chat-widget-container #chat-icon-close { transform: rotate(0) scale(1); opacity: 1; }
#chat-icon-open { position: absolute; transform: rotate(0) scale(1); opacity: 1; }
#chat-icon-close { position: absolute; transform: rotate(-90deg) scale(0); opacity: 0; }

/* Media Queries */
@media (min-width: 769px) {
 .about-grid { grid-template-columns: 1fr 1fr; }
 .hero {
  align-items: flex-end;
  justify-content: flex-start;
  padding-top: 0;
  padding-bottom: 140px;
  padding-left: 20px;
  padding-right: 20px;
  height: 80vh;
  min-height: 550px;
 }
 .hero::before { background-size: cover; background-position: center top; }
  .hero-text-wrapper {
    padding: 2rem 2.5rem; /* More padding on large screens */
  }
 .hero-content { text-align: left; max-width: 50%; padding: 80px 0 0; }
 .hero h1 {
  font-size: 3.5rem;
  /* text-shadow removed */
 }
 .hero h2 {
  font-size: 1.5rem;
  /* text-shadow removed */
 }
}

@media (min-width: 481px) and (max-width: 768px) {
 .hero {
  align-items: flex-start;
  padding-bottom: 0;
  padding-top: 46vh;
 }
 .hero::before { background-size: cover; }
 .hero h1 {
  font-size: 2.8rem;
  /* text-shadow removed */
 }
 .hero h2 {
  font-size: 1.3rem;
  /* text-shadow removed */
 }
}

/* REPLACE the existing mobile query with this */
@media (max-width: 480px) {
  #chat-widget-container { right: 20px; bottom: 20px; }
  #chat-widget { right: 15px; bottom: 95px; width: calc(100% - 30px); max-height: 70vh; }
  .chat-hover-label { display: none; }
  .chat-widget-body { padding: 20px 15px 15px; }
  #chat-widget .form-group { margin-bottom: 18px; }

  /* --- Mobile Hero Contrast and Layout Adjustments --- */
  .hero {
    align-items: center;
    padding-top: 13vh; 
    padding-bottom: 80px;
    height: 45vh;
    min-height: 300px;
    justify-content: center;
  }
  .hero-text-wrapper {
      padding: 1rem 1.2rem; 
  }
  .hero-content {
    max-width: 95%;
    padding: 0 10px;
  }
  .hero h1 {
    font-size: 1.9rem;
    margin-bottom: 15px;
  }
  .hero h2 {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: -10px;
  }
  /* --- End Mobile Hero Contrast and Layout Adjustments --- */
}