/* ==========================================================
   PRANAV CHETAN — portfolio
   Direction: technical drawing on cool drafting paper.
   Cobalt linework, graphite ink, signal-yellow markers.
   ========================================================== */

:root {
  --paper: #e8eae6;
  --paper-2: #dde0da;
  --paper-3: #d2d6ce;
  --ink: #121418;
  --ink-2: #50555e;
  --ink-3: #8a9098;
  --cobalt: #2340ff;
  --cobalt-deep: #1528b8;
  --cobalt-soft: #5b73ff;
  --signal: #ffb800;
  --rule: rgba(18, 20, 24, 0.14);
  --rule-soft: rgba(18, 20, 24, 0.07);

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Geist", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --radius: 6px;
  --header-h: 68px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--rule-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: var(--cobalt);
  color: var(--paper);
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 13px;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- Type primitives ---------- */

.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.display {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.92;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

/* ---------- Scroll progress ---------- */

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  background: var(--cobalt);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(232, 234, 230, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--cobalt);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
}
.site-nav a {
  position: relative;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 0;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--cobalt);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}
.site-nav .nav-cta {
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background-color 0.25s, color 0.25s;
}
.site-nav .nav-cta::after {
  display: none;
}
.site-nav .nav-cta:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  will-change: transform;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn--solid {
  background: var(--ink);
  color: var(--paper);
}
.btn--solid:hover {
  background: var(--cobalt);
  border-color: var(--cobalt);
}
.btn--line:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ==========================================================
   TEARDOWN — pinned hero + exploded view
   ========================================================== */

.teardown {
  position: relative;
  height: 320vh;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  --u: min(30vw, 44vh, 420px);
}

/* Drawing sheet frame + registration marks */
.sheet-frame {
  position: absolute;
  inset: calc(var(--header-h) + 8px) var(--gutter) 20px;
  border: 1px solid var(--rule);
  pointer-events: none;
}
.sheet-frame i {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--ink);
  border-style: solid;
  border-width: 0;
}
.sheet-frame i:nth-child(1) { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.sheet-frame i:nth-child(2) { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.sheet-frame i:nth-child(3) { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.sheet-frame i:nth-child(4) { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.sheet-meta {
  position: absolute;
  top: calc(var(--header-h) + 18px);
  left: calc(var(--gutter) + 14px);
  right: calc(var(--gutter) + 14px);
  display: flex;
  justify-content: space-between;
  color: var(--ink-3);
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  left: calc(var(--gutter) + clamp(14px, 3vw, 48px));
  top: calc(var(--header-h) + 40px);
  bottom: 40px;
  width: min(620px, 50vw);
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Both lines share one size that fits the column: min(620px, 50vw) wide, and
   "PRANAV" is about 5.5em, so the size is capped at column / 5.8 in plain vw
   and px (px, not rem, so a larger browser base font can't inflate it). The
   script then measures the rendered lines and trims if any browser runs wider. */
.hero-name {
  font-size: clamp(2.2rem, min(12.5vh, 8.6vw, 106px), 106px);
  margin: 20px 0 24px;
}
.hero-name .line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  padding-bottom: 0.04em;
}
.hero-name .line + .line {
  color: var(--cobalt);
}
.hero-lede {
  margin: 0 0 32px;
  max-width: 34em;
  font-size: clamp(16px, 1.25vw, 19px);
  color: var(--ink-2);
}
.hero-lede strong {
  color: var(--ink);
  font-weight: 600;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Title block (engineering drawing convention) */
.title-block {
  position: absolute;
  right: calc(var(--gutter) + 14px);
  bottom: 34px;
  z-index: 3;
  display: grid;
  grid-template-columns: auto auto;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.title-block dt,
.title-block dd {
  margin: 0;
  padding: 7px 12px;
  border-bottom: 1px solid var(--rule);
}
.title-block dt {
  color: var(--ink-3);
  border-right: 1px solid var(--rule);
}
.title-block dt:nth-last-of-type(1),
.title-block dd:nth-last-of-type(1) {
  border-bottom: 0;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(255, 184, 0, 0.6);
  vertical-align: 1px;
}

.unit-legend {
  position: absolute;
  z-index: 3;
  left: 71%;
  top: calc(49% + var(--u) * 0.66);
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  white-space: nowrap;
  color: var(--ink-2);
  pointer-events: none;
}
.unit-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
}
.unit-legend svg {
  width: 16px;
  height: 16px;
}
.scroll-cue-track {
  position: relative;
  width: 30px;
  height: 1px;
  background: var(--rule);
  overflow: hidden;
}
.scroll-cue-track span {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 1px;
  background: var(--cobalt);
}

/* ---------- The 3D unit ---------- */

.unit-wrap {
  position: absolute;
  left: 71%;
  top: 49%;
  width: 0;
  height: 0;
  z-index: 2;
  transform-style: preserve-3d;
}
.unit-float,
.unit-tilt,
.assembly {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.assembly {
  --rx: 58deg;
  --rz: -42deg;
  --spin: 0deg;
  transform: rotateX(var(--rx)) rotateZ(calc(var(--rz) + var(--spin)));
}

.plate {
  --s: 1;
  --z: 0px;
  --lift: 0px;
  --plate-fill: #f3f4f1;
  --plate-edge: #b9bfd9;
  position: absolute;
  width: calc(var(--u) * var(--s));
  height: calc(var(--u) * var(--s));
  left: calc(var(--u) * var(--s) / -2);
  top: calc(var(--u) * var(--s) / -2);
  transform: translateZ(calc(var(--z) + var(--lift)));
  transform-style: preserve-3d;
  border-radius: 14px;
}
.plate::before,
.plate::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--plate-edge);
}
.plate::before {
  transform: translateZ(-3px);
}
.plate::after {
  transform: translateZ(-6px);
  background: var(--cobalt-deep);
  opacity: 0.35;
}
.plate > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--plate-fill);
  box-shadow: inset 0 0 0 1.5px var(--cobalt);
  overflow: visible;
}
.plate svg * {
  vector-effect: non-scaling-stroke;
}
.plate--base { --s: 1; }
.plate--fins { --s: 0.9; }
.plate--circuit { --s: 0.94; --plate-fill: #eef0fb; }
.plate--turbine { --s: 0.8; border-radius: 50%; }
.plate--cylinders { --s: 0.88; }
.plate--cover { --s: 0.82; border-radius: 26px; --plate-fill: var(--cobalt); --plate-edge: var(--cobalt-deep); }
.plate--cover > svg {
  box-shadow: none;
}

.ln { fill: none; stroke: var(--cobalt); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ln-thin { stroke-width: 0.9; opacity: 0.6; }
.ln-dash { stroke-dasharray: 4 5; }
.fill-cobalt { fill: var(--cobalt); }
.fill-signal { fill: var(--signal); }
.ln-paper { fill: none; stroke: var(--paper); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pulse { fill: none; stroke: var(--signal); stroke-width: 3; stroke-linecap: round; }
.piston { fill: rgba(35, 64, 255, 0.16); stroke: var(--cobalt); stroke-width: 1.2; }

/* Ground shadow under the unit */
.unit-shadow {
  position: absolute;
  width: calc(var(--u) * 1.5);
  height: calc(var(--u) * 0.46);
  left: calc(var(--u) * -0.75);
  top: calc(var(--u) * 0.36);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(18, 20, 24, 0.18), transparent);
  pointer-events: none;
}

/* ---------- Callout labels + leader lines ---------- */

.leaders {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}
.leader {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
}
.leader-dot {
  fill: var(--signal);
  stroke: var(--ink);
  stroke-width: 1;
  opacity: 0;
}

.part-labels {
  position: absolute;
  top: 0;
  right: calc(var(--gutter) + clamp(14px, 3vw, 48px));
  width: min(330px, 30vw);
  height: 100%;
  z-index: 5;
  pointer-events: none;
}
.part-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 12px;
  align-items: start;
  opacity: 0;
}
.balloon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
}
.part-label h3 {
  margin: 4px 0 2px;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.part-label p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}

.teardown-caption {
  position: absolute;
  left: calc(var(--gutter) + clamp(14px, 3vw, 48px));
  bottom: 34px;
  z-index: 5;
  max-width: 420px;
  opacity: 0;
}
.teardown-caption h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  margin: 12px 0 10px;
}
.teardown-caption p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
}

.teardown-meter {
  position: absolute;
  right: calc(var(--gutter) + 14px);
  top: calc(var(--header-h) + 18px);
  z-index: 5;
  display: none;
}

/* ==========================================================
   SECTIONS
   ========================================================== */

.section {
  position: relative;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
}
.wrap {
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 28px;
  margin-bottom: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--ink);
}
.section-head h2 {
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  margin-top: 16px;
}
.section-head .mono {
  color: var(--ink-2);
  text-align: right;
}

