/* ---------- Tokens ---------- */
:root {
  --bg: #0a0b0d;
  --bg-2: #101216;
  --panel: #14161b;
  --panel-2: #1a1d23;
  --line: #262a32;
  --ink: #f2f2ef;
  --muted: #8b919c;
  --dim: #5a606b;
  --red: #e10600;
  --red-soft: rgba(225, 6, 0, .16);
  --purple: #b26bff;   /* timing: fastest */
  --green: #2bd46b;    /* timing: personal best */
  --yellow: #ffd23f;   /* timing: slower */
  --display: "Titillium Web", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --hud-h: 56px;
  --rail-w: 92px;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(225, 6, 0, .08), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 6px),
    var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--red); color: #fff; }

/* ---------- Start lights ---------- */
.lights {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 28px;
  background: #050506;
  transition: opacity .6s ease, visibility .6s;
}
.lights.is-done { opacity: 0; visibility: hidden; }
.lights__gantry {
  display: flex; gap: clamp(10px, 2.2vw, 22px);
  padding: 18px 22px; background: #111; border-radius: 10px;
  box-shadow: inset 0 0 0 2px #1d1d1d;
}
.lights__gantry span {
  width: clamp(38px, 7vw, 64px); aspect-ratio: 1 / 2.2;
  background: #0b0b0b; border-radius: 8px; padding: 6px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  box-shadow: inset 0 0 0 2px #222;
}
.lights__gantry span::before, .lights__gantry span::after {
  content: ""; width: 100%; aspect-ratio: 1; border-radius: 50%; background: #2a0c0c;
  transition: background .08s, box-shadow .08s;
}
.lights__gantry span.on::before, .lights__gantry span.on::after {
  background: #ff1a10;
  box-shadow: 0 0 22px 4px rgba(255, 30, 16, .7), inset 0 -4px 8px rgba(0,0,0,.35);
}
.lights__hint { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: .2em; text-transform: uppercase; }

