/* ============================================================
   UCT 2.0 — "Compass & Circuit"
   A coastal-heritage cybersecurity congress: Mahdia's medina
   rendered in brass and terracotta by day, cyber-ops navy by
   night. The recurring signature is a compass rose whose rays
   resolve into circuit traces — navigation meets network.
   ============================================================ */

:root {
  --gold: #d2a549;
  --gold-bright: #f0c96c;
  --red: #d06a4f;
  --purple: #6883b6;
  --sea-1: #3d7fb5;
  --sea-2: #1c4369;
  --mono: 'Inter', sans-serif;
  --display: 'Cinzel', serif;
  --body: 'EB Garamond', serif;
  --ease: cubic-bezier(.16, .8, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --spring-soft: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 68px;
  --nav-h-scrolled: 56px;
}

/* Dark = default (cyber-ops night). Light = daylight medina mode. */
:root,
[data-theme="dark"] {
  --bg: #08121f;
  --bg2: #0e1c33;
  --bg3: #132946;
  --surface: #101f37;
  --surface-2: #162842;
  --border: rgba(210, 165, 73, .18);
  --text: #f0e9d8;
  --text-dim: #9cb0c9;
  --text-ghost: rgba(236, 227, 207, .12);
  --shadow: rgba(0, 0, 0, .55);
  --card-shadow: 0 14px 44px -14px rgba(0, 0, 0, .55);
  --blur-bg: rgba(10, 18, 32, .66);
  --blur-bg-strong: rgba(10, 18, 32, .92);
  --accent-glow: rgba(201, 154, 74, .22);
  --hover: var(--gold);
}

[data-theme="light"] {
  --bg: #f1ead6;
  --bg2: #e7dbb9;
  --bg3: #dccb9c;
  --surface: #faf6ea;
  --surface-2: #f3ecd9;
  --gold: #a97a2f;
  --gold-bright: #c79544;
  --red: #b8503c;
  --purple: #3d6690;
  --border: rgba(85, 58, 18, .18);
  --text: #2b2416;
  --text-dim: #6d6046;
  --text-ghost: rgba(43, 36, 22, .13);
  --shadow: rgba(43, 36, 22, .16);
  --card-shadow: 0 14px 44px -14px rgba(43, 36, 22, .2);
  --blur-bg: rgba(241, 234, 214, .7);
  --blur-bg-strong: rgba(241, 234, 214, .93);
  --accent-glow: rgba(169, 122, 47, .16);
  --hover: var(--purple);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 106%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.75;
  transition: background .5s var(--ease), color .5s var(--ease);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
::selection { background: rgba(201, 154, 74, .3); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: .4;
}

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300;
  pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--gold-bright));
  box-shadow: 0 0 14px var(--accent-glow);
  transition: width .08s linear;
}

/* ============================================================
   NAV — "dynamic island" floating pill
   ============================================================ */
.nav-shell {
  position: fixed;
  top: 14px; left: 0; right: 0;
  z-index: 200;
  display: flex; justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}

nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: .55rem .6rem .55rem 1.3rem;
  height: var(--nav-h-scrolled);
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px var(--shadow);
  transition: box-shadow .4s var(--spring-soft), background .4s var(--ease), gap .4s var(--spring-soft), padding .4s var(--spring-soft), width .4s var(--spring-soft);
  max-width: 100%;
}

nav.scrolled {
  box-shadow: 0 10px 36px var(--shadow), 0 0 0 1px var(--border) inset;
}

.nav-logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: .08em;
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  transition: transform .35s var(--spring);
  flex-shrink: 0;
}
.nav-logo:hover { transform: scale(1.05); }
.nav-logo span { color: var(--red); }
.nav-logo-mark { height: 34px; width: auto; object-fit: contain; }
.nav-logo-edition { color: var(--red); }

.nav-links {
  display: flex;
  gap: 1.15rem;
  list-style: none;
  position: relative;
}

.nav-indicator {
  position: absolute;
  bottom: -2px; left: 0;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: left .45s var(--spring-soft), width .45s var(--spring-soft), opacity .3s;
  opacity: 0;
  pointer-events: none;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 0 12px var(--accent-glow);
}
.nav-indicator.active { opacity: 1; }

.nav-links a {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .25s;
  white-space: nowrap;
  padding-bottom: .3rem;
  cursor: pointer;
}
.nav-links a:hover { color: var(--hover); }
.nav-links a.active { color: var(--gold); }

/* iOS-style toggle switch */
.theme-switch {
  --w: 50px; --h: 28px;
  width: var(--w); height: var(--h);
  border-radius: var(--h);
  border: 1px solid var(--border);
  background: var(--surface-2);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .35s var(--ease), border-color .35s;
  padding: 0;
  display: flex;
  align-items: center;
}
.theme-switch .knob {
  position: absolute;
  top: 2px; left: 2px;
  width: calc(var(--h) - 6px);
  height: calc(var(--h) - 6px);
  border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.05);
  transition: transform .4s var(--spring), background .35s;
  color: #1a1207;
}
.theme-switch .knob svg {
  position: absolute;
  width: 13px; height: 13px;
  transition: opacity .3s var(--ease), transform .4s var(--spring);
}
.theme-switch .knob .icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-switch .knob .icon-moon { opacity: 0; transform: rotate(-60deg) scale(.5); }
[data-theme="light"] .theme-switch .knob {
  transform: translateX(calc(var(--w) - var(--h)));
}
[data-theme="dark"] .theme-switch .knob .icon-sun { opacity: 0; transform: rotate(60deg) scale(.5); }
[data-theme="dark"] .theme-switch .knob .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-switch:active .knob { transform: scale(.9); }