/* ---------- Project showcase ---------- */

.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: clamp(28px, 4vw, 56px);
  border-radius: 10px;
  margin-bottom: clamp(28px, 4vw, 48px);
  border: 1px solid var(--ink);
  background: var(--paper);
}
.project:last-child {
  margin-bottom: 0;
}
.project--dark {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  background-image:
    linear-gradient(rgba(232, 234, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 234, 230, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.project--dark .eyebrow,
.project--dark .project-body p {
  color: rgba(232, 234, 230, 0.72);
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-bottom: 18px;
}
.tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tag--signal {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
}
.project h3 {
  font-size: clamp(1.9rem, 3.4vw, 3.3rem);
  margin: 0 0 18px;
}
.project-body p {
  margin: 0 0 22px;
  color: var(--ink-2);
  max-width: 34em;
}

.readouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 26px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.project--dark .readouts {
  background: rgba(232, 234, 230, 0.16);
  border-color: rgba(232, 234, 230, 0.16);
}
.readout {
  padding: 14px 16px;
  background: var(--paper);
}
.project--dark .readout {
  background: var(--ink);
}
.readout-value {
  display: block;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.project--dark .readout-value {
  color: var(--signal);
}
.readout-label {
  display: block;
  margin-top: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.project--dark .readout-label {
  color: rgba(232, 234, 230, 0.55);
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.stack-list li {
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--paper-2);
  font-family: var(--f-mono);
  font-size: 12px;
}
.project--dark .stack-list li {
  background: rgba(232, 234, 230, 0.08);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
}
.text-link .arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.text-link:hover .arrow {
  transform: translateX(6px);
}
.project--dark .text-link {
  color: var(--signal);
}

/* ---------- F1 track diagram ---------- */

.track-figure {
  margin: 0;
}
.track-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.track-bed {
  fill: none;
  stroke: #262a31;
  stroke-width: 26;
  stroke-linejoin: round;
}
.track-edge {
  fill: none;
  stroke: rgba(232, 234, 230, 0.28);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}
.racing-line {
  fill: none;
  stroke: var(--cobalt-soft);
  stroke-width: 3;
  stroke-linecap: round;
}
.start-line {
  stroke: var(--paper);
  stroke-width: 3;
  stroke-dasharray: 3 3;
}
.sector-tick {
  stroke: var(--signal);
  stroke-width: 2;
}
.sector-text {
  fill: rgba(232, 234, 230, 0.7);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.car {
  stroke: var(--ink);
  stroke-width: 1.5;
}
.car--p1 { fill: var(--signal); }
.car--p2 { fill: var(--paper); }
.car--p3 { fill: var(--cobalt-soft); }
.track-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(232, 234, 230, 0.6);
}
.track-legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: -1px;
  background: var(--c);
}

/* ---------- GM pipeline diagram ---------- */

/* Two lanes (data, question) side by side, merging into the model */
.pipeline {
  --dot: 44px;
  --lane-gap: 14px;
  position: relative;
}
.pipe-device {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 11px;
  color: var(--ink);
}
.pipe-device-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 1.5px var(--ink);
}
.pipe-grid,
.pipe-out {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px var(--lane-gap);
}
.pipe-lane-title {
  font-size: 11px;
  color: var(--ink-3);
  padding-left: 2px;
}
.pipe-spine {
  position: relative;
}
.pipe-rail,
.pipe-out::before,
.pipe-merge::after {
  position: absolute;
  left: calc(var(--dot) / 2 - 1px);
  width: 2px;
  background: repeating-linear-gradient(var(--cobalt) 0 4px, transparent 4px 8px);
}
.pipe-rail {
  top: 26px;
  bottom: 26px;
}
.packet {
  position: absolute;
  left: -3px;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--signal);
  box-shadow: 0 0 0 2px var(--ink);
}
/* The question lane bends into the data lane, which runs on into the model */
.pipe-merge {
  position: relative;
  height: 40px;
}
.pipe-merge::before {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2);
  width: calc(50% + var(--lane-gap) / 2 + 1px);
  top: 0;
  height: 20px;
  border-right: 2px dashed var(--cobalt);
  border-bottom: 2px dashed var(--cobalt);
  border-bottom-right-radius: 12px;
}
.pipe-merge::after {
  content: "";
  top: 0;
  bottom: 0;
}
.pipe-merge .packet {
  left: calc(var(--dot) / 2 - 4px);
}
.pipe-out {
  display: grid;
  gap: 12px;
}
.pipe-out::before {
  content: "";
  top: 0;
  bottom: 26px;
}
.pipe-node {
  position: relative;
  display: grid;
  grid-template-columns: var(--dot) 1fr;
  align-items: center;
  min-height: 52px;
  padding: 8px 12px 8px 0;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}
.pipe-node > i {
  justify-self: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--chip, var(--paper));
  position: relative;
  z-index: 1;
}
.pipe-node strong {
  display: block;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.pipe-node span {
  display: block;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.35;
}
.pipe-node--gold,
.pipe-node--llm {
  background: var(--ink);
  color: var(--paper);
}
.pipe-node--gold span,
.pipe-node--llm span {
  color: rgba(232, 234, 230, 0.7);
}
.pipe-node--llm > i {
  border-color: var(--paper);
}
.pipe-node--ask {
  border-style: dashed;
}
.pipe-node--answer {
  min-height: 64px;
  border-color: var(--cobalt);
  box-shadow: inset 0 0 0 1px var(--cobalt);
}
.pipe-node--answer strong {
  font-size: 16px;
  color: var(--cobalt);
}
.governance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--ink-2);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-2);
}
.governance strong {
  font-weight: 600;
  color: var(--ink);
}
.governance span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  background: var(--signal);
  border: 1px solid var(--ink);
  transform: rotate(45deg);
  vertical-align: 1px;
}

.ask-card {
  margin: 0 0 26px;
  padding: 18px;
  border-radius: 8px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.ask-card .mono {
  color: var(--ink-3);
  font-size: 11px;
}
.ask-q {
  margin: 8px 0 14px;
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1.5;
  min-height: 3em;
}
.ask-lines {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}
.ask-lines i {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: var(--paper-3);
  transform-origin: 0 50%;
}
.ask-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ask-cites span {
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Toolbox / about ---------- */

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 18px 0;
  background: var(--ink);
  color: var(--paper);
}
.ticker-row {
  display: flex;
  width: max-content;
  gap: 0;
}
.ticker-row span {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker-row span::after {
  content: "";
  width: 0.4em;
  height: 0.4em;
  background: var(--signal);
  transform: rotate(45deg);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.about-statement {
  font-family: var(--f-display);
  font-stretch: 100%;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0;
}
.about-statement em {
  font-style: normal;
  color: var(--cobalt);
}
.spec-table {
  margin: 0;
  border-top: 1px solid var(--ink);
}
.spec-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.spec-row dt {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 3px;
}
.spec-row dd {
  margin: 0;
  font-size: 15px;
}
.spec-row dd small {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
}

/* ---------- Contact ---------- */

.contact {
  text-align: center;
  overflow: hidden;
}
.contact .eyebrow {
  justify-content: center;
}
.contact h2 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  margin: 18px auto 20px;
  max-width: 16ch;
}
.contact-lede {
  margin: 0 auto 44px;
  max-width: 34em;
  color: var(--ink-2);
}
.mail-link {
  display: inline-block;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.25rem, 4.4vw, 4.2rem);
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--cobalt);
  padding-bottom: 8px;
  border-bottom: 3px solid var(--cobalt);
  word-break: break-all;
}
.mail-link .char {
  display: inline-block;
}
.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 28px var(--gutter);
  border-top: 1px solid var(--ink);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  color: var(--ink-2);
}
.footer-inner nav {
  display: flex;
  gap: 20px;
}
.footer-inner a {
  text-decoration: none;
}
.footer-inner a:hover {
  color: var(--cobalt);
}

/* ==========================================================
   INNER PAGES (projects / resume)
   ========================================================== */

.page-hero {
  padding: calc(var(--header-h) + clamp(56px, 9vw, 120px)) var(--gutter) clamp(48px, 6vw, 80px);
}
.page-hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}
.page-title {
  font-size: clamp(3.2rem, 11vw, 10rem);
  margin: 18px 0 0;
}
.page-title .char {
  display: inline-block;
}
.page-lede {
  max-width: 30em;
  margin: 26px 0 0;
  color: var(--ink-2);
  font-size: clamp(16px, 1.3vw, 19px);
}
.page-hero .title-block {
  position: static;
}

