:root {
  --bg: #090c10;
  --bg-elev: #10161f;
  --surface: #161d28;
  --surface-2: #1c2533;
  --ink: #f4efe6;
  --muted: #a7b0bd;
  --soft: #7d8796;
  --gold: #c9a86a;
  --gold-2: #e8d3a2;
  --line: rgba(201, 168, 106, 0.16);
  --line-strong: rgba(201, 168, 106, 0.32);
  --ok: #8aa67f;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --max: 1180px;
  --nav-h: 76px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Outfit", system-ui, sans-serif;
  --ease-premium: cubic-bezier(0.16, 0.84, 0.44, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--gold) var(--bg);
  scrollbar-width: thin;
}

::selection { background: rgba(201, 168, 106, 0.32); color: var(--ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold), #8a6d3d);
  border: 2px solid var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 88% -10%, rgba(201, 168, 106, 0.12), transparent 55%),
    radial-gradient(700px 420px at -10% 20%, rgba(90, 120, 150, 0.08), transparent 50%),
    var(--bg);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--gold);
  color: #111;
  font-weight: 600;
}

.skip:focus { top: 12px; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  z-index: 70;
  pointer-events: none;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  backdrop-filter: blur(16px) saturate(1.15);
  background: rgba(9, 12, 16, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.monogram {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--gold-2);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong { font-size: 15px; letter-spacing: 0.04em; }
.brand-text span { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  display: inline-block;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-premium);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active { color: var(--gold-2); }

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  width: 42px;
  height: 42px;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  margin: 0 auto;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.hero {
  position: relative;
  padding: 88px 0 72px;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: min(46vw, 560px);
  height: min(46vw, 560px);
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

.hero::before {
  background: radial-gradient(circle, rgba(201, 168, 106, 0.32), transparent 70%);
  top: -18%;
  right: -12%;
  animation: auroraDrift1 20s ease-in-out infinite alternate;
}

.hero::after {
  background: radial-gradient(circle, rgba(110, 140, 168, 0.22), transparent 70%);
  bottom: -22%;
  left: -14%;
  animation: auroraDrift2 24s ease-in-out infinite alternate;
}

@keyframes auroraDrift1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-24px, 30px) scale(1.06); }
}

@keyframes auroraDrift2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(28px, -24px) scale(1.05); }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 56px;
  align-items: center;
}

.portrait {
  position: relative;
  width: min(320px, 72vw);
  aspect-ratio: 1;
  margin-inline: auto;
  padding: 16px;
  box-sizing: border-box;
}

.portrait-ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold), var(--gold-2), var(--gold), var(--gold-2), var(--gold));
  -webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #fff calc(100% - 1.5px));
  mask-image: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #fff calc(100% - 1.5px));
  filter: drop-shadow(0 0 8px rgba(201, 168, 106, 0.3));
  animation: haloSpin 16s linear infinite;
  pointer-events: none;
}

@keyframes haloSpin {
  to { transform: rotate(360deg); }
}

.portrait-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 12px rgba(201, 168, 106, 0.06), var(--shadow);
  background:
    radial-gradient(circle at 30% 25%, rgba(201, 168, 106, 0.16), transparent 42%),
    var(--surface);
  clip-path: circle(50% at 50% 50%);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.portrait-hint {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  text-align: center;
  padding: 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.portrait.is-empty .portrait-hint { display: grid; }
.portrait.is-empty img { display: none; }

.portrait-hint code {
  display: block;
  margin-top: 8px;
  color: var(--gold-2);
  font-size: 12px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero h1 {
  font-size: clamp(44px, 6.4vw, 76px);
  font-weight: 560;
  margin: 0 0 14px;
  background: linear-gradient(100deg, var(--ink) 10%, var(--gold-2) 55%, var(--gold) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.roles {
  color: var(--gold-2);
  font-size: clamp(15px, 1.6vw, 18px);
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.7;
}

.credentials {
  margin: 22px 0 28px;
  color: var(--soft);
  font-size: 14px;
}

.cta-row,
.product-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cta-row { margin-bottom: 18px; }

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #16120a;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.btn::after {
  content: "\2192";
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.3s var(--ease-premium);
}

.btn:hover {
  transform: translateY(-1px);
  background: var(--gold-2);
  box-shadow: 0 12px 28px rgba(201, 168, 106, 0.24);
}

.btn:hover::before { left: 120%; }
.btn:hover::after { transform: translateX(4px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn.ghost:hover { border-color: var(--gold); color: var(--gold-2); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28); }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.chip:hover { color: var(--gold-2); border-color: var(--line-strong); }

.page-guide {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}

.page-guide li { counter-increment: guide; }

.page-guide a {
  display: block;
  height: 100%;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--line);
  background: rgba(22, 29, 40, 0.7);
}

.page-guide a::before {
  content: "0" counter(guide);
  display: block;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.page-guide strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 560;
  margin-bottom: 6px;
}

.page-guide span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.page-guide a:hover,
.page-guide a:focus-visible { border-color: var(--line-strong); }

.hero-track {
  padding-bottom: 48px;
}

.hero-track .lead { max-width: 68ch; }

.hero-track-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.75fr);
  gap: 36px 48px;
  align-items: start;
}

.hero-art {
  justify-self: end;
  width: min(100%, 380px);
  height: auto;
  margin: 0;
  padding-top: 2px;
}

.hero-art svg {
  width: 100%;
  height: auto;
  aspect-ratio: 220 / 150;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 56px 0 8px;
  padding: 0;
  list-style: none;
}

.track-card {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  height: 100%;
  padding: 28px 26px 32px;
  border: 1px solid var(--line-strong);
  background: rgba(22, 29, 40, 0.78);
  box-shadow: var(--shadow);
}

.track-art {
  display: grid;
  place-items: center;
  height: 176px;
  margin: 0 0 18px;
  color: var(--gold-2);
}

.track-art svg {
  width: min(100%, 240px);
  height: 150px;
}

.hero-art.track-art {
  height: auto;
}

.hero-art.track-art svg {
  width: 100%;
  height: auto;
  max-width: none;
}

.track-art svg :is(path, rect, circle, ellipse, line) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.track-art svg.is-traced :is(path, rect, circle, ellipse, line):not(.robot-eye) {
  stroke-dashoffset: 0;
  animation: none;
}

.track-art svg.is-traced .robot-eye {
  stroke-dashoffset: 0;
}

.track-art svg.is-tracing :is(path, rect, circle, ellipse, line) {
  stroke-dashoffset: 1;
  animation: pencilTrace 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: var(--draw-delay, 0ms);
}

@keyframes pencilTrace {
  to { stroke-dashoffset: 0; }
}

.robot-eye {
  transform-box: fill-box;
  transform-origin: center;
}

.track-art svg .robot-eye.is-blinking {
  animation: robotBlink 0.18s ease-in-out;
}

@keyframes robotBlink {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.08); }
}

