:root {
  --bg-dark: #080c18;
  --bg-hero: #0b1022;
  --bg-section: #f7f8fa;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-card-alt: #f0f2f6;
  --text-primary: #1a1f36;
  --text-secondary: #4a5068;
  --text-muted: #8892a8;
  --text-light: #c8cdd8;
  --text-hero: #e8ecf4;
  --gold: #c9a84c;
  --gold-dim: #a08538;
  --gold-glow: rgba(201,168,76,0.25);
  --blue: #3a6ea5;
  --blue-light: #4a8ed0;
  --navy: #1a2744;
  --border: #e2e6ee;
  --border-dark: #2a3454;
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 960px;
  --shadow: 0 2px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: var(--bg-section);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ============ HERO ============ */
.hero {
  background: #ffffff;
  background-image: url('saga_hero_bg.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--text-primary);
  text-align: center;
  padding: 1.5rem 2rem 1.2rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.82);
  pointer-events: none;
}

/* Subtle grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,39,68,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,39,68,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Radial glow behind logo */
.hero::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-logo {
  margin-bottom: 0.5rem;
  display: inline-block;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-logo img {
  animation: gentleFloat 6s ease-in-out infinite;
  border-radius: 50%;
  border: 3px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  object-fit: cover;
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.hero-affiliation {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: 0.4rem;
}

.hero-details {
  display: inline-flex;
  gap: 2rem;
  margin-top: 2rem;
  padding: 0.8rem 1.6rem;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.hero-details span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-details .detail-icon {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

/* ============ COMPACT HERO (inner pages) ============ */
.hero-compact {
  padding: 1rem 2rem 0.8rem;
}

.hero-compact::after {
  display: none;
}

.hero-compact .hero-logo {
  margin-bottom: 0.3rem;
}

.hero-compact .hero-logo img {
  animation: none;
  width: 40px !important;
  height: 40px !important;
  border-width: 2px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.hero-compact h1 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
  letter-spacing: 0.12em;
}

.hero-compact .hero-subtitle {
  font-size: 0.88rem;
  margin-bottom: 0;
  letter-spacing: 0.04em;
}

/* ============ NAV ============ */
nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.8rem 1.2rem;
  color: var(--text-secondary);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: var(--max-w);
  margin: 0 auto;
}

nav a {
  display: block;
  padding: 0.85rem 1.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.25s ease;
}

nav a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

nav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ============ SECTIONS ============ */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 3.5rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 2rem;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.section-desc {
  margin-top: 0.6rem;
  color: var(--text-secondary);
  max-width: 640px;
  font-size: 0.95rem;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--gold-dim);
}

/* ============ TRACKS ============ */
.tracks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.track-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.track-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.track-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.track-card.senior::before { background: var(--navy); }
.track-card.junior::before { background: var(--gold); }

.track-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.8rem;
}

.track-card.senior .track-badge {
  background: var(--navy);
  color: #e0e8f0;
}

.track-card.junior .track-badge {
  background: var(--gold);
  color: #fff;
}

.track-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.track-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.65;
}

.track-meta {
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.track-meta li {
  padding: 0.25rem 0;
  display: flex;
  gap: 0.5rem;
}

.track-meta li strong {
  color: var(--text-secondary);
  min-width: 65px;
}

/* ============ SCHEDULE / TALKS ============ */
.schedule-placeholder {
  background: var(--bg-white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.schedule-placeholder .placeholder-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.4;
}

/* ============ PAST TALKS / ARCHIVE ============ */
.archive-semester {
  margin-top: 1.5rem;
}

.archive-semester h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.talk-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.talk-entry {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1.5rem;
  align-items: start;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}

.talk-entry:last-child {
  border-bottom: none;
}

.talk-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
}

.talk-date small {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.talk-info h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.talk-info .talk-speaker {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.talk-info .talk-speaker strong {
  font-weight: 600;
  color: var(--text-primary);
}

.talk-track-badge {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-top: 0.2rem;
}

.talk-track-badge.senior {
  background: rgba(26,39,68,0.08);
  color: var(--navy);
}

.talk-track-badge.junior {
  background: rgba(201,168,76,0.12);
  color: var(--gold-dim);
}

/* ============ ORGANIZERS ============ */
.organizers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.organizer-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.organizer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.organizer-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 1rem;
  background: var(--bg-card-alt);
}

.organizer-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.organizer-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.organizer-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.organizer-email {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.78rem;
  color: var(--blue);
  font-weight: 500;
}

/* ============ LOGISTICS ============ */
.logistics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.logistics-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.logistics-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logistics-card .logi-icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.logistics-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.logistics-card p strong {
  color: var(--text-primary);
}

/* ============ FOOTER ============ */
footer {
  background: var(--bg-dark);
  color: var(--text-muted);
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 2rem;
}

.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-logos img {
  height: 32px;
  opacity: 0.45;
  filter: grayscale(100%) brightness(1.8);
  transition: opacity 0.2s;
}

.footer-logos img:hover {
  opacity: 0.7;
}

.footer-text {
  font-size: 0.78rem;
  line-height: 1.8;
}

.footer-text a {
  color: var(--text-light);
  border-bottom: 1px dotted rgba(255,255,255,0.15);
  text-decoration: none;
}

.footer-text a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.footer-lawson {
  margin-top: 1.2rem;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.15);
  font-style: italic;
}

/* ============ ANIMATED HERO SVG ============ */
.hero-curve-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-curve-svg path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes drawCurve {
  0% { stroke-dashoffset: 3200; opacity: 0; }
  10% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.06; }
  50% { opacity: 0.12; }
}

.hero-curve-main {
  stroke: var(--gold);
  stroke-width: 1.5;
  opacity: 0.15;
  stroke-dasharray: 3200;
  stroke-dashoffset: 3200;
  animation: drawCurve 3s ease-out 0.5s forwards;
}

.hero-curve-glow {
  stroke: var(--gold);
  stroke-width: 6;
  opacity: 0;
  filter: blur(4px);
  stroke-dasharray: 3200;
  stroke-dashoffset: 3200;
  animation: drawCurve 3s ease-out 0.5s forwards, pulseGlow 4s ease-in-out 3.5s infinite;
}

/* ============ GALLERY HOVER ============ */
.surface-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b1022;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.surface-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 30px rgba(201,168,76,0.15);
  border-color: var(--gold);
}