.case {
  padding: 0 var(--gutter) clamp(64px, 9vw, 120px);
}
.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  padding-top: 28px;
  border-top: 1px solid var(--ink);
}
.case-side {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}
.case h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  margin: 16px 0 20px;
}
.case-block {
  margin-bottom: 36px;
}
.case-block h3 {
  margin: 0 0 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.case-block p {
  margin: 0 0 14px;
  color: var(--ink-2);
}
.case-points {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.case-points li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--rule);
}
.case-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 23px;
  width: 9px;
  height: 9px;
  background: var(--signal);
  border: 1px solid var(--ink);
  transform: rotate(45deg);
}
.case-visual {
  padding: clamp(20px, 3vw, 36px);
  border-radius: 10px;
  border: 1px solid var(--ink);
  margin-bottom: 36px;
}
.case-visual--dark {
  background: var(--ink);
  background-image:
    linear-gradient(rgba(232, 234, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 234, 230, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ==========================================================
   Motion guard: content hidden only once JS has loaded
   ========================================================== */

html.js .reveal,
html.js .site-header,
html.js .hero-copy .eyebrow,
html.js .hero-name,
html.js .hero-lede,
html.js .hero-actions,
html.js .plate,
html.js .sheet-meta,
html.js .title-block,
html.js .unit-legend,
html.js .page-title,
html.js .page-hero .intro-in {
  opacity: 0;
}

.blades {
  transform-box: view-box;
  transform-origin: 200px 200px;
}
.piston {
  transform-box: fill-box;
  transform-origin: center;
}
.leaders .leader-dot,
.part-label {
  will-change: opacity;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1080px) {
  .project {
    grid-template-columns: 1fr;
  }
  .case-grid {
    grid-template-columns: 1fr;
  }
  .case-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .stage {
    --u: min(42vw, 25vh, 300px);
  }
  .hero-copy {
    top: calc(var(--header-h) + 40px);
    bottom: auto;
    justify-content: flex-start;
    width: auto;
    right: calc(var(--gutter) + 14px);
    left: calc(var(--gutter) + 14px);
  }
  .hero-name {
    font-size: clamp(2.2rem, 12.5vw, 80px);
    margin: 14px 0 16px;
  }
  .hero-lede {
    font-size: 15px;
    margin-bottom: 20px;
  }
  .unit-wrap {
    left: 50%;
    top: 79%;
  }
  .unit-legend .long {
    display: none;
  }
  .title-block {
    display: none;
  }
  .sheet-meta span:last-child {
    display: none;
  }
  .part-labels {
    width: 52vw;
    right: calc(var(--gutter) + 6px);
  }
  .part-label {
    grid-template-columns: 24px 1fr;
    column-gap: 8px;
  }
  .balloon {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  .part-label h3 {
    font-size: 12px;
    margin-top: 3px;
  }
  .part-label p {
    font-size: 11.5px;
  }
  .teardown-caption {
    right: calc(var(--gutter) + 14px);
    bottom: 26px;
  }
  .teardown-caption p {
    display: none;
  }
  .about-grid,
  .page-hero .wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .site-nav .nav-hide-sm {
    display: none;
  }
  .brand span {
    display: none;
  }
  .section-head {
    grid-template-columns: 1fr;
  }
  .section-head .mono {
    text-align: left;
  }
  .readouts {
    grid-template-columns: 1fr 1fr;
  }
  .pipeline {
    --dot: 30px;
    --lane-gap: 8px;
  }
  .pipe-grid .pipe-node strong {
    font-size: 11px;
    font-stretch: 100%;
    overflow-wrap: anywhere;
  }
  .pipe-grid .pipe-node span {
    font-size: 11.5px;
  }
  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .teardown {
    height: auto;
  }
  .stage {
    position: relative;
  }
  .unit-legend {
    display: none;
  }
}

/* ==========================================================
   INTERACTION
   ========================================================== */

.stage.is-grabbing,
.stage.is-grabbing * {
  cursor: grabbing !important;
}
.plate {
  transition: filter 0.3s;
}
.plate.is-hot > svg {
  box-shadow: inset 0 0 0 2.5px var(--signal);
}
.part-label {
  pointer-events: none;
  cursor: default;
}
.part-labels.is-live .part-label {
  pointer-events: auto;
}
.part-label .balloon {
  transition: background-color 0.25s, color 0.25s, transform 0.25s;
}
.part-label.is-hot .balloon {
  background: var(--signal);
  transform: scale(1.12);
}
.ask-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}
.ask-option {
  appearance: none;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.ask-option:hover {
  background: var(--paper-3);
}
.ask-option.is-active {
  background: var(--ink);
  color: var(--paper);
}

.throttle {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  color: rgba(232, 234, 230, 0.6);
}
.throttle-rail {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: rgba(232, 234, 230, 0.16);
}
.throttle-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 2px;
  background: var(--signal);
}
.throttle-thumb {
  position: absolute;
  top: -10px;
  left: -12px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--signal);
  cursor: grab;
  touch-action: none;
}
.throttle-thumb:active {
  cursor: grabbing;
}
.throttle-value {
  min-width: 4ch;
  color: var(--signal);
}

@media (max-width: 860px) {
  .unit-legend {
    left: 50%;
    top: auto;
    bottom: 22px;
  }
}
.pipe-node--gold > i {
  border-color: var(--paper);
}

@media (max-width: 860px) {
  .sheet-meta {
    display: none;
  }
  .hero-copy {
    top: calc(var(--header-h) + 30px);
  }
}
@media (max-width: 860px) and (max-height: 740px) {
  .stage {
    --u: min(38vw, 20vh);
  }
  .unit-wrap {
    top: 85%;
  }
  .hero-name {
    font-size: clamp(2.2rem, 11vw, 64px);
    margin: 10px 0 12px;
  }
  .hero-lede {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
  }
  .btn {
    padding: 11px 18px;
  }
  .unit-legend {
    display: none;
  }
}

/* ==========================================================
   AMR + CLOUDCLEAN
   ========================================================== */

.project,
.case {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* Projects at a glance */
.overview {
  list-style: none;
  margin: 0 0 clamp(40px, 6vw, 72px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
}
.overview a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 20px 20px 22px;
  background: var(--paper);
  text-decoration: none;
  transition: background-color 0.25s;
}
.overview a:hover {
  background: var(--paper-2);
}
.overview-n {
  font-size: 11px;
  color: var(--ink-3);
}
.overview strong {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.05;
  text-transform: uppercase;
}
.overview-what {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.overview-win {
  position: relative;
  margin-top: auto;
  padding: 12px 0 0 20px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.45;
}
.overview-win::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 18px;
  width: 8px;
  height: 8px;
  background: var(--signal);
  border: 1px solid var(--ink);
  transform: rotate(45deg);
}
@media (max-width: 1080px) {
  .overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .overview {
    grid-template-columns: 1fr;
  }
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.project-body .use-line {
  margin: -6px 0 22px;
  font-size: 12px;
  line-height: 1.7;
}
.use-line b {
  font-weight: 600;
  color: var(--ink);
  margin-right: 6px;
}
.case-side .text-link {
  margin-top: 4px;
}
.readout-label .unit,
.dev-legend .tick {
  text-transform: none;
}

/* Buttons on dark panels */
.project--dark .ask-option,
.case-visual--dark .ask-option {
  border-color: rgba(232, 234, 230, 0.4);
  color: var(--paper);
}
.project--dark .ask-option:hover,
.case-visual--dark .ask-option:hover {
  background: rgba(232, 234, 230, 0.1);
}
.project--dark .ask-option.is-active,
.case-visual--dark .ask-option.is-active {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
}

/* ---------- AMR console map ---------- */

.console {
  --stop: #d9412b;
  margin: 0;
}
.console-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}
.console-modes {
  margin: 0;
}
.console-stop {
  appearance: none;
  padding: 6px 16px;
  border: 1px solid var(--stop);
  border-radius: 999px;
  background: var(--stop);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.2s;
}
.console-stop:hover {
  filter: brightness(1.1);
}
.console-stage {
  position: relative;
}
.console-map {
  width: 100%;
  height: auto;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: #cfd3cb;
  cursor: crosshair;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.console-map[data-mode="drive"] {
  cursor: default;
}
.cm-free {
  fill: #f4f5f2;
}
.cm-grid {
  fill: none;
  stroke: rgba(18, 20, 24, 0.08);
  stroke-width: 1;
}
.cm-inf {
  fill: rgba(35, 64, 255, 0.09);
}
.cm-unk {
  fill: #cfd3cb;
}
.cm-occ {
  fill: var(--ink);
}
.cm-labels text,
.cm-scale text {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  fill: var(--ink-3);
}
.cm-dock {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
}
.cm-scale path {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.2;
}
.cm-box-inf {
  fill: none;
}
.cm-box-body {
  fill: #e9d3a6;
  stroke: var(--ink);
  stroke-width: 1.4;
  cursor: pointer;
}
.cm-box.is-seen .cm-box-inf {
  fill: rgba(255, 184, 0, 0.14);
  stroke: rgba(224, 161, 0, 0.6);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.cm-trail {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.2;
  stroke-linejoin: round;
  opacity: 0.45;
}
.cm-route {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 2;
  stroke-dasharray: 5 5;
  stroke-linejoin: round;
}
.cm-goal-ring {
  fill: rgba(255, 184, 0, 0.18);
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-dasharray: 3 3;
}
.cm-goal-flag {
  fill: var(--signal);
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-linejoin: round;
}
.cm-goal.is-done .cm-goal-ring {
  fill: rgba(35, 64, 255, 0.14);
  stroke-dasharray: none;
}
.cm-rays {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 0.8;
  opacity: 0.16;
  pointer-events: none;
}
.cm-hits {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 3.2;
  stroke-linecap: round;
  pointer-events: none;
}
.cm-hits--new {
  stroke: #e0a100;
  stroke-width: 3.8;
}
.bot-halo {
  fill: rgba(35, 64, 255, 0.06);
  stroke: var(--cobalt);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

/* Hold-to-drive pad, shown in Drive mode */
.console-pad {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, 38px);
  grid-template-rows: repeat(2, 38px);
  gap: 4px;
}
.console-pad[hidden] {
  display: none;
}
.console-pad button {
  appearance: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: rgba(244, 245, 242, 0.92);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.console-pad button:nth-child(1) { grid-column: 2; grid-row: 1; }
.console-pad button:nth-child(2) { grid-column: 1; grid-row: 2; }
.console-pad button:nth-child(3) { grid-column: 3; grid-row: 2; }
.console-pad button:nth-child(4) { grid-column: 2; grid-row: 2; }
.console-pad button.is-held {
  background: var(--ink);
  color: var(--paper);
}

/* Readouts under the map */
.console-foot {
  margin-top: 12px;
}
.console-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--ink);
}
.console-led {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
}
.console-led[data-state="run"] {
  background: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(35, 64, 255, 0.18);
}
.console-led[data-state="warn"] {
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.3);
}
.console-tele {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 10px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}
.console-tele div {
  padding: 8px 10px;
  background: var(--paper);
}
.console-tele dt {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.console-tele dd {
  margin: 2px 0 0;
  font-family: var(--f-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.console-tele dd[data-level="amber"] {
  color: #b27600;
}
.console-tele dd[data-level="red"] {
  color: var(--stop);
}
.mission-log {
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  min-height: calc(3 * 1.65em + 20px);
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  font-size: 11.5px;
  line-height: 1.65;
}
.mission-log time {
  margin-right: 10px;
  color: var(--ink-3);
}
.mission-hint {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0.02em;
}
.bot {
  pointer-events: none;
}
.bot-track {
  fill: var(--ink);
}
.bot-body {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.3;
}
.bot-lidar {
  fill: var(--cobalt);
}
.bot-nose {
  fill: var(--signal);
  stroke: var(--ink);
  stroke-width: 1;
}
.map-nope {
  fill: none;
  stroke: var(--stop, #d9412b);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: nope 0.5s ease-out forwards;
  pointer-events: none;
}
@keyframes nope {
  from { opacity: 1; transform: scale(0.5); }
  to { opacity: 0; transform: scale(1.6); }
}
@media (max-width: 560px) {
  .console-tele {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .console-pad {
    grid-template-columns: repeat(3, 34px);
    grid-template-rows: repeat(2, 34px);
    right: 8px;
    bottom: 8px;
  }
}


/* ---------- Point-cloud pipeline ---------- */

.scan-figure {
  margin: 0;
}
.scan-steps {
  margin: 0 0 16px;
}
.scan-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.pts {
  fill: none;
  stroke: var(--paper);
  stroke-width: 2.1;
  stroke-linecap: round;
}
.pts--part {
  opacity: 0.9;
}
.pts--noise {
  transition: stroke 0.25s;
}
.pts--noise.is-flagged {
  stroke: var(--signal);
}
.part-axis {
  fill: none;
  stroke: rgba(232, 234, 230, 0.28);
  stroke-width: 1;
  stroke-dasharray: 18 4 3 4;
}
.dims,
.dev-legend,
.scanner {
  opacity: 0;
}
.dim-line {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.2;
}
.dim-arrow {
  fill: var(--signal);
}
.dim-text {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  fill: var(--signal);
}
.dim-text--sm {
  font-size: 11px;
}
.dev-legend text {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  fill: rgba(232, 234, 230, 0.6);
}
.scanner rect {
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 1.2;
}
.scanner circle {
  fill: var(--cobalt-soft);
}
.laser {
  stroke: var(--cobalt-soft);
  stroke-width: 1.6;
}
.laser-glow {
  stroke: var(--cobalt-soft);
  stroke-width: 10;
  opacity: 0.18;
}
.scan-status {
  margin: 12px 0 0;
  min-height: 1.6em;
  font-size: 12px;
  color: rgba(232, 234, 230, 0.7);
}

/* ---------- Use cases ---------- */

.use-cases {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.use-cases li {
  padding: 16px 18px 18px;
  background: var(--paper);
}
.use-cases .use-wide {
  grid-column: 1 / -1;
}
.use-cases strong {
  display: block;
  margin: 10px 0 4px;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.use-cases li p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
}
.use-status {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.use-status--live {
  background: var(--signal);
  border-color: var(--signal);
}
.use-status--next {
  border-style: dashed;
  border-color: var(--ink-3);
  color: var(--ink-2);
}
.use-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin: 0 0 14px;
  font-size: 11px;
  color: var(--ink-3);
}

@media (max-width: 560px) {
  .use-cases {
    grid-template-columns: 1fr;
  }
  .dim-text {
    font-size: 19px;
  }
  .dim-text--sm {
    font-size: 13px;
  }
  .dev-legend text {
    font-size: 13px;
  }
}

/* ==========================================================
   RESUME
   ========================================================== */

.res-hero {
  padding: calc(var(--header-h) + clamp(40px, 6vw, 80px)) var(--gutter) clamp(40px, 6vw, 80px);
  overflow: hidden;
}
.res-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.res-hero .page-title {
  font-size: clamp(3rem, 6.4vw, 6.8rem);
  white-space: nowrap;
}
.pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.res-hero .title-block {
  position: static;
  display: inline-grid;
  margin-top: 36px;
}

/* 3D sheet stack */
.sheets-stage {
  position: relative;
  height: clamp(420px, 44vw, 600px);
  --w: clamp(190px, 19vw, 280px);
}
.sheets-float,
.sheets-tilt,
.sheet-stack {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.sheets-tilt,
.sheet-stack {
  left: 0;
  top: 0;
}
.sheet-stack {
  --rx: 56deg;
  --rz: -34deg;
  --pitch: 0deg;
  --spin: 0deg;
  transform: rotateX(calc(var(--rx) + var(--pitch))) rotateZ(calc(var(--rz) + var(--spin)));
}
.sheet {
  --z: 0px;
  --x: 0px;
  --lift: 0px;
  position: absolute;
  width: var(--w);
  height: calc(var(--w) * 1.294);
  left: calc(var(--w) / -2);
  top: calc(var(--w) * -0.647);
  transform: translate3d(var(--x), 0, calc(var(--z) + var(--lift)));
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(var(--w) * 0.08);
  border: 0;
  border-radius: 5px;
  background: #f7f8f5;
  box-shadow: inset 0 0 0 1px rgba(18, 20, 24, 0.22);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #c9cdd6;
  transform: translateZ(-3px);
}
.sheet:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}
.sheet-head {
  font-size: 9px;
  color: var(--ink-3);
}
.sheet-title {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: calc(var(--w) * 0.1);
  line-height: 1;
  text-transform: uppercase;
}
.sheet-lines,
.sheet-rail,
.sheet-chips {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 6px;
}
.sheet-lines i,
.sheet-rail i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--paper-3);
}
.sheet-lines i:nth-child(2n),
.sheet-rail i:nth-child(2n) {
  width: 72%;
}
.sheet-rail {
  padding-left: 16px;
  border-left: 2px solid var(--cobalt);
  gap: 16px;
}
.sheet-chips {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 5px;
}
.sheet-chips i {
  width: 30%;
  height: 16px;
  border-radius: 3px;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.sheet-chips i:nth-child(3n) {
  background: var(--cobalt);
  box-shadow: none;
}
.sheet-seal {
  width: calc(var(--w) * 0.26);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed var(--cobalt);
  margin: 4px 0;
}
.sheet--cover {
  background: var(--cobalt);
  color: var(--paper);
  box-shadow: none;
  justify-content: flex-end;
}
.sheet--cover::after {
  background: var(--cobalt-deep);
}
.sheet--cover .sheet-head {
  color: rgba(232, 234, 230, 0.7);
  margin-bottom: auto;
}
.sheet--cover .sheet-title {
  font-size: calc(var(--w) * 0.13);
}
.sheet-mark {
  width: calc(var(--w) * 0.2);
  height: calc(var(--w) * 0.2);
  color: var(--signal);
}
.sheet-sub {
  font-size: 10px;
  color: rgba(232, 234, 230, 0.8);
}
.sheet-tab {
  position: absolute;
  right: -34px;
  width: 34px;
  padding: 10px 0;
  border-radius: 0 5px 5px 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 9px;
  writing-mode: vertical-rl;
  text-align: center;
}
.sheet:nth-child(1) .sheet-tab { top: 64%; }
.sheet:nth-child(2) .sheet-tab { top: 44%; }
.sheet:nth-child(3) .sheet-tab { top: 24%; }
.sheet:nth-child(4) .sheet-tab { top: 5%; background: var(--signal); color: var(--ink); }
.sheet.is-hot {
  box-shadow: inset 0 0 0 2px var(--signal);
}
.sheets-hint {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  margin: 0;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Body layout with sticky index */
.res-body {
  padding: 0 var(--gutter);
}
.res-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  border-top: 1px solid var(--ink);
}
.res-index {
  position: sticky;
  z-index: 5;
  top: calc(var(--header-h) + 32px);
  align-self: start;
  display: flex;
  flex-direction: column;
  padding: 32px 0 0 18px;
}
.res-index a {
  padding: 8px 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-3);
  transition: color 0.25s;
}
.res-index a:hover,
.res-index a.is-active {
  color: var(--ink);
}
.res-index-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  background: var(--signal);
  border: 1px solid var(--ink);
}
.res-section {
  padding: 32px 0 clamp(64px, 9vw, 120px);
}
.res-section + .res-section {
  border-top: 1px solid var(--rule);
}
.res-section-head {
  margin-bottom: clamp(28px, 4vw, 48px);
}
/* "Certifications" is about 10.8em wide; on phones its column is the screen
   minus two 16px gutters, so cap the size at that width / 11 */
.res-section-head h2 {
  font-size: min(clamp(2.2rem, 5vw, 4.4rem), (100vw - 32px) / 11);
  margin-top: 14px;
}

/* Timeline */
.timeline-wrap {
  position: relative;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.tl-rail {
  position: absolute;
  left: 135px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--rule);
}
.tl-progress {
  position: absolute;
  inset: 0;
  background: var(--cobalt);
  transform-origin: 50% 0;
  transform: scaleY(0);
}
.tl-item {
  display: grid;
  grid-template-columns: 110px 52px minmax(0, 1fr);
  align-items: start;
}
.tl-year {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  padding-top: 14px;
  color: var(--ink-3);
  transition: color 0.4s;
}
.tl-item.is-on .tl-year {
  color: var(--ink);
}
.tl-dot {
  justify-self: center;
  margin-top: 22px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  position: relative;
  z-index: 1;
}
.tl-item.is-on .tl-dot {
  background: var(--cobalt);
  border-color: var(--cobalt);
}
.tl-item.is-on .tl-dot--grad {
  background: var(--signal);
  border-color: var(--ink);
}
.tl-card {
  padding: 20px 22px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
}
.tl-card:hover {
  transform: translateX(6px);
  box-shadow: -6px 6px 0 var(--ink);
}
.tl-card h3 {
  margin: 12px 0 8px;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  text-transform: uppercase;
  line-height: 1.15;
}
.tl-card p {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 15px;
}
.tl-card p:last-child {
  margin-bottom: 0;
}
.tl-card--edu {
  background: var(--ink);
  color: var(--paper);
}
.tl-card--edu p {
  color: rgba(232, 234, 230, 0.72);
}

/* Skills board */
.skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.skill-filter {
  appearance: none;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.skill-filter:hover {
  background: var(--paper-2);
}
.skill-filter.is-active {
  background: var(--ink);
  color: var(--paper);
}
.skill-filter-sep {
  width: 1px;
  height: 22px;
  margin: 0 6px;
  background: var(--rule);
}
.skill-count {
  margin: 20px 0 16px;
  color: var(--ink-2);
}
.skill-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.skill {
  display: flex;
}
.skill-tile {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.skill-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.skill-tile:hover::before,
.skill.is-open .skill-tile::before {
  transform: translateY(0);
}
.skill.is-open .skill-tile {
  box-shadow: 0 0 0 3px var(--signal);
}
.skill-tile > * {
  position: relative;
  transition: color 0.35s;
}
.skill-tile:hover > *,
.skill.is-open .skill-tile > * {
  color: var(--paper);
}
.skill-tile b {
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  line-height: 1.15;
}
.skill-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  width: 100%;
}
.skill-foot span,
.skill-foot em {
  font-family: var(--f-mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color 0.35s;
}
.skill-foot em {
  color: var(--cobalt);
}
.skill-tile:hover .skill-foot span,
.skill.is-open .skill-foot span {
  color: rgba(232, 234, 230, 0.6);
}
.skill-tile:hover .skill-foot em,
.skill.is-open .skill-foot em {
  color: var(--signal);
}
.skill-filter-label {
  font-size: 11px;
  color: var(--ink-3);
}
.skill-filter--use.is-active {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: var(--paper);
}

/* Where a skill was used: a card under the clicked tile */
.skill-board-wrap {
  position: relative;
}
.skill-pop {
  position: absolute;
  z-index: 20;
  padding: 16px 18px 14px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: -6px 6px 0 var(--ink);
}
.skill-pop[hidden] {
  display: none;
}
.skill-pop::before {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(var(--arrow, 50%) - 6px);
  width: 12px;
  height: 12px;
  background: var(--paper);
  border-left: 1px solid var(--ink);
  border-top: 1px solid var(--ink);
  transform: rotate(45deg);
}
.skill-pop-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.skill-pop-head strong {
  display: block;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.15;
  text-transform: uppercase;
}
.skill-pop-head .mono {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--ink-3);
}
.skill-pop-close {
  appearance: none;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.skill-pop-close:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.skill-pop-sub {
  margin: 12px 0 6px;
  font-size: 11px;
  color: var(--cobalt);
}
.skill-pop-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.skill-pop-list li + li {
  border-top: 1px solid var(--rule);
}
.skill-pop-list a {
  display: block;
  padding: 9px 22px 9px 0;
  position: relative;
  text-decoration: none;
  color: var(--ink);
}
.skill-pop-list a::after {
  content: "→";
  position: absolute;
  right: 2px;
  top: 9px;
  color: var(--ink-3);
  transition: transform 0.25s, color 0.25s;
}
.skill-pop-list a:hover::after {
  transform: translateX(3px);
  color: var(--cobalt);
}
.skill-pop-list strong {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
}
.skill-pop-list em {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--paper-2);
  font-family: var(--f-mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  vertical-align: 1px;
}
.skill-pop-list span {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.skill-pop-none {
  margin: 10px 0 2px;
  font-size: 14px;
  color: var(--ink-2);
}
.skill-pop-none a {
  color: var(--cobalt);
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.cert {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
}
.cert h3 {
  margin: 6px 0 6px;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  line-height: 1.2;
}
.cert p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}
.cert-year {
  color: var(--cobalt);
}
.seal {
  width: 96px;
  height: 96px;
  overflow: visible;
}
.seal-line {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.seal-ring {
  transform-box: view-box;
  transform-origin: 60px 60px;
}
.seal-ring .seal-line {
  stroke: var(--ink);
  stroke-width: 1.5;
}

/* PDF band */
.pdf-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  padding: clamp(28px, 4vw, 52px);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  background-image:
    linear-gradient(rgba(232, 234, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 234, 230, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.pdf-band .eyebrow,
.pdf-band p {
  color: rgba(232, 234, 230, 0.7);
}
.pdf-band h2 {
  font-size: clamp(2rem, 4.4vw, 3.8rem);
  margin: 14px 0 12px;
}
.pdf-band p {
  margin: 0;
}
.btn--signal {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
}
.btn--signal:hover {
  background: var(--paper);
  border-color: var(--paper);
}
.btn--ghost {
  border-color: rgba(232, 234, 230, 0.5);
  color: var(--paper);
}
.btn--ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

html.js .sheet,
html.js .sheets-hint,
html.js .res-hero .title-block {
  opacity: 0;
}

@media (max-width: 960px) {
  .res-hero-grid {
    grid-template-columns: 1fr;
  }
  .sheets-stage {
    height: 440px;
  }
  .res-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .res-index {
    position: sticky;
    top: var(--header-h);
    z-index: 10;
    flex-direction: row;
    gap: 18px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 10px var(--gutter);
    overflow-x: auto;
    background: rgba(232, 234, 230, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
  }
  .res-index a {
    white-space: nowrap;
  }
  .res-index-marker {
    display: none;
  }
  .res-index a.is-active {
    box-shadow: inset 0 -2px 0 var(--cobalt);
  }
}
@media (max-width: 600px) {
  .sheets-stage {
    height: 360px;
    --w: 170px;
  }
  .tl-rail {
    left: 11px;
  }
  .tl-item {
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 14px;
  }
  .tl-year {
    grid-column: 2;
    padding-top: 0;
    font-size: 1.3rem;
  }
  .tl-dot {
    grid-column: 1;
    grid-row: 1;
    margin-top: 6px;
  }
  .tl-card {
    grid-column: 2;
    margin-top: 8px;
  }
  .cert-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cert {
    grid-template-columns: 64px 1fr;
  }
  .seal {
    width: 64px;
    height: 64px;
  }
  .skill-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .skill-filter-sep {
    display: none;
  }
}

/* Landing: who Pranav is */
.hero-role {
  margin: -8px 0 18px;
  color: var(--cobalt);
}
.about-title {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  margin: 16px 0 28px;
}
.about-body {
  max-width: 36em;
  margin: 26px 0 28px;
  color: var(--ink-2);
}
#about {
  border-bottom: 0;
}

/* ==========================================================
   HOME — AMR scorecard, CloudClean autopilot strip
   ========================================================== */

.project h3 a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project h3 a:hover {
  background-size: 100% 3px;
}
.project-links .text-link--strong {
  font-weight: 600;
}

.scorecard {
  display: grid;
  gap: 16px;
  margin: 0 0 26px;
  padding: 18px 18px 14px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}
.score-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.score-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.score-value {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1;
}
.score-bar {
  position: relative;
  height: 10px;
  margin: 10px 0 8px;
  border-radius: 999px;
  background: #d5dbff;
  overflow: hidden;
}
.score-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--p) * 100%);
  border-radius: 999px;
  background: var(--cobalt);
  transform-origin: 0 50%;
}
.score-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}
.project-body .score-note {
  margin: 0;
  max-width: none;
}
.score-foot {
  margin: 2px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-size: 10.5px;
  color: var(--ink-3);
}
.project-body .score-foot {
  margin: 2px 0 0;
  color: var(--ink-3);
}

.autopilot {
  margin: 0 0 24px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(232, 234, 230, 0.28);
  border-radius: 8px;
  background: rgba(232, 234, 230, 0.04);
}
.autopilot-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 14px;
  font-size: 11px;
  color: rgba(232, 234, 230, 0.7);
}
.autopilot-head b {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--signal);
  color: var(--ink);
  font-weight: 600;
}
.autopilot-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.autopilot-steps li {
  position: relative;
  padding: 8px 4px 7px;
  border: 1px solid rgba(232, 234, 230, 0.22);
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  line-height: 1.25;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  color: rgba(232, 234, 230, 0.75);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.autopilot-steps li.is-you {
  border-color: var(--paper);
  color: var(--paper);
}
.autopilot-steps li.is-on {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
}
.autopilot-steps li.is-done {
  border-color: rgba(255, 184, 0, 0.6);
  color: var(--signal);
}
.autopilot-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin: 12px 0 0;
  font-size: 10.5px;
  color: rgba(232, 234, 230, 0.6);
}
.project--dark .project-body .autopilot p {
  margin: 0;
  max-width: none;
}
.project--dark .project-body .autopilot .autopilot-head {
  margin-bottom: 14px;
}
.project--dark .project-body .autopilot .autopilot-foot {
  margin-top: 12px;
}
.project-body .autopilot-lede {
  color: var(--paper);
}
@media (max-width: 560px) {
  .autopilot-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================
   PROJECT STORY PAGES
   ========================================================== */

.story-hero {
  padding: calc(var(--header-h) + clamp(36px, 6vw, 80px)) var(--gutter) clamp(32px, 5vw, 56px);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(24px, 4vw, 40px);
  font-size: 12px;
  color: var(--ink-2);
  text-decoration: none;
}
.back-link:hover {
  color: var(--cobalt);
}
.story-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}
.story-hero .page-title {
  font-size: clamp(3.2rem, 10vw, 8.6rem);
}
.story-kicker {
  margin: 14px 0 0;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.1vw, 1.7rem);
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--cobalt);
}
.story-hero .page-lede {
  max-width: 36em;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 24px 0 0;
  padding: 6px 13px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.status-pill--done .status-dot {
  background: var(--cobalt);
}
.story-hero .title-block {
  position: static;
  min-width: 250px;
}

.story-demo {
  padding: 0 var(--gutter) clamp(56px, 8vw, 104px);
}
.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.demo-grid .case-visual {
  margin: 0;
}
.demo-notes h2 {
  margin: 0 0 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.demo-notes p {
  margin: 0 0 14px;
  color: var(--ink-2);
}
.demo-notes .case-points li {
  font-size: 15.5px;
}
.demo-notes .ask-card {
  margin-top: 20px;
}

.story-main {
  padding: 0 var(--gutter) clamp(64px, 9vw, 120px);
}
.story-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  padding-top: 28px;
  border-top: 1px solid var(--ink);
}
.story-toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  align-self: start;
  display: grid;
  gap: 2px;
}
.story-toc a {
  position: relative;
  padding: 6px 0 6px 18px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-3);
  transition: color 0.2s;
}
.story-toc a::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border: 1px solid var(--ink-3);
  transform: rotate(45deg);
  transition: background-color 0.2s, border-color 0.2s;
}
.story-toc a:hover,
.story-toc a.is-active {
  color: var(--ink);
}
.story-toc a.is-active::before {
  background: var(--signal);
  border-color: var(--ink);
}
.story-body {
  min-width: 0;
  max-width: 780px;
}
.story-section {
  margin-bottom: clamp(56px, 7vw, 88px);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.story-section:last-child {
  margin-bottom: 0;
}
.story-section > h2 {
  margin: 12px 0 22px;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
}
.story-section > p,
.story-section .chapter-body > p {
  margin: 0 0 14px;
  color: var(--ink-2);
}
.story-section strong {
  color: var(--ink);
  font-weight: 600;
}

/* Stat tiles */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  margin: 0 0 18px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.stat-tile {
  padding: 16px 16px 18px;
  background: var(--paper);
}
.stat-value {
  display: block;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.05;
}
.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-2);
}

/* Spec sheet */
.spec-sheet {
  margin: 8px 0 0;
}

/* The journey: numbered chapters on a rail */
.chapters {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chapters::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 10px;
  bottom: 30px;
  width: 1px;
  background: var(--ink);
}
.chapter {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0 20px;
  padding-bottom: clamp(36px, 5vw, 52px);
}
.chapter:last-child {
  padding-bottom: 0;
}
.chapter-n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--f-mono);
  font-size: 12px;
}
.chapter.is-on .chapter-n {
  background: var(--signal);
}
.chapter--next .chapter-n {
  border-style: dashed;
  background: var(--paper);
}
.chapter-when {
  margin: 9px 0 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.chapter h3 {
  margin: 0 0 12px;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.15;
  text-transform: uppercase;
}
.chapter-body > p {
  margin: 0 0 12px;
  color: var(--ink-2);
}
.chapter-body .case-points li {
  font-size: 15.5px;
  color: var(--ink-2);
}
.finding {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--signal);
  border-radius: 0 6px 6px 0;
  background: var(--paper-2);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
}
.finding b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cobalt);
}