/* ---------- HUD ---------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--hud-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  background: linear-gradient(180deg, rgba(10,11,13,.96), rgba(10,11,13,.78));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.hud__tag { display: flex; align-items: baseline; gap: 8px; text-decoration: none; font-weight: 900; font-size: 20px; letter-spacing: .04em; }
.hud__tag span { font-family: var(--mono); font-size: 13px; color: var(--red); font-weight: 600; }
.hud__lap { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.hud__lap b { color: var(--ink); }
.hud__lapname { color: var(--ink); background: var(--red); padding: 3px 8px; font-weight: 600; }
.hud__right { justify-self: end; display: flex; align-items: center; gap: 18px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hud__status { display: flex; align-items: center; gap: 8px; }
.hud__status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
.hud__clock { color: var(--ink); font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Gear rail ---------- */
.gears {
  position: fixed; z-index: 40; left: 0; top: var(--hud-h); bottom: 0; width: var(--rail-w);
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
  background: rgba(10,11,13,.6);
}
.gears a {
  display: grid; justify-items: center; gap: 2px; padding: 8px 4px;
  text-decoration: none; color: var(--dim);
  border-radius: 6px; transition: color .2s, background .2s;
}
.gears a b { font-family: var(--mono); font-size: 22px; line-height: 1; }
.gears a span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.gears a:hover { color: var(--ink); }
.gears a.is-active { color: #fff; background: var(--red-soft); box-shadow: inset 3px 0 0 var(--red); }
.gears a.is-active b { color: var(--red); }

main, .footer { margin-left: var(--rail-w); }

/* ---------- Sections ---------- */
.section { padding: 110px var(--gutter) 90px; max-width: 1240px; }
.section__head { display: flex; align-items: center; gap: 18px; margin-bottom: 40px; }
.section__gear {
  font-family: var(--mono); font-size: 34px; font-weight: 600; color: var(--red);
  width: 64px; height: 64px; display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: 12px; background: var(--panel);
}
.section__head h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; font-style: italic; }
.section__head p { margin: 6px 0 0; color: var(--muted); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--hud-h) + 40px) var(--gutter) 80px;
  overflow: hidden;
}
.hero__track { position: absolute; right: -4%; top: 50%; width: min(64vw, 980px); transform: translateY(-46%); opacity: .9; pointer-events: none; }
.hero__track path { fill: none; stroke: #191c22; stroke-width: 26; stroke-linejoin: round; }
.hero__portrait { opacity: .82; animation: portraitIn 1.6s .3s ease both; }
@keyframes portraitIn { from { opacity: 0; } to { opacity: .82; } }
.hero__track #trackCar { fill: var(--red); filter: drop-shadow(0 0 10px var(--red)) drop-shadow(0 0 22px rgba(225,6,0,.6)); }
.hero__track .racing-line { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 2 12; opacity: .45; }
.hero__track .trail { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; opacity: .8; }
.hero__inner { position: relative; max-width: 760px; }
.eyebrow { margin: 0 0 14px; font-family: var(--mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.hero__name { margin: 0; font-size: clamp(52px, min(9vw, 12.5svh), 124px); line-height: .9; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.01em; }
.hero__name span { display: block; color: transparent; -webkit-text-stroke: 2px var(--ink); }
.hero__role { margin: 18px 0 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; }
.hero__tagline { margin: 10px 0 0; max-width: 600px; color: var(--muted); font-size: 18px; }
.facts { display: grid; grid-template-columns: repeat(3, auto); gap: 10px 34px; margin: 30px 0 0; justify-content: start; }
.facts div { border-left: 3px solid var(--red); padding-left: 12px; }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 14px;
  text-decoration: none; border: 1px solid var(--line); background: var(--panel);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { border-color: var(--red); transform: translateY(-2px); }
.btn--primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn--primary:hover { background: #ff1f17; }
.scrollcue { position: absolute; bottom: 28px; left: var(--gutter); display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); text-decoration: none; }
.scrollcue i { width: 40px; height: 2px; background: var(--red); animation: cue 1.6s infinite; transform-origin: left; }
@keyframes cue { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* ---------- Ignition key ---------- */
.ignition { display: flex; align-items: center; gap: 22px; margin-top: 34px; }
.ignition__key { flex: 0 0 auto; width: clamp(150px, 12vw, 180px); touch-action: none; cursor: grab; outline: none; border-radius: 50%; }
.ignition__key:active { cursor: grabbing; }
.ignition__key:focus-visible { box-shadow: 0 0 0 2px var(--red); }
.ignition.is-on .ignition__key { cursor: default; }
.ignition__key svg { display: block; width: 100%; overflow: visible; }
.ig__bezel { fill: #0b0c0e; }
.ig__ring { fill: #141518; stroke: #34363c; stroke-width: 3; transition: stroke .4s, filter .4s; }
.ignition.is-on .ig__ring { stroke: var(--red); filter: drop-shadow(0 0 10px rgba(225, 6, 0, .9)); }
.ig__knurl line { stroke: #2e3035; stroke-width: 2; }
.ig__pip { stroke: #6b707a; stroke-width: 3; }
.ig__label { font-family: var(--mono); font-weight: 600; font-size: 19px; letter-spacing: .04em; fill: #6b707a; text-anchor: middle; dominant-baseline: central; transition: fill .2s; }
.ig__label.is-lit { fill: #fff; }
.ignition.is-on .ig__label.is-lit { fill: #ff3b30; }
.ig__throat { fill: #030304; }
.ig__fob path { fill: url(#alu); stroke: #e9ebef; stroke-width: 1.5; }
.ig__fobhi { fill: none; stroke: #fff; stroke-opacity: .6; stroke-width: 2; stroke-linecap: round; }
.ig__hole { fill: #0a0a0b; stroke: #7d8089; stroke-width: 2; }
.ig__badge { fill: #141518; stroke: #c9a54a; stroke-width: 2; }
.ig__mono { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 22px; fill: #e5232b; text-anchor: middle; dominant-baseline: central; }
#lanyard { pointer-events: none; }
.ignition__text { min-width: 0; }
.ignition__hint { margin: 0; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.ignition__sub { margin: 4px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ignition.is-on .ignition__hint { color: var(--green); }
.ignition.is-nudge .ignition__key { animation: nudge .5s ease; }
.ignition.is-nudge .ignition__hint { color: #ff3b30; }
@keyframes nudge { 20% { transform: rotate(-6deg); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(1deg); } }

/* Until the key is turned only Neutral is shown */
body.is-locked main > section:not(#home), body.is-locked .footer, body.is-locked .scrollcue { display: none; }
body.is-locked .gears a:not([data-gear="N"]) { opacity: .3; }

/* ---------- Live background + ignition ---------- */
.livebg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
body.is-live .livebg { opacity: 1; }
main, .footer { position: relative; z-index: 1; }
.ignite-flash { position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: radial-gradient(circle at var(--x) var(--y), rgba(255, 30, 16, .5), rgba(225, 6, 0, .12) 35%, transparent 70%);
  animation: igniteFlash 1.1s ease-out forwards; }
@keyframes igniteFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.ignite-ring { position: fixed; left: var(--x); top: var(--y); z-index: 61; pointer-events: none; border-radius: 50%;
  border: 2px solid rgba(255, 50, 30, .9); box-shadow: 0 0 30px 6px rgba(225, 6, 0, .55), inset 0 0 30px 4px rgba(225, 6, 0, .35);
  transform: translate(-50%, -50%); animation: igniteRing 1.4s cubic-bezier(.15, .7, .25, 1) forwards; }
.ignite-ring--late { animation-delay: .18s; opacity: 0; border-color: rgba(255,255,255,.5); }
@keyframes igniteRing { 0% { width: 0; height: 0; opacity: 1; } 100% { width: 280vmax; height: 280vmax; opacity: 0; } }
.ignite-scan { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 62; pointer-events: none;
  background: linear-gradient(90deg, transparent, #ff2a1a 20%, #fff 50%, #ff2a1a 80%, transparent);
  box-shadow: 0 0 24px 6px rgba(225, 6, 0, .6); animation: igniteScan 1s .2s cubic-bezier(.5, 0, .5, 1) both; }
@keyframes igniteScan { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(100vh); opacity: 0; } }
body.is-igniting .hud, body.is-igniting .gears { animation: dashFlicker .9s steps(1) both; }
@keyframes dashFlicker { 0% { opacity: .15; } 12% { opacity: 1; } 20% { opacity: .35; } 30% { opacity: 1; } 42% { opacity: .6; } 52%, 100% { opacity: 1; } }
body.is-igniting .gears a { animation: gearOn .5s ease both; }
body.is-igniting .gears a:nth-child(2) { animation-delay: .25s; } body.is-igniting .gears a:nth-child(3) { animation-delay: .35s; }
body.is-igniting .gears a:nth-child(4) { animation-delay: .45s; } body.is-igniting .gears a:nth-child(5) { animation-delay: .55s; }
body.is-igniting .gears a:nth-child(6) { animation-delay: .65s; } body.is-igniting .gears a:nth-child(7) { animation-delay: .75s; }
@keyframes gearOn { 0% { color: #fff; text-shadow: 0 0 14px var(--red); } 100% { text-shadow: none; } }

/* ---------- Instrument cluster ---------- */
.dials {
  display: flex; justify-content: center; align-items: center; flex-wrap: nowrap;
  padding: clamp(24px, 4vw, 44px) clamp(16px, 3vw, 48px) clamp(18px, 3vw, 30px);
  background: radial-gradient(ellipse 70% 90% at 50% 0%, #1c1e23, #0a0b0d 72%);
  border: 1px solid var(--line); border-radius: 56px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.04), inset 0 -30px 60px rgba(0,0,0,.5), 0 30px 60px rgba(0,0,0,.45);
}
.pod { position: relative; text-align: center; margin: 0 -6px; }
.pod svg { display: block; width: var(--s); margin: 0 auto; filter: drop-shadow(0 12px 18px rgba(0,0,0,.65)); }
.pod--main { --s: clamp(220px, 25vw, 330px); z-index: 2; }
.pod--near { --s: clamp(150px, 17vw, 236px); z-index: 1; }
.pod--far { --s: clamp(116px, 12vw, 172px); }
.pod__face { fill: url(#faceDark); transition: fill .4s; }
.pod--track .pod__face { fill: url(#faceTrack); }
.pod__tick { stroke: rgba(255,255,255,.55); stroke-width: 1.2; }
.pod__tick--major { stroke: #fff; stroke-width: 2.6; }
.pod__num { font-family: var(--display); font-weight: 700; font-size: 17px; fill: #fff; text-anchor: middle; dominant-baseline: central; }
.pod__sweep { fill: none; stroke: #ff2a1a; stroke-width: 3; filter: drop-shadow(0 0 4px rgba(255, 42, 26, .9)); }
.pod--track .pod__sweep { stroke: #fff; filter: drop-shadow(0 0 4px rgba(255,255,255,.8)); }
.pod__value { font-family: var(--display); font-weight: 700; font-size: 30px; fill: #fff; text-anchor: middle; font-variant-numeric: tabular-nums; }
.pod__unit { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; fill: #ff4a3a; text-anchor: middle; }
.pod--track .pod__unit { fill: #ffd5d2; }
.pod__needle path { fill: #ff2414; filter: drop-shadow(0 0 5px rgba(255, 36, 20, .85)); }
.pod--track .pod__needle path { fill: #fff; filter: drop-shadow(0 0 5px rgba(255,255,255,.8)); }
.pod__hub { fill: #0b0b0d; stroke: #4a4d55; stroke-width: 2; }
.pod__glass { fill: #fff; opacity: .045; pointer-events: none; }
.gear__window { fill: #050506; stroke: #3a3d44; stroke-width: 2; }
.pod--track .gear__window { fill: rgba(0,0,0,.5); stroke: rgba(255,255,255,.35); }
.gear__digit { font-family: var(--display); font-weight: 900; font-size: 74px; fill: #fff; text-anchor: middle; dominant-baseline: central; }
.gear__suffix { font-family: var(--mono); font-size: 13px; font-weight: 600; fill: #ff4a3a; text-anchor: middle; dominant-baseline: central; }
.pod--track .gear__suffix { fill: #fff; }
.gear__num { transition: fill .15s; }
.gear__num.is-lit { fill: #ff3b30; filter: drop-shadow(0 0 6px rgba(255, 59, 48, .9)); }
.pod--track .gear__num.is-lit { fill: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); }
.gear__led { fill: #1b1d22; stroke: #2e3036; stroke-width: 1.5; transition: fill .12s; }
.gear__led.on[data-i="0"], .gear__led.on[data-i="1"] { fill: var(--green); filter: drop-shadow(0 0 4px var(--green)); }
.gear__led.on[data-i="2"], .gear__led.on[data-i="3"] { fill: var(--yellow); filter: drop-shadow(0 0 4px var(--yellow)); }
.gear__led.on[data-i="4"] { fill: #ff2a1a; filter: drop-shadow(0 0 4px #ff2a1a); }
.pod.is-shifted .gear__led { animation: ledFlash .16s 3 alternate; }
@keyframes ledFlash { to { fill: #ff2a1a; } }
.pod__label { margin: 10px 0 0; font-weight: 700; line-height: 1.2; font-size: 16px; }
.pod--main .pod__label { font-size: 19px; }
.pod__detail { margin: 4px auto 0; max-width: 26ch; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.pod--main .pod__detail { color: var(--muted); }

/* ---------- Projects wheel ---------- */
.wheelsec { position: relative; /* height set in JS: one screen per project */ }
.wheelsec__sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  padding: calc(var(--hud-h) + 26px) var(--gutter) 24px;
  display: grid; grid-template-rows: auto 1fr auto;
}
.section__head--wheel { margin-bottom: 8px; }
.wheelsec__stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 2vw; min-height: 0; }
.wheel { position: relative; width: min(64svh, 40vw); aspect-ratio: 1; justify-self: center; }
.wheel svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); }
.wheel .stripe { fill: none; stroke: #d21f27; stroke-width: 16; }
.wheel .stripe-edge { fill: none; stroke: #5e0a0e; stroke-width: 1.5; }
.wheel .wall-text { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 46px; letter-spacing: 3px; fill: #d21f27; }
.wheel .wall-text--sm { font-size: 52px; letter-spacing: 6px; }
.wheel .wall-mould { font-family: var(--mono); font-weight: 600; font-size: 19px; letter-spacing: 5px; fill: #1b1b1e; }
.wheel .marbles ellipse { fill: #242427; }
.wheel .spec { fill: none; stroke: #fff; stroke-opacity: .16; stroke-width: 8; pointer-events: none; }
.wheel .car { pointer-events: none; }
.car__body { fill: url(#carGrad); stroke: rgba(255,255,255,.14); stroke-width: 3; stroke-linejoin: round; }
.car__dark { fill: #040405; }
.car__fin { fill: #15171b; stroke: rgba(255,255,255,.1); stroke-width: 2; }
.car__plate { fill: #1b1d22; stroke: rgba(255,255,255,.14); stroke-width: 2; }
.car__tyre { fill: #0b0b0c; }
.car__rim { fill: #131417; }
.car__stripe { fill: none; stroke: #d21f27; stroke-width: 16; opacity: .7; }
.car__helmet { fill: #9da1a9; opacity: .55; }
.car__halo { fill: none; stroke: #2b2e34; stroke-width: 34; stroke-linecap: round; }
.car__arm { fill: none; stroke: #2b2e34; stroke-width: 14; stroke-linecap: round; }
.car__shadow { fill: #000; opacity: .7; filter: blur(14px); }
.car__spokes { fill: none; stroke: #2a2c31; stroke-width: 40; stroke-linecap: round; }
.car__hub { fill: #c3d531; opacity: .8; }
.car__livery { fill: none; stroke: #d21f27; stroke-width: 9; stroke-linejoin: round; opacity: .85; }
.carbg { position: absolute; left: 0; right: 0; bottom: 2svh; height: 34svh; opacity: .5; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent); mask-image: linear-gradient(90deg, #000 55%, transparent); }
.carbg svg { width: 100%; height: 100%; display: block; }
.wheelsec__sticky > :not(.carbg) { position: relative; z-index: 1; }

/* Image lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; align-content: center; gap: 14px; padding: 4vw; background: rgba(5,5,6,.92); cursor: zoom-out; }
.lightbox.is-open { display: grid; }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox span { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.wheel .badge circle { fill: rgba(16,17,20,.92); stroke: #3a3d44; stroke-width: 3; transition: fill .3s, stroke .3s; }
.wheel .badge text { font-family: var(--mono); font-weight: 600; font-size: 24px; fill: var(--muted); text-anchor: middle; dominant-baseline: central; transition: fill .3s; }
.wheel .badge { cursor: pointer; }
.wheel .badge:hover circle { stroke: var(--ink); }
.wheel .badge.is-focus circle { fill: var(--red); stroke: #ff6a63; }
.wheel .badge.is-focus text { fill: #fff; }
.wheel .pointer { fill: var(--red); filter: drop-shadow(0 0 8px var(--red)); }

.panel {
  position: relative; background: linear-gradient(160deg, rgba(26,29,35,.68), rgba(18,20,24,.78));
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  border: 1px solid var(--line); border-left: 4px solid var(--red);
  padding: 20px 24px; max-height: 100%; min-height: 0;
  display: flex; flex-direction: column;
  cursor: pointer; transition: border-color .25s, box-shadow .25s;
}
.panel:hover { border-color: #3a3e47; border-left-color: var(--red); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.panel.is-swap { animation: swap .45s ease; }
@keyframes swap { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.panel__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.panel__num { color: var(--red); font-weight: 600; }
.panel h3 { margin: 6px 0 4px; font-size: clamp(24px, 2.6vw, 36px); line-height: 1.05; font-weight: 900; font-style: italic; text-transform: uppercase; }
.panel__title { text-decoration: none; }
.panel__title:hover { color: #ff4a42; }
.panel__kind { margin: 0; color: var(--muted); font-weight: 600; }
.panel__media {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden; cursor: zoom-in;
  flex: 0 1 auto; height: clamp(120px, 27svh, 300px); min-height: 0; margin: 12px 0;
  background: #0c0d10; border: 1px solid var(--line);
}
.panel__media::before { content: ""; position: absolute; inset: -24px; background: var(--img) center / cover no-repeat; filter: blur(18px) brightness(.45); }
.panel__media img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.panel__open {
  position: absolute; right: 10px; bottom: 10px; padding: 6px 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(10,11,13,.85); border: 1px solid var(--line); opacity: 0; transition: opacity .25s;
}
.panel__media:hover .panel__open, .panel__media:focus-visible .panel__open { opacity: 1; }
.panel__desc { margin: 0; color: #cfd2d6; }
.d-short { display: none; }
.panel__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; padding: 4px 8px; border: 1px solid var(--line); color: var(--muted); }
.tag:nth-child(3n+1) { border-color: rgba(178, 107, 255, .45); color: var(--purple); }
.tag:nth-child(3n+2) { border-color: rgba(43, 212, 107, .4); color: var(--green); }
.tag:nth-child(3n) { border-color: rgba(255, 210, 63, .4); color: var(--yellow); }
.metric { display: flex; align-items: baseline; gap: 10px; }
.metric b { font-family: var(--mono); font-size: 28px; color: var(--ink); }
.metric span { font-size: 13px; color: var(--muted); max-width: 190px; line-height: 1.3; }
.panel__links { display: flex; gap: 8px; }
.panel__links .btn { padding: 9px 16px; font-size: 12px; }

.stint { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.stint__bars { display: flex; gap: 4px; flex: 1; max-width: 420px; }
.stint__bars i { flex: 1; height: 5px; background: #23262d; transition: background .3s; }
.stint__bars i.is-done { background: var(--green); }
.stint__bars i.is-now { background: var(--purple); box-shadow: 0 0 8px var(--purple); }

/* ---------- Experience: timing tower ---------- */
.tower { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tower li {
  display: grid; grid-template-columns: 64px 1fr; gap: 0;
  background: var(--panel); border: 1px solid var(--line);
}
.tower__pos { display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 20px; background: #0e0f12; border-right: 4px solid var(--red); }
.tower li:nth-child(2) .tower__pos { border-right-color: var(--purple); }
.tower li:nth-child(3) .tower__pos { border-right-color: var(--green); }
.tower__body { padding: 16px 20px; }
.tower__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }
.tower__role { margin: 0; font-size: 21px; font-weight: 700; }
.tower__org { margin: 0; color: var(--muted); }
.tower__date { font-family: var(--mono); font-size: 13px; color: var(--yellow); white-space: nowrap; }
.tower ul { margin: 10px 0 0; padding-left: 18px; color: #cfd2d6; }
.tower ul li { display: list-item; background: none; border: 0; margin: 3px 0; }
.tower ul li::marker { color: var(--red); }

/* ---------- Skills: setup sheet ---------- */
.setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.setup__card { background: var(--panel); border: 1px solid var(--line); padding: 18px 20px; position: relative; }
.setup__card::before { content: attr(data-code); position: absolute; top: 12px; right: 14px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.setup__card h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.setup__card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.setup__card li { display: flex; justify-content: space-between; border-bottom: 1px dashed #262a32; padding-bottom: 6px; }
.setup__card li::after { content: "●"; color: var(--green); font-size: 10px; }

/* ---------- Education ---------- */
.edu { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.edu__card { background: var(--panel); border: 1px solid var(--line); padding: 22px 24px; border-top: 3px solid var(--red); }
.edu__date { font-family: var(--mono); font-size: 12px; color: var(--yellow); letter-spacing: .1em; text-transform: uppercase; }
.edu__card h3 { margin: 6px 0 2px; font-size: 24px; font-weight: 900; font-style: italic; text-transform: uppercase; }
.edu__card p { margin: 0; color: var(--muted); }
.edu__card .edu__detail { margin-top: 12px; color: #cfd2d6; font-size: 15px; }

/* ---------- Contact ---------- */
.radio { background: var(--panel); border: 1px solid var(--line); padding: 28px; max-width: 820px; }
.radio__label { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.wave { display: flex; align-items: center; gap: 3px; height: 22px; }
.wave i { width: 3px; background: var(--red); border-radius: 2px; animation: wave 1s ease-in-out infinite; }
.wave i:nth-child(odd) { animation-delay: -.4s; }
.wave i:nth-child(3n) { animation-delay: -.7s; }
@keyframes wave { 0%, 100% { height: 4px; } 50% { height: 22px; } }
.radio h3 { margin: 16px 0 8px; font-size: clamp(40px, 6vw, 72px); line-height: 1; font-weight: 900; font-style: italic; text-transform: uppercase; }
.radio p { margin: 0; color: #cfd2d6; max-width: 620px; }
.radio .cta { margin-top: 24px; }
.radio__emails { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--mono); font-size: 14px; }
.radio__emails a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--red); }
.radio__emails a:hover { color: #ff4a42; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 26px var(--gutter) 40px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--dim); }

/* ---------- Responsive ---------- */
@media (min-width: 901px) and (max-height: 820px) {
  .section__head--wheel p { display: none; }
  .section__head--wheel .section__gear { width: 48px; height: 48px; font-size: 26px; }
  .section__head--wheel h2 { font-size: 32px; }
  .panel__media { height: 17svh; }
  .panel__desc { font-size: 15px; }
}
@media (min-width: 901px) and (max-height: 800px) {
  .hero .facts { display: none; }
  .ignition { margin-top: 22px; }
}
@media (min-width: 901px) and (max-height: 660px) {
  .panel__media { display: none; }
}

@media (max-width: 900px) {
  :root { --rail-w: 0px; }
  .gears {
    top: auto; bottom: 0; right: 0; width: auto; height: 62px;
    flex-direction: row; justify-content: space-around; padding: 6px;
    border-right: 0; border-top: 1px solid var(--line);
    background: rgba(10,11,13,.94); backdrop-filter: blur(8px);
  }
  .gears a { padding: 4px 2px; flex: 1; }
  .gears a b { font-size: 18px; }
  .gears a span { font-size: 8px; letter-spacing: .06em; }
  .gears a.is-active { box-shadow: inset 0 3px 0 var(--red); }
  .hud__status span { display: none; }
  .hud__lapnum { display: none; }
  .footer { padding-bottom: 90px; }
  .facts { grid-template-columns: 1fr; }
  .hero__track { width: 120vw; right: -40vw; opacity: .45; }
  .hero__portrait { display: none; }
  .hero { padding-bottom: 96px; }
  .ignition { margin-top: 26px; gap: 16px; }
  .ignition__key { width: 118px; }
  .hero { padding-top: calc(var(--hud-h) + 20px); align-content: start; }
  .hero__name { font-size: clamp(44px, 13vw, 64px); }
  .hero__tagline { font-size: 16px; }
  .facts { display: none; }
  .cta { margin-top: 20px; gap: 8px; }
  .cta .btn { padding: 10px 14px; font-size: 12px; }
  .pod--near, .pod--far { flex: 1 1 44%; margin: 0; --s: clamp(130px, 38vw, 200px); }
  .pod--far .pod__label { font-size: 14px; }
  .pod--near .pod__label { font-size: 14px; }

  .wheelsec__sticky { padding-bottom: 72px; }
  .wheelsec__stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; gap: 10px; }
  .section__head--wheel { display: none; }
  .wheel { width: min(46svh, 86vw); margin: -12svh auto 0; }
  .panel { cursor: default; }
  .panel { padding: 16px 18px; }
  .panel__media { display: none; }
  .carbg { height: 16svh; bottom: 70px; }
  .panel__desc { font-size: 15px; }
  .d-long { display: none; }
  .d-short { display: inline; }
  .dials { flex-wrap: wrap; border-radius: 32px; row-gap: 18px; }
  .pod--main { order: -1; flex-basis: 100%; }
  .pod--near { --s: clamp(130px, 38vw, 200px); }
  .section__head--wheel p { display: none; }
  .stint__bars { max-width: none; }
}
@media (max-width: 900px) and (max-height: 720px) {
  .wheel { width: min(38svh, 72vw); margin-top: -9svh; }
  .panel .tags { display: none; }
  .stint { display: none; }
  .wheelsec__stage { grid-template-rows: auto minmax(0, 1fr); }
  .panel h3 { font-size: 22px; }
  .panel { padding: 12px 14px; }
  .panel__row { margin-top: 10px; }
  .metric b { font-size: 22px; }
}
@media (max-width: 520px) {
  .hud { grid-template-columns: auto 1fr; }
  .hud__lap { justify-self: end; }
  .hud__right { display: none; }
  .section { padding-top: 84px; }
  .section__gear { width: 48px; height: 48px; font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .panel.is-swap { animation: none; }
  .wave i, .scrollcue i, .hud__status i { animation: none; }
  .wave i { height: 12px; }
}