.hamburger {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px; height: 40px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform .3s var(--spring), background .2s;
}
.hamburger:active { transform: scale(.92); }
.hamburger span {
  display: block; width: 16px; height: 2px;
  background: var(--text-dim);
  transition: .3s var(--spring-soft);
  border-radius: 2px;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile menu: iOS action-sheet from bottom ── */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(2px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.sheet-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-menu {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 210;
  background: var(--blur-bg-strong);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-top: 1px solid var(--border);
  border-radius: 26px 26px 0 0;
  padding: .7rem 1.6rem calc(1.8rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 50px var(--shadow);
  transform: translateY(100%);
  transition: transform .5s var(--spring-soft);
  display: flex;
  flex-direction: column;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu .grabber {
  width: 38px; height: 4px;
  border-radius: 4px;
  background: var(--border);
  margin: 0 auto 1.1rem;
}
.mobile-menu a {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text);
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s, padding-left .25s var(--spring-soft);
  display: flex;
  align-items: center;
  gap: .85rem;
}
.mobile-menu a svg {
  width: 19px; height: 19px; flex-shrink: 0;
  color: var(--gold);
  transition: transform .3s var(--spring);
}
.mobile-menu a:hover svg, .mobile-menu a:active svg { transform: scale(1.12); }
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu a:active { color: var(--gold); padding-left: .4rem; }

/* ============================================================
   PAGE FLOW
   ============================================================ */
main { padding-top: calc(var(--nav-h) + 20px); position: relative; z-index: 1; }

.page-section { scroll-margin-top: 90px; position: relative; padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.page-section:nth-of-type(odd) { background: var(--bg); }
.page-section:nth-of-type(even) { background: var(--bg2); }

.section-inner { max-width: 1100px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 3rem); }

/* ============================================================
   SCROLL REVEAL — fade + blur focus-pull
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero-wrapper {
  position: relative;
  width: 100%; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 11rem;
  overflow: hidden;
}

.hero-rose-wrap {
  position: absolute;
  top: 50%; left: 50%;
  width: min(920px, 130vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 0;
}
.hero-rose {
  width: 100%; height: 100%;
  opacity: .5;
  animation: roseSpin 140s linear infinite;
  will-change: transform;
}
[data-theme="light"] .hero-rose { opacity: .32; }
@keyframes roseSpin { to { transform: rotate(360deg); } }

.hero-glow-wrap {
  position: absolute;
  width: 640px; height: 640px;
  top: 44%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 0;
}
.hero-glow {
  width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: pulseGlow 8s ease-in-out infinite;
  filter: blur(40px);
}
@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(1.1); }
}

.hero-skyline {
  position: absolute;
  bottom: 20px; left: 2%;
  width: min(420px, 42vw);
  height: auto;
  object-fit: contain;
  z-index: 1;
  opacity: .7;
  filter: blur(.5px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 20%, #000 85%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 20%, #000 85%, transparent);
  mask-composite: intersect;
  pointer-events: none;
}
[data-theme="light"] .hero-skyline { opacity: .6; }

.hero-content {
  position: relative; z-index: 3;
  display: flex; flex-direction: column; align-items: center;
  opacity: 0; transform: translateY(18px);
  animation: heroIn 1s var(--ease) .15s forwards;
}
@keyframes heroIn { to { opacity: 1; transform: translateY(0); } }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
  display: flex; align-items: center; gap: .7rem;
}
.hero-eyebrow svg { width: 12px; height: 12px; }

h1.hero-title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 700; line-height: 1.05;
  letter-spacing: .03em; text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.1rem;
}
.hero-title .accent {
  background: linear-gradient(100deg, var(--gold) 0%, var(--gold-bright) 30%, var(--gold) 55%, var(--gold-bright) 75%, var(--gold) 100%);
  background-size: 240% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite;
}
.hero-title .accent-red { color: var(--red); }
@keyframes shimmer { to { background-position: -240% 0; } }
@media (prefers-reduced-motion: reduce) { .hero-title .accent { animation: none; } }

.hero-rule { display: flex; align-items: center; gap: .8rem; width: clamp(220px, 36vw, 420px); margin: 0 0 1.2rem; }
.hero-rule-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.hero-rule-dot { color: var(--gold); font-size: .8rem; }

.hero-subtitle {
  font-family: var(--display);
  font-size: clamp(.95rem, 3vw, 1.35rem);
  font-weight: 500; color: var(--text-dim);
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 1.6rem;
}

.hero-organizer {
  font-family: var(--mono); font-size: .75rem; color: var(--text-dim);
  letter-spacing: .18em; margin-bottom: 2.4rem;
}

/* ── HERO TAGLINE (typewriter) ── */
.hero-tagline {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 1.4rem;
}
.tw-line {
  display: inline-block;
  white-space: nowrap;
  vertical-align: bottom;
  clip-path: inset(0 100% 0 0);
  animation-fill-mode: forwards;
}
.tw-1 {
  font-family: var(--body); font-size: 1.05rem; font-style: italic;
  color: var(--text-dim);
  animation: reveal-type 1.1s steps(20, end) .5s forwards;
}
.tw-2 {
  font-family: var(--body); font-size: 1.05rem;
  color: var(--text-dim);
  margin-top: .35rem;
  animation: reveal-type 2.1s steps(55, end) 1.9s forwards;
}
.tw-3 {
  font-family: var(--display); font-size: 1.05rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  margin-top: .6rem;
  animation: reveal-type .9s steps(16, end) 4.3s forwards;
}
.tw-cursor {
  display: inline-block;
  width: .6em; height: .78em;
  margin-left: calc(2px - .18em);
  background: var(--gold);
  vertical-align: baseline;
  position: relative;
  top: .10.4em;
  letter-spacing: normal;
  opacity: 0;
  animation: tw-blink 2s step-end 5.2s infinite;
}
@keyframes reveal-type { to { clip-path: inset(0 0 0 0); } }
@keyframes tw-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .tw-line { clip-path: none; animation: none; }
  .tw-cursor { opacity: 1; animation: tw-blink 1s step-end infinite; }
}
@media (max-width: 640px) {
  .tw-1, .tw-2, .tw-3 { font-size: .88rem; white-space: normal; clip-path: none; animation: none; }
  .tw-cursor { opacity: 1; animation: tw-blink 1s step-end infinite; }
}

.hero-note {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .06em;
  color: var(--text-dim);
  margin-bottom: 2.2rem;
  padding: .5rem 1.2rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: .5rem;
}
.hero-note .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  animation: blink 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

/* Countdown — odometer style */
.countdown { display: flex; gap: 1.4rem; justify-content: center; }
.countdown-item { display: flex; flex-direction: column; align-items: center; }
.countdown-face {
  position: relative;
  width: clamp(2.6rem, 7vw, 3.4rem);
  height: clamp(2.9rem, 7.5vw, 3.7rem);
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.countdown-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  color: var(--gold);
}
.countdown-num.tick { animation: flipDown .5s var(--spring-soft); }
@keyframes flipDown {
  0% { transform: translateY(-100%); opacity: 0; filter: blur(3px); }
  100% { transform: translateY(0); opacity: 1; filter: blur(0); }
}
.countdown-label { font-family: var(--mono); font-size: .6rem; letter-spacing: .2em; color: var(--text-dim); margin-top: .5rem; }
.countdown-sep { font-family: var(--display); font-size: 1.8rem; color: var(--red); align-self: center; margin-top: -1rem; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }

.hero-waves { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 190px; z-index: 2; pointer-events: none; }
.hero-waves svg { width: 100%; height: 100%; display: block; }

.boat { position: absolute; bottom: 90px; animation: sailAcross linear infinite, bob 3s ease-in-out infinite; z-index: 3; opacity: .85; }
.boat.a { width: 34px; animation-duration: 32s, 2.6s; }
.boat.b { width: 22px; bottom: 115px; animation-duration: 41s, 3.2s; animation-delay: -14s, -1s; }
.boat.c { width: 26px; bottom: 75px; animation-duration: 50s, 3s; animation-delay: -31s, 0s; }
@keyframes sailAcross { from { left: -8%; } to { left: 106%; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.scroll-cue {
  position: absolute; bottom: 220px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .3em; color: var(--text-dim);
  text-transform: uppercase; opacity: .8;
  animation: fadeInDelay 1.2s var(--ease) .8s both;
}
.scroll-cue .line { width: 1px; height: 26px; background: linear-gradient(to bottom, var(--gold), transparent); animation: scrollLine 2s ease-in-out infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes fadeInDelay { from { opacity: 0; } to { opacity: .8; } }

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
.eyebrow {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .3em; color: var(--red);
  text-transform: uppercase; margin-bottom: .6rem;
  display: flex; align-items: center; gap: .5rem;
}

h2.section-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--text-ghost);
  background-image: linear-gradient(100deg, var(--gold) 0%, var(--text) 45%, var(--text) 100%);
  background-repeat: no-repeat; background-size: 0% 100%;
  -webkit-background-clip: text; background-clip: text;
  transition: background-size 1.1s var(--ease);
  display: inline-block;
}
h2.section-title.is-visible { background-size: 100% 100%; }
@media (prefers-reduced-motion: reduce) { h2.section-title { background-size: 100% 100%; } }

.section-lead { color: #a0b0c6; max-width: 620px; font-size: 1.05rem; line-height: 1.8; }

.divider {
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--red));
  margin: 1.2rem 0 2rem;
  transition: width .8s var(--spring-soft) .15s;
}
.divider.is-visible { width: 52px; }
@media (prefers-reduced-motion: reduce) { .divider { width: 52px; } }

/* ── about ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }

.about-visual {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem 2rem;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  transition: transform .4s var(--spring-soft), box-shadow .4s;
}
.about-visual:hover { transform: translateY(-4px); }
.about-visual::before {
  content: '◈ Event Manifest';
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; color: var(--gold);
  display: block; margin-bottom: 1.1rem;
}
.terminal-line { font-family: var(--body); font-size: .92rem; color: var(--text-dim); margin: .35rem 0; display: flex; align-items: flex-start; gap: .6rem; }
.terminal-line .prompt { color: var(--gold); flex-shrink: 0; }
.terminal-line .val { color: var(--text); }
.terminal-line .key { color: var(--gold-bright); font-family: var(--display); font-weight: 600; letter-spacing: .04em; }
.terminal-cursor { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: blink 1.4s ease-in-out infinite; margin-left: .3rem; }

.about-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.tag {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  border: 1px solid var(--border); padding: .35rem .8rem; color: var(--gold);
  background: var(--surface); border-radius: 999px;
  transition: border-color .25s, transform .25s var(--spring);
}
.tag:hover { border-color: var(--hover); color: var(--hover); transform: translateY(-2px); }

/* ── program: iOS segmented control ── */
.day-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  position: relative;
  gap: 2px;
}
.day-tab {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .55rem 1.6rem;
  border: none;
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 9px;
  transition: color .35s var(--ease);
}
.day-tab.active { color: var(--gold); }
.day-tab:active { transform: scale(.97); }
.day-tabs-thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 5px);
  background: var(--surface);
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  transition: transform .4s var(--spring-soft);
  z-index: 1;
}