/* Lessons grid */
.lessons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  counter-reset: lesson;
}
.lessons li {
  padding: 18px 18px 20px;
  background: var(--paper);
  counter-increment: lesson;
}
.lessons li::before {
  content: counter(lesson, decimal-leading-zero);
  display: block;
  margin-bottom: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--cobalt);
}
.lessons strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
}
.lessons p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* Before / after comparison (e.g. Autopilot vs doing it by hand) */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 8px 0 18px;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
}
.compare > div {
  padding: 18px;
  background: var(--paper);
}
.compare > div:last-child {
  background: var(--ink);
  color: var(--paper);
}
.compare h3 {
  margin: 0 0 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.compare > div:last-child h3 {
  color: var(--signal);
}
.compare-count {
  display: block;
  margin-bottom: 12px;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.1;
}
.compare ol {
  margin: 0;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.compare > div:last-child ol {
  color: rgba(232, 234, 230, 0.78);
}
.compare li + li {
  margin-top: 4px;
}

/* Evolution strip (versions of a system) */
.evolution {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.evolution li {
  position: relative;
  padding: 12px 12px 14px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.evolution li:last-child {
  background: var(--ink);
  color: rgba(232, 234, 230, 0.8);
}
.evolution b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.evolution li:last-child b {
  color: var(--signal);
}

/* Small charts */
.chart {
  position: relative;
  margin: 20px 0 0;
  padding: 18px 18px 14px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}
.chart-head {
  margin-bottom: 14px;
}
.chart-head strong {
  display: block;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  text-transform: uppercase;
}
.chart-head span {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: -4px 0 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.chart-legend i {
  display: inline-block;
  width: 12px;
  height: 8px;
  margin-right: 7px;
  border-radius: 0 3px 3px 0;
  vertical-align: 0;
}
.chart-rows {
  display: grid;
  gap: 4px;
}
.chart-row {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 14fr);
  gap: 4px 16px;
  align-items: center;
  padding: 6px 6px;
  margin: 0 -6px;
  border-radius: 6px;
  outline-offset: 0;
  transition: background-color 0.2s;
}
.chart-row:hover,
.chart-row:focus-visible {
  background: var(--paper-2);
}
.chart-label {
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
}
.chart-bars {
  display: grid;
  gap: 3px;
}
.chart-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.chart-bar i {
  flex: 0 0 auto;
  width: max(3px, calc((100% - 86px) * var(--p)));
  height: 12px;
  border-radius: 0 4px 4px 0;
  background: var(--cobalt);
  transform-origin: 0 50%;
}
.chart--pairs .chart-bar i {
  height: 10px;
}
.chart-bar.is-before i,
.chart-bar.is-muted i,
.k-before {
  background: #b3b8c0;
}
.k-after {
  background: var(--cobalt);
}
.chart-bar b {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink);
}
.chart-bar.is-before b,
.chart-bar.is-muted b {
  color: var(--ink-2);
}
.chart-foot {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.chart-data {
  margin-top: 8px;
  font-size: 12.5px;
}
.chart-data summary {
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.chart-data table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.chart-data th,
.chart-data td {
  padding: 5px 8px 5px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.chart-data th {
  font-weight: 500;
  color: var(--ink-2);
}
.chart-tip {
  position: absolute;
  z-index: 5;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(18, 20, 24, 0.18);
}
.chart-tip[hidden] {
  display: none;
}
.chart-tip strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
}
.chart-tip span {
  display: block;
  color: rgba(232, 234, 230, 0.72);
}

/* Ongoing banner */
.ongoing {
  position: relative;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  background-image:
    linear-gradient(rgba(232, 234, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 234, 230, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.ongoing .eyebrow {
  color: var(--signal);
}
.ongoing h3 {
  margin: 12px 0 10px;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.15;
  text-transform: uppercase;
}
.ongoing p {
  margin: 0 0 12px;
  color: rgba(232, 234, 230, 0.78);
}
.ongoing .case-points li {
  border-bottom-color: rgba(232, 234, 230, 0.14);
  color: rgba(232, 234, 230, 0.85);
  font-size: 15.5px;
}
.ongoing .case-points li::before {
  border-color: var(--paper);
}
.ongoing-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px dashed rgba(255, 184, 0, 0.6);
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--signal);
}
.ongoing .ongoing-note {
  margin-bottom: 0;
}

/* Prev / next project */
.story-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.story-pager a {
  display: grid;
  gap: 6px;
  padding: clamp(24px, 4vw, 44px) var(--gutter);
  text-decoration: none;
  transition: background-color 0.25s;
}
.story-pager a + a {
  border-left: 1px solid var(--ink);
  text-align: right;
}
.story-pager a:hover {
  background: var(--paper-2);
}
.story-pager .mono {
  color: var(--ink-3);
}
.story-pager strong {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  line-height: 1;
  text-transform: uppercase;
}

html.js .story-hero .intro-in {
  opacity: 0;
}

@media (max-width: 1080px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
  .story-grid {
    grid-template-columns: 1fr;
  }
  .story-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
  }
}
@media (max-width: 860px) {
  .story-hero-grid {
    grid-template-columns: 1fr;
  }
  .story-hero .title-block {
    display: grid;
    min-width: 0;
    justify-self: start;
  }
  .evolution {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .lessons,
  .compare {
    grid-template-columns: 1fr;
  }
  .chart-row {
    grid-template-columns: 1fr;
  }
  .story-pager strong {
    font-size: 1.05rem;
  }
}

/* Two small charts side by side */
.chart-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.chart-pair .chart {
  margin: 0;
}
.chart-pair .chart-row {
  grid-template-columns: 1fr;
  gap: 4px;
}
@media (max-width: 700px) {
  .chart-pair {
    grid-template-columns: 1fr;
  }
}
.chapter-body > .finding {
  margin: 18px 0 0;
}

/* Story titles: long single words must never break mid-word */
.story-hero .page-title {
  font-size: clamp(2.4rem, 6vw, 6.8rem);
}
.story-hero .page-title--short {
  font-size: clamp(3.2rem, 10vw, 8.6rem);
}
@media (max-width: 860px) {
  .story-hero .page-title {
    font-size: clamp(2.1rem, 9.4vw, 5rem);
  }
  .story-hero .page-title--short {
    font-size: clamp(3rem, 16vw, 6rem);
  }
}
.compare-then {
  margin: 14px 0 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--signal);
}
.compare-auto {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(232, 234, 230, 0.78);
}
.compare-auto li {
  position: relative;
  padding-left: 20px;
}
.compare-auto li + li {
  margin-top: 4px;
}
.compare-auto li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--signal);
}

/* ---------- AMR: real-robot video ---------- */

.story-video {
  padding: 0 var(--gutter) clamp(48px, 7vw, 88px);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.video-frame {
  position: relative;
  margin: 0;
  border: 1px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink);
}
.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}
.video-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(18, 20, 24, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--paper);
  font-size: 11px;
  pointer-events: none;
}
.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d9412b;
}
.video-chapters {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.video-chapter {
  appearance: none;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-2);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.video-chapter:hover {
  border-color: var(--ink);
}
.video-chapter.is-active {
  border-color: var(--ink);
  background: var(--paper-2);
  box-shadow: inset 3px 0 0 var(--signal);
}
.video-chapter time {
  padding-top: 2px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--cobalt);
}
.video-chapter strong {
  display: block;
  margin-bottom: 3px;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--ink);
}

