:root {
  --paper: #f2f0eb;
  --paper-2: #e9e6df;
  --ink: #151513;
  --mute: #6d6a63;
  --line: rgba(21, 21, 19, 0.14);
  --line-strong: rgba(21, 21, 19, 0.85);
  --accent: #ff4f00;            /* international orange */
  --sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 3.4vw, 48px);
  --nav-h: 56px;
  --col: minmax(0, 1fr);
  --ease: cubic-bezier(0.22, 0.8, 0.16, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "kern";
}
h1, h2, h3, p, ol, ul, dl, dd, figure, table { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.label { font-family: var(--mono); font-size: 12px; font-weight: 400; line-height: 1.4; letter-spacing: 0.02em; text-transform: uppercase; color: var(--mute); }
.skip { position: fixed; left: var(--gutter); top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; font-family: var(--mono); font-size: 12px; }
.skip:focus { top: 10px; }

.link { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: color 0.2s, background-size 0.35s var(--ease); }
.link:hover { color: var(--accent); background-size: 0 1px; background-position: 100% 100%; }

/* ================= NAV ================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-inline: var(--gutter);
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled { background: rgba(242, 240, 235, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.nav-name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.nav nav { display: flex; gap: clamp(14px, 2.2vw, 30px); }
.nav nav a { font-size: 15px; color: var(--mute); padding: 8px 0; position: relative; transition: color 0.2s; }
.nav nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease); }
.nav nav a:hover, .nav nav a.active { color: var(--ink); }
.nav nav a:hover::after, .nav nav a.active::after { transform: scaleX(1); transform-origin: left; }

/* ================= HERO ================= */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; border-bottom: 1px solid var(--line-strong); }
.field-wrap { position: absolute; inset: 0; }
#field { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: pan-y; }
.hero-text { position: absolute; left: var(--gutter); top: calc(var(--nav-h) + clamp(20px, 5vh, 64px)); width: min(64vw, 1040px); pointer-events: none; }
.hero h1 {
  font-size: clamp(34px, 5.1vw, 86px); font-weight: 500; line-height: 1.03; letter-spacing: -0.038em;
  text-wrap: balance; margin-left: -0.04em;
}
.mode {
  pointer-events: auto; display: inline; font-weight: inherit; letter-spacing: inherit; line-height: inherit;
  color: var(--mute); background: linear-gradient(var(--line-strong), var(--line-strong)) 0 92% / 100% 2px no-repeat;
  transition: color 0.2s, background 0.2s; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.mode:hover { color: var(--ink); }
.mode[aria-pressed="true"] { color: var(--ink); background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 4px; }
.nb { white-space: nowrap; }
.hero-meta { margin-top: clamp(16px, 2.2vw, 30px); }
.hero-meta span { margin: 0 6px; }

.field-info { position: absolute; left: var(--gutter); bottom: clamp(18px, 3vh, 32px); display: grid; gap: 6px; max-width: min(46ch, 60vw); pointer-events: none; }
.field-note { font-size: clamp(15px, 1.25vw, 18px); line-height: 1.3; letter-spacing: -0.01em; }
.field-stat { color: var(--ink); font-variant-numeric: tabular-nums; }
.field-stat::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; }

/* ================= SECTIONS ================= */
.section { display: grid; grid-template-columns: repeat(12, var(--col)); column-gap: clamp(12px, 1.6vw, 24px); padding: clamp(72px, 10vw, 150px) var(--gutter) 0; }
.section-head { grid-column: 1 / span 3; position: sticky; top: calc(var(--nav-h) + 12px); align-self: start; display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line-strong); }
.section-head h2 { color: var(--ink); }
.section > :not(.section-head) { grid-column: 4 / -1; }