.schedule-block { display: none; }
.schedule-block.active { display: block; animation: fadeUpBlock .5s var(--ease); }
@keyframes fadeUpBlock { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.schedule-item {
  display: grid; grid-template-columns: 90px 1fr; gap: 1rem;
  padding: 1rem .5rem; border-bottom: 1px solid var(--border);
  align-items: start; border-radius: 10px;
  transition: background .25s var(--ease);
}
.schedule-item:hover { background: var(--surface); }
.schedule-time { font-family: var(--mono); font-size: .75rem; color: var(--text-dim); padding-top: .15rem; }
.schedule-event { font-family: var(--display); font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: .2rem; }
.schedule-detail { font-size: .88rem; color: var(--text-dim); }
.schedule-badge {
  display: inline-block; font-family: var(--mono); font-size: .6rem; letter-spacing: .1em;
  border: 1px solid; padding: .12rem .5rem; margin-right: .4rem; vertical-align: middle; border-radius: 999px;
}
.badge-ctf { border-color: var(--red); color: var(--red); }
.badge-tech { border-color: var(--gold); color: var(--gold); }
.badge-social { border-color: var(--gold-bright); color: var(--gold-bright); }
.badge-night { border-color: var(--purple); color: var(--purple); }

/* ── CTF ── */
.ctf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 2rem; }
.ctf-card {
  background: var(--surface); padding: 1.6rem; border-radius: 16px;
  border: 1px solid var(--border);
  transition: transform .35s var(--spring-soft), box-shadow .35s, border-color .35s;
  position: relative; overflow: hidden;
}
.ctf-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transition: transform .4s var(--spring-soft);
}
.ctf-card:hover::before { transform: scaleX(1); }
.ctf-card:hover { transform: translateY(-6px); border-color: var(--hover); box-shadow: var(--card-shadow); }
.ctf-card:active { transform: translateY(-2px) scale(.98); }
.ctf-icon { width: 34px; height: 34px; margin-bottom: .9rem; color: var(--gold); transition: transform .35s var(--spring); }
.ctf-card:hover .ctf-icon { transform: scale(1.15) rotate(-6deg); }
.ctf-name { font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .05em; color: var(--gold); margin-bottom: .4rem; }
.ctf-desc { font-size: .88rem; color: var(--text-dim); line-height: 1.6; }

