:root {
  /* DESIGN FONT TOKENS: IBM Plex Mono diagnostic accents. Mono* Mono** from Google Fonts */
  --void: #050508;
  --ink: #111118;
  --cyan: #00F5FF;
  --violet: #7A3CFF;
  --pink: #FF2BD6;
  --green: #B8FF2C;
  --frost: #EAF7FF;
  --orange: #FF8A00;
  --aurora: linear-gradient(115deg, #00F5FF 0%, #7A3CFF 34%, #FF2BD6 66%, #B8FF2C 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--frost);
  font-family: "Commissioner", sans-serif;
  overflow-x: hidden;
}

.design-token { display: none; }

a { color: inherit; text-decoration: none; }
.noise-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .12;
  background-image: radial-gradient(circle at 20% 30%, rgba(234,247,255,.35) 0 1px, transparent 1px), radial-gradient(circle at 70% 60%, rgba(0,245,255,.24) 0 1px, transparent 1px);
  background-size: 31px 37px, 43px 47px;
  mix-blend-mode: screen;
}

.lab-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: rgba(5,5,8,.72);
  border-bottom: 2px solid var(--ink);
  backdrop-filter: blur(18px) saturate(140%);
}
.wordmark { color: var(--green); }
.nav-links { display: flex; gap: 8px; }
.nav-links a, .state-readout, .wordmark {
  border: 1px solid rgba(234,247,255,.18);
  padding: 7px 9px;
  background: rgba(17,17,24,.78);
}
.nav-links a:hover { color: var(--cyan); border-color: var(--pink); transform: translate(1px, -1px); }
.state-readout { justify-self: end; display: flex; align-items: center; gap: 8px; font-family: "IBM Plex Mono", monospace; color: var(--frost); }
.state-readout i { width: 8px; height: 8px; background: var(--orange); display: inline-block; animation: blink 1.1s steps(2) infinite; }

.sim-state {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  isolation: isolate;
}
.sim-state::before {
  content: attr(data-state);
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  color: rgba(234,247,255,.45);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}
.calibration-grid, .sim-state::after {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(rgba(234,247,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(234,247,255,.07) 1px, transparent 1px);
  background-size: 9vw 9vw;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 88%);
  z-index: -2;
}
.sim-state::after { background-size: 2px 100%, 100% 2px; opacity: .18; }

.micro-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
}
code { font-family: "IBM Plex Mono", monospace; color: var(--cyan); font-size: 11px; }

.mega-title, .cut-title, .final-word, .model-slab h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .84;
  text-transform: uppercase;
}

.boot-state { background: radial-gradient(circle at 72% 22%, rgba(122,60,255,.34), transparent 26%), var(--void); }
.boot-state .state-tag { position: absolute; top: 94px; left: 22px; }
.mega-title { position: absolute; left: -1vw; bottom: -2vw; font-size: clamp(72px, 17vw, 260px); max-width: 86vw; }
.mega-title::after, .final-word::after {
  content: attr(class);
  position: absolute;
  inset: auto 0 0 0;
  height: 22%;
  color: transparent;
  background: var(--aurora);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: auroraShift 7s linear infinite;
}
.scanline { position: absolute; top: 0; bottom: 0; left: 42%; width: 3px; background: var(--aurora); box-shadow: 0 0 26px var(--cyan); animation: scan 5s ease-in-out infinite alternate; }
.edge-label { position: absolute; left: -74px; top: 50%; transform: rotate(-90deg); color: rgba(234,247,255,.36); font-size: 10px; letter-spacing: .16em; }