/* ==========================================================
   F1 — live pick + joke bet
   ========================================================== */

.story-live {
  padding: 0 var(--gutter) clamp(56px, 8vw, 104px);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.live-head {
  max-width: 40em;
  margin-bottom: 24px;
}
.live-head h2 {
  margin: 12px 0 14px;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
}
.live-head p {
  margin: 0;
  color: var(--ink-2);
}
.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(16px, 2.4vw, 28px);
  align-items: start;
}
.live-card {
  padding: clamp(20px, 3vw, 32px);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  background-image:
    linear-gradient(rgba(232, 234, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 234, 230, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.live-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 18px;
  font-size: 11px;
  color: rgba(232, 234, 230, 0.6);
}
.live-updated {
  margin-left: auto;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid #d9412b;
  border-radius: 999px;
  color: #ff8a73;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5a3c;
  animation: live-blink 1.6s ease-in-out infinite;
}
.live-pill.is-off {
  border-color: rgba(232, 234, 230, 0.3);
  color: rgba(232, 234, 230, 0.6);
}
.live-pill.is-off i {
  background: rgba(232, 234, 230, 0.4);
  animation: none;
}
@keyframes live-blink {
  50% { opacity: 0.25; }
}
.live-race {
  margin: 0 0 6px;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.02;
  text-transform: uppercase;
}
.live-where {
  margin: 0 0 16px;
  font-size: 14.5px;
  color: rgba(232, 234, 230, 0.7);
}
.live-count {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 22px;
  font-size: 11px;
  color: rgba(232, 234, 230, 0.6);
}
.live-count b {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
.live-pick {
  padding: 18px 0 16px;
  border-top: 1px solid rgba(232, 234, 230, 0.16);
}
.live-pick .mono {
  margin: 0 0 6px;
  font-size: 11px;
  color: var(--signal);
}
.live-pick strong {
  display: block;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1;
  text-transform: uppercase;
}
.live-pick span {
  display: block;
  margin-top: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 234, 230, 0.7);
}
.live-podium {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(232, 234, 230, 0.16);
  border: 1px solid rgba(232, 234, 230, 0.16);
  border-radius: 6px;
  overflow: hidden;
}
.live-podium li {
  padding: 10px 12px;
  background: var(--ink);
  font-size: 15px;
}
.live-podium b {
  margin-right: 8px;
  font-size: 11px;
  color: var(--signal);
}
.live-podium span {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: rgba(232, 234, 230, 0.6);
}
.live-note {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(232, 234, 230, 0.75);
}
.live-record {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 14px;
  background: rgba(232, 234, 230, 0.16);
  border: 1px solid rgba(232, 234, 230, 0.16);
  border-radius: 6px;
  overflow: hidden;
}
.live-record div {
  padding: 10px 12px;
  background: var(--ink);
}
.live-record dt {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(232, 234, 230, 0.55);
}
.live-record dd {
  margin: 4px 0 0;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--paper);
}
.live-record div:first-child dd {
  color: var(--signal);
}
.live-how summary {
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(232, 234, 230, 0.65);
}
.live-how p {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(232, 234, 230, 0.72);
}
.live-skeleton {
  display: grid;
  gap: 12px;
}
.live-skeleton i {
  display: block;
  height: 18px;
  border-radius: 4px;
  background: rgba(232, 234, 230, 0.1);
}
.live-skeleton i:nth-child(1) { width: 70%; height: 34px; }
.live-skeleton i:nth-child(2) { width: 45%; }
.live-skeleton i:nth-child(3) { width: 60%; height: 48px; }

/* The bet: a paper slip with torn ticket edges */
.bet-card {
  position: relative;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: #f4f5f1;
}
.bet-card h3 {
  margin: 10px 0 8px;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.15;
  text-transform: uppercase;
}
.bet-card > p {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--ink-2);
}
.bet-label {
  display: block;
  margin: 14px 0 6px;
  font-size: 11px;
  color: var(--ink-3);
}
.bet-row {
  display: flex;
  gap: 8px;
}
.bet-select {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.bet-row .ask-option {
  flex: none;
}
.bet-stakes {
  margin: 0 0 18px;
}
.bet-card .btn {
  cursor: pointer;
}
.bet-fine {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
}
.bet-card > .bet-fine {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}
.slip {
  position: relative;
  margin: 14px 0 16px;
  padding: 16px 16px 14px;
  border: 1px dashed var(--ink-2);
  border-radius: 6px;
  background: var(--paper);
  background-image: repeating-linear-gradient(0deg, transparent 0 22px, rgba(18, 20, 24, 0.035) 22px 23px);
}
.slip-head {
  display: flex;
  justify-content: space-between;
  margin: 0 0 6px;
  font-size: 10.5px;
  color: var(--ink-3);
}
.slip-race {
  margin: 0 0 10px;
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
}
.slip dl {
  margin: 0;
}
.slip dl div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}
.slip dt {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 2px;
}
.slip dd {
  margin: 0;
  color: var(--ink);
}
.slip dd .mono {
  margin-left: 6px;
  font-size: 11px;
  color: var(--cobalt);
}
.slip-quip {
  margin: 10px 0 0;
  font-size: 13.5px;
  font-style: italic;
  color: var(--ink-2);
}
.slip-stamp {
  position: absolute;
  right: 14px;
  top: 38px;
  padding: 4px 10px;
  border: 2px solid #d9412b;
  border-radius: 4px;
  color: #d9412b;
  font-size: 12px;
  font-weight: 600;
  transform: rotate(-8deg);
}
.bet-settled {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--signal);
  border-radius: 0 6px 6px 0;
  background: var(--paper-2);
  font-size: 14px;
  line-height: 1.5;
}
.bet-settled b {
  display: block;
  margin-bottom: 2px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--cobalt);
}
.bet-tally {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-2);
}
.bet-tally b {
  font-family: var(--f-display);
  font-size: 18px;
  color: var(--ink);
}

