:root {
  --bg: #0a0a0f;
  --bg2: #0f0f1a;
  --bg3: #13131f;
  --gold: #c9a84c;
  --gold-light: #e8c96e;
  --gold-dim: rgba(201,168,76,0.15);
  --white: #ffffff;
  --grey: #8a8a9a;
  --grey-light: #b0b0c0;
  --border: rgba(255,255,255,0.06);
  --border-gold: rgba(201,168,76,0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;
}

/* ===== POPUP ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
}

.popup-box {
  background: var(--bg2);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 40px rgba(201,168,76,0.1);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

.popup-icon { font-size: 3rem; margin-bottom: 16px; }

.popup-box h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.popup-box p {
  font-size: 0.92rem;
  color: var(--grey-light);
  line-height: 1.7;
  margin-bottom: 28px;
}

.popup-btn {
  background: var(--gold);
  color: var(--bg);
  border: none;
  padding: 13px 40px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
}

.popup-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* ===== NAVBAR ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6%;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
}

.nav-logo span { color: var(--gold); }

.nav-links { display: flex; gap: 36px; list-style: none; align-items: center; }

.nav-links a {
  text-decoration: none;
  color: var(--grey);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--white); }

.nav-btn {
  background: var(--gold) !important;
  color: var(--bg) !important;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: all 0.3s !important;
}

.nav-btn:hover {
  background: var(--gold-light) !important;
  transform: translateY(-1px);
  color: var(--bg) !important;
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: 0.2s;
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 6% 80px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.9s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

.hero-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-heading span {
  color: var(--gold);
  font-style: italic;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--grey-light);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 580px;
}

.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 60px; }

.btn-primary {
  background: var(--gold);
  color: var(--bg);
  padding: 15px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s;
  box-shadow: 0 4px 24px rgba(201,168,76,0.3);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(201,168,76,0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--grey-light);
  padding: 15px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat { padding: 0 36px; }
.stat:first-child { padding-left: 0; }

.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.stat-num span { color: var(--gold); }
.stat-label { font-size: 0.8rem; color: var(--grey); margin-top: 4px; font-weight: 400; }

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===== COURSES ===== */
#courses {
  padding: 100px 6%;
  background: var(--bg2);
}

.section-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  text-align: center;
  color: var(--white);
  margin-bottom: 12px;
}

.section-heading span { color: var(--gold); font-style: italic; }

.section-sub {
  text-align: center;
  font-size: 0.95rem;
  color: var(--grey);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto 60px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.course-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.3s;
}

.course-card:hover::before { background: var(--gold); }

.course-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.course-card.featured {
  border-color: var(--border-gold);
  background: linear-gradient(135deg, #13131f, #1a1510);
}

.course-card.featured::before { background: var(--gold); }

.course-tag {
  display: inline-block;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.course-icon { font-size: 2rem; margin-bottom: 14px; display: block; }

.course-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.course-card p { font-size: 0.88rem; color: var(--grey); line-height: 1.7; margin-bottom: 20px; }

.course-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.course-meta span {
  font-size: 0.78rem;
  color: var(--grey-light);
  background: rgba(255,255,255,0.05);
  padding: 4px 10px;
  border-radius: 50px;
}

.course-btn {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: letter-spacing 0.3s;
}

.course-btn:hover { letter-spacing: 1px; }

/* ===== RESULTS ===== */
#results {
  padding: 100px 6%;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.results-inner { max-width: 1100px; margin: 0 auto; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 48px 0;
}

.result-card {
  background: var(--bg2);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
}

.result-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}

.result-label { font-size: 0.85rem; color: var(--grey-light); line-height: 1.4; }

.toppers-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.topper-card {
  flex: 1;
  min-width: 200px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.3s;
}

.topper-card:hover { border-color: var(--border-gold); }

.topper-avatar {
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  background: var(--gold-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topper-name {
  font-weight: 600;
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.topper-score { font-size: 0.82rem; color: var(--gold); }

/* ===== FACULTY ===== */
#faculty {
  padding: 100px 6%;
  background: var(--bg2);
}

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.faculty-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  transition: all 0.3s;
  text-align: center;
}

.faculty-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
}

.faculty-avatar {
  font-size: 3rem;
  width: 80px;
  height: 80px;
  background: var(--gold-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.faculty-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.faculty-title {
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 500;
}

.faculty-card p { font-size: 0.88rem; color: var(--grey); line-height: 1.7; }

/* ===== CONTACT ===== */
#contact {
  padding: 100px 6%;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.contact-inner { max-width: 900px; margin: 0 auto; text-align: center; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 48px 0;
}

.contact-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 16px;
  transition: all 0.3s;
}

.contact-card:hover {
  border-color: var(--border-gold);
  background: var(--bg3);
}

.contact-icon { font-size: 1.6rem; margin-bottom: 10px; }

.contact-card h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 6px;
}

.contact-card p { font-size: 0.9rem; color: var(--white); font-weight: 500; }

.contact-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--bg);
  padding: 16px 44px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s;
  box-shadow: 0 4px 24px rgba(201,168,76,0.3);
}

.contact-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(201,168,76,0.4);
}

/* ===== FOOTER ===== */
footer {
  background: #060609;
  color: var(--grey);
  text-align: center;
  padding: 24px;
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--gold);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 1024px) {
  .hero-stats {
    gap: 20px;
  }
  .stat {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background: rgba(10,10,15,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 30px 0;
    gap: 25px;
    transition: left 0.3s ease;
    border-bottom: 1px solid var(--border);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-btn {
    padding: 8px 28px;
    font-size: 0.85rem !important;
  }
  
  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .stat {
    text-align: center;
    min-width: 100px;
    padding: 0;
  }
  
  .stat-divider {
    display: none;
  }
  
  .stat-num {
    font-size: 1.8rem;
  }
  
  .hero-btns {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-primary, .btn-ghost {
    text-align: center;
    width: 100%;
  }
  
  .topper-card {
    min-width: 100%;
  }
  
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .courses-grid, .results-grid, .faculty-grid {
    grid-template-columns: 1fr;
  }
  
  .popup-box {
    padding: 32px 24px;
    width: 90%;
  }
  
  .popup-box h2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero-heading {
    font-size: 2.5rem;
  }
  
  .hero-desc {
    font-size: 0.9rem;
  }
  
  .hero-badge {
    font-size: 0.7rem;
  }
  
  .stat {
    min-width: calc(50% - 20px);
  }
  
  .stat-num {
    font-size: 1.5rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .topper-card {
    flex-direction: column;
    text-align: center;
  }
  
  .topper-avatar {
    margin-bottom: 8px;
  }
  
  .course-card {
    padding: 24px 20px;
  }
  
  .faculty-card {
    padding: 24px 20px;
  }
  
  .result-card {
    padding: 24px 16px;
  }
  
  .result-num {
    font-size: 2.2rem;
  }
  
  .contact-btn {
    padding: 12px 28px;
    font-size: 0.9rem;
  }
}