.track-num {
  display: block;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
}

.track-card strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 560;
  margin-bottom: 10px;
}

.track-card > span:last-child {
  display: block;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.track-card:hover,
.track-card:focus-visible {
  border-color: var(--gold);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.stat {
  padding: 22px 20px;
  background: rgba(22, 29, 40, 0.7);
  border: 1px solid var(--line);
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 40px);
  color: var(--gold-2);
  line-height: 1;
  margin-bottom: 8px;
}

.stat span { color: var(--muted); font-size: 13px; }

section {
  position: relative;
  padding: 84px 0;
  border-top: 1px solid var(--line);
}

.reveal {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.7s var(--ease-premium), translate 0.7s var(--ease-premium);
}

.reveal.in-view {
  opacity: 1;
  translate: 0 0;
}

.card.reveal,
.feature.reveal,
.job.reveal,
.stat.reveal,
.panel.reveal,
.card.is-motion,
.feature.is-motion,
.job.is-motion,
.stat.is-motion,
.panel.is-motion {
  translate: none;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  margin-bottom: 10px;
}

.section-kicker::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-title {
  font-size: clamp(32px, 4.4vw, 52px);
  max-width: 16ch;
}

.section-intro {
  max-width: 68ch;
  color: var(--muted);
  margin: 14px 0 36px;
}

.section-intro a {
  color: var(--gold-2);
  border-bottom: 1px solid var(--line-strong);
}

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
  box-shadow: var(--shadow);
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.list li { margin: 0.55rem 0; }

.bring-grid,
.skill-grid,
.project-grid,
.proto-grid,
.edu-grid,
.community-grid {
  display: grid;
  gap: 16px;
}

.bring-grid,
.skill-grid,
.edu-grid,
.community-grid { grid-template-columns: repeat(2, 1fr); }

.project-grid { grid-template-columns: repeat(2, 1fr); }
.proto-grid { grid-template-columns: repeat(3, 1fr); }

.card {
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  padding: 24px;
  height: 100%;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.card h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.meta, .sub {
  color: var(--soft);
  font-size: 13px;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  color: var(--gold-2);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.label.dev { color: #d4c08a; }
.label.plan { color: #b8c0cc; }

.feature {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(201, 168, 106, 0.08), transparent 42%),
    var(--surface);
  border: 1px solid var(--line-strong);
  margin-bottom: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.timeline {
  display: grid;
  gap: 18px;
}

.job {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 26px;
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.job h3 { font-size: 26px; }
.when { color: var(--gold); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

.card,
.feature,
.job,
.stat,
.panel,
.page-guide a {
  position: relative;
  transform-origin: center center;
  transition: transform 0.35s ease, border-color 0.2s ease, box-shadow 0.2s ease,
    opacity 0.7s var(--ease-premium), translate 0.7s var(--ease-premium);
}

.card::before,
.feature::before,
.job::before,
.stat::before,
.panel::before,
.page-guide a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-premium);
  pointer-events: none;
}

.card:hover::before,
.feature:hover::before,
.job:hover::before,
.stat:hover::before,
.panel:hover::before,
.page-guide a:hover::after,
.card:focus-within::before,
.feature:focus-within::before,
.job:focus-within::before,
.panel:focus-within::before,
.page-guide a:focus-visible::after { transform: scaleX(1); }

.card.is-motion,
.feature.is-motion,
.job.is-motion,
.stat.is-motion,
.panel.is-motion,
.page-guide a.is-motion {
  will-change: transform;
}

.card.is-tracking,
.feature.is-tracking,
.job.is-tracking,
.stat.is-tracking,
.panel.is-tracking,
.page-guide a.is-tracking {
  transition: transform 80ms ease-out, border-color 0.2s ease, box-shadow 0.2s ease;
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  z-index: 1;
}

.card:hover,
.feature:hover,
.job:hover,
.stat:hover,
.panel:hover,
.page-guide a:hover,
.card:focus-within,
.feature:focus-within,
.job:focus-within,
.panel:focus-within,
.page-guide a:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

@media (hover: hover) {
  .card:hover,
  .feature:hover,
  .job:hover,
  .stat:hover,
  .panel:hover,
  .page-guide a:hover {
    transform: perspective(900px) translate3d(0, -6px, 0);
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chips span {
  border: 1px solid var(--line);
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
}

.contact-box {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--soft);
  font-size: 14px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--gold-2);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  border-bottom: 1px solid var(--line-strong);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a.back-to-top {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
  border-bottom: none;
}

.site-footer a.back-to-top:hover,
.site-footer a.back-to-top:focus-visible {
  color: var(--gold-2);
  border-bottom: 1px solid var(--line-strong);
}

@media (max-width: 980px) {
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-grid,
  .stats,
  .split,
  .feature,
  .job,
  .project-grid,
  .bring-grid,
  .skill-grid,
  .edu-grid,
  .community-grid,
  .contact-box { grid-template-columns: 1fr; }

  .page-guide,
  .track-grid { grid-template-columns: 1fr; }
  .track-card { min-height: 360px; }
  .proto-grid { grid-template-columns: 1fr 1fr; }
  .hero-track-grid { grid-template-columns: 1fr; }

  .hero-art {
    order: -1;
    justify-self: end;
    width: min(240px, 52vw);
  }

  .hero-copy {
    order: 1;
    align-self: stretch;
    width: 100%;
  }
  .portrait {
    order: 0;
    align-self: center;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--nav-h);
    background: rgba(9, 12, 16, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px;
    flex-direction: column;
  }

  .nav-links.open { display: flex; }

  .hero { padding-top: 56px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .proto-grid,
  .page-guide,
  .track-grid,
  .stats { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,
  .card,
  .feature,
  .job,
  .stat,
  .panel,
  .page-guide a { transition: none; }

  .hero::before,
  .hero::after,
  .portrait-ring { animation: none; }

  .track-art svg :is(path, rect, circle, ellipse, line),
  .robot-eye.is-blinking {
    stroke-dashoffset: 0;
    animation: none;
  }

  .reveal {
    opacity: 1;
    translate: 0 0;
    transition: none;
  }
}

/* Light theme */
:root[data-theme="light"] {
  --bg: #f6f2ea;
  --bg-elev: #fbf9f5;
  --surface: #ffffff;
  --surface-2: #efe9de;
  --ink: #1a1d23;
  --muted: #4a5260;
  --soft: #5b6371;
  --gold: #7d5f27;
  --gold-2: #654b1c;
  --line: rgba(125, 95, 39, 0.22);
  --line-strong: rgba(125, 95, 39, 0.45);
  --ok: #4a6541;
  --shadow: 0 24px 60px rgba(60, 45, 20, 0.12);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(900px 480px at 88% -10%, rgba(201, 168, 106, 0.18), transparent 55%),
    radial-gradient(700px 420px at -10% 20%, rgba(90, 120, 150, 0.08), transparent 50%),
    var(--bg);
}

:root[data-theme="light"] body::before { opacity: 0.02; }
:root[data-theme="light"] ::selection { background: rgba(125, 95, 39, 0.22); }
:root[data-theme="light"] .site-header { background: rgba(246, 242, 234, 0.85); }
:root[data-theme="light"] .page-guide a,
:root[data-theme="light"] .stat { background: rgba(255, 255, 255, 0.75); }
:root[data-theme="light"] .track-card { background: rgba(255, 255, 255, 0.85); }
:root[data-theme="light"] .btn { color: #ffffff; }
:root[data-theme="light"] .btn.ghost { color: var(--ink); }
:root[data-theme="light"] .btn.ghost:hover { color: var(--gold-2); box-shadow: 0 12px 28px rgba(60, 45, 20, 0.12); }
:root[data-theme="light"] .label.dev { color: #715716; }
:root[data-theme="light"] .label.plan { color: #515c6a; }

.theme-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--gold-2);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav > nav { margin-left: auto; }

@media (max-width: 820px) {
  :root[data-theme="light"] .nav-links { background: rgba(246, 242, 234, 0.97); }
  .theme-toggle { order: 1; margin-left: auto; }
  .nav-toggle { order: 2; }
  .nav > nav { order: 3; margin-left: 0; }
}

@media (max-width: 400px) {
  .nav { gap: 10px; }
}
