.mobile-nav {
  position: sticky;
  top: 56px;
  z-index: 40;
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms cubic-bezier(.4, .0, .2, 1), border-color 300ms;
  border-bottom: 0px solid var(--border);
  background: color-mix(in oklab, var(--bg-elev) 85%, transparent);
  backdrop-filter: blur(8px) saturate(140%);
}

.mobile-nav.open {
  max-height: 280px;
  border-bottom-width: 1px;
}

.mobile-nav-inner {
  display: grid;
  gap: 10px;
  padding: 12px 12px 16px;
}

.mobile-link {
  display: block;
  padding: 10px 8px;
  text-decoration: none;
  color: var(--text);
  border-radius: 8px;
}

.mobile-link:hover { background: var(--card); }

/* Mobile actions row (appearance toggle) */
.mobile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.mobile-actions-label { font-size: 0.95rem; }
:root {
  --bg: #0b0b0c;
  --bg-elev: #121214;
  --text: #e8e8ea;
  --muted: #a1a1a8;
  --brand: #7aa2ff;
  --brand-2: #9e77ff;
  --card: #151518;
  --border: #232327;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Light theme tokens */
html.light {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --text: #0c0c14;
  --muted: #4d4d56;
  --brand: #335cff;
  --brand-2: #7b4dff;
  --card: #ffffff;
  --border: #e7e7ef;
  --shadow: 0 12px 28px rgba(10, 20, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.container {
  max-width: 1100px;
  padding: 0 20px;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: color-mix(in oklab, var(--bg-elev) 75%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 8px;
}

.brand {
  font-weight: 700;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
}

.site-nav {
  display: none;
  gap: 20px;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.9;
}

.site-nav a:hover {
  color: var(--brand);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.theme-toggle .sun { display: none; }
html.light .theme-toggle .sun { display: inline; }
html.light .theme-toggle .moon { display: none; }

/* Hide header theme toggle on mobile; show on desktop */
.header-toggle { display: none; }
@media (min-width: 860px) {
  .header-toggle { display: inline-flex; }
}

/* Mobile hamburger */
.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  cursor: pointer;
}

.menu-toggle .bar {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.section {
  padding: 64px 0;
}

.hero {
  position: relative;
  padding: 96px 0 72px;
}

.hero-bg {
  position: fixed;
  inset: -20vh -10vw -20vh -10vw; /* extend beyond viewport to avoid cutoff */
  background:
    radial-gradient(1200px 600px at 75% 10%, rgba(122, 162, 255, 0.10), transparent 60%),
    radial-gradient(1000px 520px at 15% 5%, rgba(158, 119, 255, 0.08), transparent 60%);
  filter: blur(0.2px);
  z-index: 0; /* behind content, above body background */
  pointer-events: none;
}

header, main, footer { position: relative; z-index: 1; }

.hero-content h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.05;
  margin: 0 0 8px;
}

.subtitle {
  margin: 0;
  font-weight: 500;
}

.muted {
  color: var(--muted);
}

.small { font-size: 0.9rem; }

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3.6vw, 34px);
}

.grid.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 860px) {
  .site-nav { display: inline-flex; }
  .grid.two-col { grid-template-columns: 0.8fr 1.2fr; }
}

@media (min-width: 860px) {
  .menu-toggle { display: none; }
}

.flow > * + * { margin-top: 14px; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card {
  background: linear-gradient(180deg, color-mix(in oklab, var(--card) 92%, transparent), var(--card));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.meta {
  font-size: 0.95rem;
  color: var(--muted);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: start;
  gap: 12px;
}

.time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.awards-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.awards-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 12px;
}

.award-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
}

.video-wrap .responsive-iframe {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
}

.footer-inner p { margin: 0; }

.back-to-top {
  color: var(--brand);
  text-decoration: none;
}

/* Improve footer readability and spacing on small screens */
.site-footer { font-size: clamp(0.875rem, 2.8vw, 1rem); }

@media (max-width: 520px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 16px 0;
  }
}

/* Respect device safe areas to avoid content hugging edges on mobiles */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
}

/* Animations */
.reveal-up { opacity: 0; transform: translateY(12px); }
.reveal-up.is-visible {
  animation: revealUp 700ms cubic-bezier(.2,.65,.25,1) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal-up { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}


