/* ── Theme (light mode) ── */
body.light {
  --bg: #f5f5f7;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f0f2;
  --border: rgba(0,0,0,0.08);
  --text: #1d1d1f;
  --text-2: #515154;
  --text-3: #86868b;
}
body.light .nav { background: rgba(245,245,247,0.72) !important; }
body.light .hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0,113,227,0.1) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(120,0,220,0.06) 0%, transparent 60%);
}
body.light .hero-title {
  background: linear-gradient(180deg, #1d1d1f 0%, #515154 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.light .ticker-wrap { background: #f0f0f2; border-color: rgba(0,0,0,0.06); }
body.light .ticker span { color: var(--text-3); }
body.light .tl-line { background: rgba(0,0,0,0.08); }
body.light .quiz-card { background: #fff; border-color: rgba(0,0,0,0.08); }
body.light .quiz-option { background: #f5f5f7; border-color: rgba(0,0,0,0.08); color: #1d1d1f; }
body.light .quiz-option:hover { background: #e8e8ed; }
body.light .back-top { background: rgba(0,0,0,0.08); color: #1d1d1f; }

/* ── Theme toggle ── */
.nav-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  background: none; border: 1px solid var(--border);
  border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: var(--text-2);
  font-size: 15px;
}
.theme-toggle:hover { background: rgba(255,255,255,0.08); color: var(--text); }

/* ── Hero canvas (particle field) ── */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.5;
}

/* ── Word reveal animation ── */
.word-wrap { overflow: hidden; display: inline-block; }
.word {
  display: inline-block;
  transform: translateY(110%);
  animation: wordUp 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
}
.word-wrap:nth-child(3) .word { animation-delay: 0.12s; }
@keyframes wordUp {
  to { transform: translateY(0); }
}

/* ── Ticker / marquee ── */
.ticker-wrap {
  overflow: hidden;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  white-space: nowrap;
}
.ticker {
  display: inline-flex;
  gap: 20px;
  animation: ticker 28s linear infinite;
}
.ticker span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.3px;
}
.ticker span:not(:nth-child(2n)) { color: var(--text-2); }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-wrap:hover .ticker { animation-play-state: paused; }

/* ── Magnetic buttons ── */
.magnetic { transition: transform 0.3s cubic-bezier(0.23,1,0.32,1), background 0.2s; }

/* ── Count-up numbers ── */
.count-up { transition: none; }

/* ── Timeline ── */
.timeline-section {
  padding: 100px 0;
  background: var(--bg);
}
.timeline {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding-left: 32px;
}
.tl-line {
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border);
}
.tl-item {
  position: relative;
  padding-bottom: 40px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.tl-item.visible { opacity: 1; transform: none; }
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -28px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  transition: all 0.3s;
}
.tl-dot--active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,113,227,0.2);
}
.tl-item:hover .tl-dot { border-color: var(--accent); background: var(--accent); }

.tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.tl-card:hover {
  transform: translateX(6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.12);
}
.tl-card--active { border-color: rgba(0,113,227,0.3); background: rgba(0,113,227,0.05); }
.tl-year {
  font-size: 12px; font-weight: 700;
  color: var(--accent); letter-spacing: 1px;
  text-transform: uppercase; display: block;
  margin-bottom: 6px;
}
.tl-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.tl-card p  { font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* ── Tilt cards ── */
.tilt-card { transform-style: preserve-3d; will-change: transform; }

/* ── Quiz section ── */
.quiz-section {
  padding: 100px 0;
  background: var(--bg-2);
}
.quiz-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  text-align: center;
}
.quiz-card .section-label { margin-bottom: 10px; }
.quiz-card h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 36px;
  min-height: 2.4em;
  line-height: 1.3;
}
.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.quiz-option {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px; font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  line-height: 1.4;
}
.quiz-option:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); }
.quiz-option.correct { background: rgba(48,209,88,0.12); border-color: rgba(48,209,88,0.4); color: #30d158; }
.quiz-option.wrong   { background: rgba(255,69,58,0.1);  border-color: rgba(255,69,58,0.3);  color: #ff453a; }
.quiz-option:disabled { cursor: not-allowed; }
.quiz-result {
  font-size: 15px; color: var(--text-2);
  margin-bottom: 20px; line-height: 1.6;
  padding: 14px 20px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.quiz-score {
  font-size: 13px; color: var(--text-3);
  margin-top: 8px;
}

/* ── Mood board ── */
.mood-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin: 32px 0 36px;
  flex-wrap: wrap;
}
.mood-label { font-size: 14px; color: var(--text-3); }
.mood-btns { display: flex; gap: 8px; }
.mood-btn {
  font-size: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.mood-btn:hover { transform: scale(1.2) rotate(-5deg); border-color: rgba(255,255,255,0.2); }
.mood-btn.active {
  background: rgba(0,113,227,0.15);
  border-color: var(--accent);
  transform: scale(1.15);
}
.mood-display {
  font-size: 14px; color: var(--text-2);
  min-width: 120px; text-align: left;
  transition: opacity 0.3s;
}

/* ── Back to top ── */
.back-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: all 0.3s;
  z-index: 50;
  backdrop-filter: blur(10px);
}
.back-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover { background: rgba(255,255,255,0.14); color: var(--text); transform: translateY(-2px); }

/* ── Ripple effect ── */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transform: scale(0);
  animation: ripple 0.5s linear;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-card { padding: 28px 20px; }
  .timeline { padding-left: 24px; }
  .back-top { bottom: 20px; right: 16px; }
  .mood-row { gap: 8px; }
  .mood-display { min-width: auto; text-align: center; width: 100%; }
  .timeline-section { padding: 48px 0; }
  .quiz-section { padding: 48px 0; }
  .tl-card { padding: 14px 16px; }
}