/* ---- work rows ---- */
.rows { border-top: 1px solid var(--line-strong); }
.row { border-bottom: 1px solid var(--line); }
.row-head {
  width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1.05fr) minmax(0, 1fr) auto 28px; column-gap: clamp(12px, 1.6vw, 24px);
  align-items: baseline; padding: clamp(16px, 1.9vw, 26px) 0; cursor: pointer;
}
.row-title { font-size: clamp(26px, 3.3vw, 54px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; transition: transform 0.45s var(--ease); }
.row-sum { color: var(--mute); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.3; }
.row-year { text-align: right; white-space: nowrap; }
.row-no { transition: color 0.2s; }
.row-plus { position: relative; width: 14px; height: 14px; justify-self: end; align-self: center; transition: transform 0.45s var(--ease); }
.row-plus::before, .row-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -0.75px; background: var(--ink); }
.row-plus::after { transform: rotate(90deg); transition: transform 0.45s var(--ease), background 0.2s; }
.row-head:hover .row-title { transform: translateX(10px); }
.row-head:hover .row-no, .row-head[aria-expanded="true"] .row-no { color: var(--accent); }
.row-head[aria-expanded="true"] .row-plus::after { transform: rotate(0deg); }
.row-head[aria-expanded="true"] .row-plus::before, .row-head[aria-expanded="true"] .row-plus::after { background: var(--accent); }
.row-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.55s var(--ease); }
.row-body > .row-inner { overflow: hidden; min-height: 0; }
.row-head[aria-expanded="true"] + .row-body { grid-template-rows: 1fr; }
.row-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: clamp(24px, 4vw, 72px); padding-left: calc(44px + clamp(12px, 1.6vw, 24px)); visibility: hidden; transition: visibility 0.55s; }
.row-head[aria-expanded="true"] + .row-body .row-inner { visibility: visible; }
.row-inner > * { padding-bottom: clamp(24px, 3vw, 44px); padding-top: 4px; }
.row-text p { margin-bottom: 14px; max-width: 58ch; }
.row-text p:first-child { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.32; letter-spacing: -0.015em; }
.row-text p:not(:first-child) { color: #3d3b37; }
.row-text b { font-weight: 600; color: var(--ink); }
.meta > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.meta dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--mute); padding-top: 2px; }

/* ---- experience tables ---- */
.tables { display: grid; gap: clamp(40px, 5vw, 72px); }
.table { width: 100%; border-collapse: collapse; }
.table caption { text-align: left; padding-bottom: 10px; }
.table tr { border-top: 1px solid var(--line); }
.table tr:first-child { border-top: 1px solid var(--line-strong); }
.table tr:last-child { border-bottom: 1px solid var(--line); }
.table th, .table td { text-align: left; vertical-align: baseline; padding: 14px 16px 14px 0; font-weight: 400; }
.table th { width: 46%; font-weight: 500; font-size: clamp(17px, 1.5vw, 22px); letter-spacing: -0.02em; }
.table td { color: var(--mute); }
.table .when { text-align: right; white-space: nowrap; padding-right: 0; width: 1%; }
.when i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; }
.place { display: inline-block; min-width: 2.6em; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--accent); vertical-align: 0.2em; }