.glass-card {
  position: relative;
  border: 1px solid transparent;
  background: linear-gradient(rgba(234,247,255,.13), rgba(234,247,255,.05)) padding-box, var(--aurora) border-box;
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 24px 70px rgba(0,0,0,.35);
  padding: 22px;
  transition: transform .35s ease, border-color .35s ease;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.glass-card p { line-height: 1.45; max-width: 31ch; }
.glass-card::after { content: "hidden diagnostic string // visible on contact"; position: absolute; left: 18px; bottom: 10px; font-family: "IBM Plex Mono", monospace; font-size: 9px; color: var(--orange); opacity: 0; transition: opacity .2s ease; }
.glass-card:hover::after { opacity: 1; }
.boot-card { position: absolute; right: 9vw; top: 24vh; width: min(380px, 72vw); min-height: 330px; }
.wire-cube { width: 140px; height: 120px; margin: 32px auto; border: 2px solid var(--cyan); transform: skewY(-12deg) rotate(4deg); box-shadow: 28px -22px 0 -2px rgba(122,60,255,.45), 28px -22px 0 0 var(--pink); }
.aurora-seam { position: absolute; background: var(--aurora); background-size: 260% 100%; filter: blur(.2px); animation: auroraShift 9s linear infinite; }
.seam-one { left: 12vw; top: 0; width: 9px; height: 100%; }
.seam-two { left: 61.8%; top: 0; width: 2px; height: 100%; box-shadow: 0 0 34px var(--green); }

.model-state { display: grid; grid-template-columns: 62% 38%; padding-top: 42px; background: linear-gradient(90deg, var(--ink) 0 62%, var(--void) 62%); }
.model-slab { padding: 12vh 5vw; border-right: 2px solid var(--green); border-top: 2px solid var(--green); align-self: center; min-height: 78vh; }
.model-slab h2 { font-size: clamp(48px, 8.8vw, 138px); margin: 24px 0; }
.model-slab p { font-size: clamp(18px, 2vw, 28px); max-width: 45ch; line-height: 1.2; }
.metric-row { display: grid; grid-template-columns: repeat(4, auto); gap: 10px; max-width: 560px; border-top: 2px solid var(--orange); padding-top: 16px; font-family: "IBM Plex Mono", monospace; }
.metric-row strong { color: var(--pink); }
.card-stack { padding: 12vh 3vw; display: grid; gap: 18px; align-content: center; }
.specimen { min-height: 190px; }
.specimen:nth-child(2) { transform: translateX(-36px); }
.scratches { height: 42px; margin: 20px 0; background: repeating-linear-gradient(96deg, transparent 0 13px, var(--cyan) 14px 15px, transparent 16px 24px); opacity: .75; }
.dot-matrix { height: 70px; background-image: radial-gradient(var(--green) 1.5px, transparent 2px); background-size: 16px 16px; margin: 16px 0; }
.contours { height: 76px; border: 1px solid rgba(234,247,255,.2); background: radial-gradient(ellipse at 40% 50%, transparent 0 20%, var(--pink) 21% 22%, transparent 23% 35%, var(--violet) 36% 37%, transparent 38% 52%, var(--cyan) 53% 54%, transparent 55%); }

.weather-state { min-height: 120vh; background: radial-gradient(circle at 55% 44%, rgba(255,43,214,.22), transparent 22%), radial-gradient(circle at 15% 80%, rgba(0,245,255,.18), transparent 28%), var(--void); }
.weather-state .state-tag { position: absolute; top: 92px; left: 7vw; }
.cut-title { position: absolute; top: 16vh; left: 5vw; font-size: clamp(76px, 14vw, 210px); opacity: .92; }
.gradient-mesh { position: absolute; inset: 18vh 9vw 12vh 28vw; background: var(--aurora); background-size: 260% 260%; filter: blur(28px); opacity: .6; clip-path: polygon(9% 17%, 100% 4%, 76% 82%, 0 100%); animation: auroraShift 10s linear infinite; }
.drift-card { position: absolute; width: min(420px, 76vw); }
.drift-a { right: 10vw; top: 20vh; transform: rotate(1.5deg); }
.drift-b { left: 10vw; bottom: 20vh; transform: rotate(-1.8deg); }
.drift-c { right: 23vw; bottom: 9vh; transform: rotate(.9deg); }
.mini-bars { height: 58px; background: repeating-linear-gradient(90deg, var(--orange) 0 8px, transparent 8px 18px); }
.refraction { height: 72px; background: linear-gradient(135deg, transparent 0 35%, rgba(234,247,255,.35) 36% 38%, transparent 39% 55%, rgba(0,245,255,.4) 56% 59%, transparent 60%); }

.gate-state { background: var(--ink); }
.gate-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gate-path { fill: none; stroke: url(#none); stroke-width: 2; stroke: var(--cyan); stroke-dasharray: 1600; stroke-dashoffset: 1600; filter: drop-shadow(0 0 10px rgba(0,245,255,.5)); }
.gate-state.is-visible .gate-path { animation: drawPath 4.5s ease forwards; }
.path-b { stroke: var(--pink); animation-delay: .35s; }
.path-c { stroke: var(--green); animation-delay: .7s; }
.stamp { position: absolute; padding: 14px 18px; background: var(--void); border: 2px solid var(--frost); color: var(--frost); font-weight: 900; font-size: clamp(28px, 5vw, 76px); letter-spacing: -.055em; line-height: .86; text-transform: uppercase; transition: transform .12s steps(1); }
.stamp:hover { transform: translate(1px, 1px); border-color: var(--orange); }
.stamp-a { left: 8vw; top: 18vh; }
.stamp-b { right: 12vw; top: 28vh; }
.stamp-c { left: 17vw; bottom: 18vh; }
.stamp-d { right: 8vw; bottom: 12vh; }
.rect-node { position: absolute; width: 18px; height: 12px; background: var(--orange); border: 2px solid var(--void); animation: blink 1.4s steps(2) infinite; }
.node-a { left: 30%; top: 42%; } .node-b { right: 20%; top: 30%; } .node-c { left: 42%; bottom: 38%; } .node-d { right: 10%; bottom: 20%; }
.gate-label { position: absolute; left: 18px; bottom: 18px; }

.exit-state { display: grid; align-content: center; padding: 8vw; background: radial-gradient(circle at 85% 20%, rgba(184,255,44,.16), transparent 24%), var(--void); }
.exit-state .state-tag { margin-bottom: 20px; }
.final-word { position: relative; font-size: clamp(60px, 17vw, 260px); }
.manifesto { max-width: 560px; font-size: clamp(18px, 2.1vw, 29px); line-height: 1.24; margin: 24px 0 40px; }
.complete-marker { width: min(520px, 88vw); border: 2px solid var(--green); display: flex; justify-content: space-between; gap: 12px; padding: 18px; color: var(--green); font-weight: 800; letter-spacing: .12em; font-size: 11px; }
.complete-marker b { color: var(--orange); font-family: "IBM Plex Mono", monospace; }

@keyframes scan { from { transform: translateX(-34vw); } to { transform: translateX(35vw); } }
@keyframes auroraShift { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
@keyframes blink { 50% { opacity: .18; } }
@keyframes drawPath { to { stroke-dashoffset: 0; } }

@media (max-width: 800px) {
  .lab-nav { grid-template-columns: 1fr; align-items: start; }
  .nav-links, .state-readout { justify-self: start; }
  .model-state { display: block; background: var(--void); }
  .model-slab { border-right: 0; min-height: auto; padding-top: 20vh; }
  .card-stack { padding-top: 4vh; }
  .specimen:nth-child(2) { transform: none; }
  .boot-card, .drift-card { position: relative; inset: auto; margin: 0 7vw 28px auto; top: 22vh; }
  .weather-state { padding-top: 34vh; }
  .cut-title { top: 18vh; }
  .stamp { font-size: 34px; }
}