/* Home page: one-line live strip on the F1 card */
.live-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 24px;
  padding: 12px 14px;
  border: 1px solid rgba(232, 234, 230, 0.2);
  border-radius: 8px;
  background: rgba(232, 234, 230, 0.04);
}
.live-strip p {
  margin: 0;
  min-width: 0;
}
.project--dark .project-body .live-strip p {
  margin: 0;
  color: var(--paper);
}
.live-strip p .mono {
  display: block;
  font-size: 10px;
  color: rgba(232, 234, 230, 0.55);
}
.live-strip b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.live-strip .text-link {
  grid-column: 1 / -1;
  justify-self: start;
  font-size: 12px;
}
.live-strip.is-off .live-pill {
  border-color: rgba(232, 234, 230, 0.3);
  color: rgba(232, 234, 230, 0.6);
}
.live-strip.is-off .live-pill i {
  background: rgba(232, 234, 230, 0.4);
  animation: none;
}

@media (max-width: 1080px) {
  .live-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.live-card,
.bet-card {
  min-width: 0;
}
.live-where,
.live-top span {
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .live-record {
    grid-template-columns: 1fr;
  }
  .live-podium {
    grid-template-columns: 1fr;
  }
  .slip dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .live-strip {
    grid-template-columns: 1fr;
  }
  .live-strip .live-pill {
    justify-self: start;
  }
  .bet-row {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-pill i {
    animation: none;
  }
}
.track-legend-race {
  flex-basis: 100%;
  font-style: normal;
  color: rgba(232, 234, 230, 0.45);
}
.track-legend-race:empty {
  display: none;
}
.bet-card > .bet-label {
  margin: 14px 0 6px;
  font-size: 11px;
  color: var(--ink-3);
}
.project-visual,
.project-body {
  min-width: 0;
}
@media (max-width: 1080px) {
  .project {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 400px) {
  .project h3 {
    font-size: 1.45rem;
  }
  .story-pager {
    grid-template-columns: 1fr;
  }
  .story-pager a + a {
    border-left: 0;
    border-top: 1px solid var(--ink);
    text-align: left;
  }
}
.hero-lede a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--cobalt);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.hero-lede a:hover {
  color: var(--cobalt);
}
/* Short phones (iPhone SE and similar): tighter type, and the decorative
   unit gets smaller and sits lower so it never runs into the intro */
@media (max-width: 860px) and (max-height: 680px) {
  .stage {
    --u: min(30vw, 15vh);
  }
  .unit-wrap {
    top: 90%;
  }
  .hero-copy {
    top: calc(var(--header-h) + 12px);
  }
  .hero-name {
    margin: 6px 0 8px;
  }
  .hero-role {
    margin: 0;
    font-size: 10.5px;
  }
  .hero-lede {
    margin: 8px 0 12px;
    font-size: 13.5px;
    line-height: 1.45;
  }
  .hero-actions .btn {
    padding: 9px 15px;
    font-size: 12px;
  }
}

/* Resume stack: grab to turn it, and a label naming the sheet under the cursor */
.sheets-stage {
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.sheets-stage.is-grabbing,
.sheets-stage.is-grabbing .sheet {
  cursor: grabbing;
}
.sheet.is-hot {
  box-shadow: inset 0 0 0 3px var(--signal);
}
.sheet.is-hot .sheet-tab {
  background: var(--signal);
  color: var(--ink);
}
.sheets-label {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  min-height: 1.4em;
  margin: 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cobalt);
  pointer-events: none;
}
.tl-points {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.tl-points li {
  position: relative;
  padding: 8px 0 8px 18px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.tl-points li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 16px;
  width: 7px;
  height: 7px;
  background: var(--signal);
  border: 1px solid var(--ink);
  transform: rotate(45deg);
}
.tl-points strong {
  color: var(--ink);
  font-weight: 600;
}
.tl-item {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* CloudClean diagram: the mesh step */
.mesh {
  opacity: 0;
}
.mesh-wire {
  fill: none;
  stroke: var(--cobalt-soft);
  stroke-width: 0.7;
  stroke-opacity: 0.8;
  stroke-linecap: round;
}
.mesh-edge {
  fill: none;
  stroke: #8a9cff;
  stroke-width: 1.2;
  stroke-linejoin: round;
}