/* ---- about ---- */
.about { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); column-gap: clamp(24px, 4vw, 72px); border-top: 1px solid var(--line-strong); padding-top: clamp(20px, 2.4vw, 32px); align-items: start; }
.portrait img { width: 100%; filter: grayscale(1) contrast(1.02); background: var(--paper-2); }
.portrait figcaption { margin-top: 10px; }
.statement { font-size: clamp(24px, 2.7vw, 42px); font-weight: 500; line-height: 1.12; letter-spacing: -0.035em; margin-bottom: 22px; text-wrap: balance; }
.about-text > p:not(.statement) { max-width: 58ch; color: #3d3b37; }
.facts { margin-top: clamp(28px, 3.4vw, 48px); }
.facts > div { display: grid; grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { padding-top: 3px; }
.facts dd { font-size: 16px; line-height: 1.45; }

/* ---- contact ---- */
.contact { padding-bottom: clamp(72px, 10vw, 150px); }
.contact-body { border-top: 1px solid var(--line-strong); padding-top: clamp(20px, 2.4vw, 32px); }
.contact-lead { color: var(--mute); font-size: clamp(17px, 1.5vw, 22px); margin-bottom: 10px; }
.email { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 20px; }
.email-link { font-size: clamp(24px, 4.7vw, 76px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.05; overflow-wrap: anywhere; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat; transition: background-size 0.5s var(--ease); padding-bottom: 4px; }
.email-link:hover, .email-link:focus-visible { background-size: 100% 3px; }
.copy { color: var(--ink); border: 1px solid var(--line-strong); padding: 8px 12px; min-width: 76px; text-align: center; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.copy:hover { background: var(--ink); color: var(--paper); }
.copy.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.elsewhere { display: flex; gap: 24px; margin-top: clamp(24px, 3vw, 40px); font-size: 18px; }

.footer { display: flex; justify-content: space-between; gap: 12px; padding: 18px var(--gutter); border-top: 1px solid var(--line); }
.footer a:hover { color: var(--ink); }

/* ================= TABLET / MOBILE ================= */
@media (max-width: 980px) {
  .section { display: block; }
  .section-head { position: static; flex-direction: row; justify-content: space-between; margin-bottom: 18px; }
  .rows, .about, .contact-body { border-top: 0; }
  .about, .contact-body { padding-top: 0; }
  .row-head { grid-template-columns: 34px minmax(0, 1fr) auto 22px; }
  .row-sum { grid-column: 2 / 4; grid-row: 2; margin-top: 6px; }
  .row-inner { grid-template-columns: 1fr; padding-left: calc(34px + clamp(12px, 1.6vw, 24px)); }
  .row-inner > .row-text { padding-bottom: 8px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav nav a { font-size: 14px; }
  .nav-name .first { display: none; }
  .hero { height: auto; min-height: 100svh; display: flex; flex-direction: column; }
  .hero-text { position: static; width: auto; padding: calc(var(--nav-h) + 20px) var(--gutter) 0; }
  .hero h1 { font-size: clamp(32px, 9.4vw, 54px); }
  .field-wrap { position: relative; inset: auto; flex: 1; min-height: 320px; margin-top: 18px; border-top: 1px solid var(--line); order: 2; }
  .field-info { position: static; order: 3; max-width: none; padding: 14px var(--gutter) 18px; border-top: 1px solid var(--line); }
  .row-year { display: none; }
  .row-head { grid-template-columns: 30px minmax(0, 1fr) 22px; }
  .row-sum { grid-column: 2 / 3; }
  .row-inner { padding-left: 0; }
  .table, .table tbody, .table tr, .table th, .table td { display: block; width: auto; }
  .table tr { padding: 12px 0; }
  .table th, .table td { padding: 0; }
  .table .when { text-align: left; margin-top: 4px; }
  .about { grid-template-columns: 1fr; row-gap: 24px; }
  .portrait { max-width: 220px; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =====================================================================
   v2: hero without headline, lab, terminal, point-cloud portrait, motion
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- hero ---- */
.hero { border-bottom: 0; z-index: 0; }
.hero-inner { position: absolute; inset: 0; will-change: transform, opacity; transform-origin: 50% 0; }
.hero-meta { position: absolute; right: var(--gutter); bottom: clamp(18px, 3vh, 32px); margin: 0; text-align: right; pointer-events: none; }
.seg { display: inline-flex; width: max-content; border: 1px solid var(--line-strong); background: var(--paper); pointer-events: auto; margin-bottom: 8px; }
.seg .mode {
  display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1;
  padding: 10px 14px; color: var(--mute); background: none; border-right: 1px solid var(--line-strong); transition: background 0.2s, color 0.2s;
}
.seg .mode:last-child { border-right: 0; }
.seg .mode:hover { color: var(--ink); }
.seg .mode[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.sheet { position: relative; z-index: 2; background: var(--paper); border-top: 1px solid var(--line-strong); }

/* ---- scroll rail + cursor tag ---- */
.rail { position: fixed; left: 0; top: 0; bottom: 0; width: 3px; z-index: 45; pointer-events: none; }
.rail i { display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: 50% 0; transform: scaleY(0); will-change: transform; }
.cursor-tag {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff;
  transform: translate3d(var(--x, -100px), var(--y, -100px), 0) translate(-50%, -50%) scale(var(--s, 0));
  transition: --s 0.3s; will-change: transform;
}
@media (hover: none), (pointer: coarse) { .cursor-tag { display: none; } }

/* ---- statement: words light up with scroll ---- */
.statement-block { padding: clamp(90px, 15vw, 240px) var(--gutter) clamp(40px, 6vw, 90px); }
.big { font-size: clamp(31px, 5.6vw, 96px); font-weight: 500; line-height: 1.02; letter-spacing: -0.042em; max-width: 17em; margin-left: -0.04em; }
.big .w { opacity: 0.14; transition: opacity 0.45s var(--ease); }
.big .w.on { opacity: 1; }

/* ---- reveals ---- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 44px, 0); transition: opacity 1s var(--ease), transform 1.15s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---- lab ---- */
.demos { display: grid; gap: clamp(64px, 9vw, 130px); border-top: 1px solid var(--line-strong); padding-top: clamp(20px, 2.4vw, 32px); }
.demo { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); column-gap: clamp(24px, 4vw, 64px); align-items: start; }
.demo h3 { font-size: clamp(28px, 3.3vw, 54px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; margin: 12px 0 16px; }
.demo-text > p:not(.label) { color: #3d3b37; max-width: 46ch; margin-bottom: 18px; }
.demo-stage { position: relative; aspect-ratio: 16 / 11; border: 1px solid var(--line-strong); overflow: hidden; }
.demo-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.ctl { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ctl + .btn, .ctl + .readout { margin-top: 4px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
input[type="range"]::-moz-range-track { height: 1px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6.5px; background: var(--ink); border: 0; border-radius: 0; transition: background 0.2s, transform 0.2s; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: var(--ink); border: 0; border-radius: 0; }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { background: var(--accent); transform: scale(1.2); }
.btn { display: inline-block; color: var(--ink); border: 1px solid var(--line-strong); padding: 10px 13px; transition: background 0.2s, color 0.2s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.readout { margin-top: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.readout b { color: var(--accent); font-weight: 500; }
.cmd { display: flex; gap: 8px; margin-bottom: 10px; }
.cmd-input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13.5px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--ink); }
.cmd-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); padding: 6px 9px; text-transform: none; color: var(--ink); transition: border-color 0.2s, color 0.2s; }
.chip:hover, .chip:focus-visible { border-color: var(--accent); color: var(--accent); }
.steps li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.4; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps i { font-style: normal; font-family: var(--mono); color: var(--accent); }
.steps .no i { color: var(--ink); }
.steps .no span { color: var(--mute); }
.steps b { font-family: var(--mono); font-weight: 500; font-size: 12px; text-transform: uppercase; margin-right: 6px; }

/* ---- point-cloud portrait ---- */
.scan-wrap { position: relative; aspect-ratio: 4 / 5; border: 1px solid var(--line); overflow: hidden; }
.scan-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; opacity: 0; }
.scan-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-wrap.ready canvas { opacity: 1; }
.scan-wrap.ready img { opacity: 0; pointer-events: none; }
.portrait figcaption { line-height: 1.7; }
.about-text .statement { font-size: clamp(22px, 2.4vw, 38px); }

/* ---- terminal ---- */
.term { background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 14px; }
.term-out { height: clamp(260px, 42vh, 440px); overflow-y: auto; overscroll-behavior: contain; padding: 20px 20px 8px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.term-out .c { color: var(--paper); }
.term-out .c::before { content: "zian ~ % "; color: var(--accent); }
.term-out .o { color: #b8b4aa; }
.term-out .a { color: var(--accent); }
.term-chips { padding: 6px 20px 0; margin: 0 0 14px; }
.term .chip { border-color: rgba(242, 240, 235, 0.22); color: var(--paper); }
.term .chip:hover, .term .chip:focus-visible { border-color: var(--accent); color: var(--accent); }
.term-in { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid rgba(242, 240, 235, 0.16); cursor: text; }
.term-in span { color: var(--accent); white-space: nowrap; }
.term-in input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--paper); font: inherit; caret-color: var(--accent); }
.term-in input::placeholder { color: #6f6c66; }
.term:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 980px) {
  .demos { border-top: 0; padding-top: 0; }
  .demo { grid-template-columns: 1fr; row-gap: 20px; }
}
@media (max-width: 760px) {
  .hero-inner { position: relative; inset: auto; display: flex; flex-direction: column; min-height: 100svh; padding-top: var(--nav-h); }
  .field-wrap { margin-top: 0; border-top: 0; min-height: 380px; }
  .hero-meta { display: none; }
  .nav nav { gap: 12px; }
  .ctl { grid-template-columns: 120px minmax(0, 1fr); }
  .term { font-size: 13px; }
  .term-out { padding: 16px 14px 6px; }
  .term-chips { padding: 6px 14px 0; }
  .term-in { padding: 14px; }
  .rail { width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
  .big .w { opacity: 1; }
  .rail { display: none; }
}

/* =====================================================================
   v3: new order, text-only About, fuller projects, field-based lab
   ===================================================================== */
.about { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); column-gap: clamp(28px, 5vw, 88px); }
.about-text .statement { font-size: clamp(26px, 3.1vw, 50px); margin-bottom: 26px; }
.about-text > p:not(.statement) { margin-bottom: 16px; }
.about .facts { margin-top: 6px; }
.about .facts > div:first-child { border-top: 0; padding-top: 0; }
.section-head .count span { font-variant-numeric: tabular-nums; }

@media (min-width: 761px) { .table th { width: 34%; } }
.table td:not(.when) { line-height: 1.4; }

.how { counter-reset: how; margin: 4px 0 18px; max-width: 58ch; }
.how li { counter-increment: how; position: relative; padding: 10px 0 10px 34px; border-top: 1px solid var(--line); color: #3d3b37; font-size: 16px; line-height: 1.42; }
.how li:last-child { border-bottom: 1px solid var(--line); }
.how li::before { content: counter(how, decimal-leading-zero); position: absolute; left: 0; top: 12px; font-family: var(--mono); font-size: 11px; color: var(--accent); }
.how b { font-weight: 600; color: var(--ink); }
.row-text .link { color: var(--ink); }

.lab-intro { font-size: clamp(19px, 1.7vw, 26px); line-height: 1.3; letter-spacing: -0.015em; max-width: 44ch; margin-bottom: clamp(-30px, -3vw, -10px); }
.demo-stage { background: #2c5a3a; border-color: var(--ink); }
.demo-stage canvas { cursor: crosshair; }
.readout { min-height: 1.4em; }

@media (max-width: 980px) {
  .about { grid-template-columns: 1fr; row-gap: 28px; }
  .about .facts > div:first-child { border-top: 1px solid var(--line); padding-top: 12px; }
  .lab-intro { margin-bottom: 0; }
}

/* lab gets the full width so the fields are big enough to play with */
#lab { display: block; }
#lab .section-head { position: static; flex-direction: row; justify-content: space-between; margin-bottom: 0; }
#lab .demos { border-top: 0; }
#lab .demo { grid-template-columns: minmax(0, 0.58fr) minmax(0, 1.42fr); }
#lab .lab-intro { max-width: 40ch; }
@media (max-width: 980px) { #lab .demo { grid-template-columns: 1fr; } }

/* =====================================================================
   v4: more motion
   ===================================================================== */
/* opening line: short, so it runs large, with a robot driving under it as you scroll */
.big { font-size: clamp(44px, 9.4vw, 160px); line-height: 0.95; max-width: none; letter-spacing: -0.05em; }
.track { position: relative; height: 30px; margin-top: clamp(28px, 4vw, 60px); border-bottom: 1px solid var(--line-strong);
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 5%) left bottom / 100% 7px no-repeat; }
.track-bot { position: absolute; left: 0; bottom: -12px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); will-change: transform;
  transform: translate3d(calc(var(--p, 0) * (100vw - 2 * var(--gutter) - 24px)), 0, 0); }
.track-bot::after { content: ""; position: absolute; left: 13px; top: 11px; width: 8px; height: 2px; background: #fff; border-radius: 1px; }

/* section rules draw in from the left */
.js .section-head { border-top-color: transparent; }
.js .section-head::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--line-strong); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.3s var(--ease); }
.js .section-head.in::before { transform: scaleX(1); }

/* about */
.about-text .goal { font-size: clamp(20px, 2vw, 30px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.2; color: var(--ink); margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line-strong); max-width: none; }
.about-text .statement { text-wrap: balance; }

/* numbers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 24px); padding: clamp(72px, 10vw, 150px) var(--gutter) 0; }
.stat { border-top: 1px solid var(--line-strong); padding-top: 14px; }
.stat b { display: block; font-size: clamp(46px, 7vw, 124px); font-weight: 500; letter-spacing: -0.06em; line-height: 0.9; font-variant-numeric: tabular-nums; margin: 0 0 14px -0.04em; }
.stat .label { display: block; max-width: 24ch; }
.stats .stat:nth-child(2) { --i: 1; } .stats .stat:nth-child(3) { --i: 2; } .stats .stat:nth-child(4) { --i: 3; }

/* table rows come in one after another */
.js .table[data-reveal] { opacity: 1; transform: none; }
.js .table[data-reveal] caption, .js .table[data-reveal] tr > * { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--r, 0) * 90ms); }
.js .table[data-reveal].in caption, .js .table[data-reveal].in tr > * { opacity: 1; transform: none; }
.when i { animation: live 2.2s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255, 79, 0, 0.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255, 79, 0, 0); } }

/* work rows fill on hover */
.row { position: relative; isolation: isolate; }
.row::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -0.4); background: var(--paper-2); transform: scaleY(0); transform-origin: 50% 100%; transition: transform 0.55s var(--ease); z-index: -1; }
.row:hover::before, .row:focus-within::before { transform: scaleY(1); }
.row-head { transition: padding 0.5s var(--ease); }
.row-head[aria-expanded="true"] .row-title { transform: translateX(10px); }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); margin-top: clamp(72px, 10vw, 150px); }
.marquee-track { display: flex; width: max-content; white-space: nowrap; will-change: transform; transform: translate3d(var(--mx, 0px), 0, 0); }
.marquee-track span { font-size: clamp(40px, 7.4vw, 124px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; padding: clamp(14px, 1.8vw, 28px) 0; }
.marquee-track i { font-style: normal; color: var(--accent); font-size: 0.34em; vertical-align: 0.5em; margin: 0 0.5em; }

/* wordmark */
.wordmark { padding: clamp(40px, 6vw, 90px) var(--gutter) 0; font-size: 17.6vw; font-weight: 600; letter-spacing: -0.065em; line-height: 0.82; white-space: nowrap; overflow: hidden; margin-left: -0.05em; }
.wordmark .ch { display: inline-block; transform: translate3d(0, 108%, 0); transition: transform 1.1s var(--ease); transition-delay: calc(var(--c) * 34ms); }
.wordmark.in .ch { transform: none; }

/* nav slides away while reading, back when scrolling up */
.nav { transition: background 0.3s, box-shadow 0.3s, transform 0.5s var(--ease); }
.nav.away { transform: translate3d(0, -100%, 0); }

/* cursor ring */
.cursor { position: fixed; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 1px solid var(--ink); border-radius: 50%; pointer-events: none; z-index: 70; opacity: 0;
  transform: translate3d(var(--x, -100px), var(--y, -100px), 0) scale(var(--s, 1)); transition: opacity 0.3s, background 0.25s, border-color 0.25s; will-change: transform; }
.cursor.on { opacity: 1; }
.cursor.hot { background: rgba(255, 79, 0, 0.16); border-color: var(--accent); }
.cursor.dark { border-color: #fff; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
.mag { transition: transform 0.45s var(--ease), background 0.2s, color 0.2s, border-color 0.2s; will-change: transform; }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .big { font-size: clamp(42px, 13vw, 84px); }
  .wordmark { font-size: 17vw; }
}
@media (prefers-reduced-motion: reduce) {
  .js .section-head { border-top-color: var(--line-strong); }
  .js .section-head::before { display: none; }
  .js .table[data-reveal] caption, .js .table[data-reveal] tr > * { opacity: 1; transform: none; }
  .wordmark .ch { transform: none; }
  .cursor, .track-bot { display: none; }
  .nav.away { transform: none; }
}
.wordmark { font-size: 14.2vw; }
@media (max-width: 760px) { .wordmark { font-size: 14vw; } }
@media (max-width: 980px) { .section-head { position: relative; top: auto; } }
#lab .section-head { position: relative; top: auto; }

/* lab intro */
.lab-intro b { display: block; font-size: clamp(44px, 6vw, 104px); font-weight: 500; letter-spacing: -0.05em; line-height: 0.95; margin: 0 0 14px -0.04em; }

/* side fields: a robot crosses a small pitch as you scroll the section */
.mini { margin-top: clamp(18px, 2.4vw, 34px); width: min(100%, 230px); }
.mini svg { width: 100%; height: auto; overflow: visible; }
.m-line { fill: none; stroke: var(--ink); stroke-opacity: 0.3; stroke-width: 0.8; }
.m-opp { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.m-ghost { fill: none; stroke: var(--ink); stroke-opacity: 0.22; stroke-width: 0.8; stroke-dasharray: 2 3; }
.m-path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.m-ball { fill: var(--ink); }
.m-bot { fill: var(--accent); stroke: var(--paper); stroke-width: 1.5; }
.mini-read { display: flex; justify-content: space-between; margin-top: 10px; font-variant-numeric: tabular-nums; }
.mini-read b { font-weight: 500; color: var(--accent); }
@media (max-width: 980px) { .mini { display: none; } }

/* side animations: MQ-9 assembly, takeoff, ground control */
.mini { width: min(100%, 250px); }
.mini-read b { min-width: 5ch; text-align: right; }
.u-fus, .u-wing, .u-tail { fill: var(--paper); stroke: var(--ink); stroke-width: 0.9; stroke-linejoin: round; }
.u-prop { fill: var(--ink); }
.u-eye { fill: var(--accent); }
.u-det { fill: none; stroke: var(--ink); stroke-opacity: 0.55; stroke-width: 0.6; }
.u-guide { fill: none; stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 0.6; stroke-dasharray: 1.5 2.5; }
.u-dim { fill: none; stroke: var(--ink); stroke-width: 0.6; }
.u-txt { font-family: var(--mono); font-size: 7px; letter-spacing: 0.06em; fill: var(--mute); }
.u-final { opacity: 0; }
.uav.shadow path { fill: var(--ink); stroke: none; }
.rw-surf { fill: var(--paper-2); }
.rw-edge { fill: none; stroke: var(--ink); stroke-opacity: 0.5; stroke-width: 0.7; }
.rw-dash { fill: none; stroke: var(--ink); stroke-opacity: 0.55; stroke-width: 1.4; stroke-dasharray: 14 12; }
.rw-thr rect { fill: var(--ink); fill-opacity: 0.55; }
.rw-num { font-family: var(--sans); font-weight: 600; font-size: 15px; fill: var(--ink); fill-opacity: 0.55; }
.gc-frame { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1; }
.gc-grid { fill: none; stroke: var(--ink); stroke-opacity: 0.1; stroke-width: 0.6; }
.gc-ring { fill: none; stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 0.6; stroke-dasharray: 2 3; }
.gc-home { fill: var(--ink); }
.gc-plan { fill: none; stroke: var(--ink); stroke-opacity: 0.4; stroke-width: 0.7; stroke-dasharray: 2 3; }
.gc-flown { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; }
.gc-wp { fill: var(--paper); stroke: var(--ink); stroke-width: 0.8; }
.gc-uav path { stroke-width: 4; }
.gc-uav .u-fus, .gc-uav .u-wing, .gc-uav .u-tail { fill: var(--ink); }
.gc-data { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.gc-data > div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.gc-data dd { color: var(--ink); white-space: nowrap; }
.gc-data dd i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; animation: live 2.2s ease-out infinite; }