/* ── training ── */
.training-banner {
  border: 1px solid var(--border); background: var(--surface);
  padding: 1.5rem 2rem; display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 2rem; border-radius: 16px;
}
.training-banner svg { width: 26px; height: 26px; color: var(--gold-bright); flex-shrink: 0; }
.training-banner p { font-size: .92rem; color: var(--text-dim); }
.training-banner strong { color: var(--gold-bright); }

.training-timeline { display: flex; flex-direction: column; position: relative; }
.training-timeline::before { content: ''; position: absolute; left: 16px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.tl-item { display: flex; gap: 1.5rem; align-items: flex-start; padding: .9rem 0; transition: transform .3s var(--spring-soft); }
.tl-item:hover { transform: translateX(6px); }
.tl-dot {
  width: 33px; height: 33px; flex-shrink: 0; border: 1px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--bg);
  font-family: var(--display); font-size: .7rem; font-weight: 700; color: var(--gold);
  position: relative; z-index: 1; transition: background .3s, color .3s, transform .3s var(--spring);
}
.tl-item:hover .tl-dot { background: var(--hover); color: var(--bg); transform: scale(1.12); }
.tl-content h4 { font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: .2rem; }
.tl-content p { font-size: .88rem; color: var(--text-dim); }

/* ── speakers / ambassadors ── */
.speakers-grid, .ambassadors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.3rem; margin-top: 2rem; }
.speaker-card, .ambassador-card {
  border: 1px solid var(--border); background: var(--surface); padding: 1.8rem 1rem;
  text-align: center; border-radius: 16px; position: relative; overflow: hidden;
  transition: transform .35s var(--spring-soft), box-shadow .35s, border-color .35s;
}
.speaker-card:hover, .ambassador-card:hover { border-color: var(--hover); transform: translateY(-5px); box-shadow: var(--card-shadow); }
.speaker-avatar, .ambassador-avatar {
  width: 60px; height: 60px; margin: 0 auto .9rem; border-radius: 50%;
  border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--gold); background: var(--surface-2); transition: border-color .3s, transform .35s var(--spring);
}
.speaker-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: .9rem;
  border: 1px solid rgba(210, 165, 73, .24);
  background: var(--surface-2);
}
.speaker-avatar svg, .ambassador-avatar svg { width: 24px; height: 24px; }
.speaker-card:hover .speaker-avatar, .ambassador-card:hover .ambassador-avatar { border-color: var(--hover); transform: scale(1.08); }
.speaker-name, .ambassador-name { font-family: var(--display); font-weight: 700; font-size: .95rem; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .35rem; }
.speaker-role, .ambassador-school { font-family: var(--mono); font-weight: 400; font-size: .68rem; letter-spacing: .18em; color: var(--text-dim); text-transform: uppercase; line-height: 1.5; }
.ambassador-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: .9rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.ambassador-card .ambassador-name { margin-bottom: .25rem; }
.ambassador-card .ambassador-school { margin-top: .2rem; color: var(--gold); }
.ambassador-email {
  display: inline-block;
  margin-top: .4rem;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  color: var(--text-dim);
  text-decoration: none;
  word-break: break-word;
}
.ambassador-email:hover { color: var(--gold); }
.ambassador-card.ambassador-apply { border-color: var(--gold); background: var(--surface-2); }
.ambassador-card.ambassador-apply .ambassador-avatar { border: 1px solid var(--gold); color: var(--gold); }
.ambassador-card.ambassador-apply .ambassador-name { color: var(--gold); }