.surface-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.surface-card:hover img {
  transform: scale(1.05);
}

.surface-card .card-text {
  padding: 0.8rem 1rem;
  background: #fff;
}

.surface-card .card-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.92rem;
}

.surface-card .card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.2rem;
}

.family-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b1022;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.family-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.15);
  border-color: var(--gold);
}

/* ============ SCROLL ANIMATIONS ============ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hero { padding: 3.5rem 1.5rem 3rem; }
  .hero h1 { font-size: 2.4rem; }
  .hero-logo svg { width: 120px; height: 120px; }
  .hero-details { flex-direction: column; gap: 0.5rem; }
  .tracks-grid { grid-template-columns: 1fr; }
  .organizers-grid { grid-template-columns: 1fr; }
  .logistics-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr !important; }
  .gallery-grid .surface-card img { height: 260px; }
  .talk-entry { grid-template-columns: 80px 1fr; }
  .talk-entry .talk-track-badge { grid-column: 2; }
  .nav-toggle { display: block; }
  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid var(--border);
  }
  nav ul.open { display: flex; }
  nav a {
    padding: 0.7rem 1.2rem;
    font-size: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }
  main { padding: 0 1.2rem; }
  section { padding: 2.5rem 0; }

  .hero-compact { padding: 1.5rem 1.2rem 1rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; letter-spacing: 0.1em; }
  .section-title { font-size: 1.4rem; }
}