/* ── partners ── */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-top: 2rem; }
.partner-slot {
  border: 1px dashed var(--border); background: var(--surface); height: 90px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim);
  transition: border-color .3s, color .3s, transform .3s var(--spring-soft), box-shadow .3s;
}
.partner-slot:hover { border-color: var(--hover); color: var(--hover); transform: translateY(-3px); box-shadow: var(--card-shadow); }
.partners-cta { margin-top: 2rem; }

/* ── networking ── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.feature-card {
  border: 1px solid var(--border); padding: 1.6rem; background: var(--surface); border-radius: 16px;
  position: relative; overflow: hidden; transition: transform .35s var(--spring-soft), box-shadow .35s, border-color .35s;
}
.feature-card:hover { border-color: var(--hover); transform: translateY(-4px); box-shadow: var(--card-shadow); }
.feature-card::after {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 0; background: var(--gold);
  transition: height .4s var(--spring-soft); border-radius: 0 3px 3px 0;
}
.feature-card:hover::after { height: 100%; }
.feature-icon { width: 26px; height: 26px; color: var(--gold); margin-bottom: .9rem; }
.feature-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--text); margin-bottom: .5rem; }
.feature-desc { font-size: .9rem; color: var(--text-dim); line-height: 1.65; }

/* ── venue ── */
.venue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.venue-map {
  border: 1px solid var(--border); overflow: hidden; height: 300px; background: var(--surface);
  border-radius: 16px; box-shadow: var(--card-shadow); transition: box-shadow .4s;
  position: relative;
}
.venue-map:hover { box-shadow: 0 20px 50px -16px var(--shadow); }
.venue-map iframe { width: 100%; height: 100%; border: 0; }
.venue-map::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: transparent;
  opacity: 0;
  transition: opacity .5s var(--ease), background .5s var(--ease);
}
[data-theme="dark"] .venue-map::after {
  background: #0a1220;
  mix-blend-mode: multiply;
  opacity: .45;
}
.venue-info h3 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--text); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .03em; }
.venue-detail { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: .8rem; }
.venue-detail svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; margin-top: .15rem; }
.venue-detail p { font-size: .9rem; color: var(--text-dim); }
.venue-detail strong { color: var(--text); }

/* ── FAQ — spring accordion ── */
.faq-list { display: flex; flex-direction: column; margin-top: 2rem; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.15rem 0; font-family: var(--display); font-weight: 600; font-size: 1rem;
  color: var(--text); text-align: left; gap: 1rem; transition: color .25s;
}
.faq-q:hover { color: var(--hover); }
.faq-icon {
  flex-shrink: 0; width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--gold);
  transition: transform .45s var(--spring-soft), border-color .3s;
}
.faq-item.open .faq-icon { transform: rotate(135deg); border-color: var(--gold); }
.faq-a {
  max-height: 0; overflow: hidden; font-size: .92rem; color: var(--text-dim); line-height: 1.7;
  transition: max-height .45s var(--spring-soft), padding .3s;
}
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 1.15rem; }

/* ── contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-links { display: flex; flex-direction: column; gap: .7rem; }
.contact-link { display: flex; align-items: center; gap: .8rem; font-size: .9rem; color: var(--text-dim); transition: color .25s, transform .25s var(--spring-soft); }
.contact-link:hover { color: var(--hover); transform: translateX(4px); }
.contact-link svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--gold); }
.social-row { display: flex; gap: .7rem; margin-top: 1.2rem; }
.social-btn {
  font-family: var(--mono); font-size: .65rem; letter-spacing: .1em; border: 1px solid var(--border);
  padding: .5rem 1rem; color: var(--text-dim); border-radius: 999px; display: flex; align-items: center; gap: .4rem;
  transition: border-color .25s, color .25s, transform .25s var(--spring-soft);
}
.social-btn:hover { border-color: var(--hover); color: var(--hover); transform: translateY(-2px); }

.register-box {
  border: 1px solid var(--gold); padding: 2.2rem; background: var(--surface); text-align: center;
  border-radius: 20px; position: relative; overflow: hidden; box-shadow: var(--card-shadow);
}
.register-box::before {
  content: ''; position: absolute; inset: -40%;
  background: radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 60%);
  animation: pulseGlow 6s ease-in-out infinite; pointer-events: none;
}
.register-box h3 { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--text); margin-bottom: .5rem; text-transform: uppercase; position: relative; }
.register-box p { font-size: .9rem; color: var(--text-dim); margin-bottom: 1.5rem; position: relative; }
.register-box .note { font-family: var(--mono); font-size: .65rem; color: var(--text-dim); margin-top: .8rem; position: relative; }

/* ── buttons ── */
.btn-primary, .btn-outline {
  font-family: var(--display); font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .85rem 2.1rem; cursor: pointer; border-radius: 999px; display: inline-flex; align-items: center; gap: .5rem;
  transition: transform .3s var(--spring), box-shadow .3s, background .25s, color .25s;
}
.btn-primary { background: var(--gold); color: #1a1207; border: 1px solid var(--gold); box-shadow: 0 6px 22px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -6px var(--accent-glow); }
.btn-primary:active { transform: translateY(0) scale(.96); }
.btn-outline { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn-outline:hover { background: var(--accent-glow); transform: translateY(-2px); }
.btn-outline:active { transform: translateY(0) scale(.96); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed; right: clamp(1rem, 3vw, 2.2rem); bottom: clamp(1rem, 3vw, 2.2rem); z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--gold);
  background: var(--blur-bg-strong); backdrop-filter: blur(10px); color: var(--gold);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(16px) scale(.85); pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--spring), border-color .25s, box-shadow .25s;
  box-shadow: var(--card-shadow);
}
.back-to-top.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { border-color: var(--red); color: var(--red); }
.back-to-top:active { transform: scale(.9); }
.back-to-top svg { width: 18px; height: 18px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border); padding: 2.6rem clamp(1rem, 4vw, 3rem);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.4rem;
  background: var(--bg2); position: relative; z-index: 1;
}
.site-footer .footer-copy { font-family: var(--mono); font-size: .65rem; color: var(--text-dim); }

.footer-brand { display: flex; align-items: center; justify-content: center; gap: 1.6rem; flex-wrap: wrap; }
.footer-logo-img { height: 68px; width: auto; object-fit: contain; }
.footer-brand-divider { width: 1px; height: 46px; background: var(--border); flex-shrink: 0; }
.footer-cs-logo { height: 40px; width: auto; object-fit: contain; }
.footer-cs-logo-dark { display: none; }
[data-theme="dark"] .footer-cs-logo-light { display: none; }
[data-theme="dark"] .footer-cs-logo-dark { display: block; }
@media (max-width: 480px) {
  .footer-logo-img { height: 50px; }
  .footer-cs-logo { height: 30px; }
}

/* ============================================================
   INTERACTIVE EXTRAS — theme wipe, cursor glow, toast, tilt
   ============================================================ */

/* circular reveal when the theme switch fires */
.theme-wipe {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
}

/* ambient cursor glow — subtle radar presence, desktop only */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 340px; height: 340px;
  margin-left: -170px; margin-top: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 72%);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity .5s var(--ease);
  will-change: transform;
}

/* toast */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--blur-bg-strong);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .03em;
  padding: .75rem 1.3rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--spring-soft);
  z-index: 400;
  box-shadow: var(--card-shadow);
  display: flex; align-items: center; gap: .5rem;
  max-width: calc(100vw - 2.5rem);
}
.toast::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* nav-shell stays fixed and visible at all times (no auto-hide) */

/* terminal lines type in, staggered, once the panel reveals */
.about-visual .terminal-line {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: var(--line-delay, 0ms);
}
.about-visual.is-visible .terminal-line { opacity: 1; transform: translateX(0); }

.ctf-card, .feature-card, .about-visual,
.btn-primary, .btn-outline, .social-btn, .back-to-top {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow { display: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about-grid, .venue-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  nav { gap: .8rem; padding: .5rem .5rem .5rem 1.1rem; }
  .page-section { padding: 3rem 0; }
  .hero-glow { display: none; }
  .hero-wrapper { padding: 6.5rem 1.2rem 8rem; }
  .hero-waves { height: 110px; }
  .hero-skyline { bottom: 10px; left: 1%; width: min(220px, 55vw); }
  .scroll-cue { display: none; }
  .countdown { gap: .6rem; }
  .countdown-sep { font-size: 1.4rem; }
  .schedule-item { grid-template-columns: 1fr; gap: .2rem; padding: .8rem .3rem; }
  .schedule-time { font-weight: 600; color: var(--gold); }
  .training-banner { flex-direction: column; padding: 1.2rem; }
  .register-box { padding: 1.6rem; }
  .back-to-top { width: 42px; height: 42px; }
}

@media (max-width: 480px) {
  .countdown-face { width: 2.3rem; height: 2.6rem; }
  .countdown-num { font-size: 1.3rem; }
  .countdown-label { font-size: .5rem; }
  h1.hero-title { font-size: 2.2rem; }
  .hero-eyebrow { font-size: .6rem; letter-spacing: .2em; }
}

/* ============================================================
   PRELOADER — compass needle settles on load
   ============================================================ */
.preloader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.preloader-compass { width: 76px; height: 76px; }
.preloader-needle {
  transform-origin: 50px 50px;
  animation: needleSettle 1.1s cubic-bezier(.22,1.6,.36,1) forwards;
}
@keyframes needleSettle {
  0%   { transform: rotate(0deg); }
  55%  { transform: rotate(400deg); }
  75%  { transform: rotate(330deg); }
  100% { transform: rotate(360deg); }
}
.preloader-label {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .35em; text-transform: uppercase;
  color: var(--gold); opacity: .85;
}
.preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .preloader-needle { animation: none; transform: rotate(360deg); }
  .preloader { transition: opacity .2s; }
}

/* ============================================================
   HERO PARALLAX LAYERS (driven by JS via CSS vars)
   ============================================================ */
.hero-rose-wrap[data-parallax],
.hero-glow-wrap[data-parallax] {
  transform: translate(-50%, -50%) translate3d(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px), 0);
  transition: transform .25s ease-out;
}
.hero-skyline[data-parallax] {
  transform: translate3d(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px), 0);
  transition: transform .25s ease-out;
}

/* ============================================================
   HERO STATS BAR
   ============================================================ */
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(.9rem, 3vw, 1.8rem);
  margin: 0 0 1.8rem;
  flex-wrap: wrap;
}
.stat-item { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.stat-num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  color: var(--gold);
  line-height: 1;
}
.stat-suffix { font-family: var(--display); font-weight: 700; color: var(--gold); font-size: clamp(1rem, 2.6vw, 1.3rem); margin-left: 1px; }
.stat-item .stat-suffix { margin-top: -.05em; }
.stat-label {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim);
}
.stat-divider { width: 1px; height: 30px; background: var(--border); flex-shrink: 0; }
@media (max-width: 560px) {
  .stat-divider:nth-of-type(2n) { display: none; }
}

/* ============================================================
   SIDE COMPASS NAV — fixed section dots (desktop only)
   ============================================================ */
.side-nav {
  position: fixed;
  right: 22px; top: 50%; transform: translateY(-50%);
  z-index: 150;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  padding: 14px 7px;
  border-radius: 999px;
  background: var(--blur-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
}
.side-nav button {
  width: 22px; height: 22px;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.side-nav button span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-ghost);
  border: 1px solid var(--border);
  transition: background .3s, transform .3s var(--spring), box-shadow .3s;
}
.side-nav button::before {
  content: attr(aria-label);
  position: absolute; right: 26px; top: 50%; transform: translateY(-50%) translateX(4px);
  font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text); background: var(--blur-bg-strong); border: 1px solid var(--border);
  padding: .3rem .6rem; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.side-nav button:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }
.side-nav button:hover span { transform: scale(1.3); }
.side-nav button.active span {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--accent-glow);
  transform: scale(1.25);
}
@media (max-width: 900px) { .side-nav { display: none; } }

/* ============================================================
   PARTNERS MARQUEE — infinite drift, pauses on hover
   ============================================================ */
.partners-marquee {
  margin-top: 2rem;
  overflow: hidden;
  display: flex;
  gap: 1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.partners-track {
  display: flex; gap: 1rem; width: max-content;
  animation: marqueeDrift 26s linear infinite;
}
.partners-marquee:hover .partners-track { animation-play-state: paused; }
@keyframes marqueeDrift { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.partners-marquee .partner-slot {
  border: 1px dashed var(--border); background: var(--surface);
  width: 160px; height: 90px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim);
  transition: border-color .3s, color .3s;
}
.partners-marquee .partner-slot:hover { border-color: var(--hover); color: var(--hover); }
@media (prefers-reduced-motion: reduce) {
  .partners-track { animation: none; }
  .partners-track:nth-of-type(2) { display: none; }
  .partners-marquee { overflow-x: auto; }
}

/* ============================================================
   CTF FLIP CARDS
   ============================================================ */
.ctf-hint {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; color: var(--text-dim);
  margin-top: -.8rem; margin-bottom: 1rem; text-transform: uppercase;
}
.ctf-grid .ctf-card { background: none; border: none; padding: 0; perspective: 1200px; overflow: visible; }
.ctf-grid .ctf-card::before { display: none; }
.ctf-card-inner {
  position: relative; width: 100%; min-height: 220px;
  transform-style: preserve-3d;
  transition: transform .6s var(--spring-soft);
}
.ctf-card:hover .ctf-card-inner,
.ctf-card:focus-within .ctf-card-inner { transform: rotateY(180deg); }
.ctf-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface);
  padding: 1.6rem;
  box-shadow: var(--card-shadow);
}
.ctf-face-front { display: flex; flex-direction: column; }
.ctf-face-back {
  transform: rotateY(180deg);
  display: flex; flex-direction: column; justify-content: center;
  border-color: var(--hover);
  background: linear-gradient(135deg, rgba(54, 121, 172, .18), rgba(54, 121, 172, .04) 65%), var(--surface-2);
  transition: background .3s, border-color .3s;
}
.ctf-card:hover .ctf-face-back {
  background: linear-gradient(135deg, rgba(54, 121, 172, .28), rgba(54, 121, 172, .06) 70%), var(--surface-2);
}
.ctf-back-label {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  margin-bottom: .9rem;
}
.ctf-back-range {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .04em; color: var(--text-dim);
  margin-bottom: 1rem;
}
.ctf-back-bar {
  flex: 1; height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; position: relative;
}
.ctf-back-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--red)); border-radius: 4px; }
.ctf-back-note { font-size: .86rem; color: var(--text); line-height: 1.6; }
@media (hover: none) {
  .ctf-card:active .ctf-card-inner { transform: rotateY(180deg); }
}

/* ============================================================
   TRAINING TIMELINE — scroll fill
   ============================================================ */
.training-timeline { position: relative; }
.training-timeline-fill {
  position: absolute; left: 16px; top: 0; width: 1px; height: 0;
  background: linear-gradient(to bottom, var(--gold), var(--red));
  box-shadow: 0 0 8px var(--accent-glow);
  transition: height .15s linear;
  z-index: 0;
}

/* ============================================================
   CHAT ASSISTANT — Touhemi (liquid glass)
   ============================================================ */
.chat-widget {
  position: fixed;
  left: clamp(1rem, 3vw, 2.2rem);
  bottom: clamp(1rem, 3vw, 2.2rem);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.chat-fab {
  position: relative;
  width: 118px; height: 118px;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  animation: chatFloat 3.4s ease-in-out infinite;
  transition: transform .3s var(--spring-soft);
}
.chat-fab:hover { transform: scale(1.05); }
.chat-fab-icon {
  width: 94%; height: 94%; object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .4));
}
@keyframes chatFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.chat-fab-bubble {
  position: absolute;
  left: calc(100% - 8px);
  top: 8%;
  white-space: nowrap;
  font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .04em;
  color: var(--text);
  background: var(--blur-bg-strong);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .55rem 1.05rem;
  box-shadow: var(--card-shadow);
  animation: chatBubbleIn .5s var(--spring-soft) 1.2s backwards, chatBubbleFloat 3.4s ease-in-out 1.2s infinite;
  pointer-events: none;
}
.chat-fab-bubble::before {
  content: '';
  position: absolute; left: -5px; top: 55%; transform: translateY(-50%);
  width: 9px; height: 9px;
  background: inherit;
  border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}
@keyframes chatBubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes chatBubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.chat-widget.chat-open .chat-fab-bubble { display: none; }

/* Conversation window — "liquid glass" panel */
.chat-window {
  position: absolute;
  left: 0;
  bottom: calc(100% + 16px);
  width: min(360px, 88vw);
  height: min(480px, 70vh);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .22);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .02) 40%),
    var(--blur-bg-strong);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(.92);
  transform-origin: bottom left;
  pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--spring-soft);
}
.chat-widget.chat-open .chat-window {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}

.chat-header {
  display: flex; align-items: center; gap: .7rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(90deg, rgba(255, 255, 255, .06), transparent);
  flex-shrink: 0;
}
.chat-avatar {
  width: 34px; height: 34px; object-fit: contain;
  border-radius: 50%;
  background: var(--surface-2);
  padding: 3px;
  border: 1px solid var(--border);
}
.chat-header-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.chat-name { font-family: var(--display); font-weight: 700; font-size: .95rem; color: var(--text); }
.chat-status {
  display: flex; align-items: center; gap: .35rem;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; color: var(--text-dim);
  text-transform: uppercase;
}
.chat-status i {
  width: 6px; height: 6px; border-radius: 50%; background: #5fd97a;
  box-shadow: 0 0 6px #5fd97a;
}
.chat-close {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
.chat-close:hover { background: rgba(255, 255, 255, .1); color: var(--hover); }
.chat-close svg { width: 16px; height: 16px; }

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 1rem;
  display: flex; flex-direction: column; gap: .7rem;
}
.chat-msg { display: flex; }
.chat-msg p {
  margin: 0; padding: .65rem .9rem; border-radius: 16px;
  font-size: .85rem; line-height: 1.55; max-width: 84%;
}
.chat-msg-bot { justify-content: flex-start; }
.chat-msg-bot p {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-msg-user { justify-content: flex-end; }
.chat-msg-user p {
  background: var(--gold);
  color: #1a1207;
  border-bottom-right-radius: 4px;
}
.chat-msg-typing p {
  display: flex; align-items: center; gap: 4px;
  padding: .8rem 1rem;
}
.chat-msg-typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim);
  animation: chatTyping 1s ease-in-out infinite;
}
.chat-msg-typing i:nth-child(2) { animation-delay: .15s; }
.chat-msg-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatTyping {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-input-row {
  display: flex; align-items: center; gap: .5rem;
  padding: .8rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .03);
  flex-shrink: 0;
}
.chat-input-row input {
  flex: 1; min-width: 0;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: .6rem 1rem;
  font-family: var(--body); font-size: .85rem; color: var(--text);
  outline: none;
  transition: border-color .2s, background .2s;
}
.chat-input-row input:focus { border-color: var(--hover); background: rgba(255, 255, 255, .1); }
.chat-input-row input::placeholder { color: var(--text-dim); }
.chat-send {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  border: none; background: var(--gold); color: #1a1207; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, background .2s;
}
.chat-send:hover { transform: scale(1.08); }
.chat-send:active { transform: scale(.92); }
.chat-send svg { width: 16px; height: 16px; }

@media (max-width: 480px) {
  .chat-window { width: 92vw; height: 72vh; }
  .chat-fab-bubble { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-fab { animation: none; }
  .chat-fab-bubble { animation: none; }
}