/* Steel and Signal v2.6, williamdelehanty.com. Tokens per DESIGN.md.
   Design pass notes: bigger type drama, one load-in moment per page,
   micro-interactions on everything touchable, drafting-table texture
   (grain, blueprint grid, hatched voids, drawing plates).
   Brief 6 (2026-09-02): real screens and photos in frames, the status
   rail back as a thin strip, a photo strip, and a fixed motion budget. */

:root {
  --bg: #15181B;
  --bg-panel: #1E2226;
  --line: #3A4046;
  --line-soft: #2A2F34;
  --text: #E6E4DF;
  --text-muted: #9AA0A6;
  --signal: #F2C230;
  --signal-ink: #15181B;
  --photo-warm: #B08968;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 14px 34px rgba(0,0,0,.35);
  --grid-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M55.5 0v56M0 55.5h56' stroke='%232A2F34' stroke-width='1'/%3E%3C/svg%3E");
  --hatch-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M-3 15L15 -3M-3 3L3 -3M9 15L15 9' stroke='%232A2F34' stroke-width='1'/%3E%3C/svg%3E");
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/barlow-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/barlow-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/barlow-condensed-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/plex-mono-400.woff2') format('woff2');
}
@font-face { font-family: 'Barlow Fallback'; src: local('Arial'); size-adjust: 98%; ascent-override: 97%; descent-override: 25%; line-gap-override: 0%; }
@font-face { font-family: 'Barlow Condensed Fallback'; src: local('Arial Narrow'), local('Arial'); size-adjust: 88%; ascent-override: 97%; descent-override: 25%; line-gap-override: 0%; }
@font-face { font-family: 'Plex Mono Fallback'; src: local('Courier New'); size-adjust: 100%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.55 'Barlow', 'Barlow Fallback', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Film grain over everything, barely there */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--signal); color: var(--signal-ink); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

a {
  color: var(--text);
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color .18s ease, color .18s ease;
}
a:hover { text-decoration-color: var(--signal); }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }

/* Label voices */
.eyebrow {
  font: 600 0.875rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.mono {
  font: 400 0.8125rem/1.5 'IBM Plex Mono', 'Plex Mono Fallback', monospace;
  color: var(--text-muted);
}

/* The one orchestrated moment per page: content rises once on load */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.hero h1, .cs-header h1 { animation: rise .4s ease-out both; }
.hero .sub { animation: rise .4s ease-out .06s both; }
.hero .lede, .cs-header .outcome { animation: rise .4s ease-out .12s both; }
.hero figure, .cs-header .meta { animation: rise .4s ease-out .18s both; }
.js .hero h1.kinetic, .js .cs-header h1.kinetic { animation: none; }
.kinetic .kw {
  display: inline-block;
  animation: rise .45s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i) * 45ms);
}
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

/* Nav */
.nav { border-bottom: 1px solid var(--line-soft); }
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
  flex-wrap: wrap;
}
.nav .name {
  font: 600 0.9375rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav ul { display: flex; gap: 8px; list-style: none; flex-wrap: wrap; }
.nav ul a {
  display: inline-block;
  position: relative;
  padding: 15px 10px;
  font: 600 0.75rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav ul a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.nav ul a:hover::after, .nav ul a[aria-current]::after { transform: scaleX(1); }

/* Status rail: one thin strip under the nav. Baked values in the markup,
   live values from /api/status. The dot pulse is the only ambient motion. */
.rail { border-bottom: 1px solid var(--line-soft); }
.rail .wrap {
  display: flex;
  align-items: center;
  padding-block: 9px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rail .wrap::-webkit-scrollbar { display: none; }
.rail .item {
  white-space: nowrap;
  font: 400 0.8125rem/1 'IBM Plex Mono', 'Plex Mono Fallback', monospace;
  color: var(--text-muted);
}
.rail .item b {
  font-weight: 400;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.rail .dot {
  flex: none;
  width: 5px;
  height: 5px;
  margin-inline: 18px;
  border-radius: 50%;
  background: var(--signal);
  animation: railpulse 3.2s ease-in-out infinite;
}
.rail .dot + .item + .dot { animation-delay: 1.1s; }
@keyframes railpulse {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; }
}

/* Sections */
.section { padding-block: 72px 80px; margin-bottom: 56px; }
.section:last-of-type { margin-bottom: 0; }
#work, #stack { padding-top: 40px; }
#proof { margin-bottom: 8px; }
.section-head {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-bottom: 44px;
}
.section-head::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 56px;
  height: 2px;
  background: var(--signal);
}
.section-head .id { text-decoration: none; color: var(--text-muted); }
.section-head .id:hover { color: var(--signal); }

/* Hero: drafting-table backdrop, steel texture, big thesis type */
.hero {
  position: relative;
  padding-block: 96px 72px;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}
.hero > .wrap { width: 100%; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('assets/img/steel-texture.jpg') center/cover;
  opacity: .08;
  filter: grayscale(1) brightness(.55);
  pointer-events: none;
  z-index: 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grid-tile);
  opacity: .35;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 72px;
  align-items: start;
}
.hero h1 {
  font-size: clamp(2.375rem, 4.6vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
}
.hero h1 .ul {
  border-bottom: 4px solid var(--signal);
  padding-bottom: 2px;
}
.hero .sub {
  margin-top: 22px;
  max-width: 26em;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.4;
  color: var(--text);
}
.hero .lede {
  margin-top: 34px;
  max-width: 34em;
  font-size: 1.1875rem;
  line-height: 1.6;
}
.hero .lede + .lede { margin-top: 14px; }
.hero .shot { margin: 0; min-width: 0; }
.hero .shot figcaption { margin-top: 12px; }

/* Frames: every real screen and photo gets the same treatment. Hairline,
   4px radius, grain, a slight inner shadow. Captions sit outside in mono. */
.frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-panel);
}
.frame.r43 { aspect-ratio: 4 / 3; }
.frame.r45 { aspect-ratio: 4 / 5; }
.frame.r11 { aspect-ratio: 1; }
.frame > img, .frame > svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.frame > video { width: 100%; height: 100%; display: block; object-fit: cover; }
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(0,0,0,.28), inset 0 3px 18px rgba(0,0,0,.35);
}
.shot { margin: 0; min-width: 0; }

/* Slot: hatched drafting void, the honest placeholder until the asset lands */
.slot {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  border: 1px dashed var(--line);
  background-color: var(--bg-panel);
  background-image: var(--hatch-tile);
}
.frame.slot::before {
  content: "+";
  inset: auto;
  top: 6px;
  left: 9px;
  opacity: 1;
  background: none;
  font: 400 0.875rem/1 'IBM Plex Mono', 'Plex Mono Fallback', monospace;
  color: var(--text-muted);
}
.slot .mono {
  position: relative;
  z-index: 3;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 6px 10px;
  font-size: 0.75rem;
  line-height: 1.5;
}
.slot .mono b {
  font-weight: 400;
  color: var(--signal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 6px;
}

/* Selected work: text 55%, image 40%, 5% gutter, sides alternate.
   Hover lifts the image 4px and runs the title hairline to full width. */
.rows { display: block; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 8fr);
  grid-template-areas: "text img";
  column-gap: 5%;
  align-items: center;
  padding: 36px 24px;
  margin-inline: -24px;
  border-top: 1px solid var(--line-soft);
}
.row:first-child { border-top: 0; }
.row:nth-child(even) {
  grid-template-columns: minmax(0, 8fr) minmax(0, 11fr);
  grid-template-areas: "img text";
}
.row .text { grid-area: text; min-width: 0; }
.row .frame { grid-area: img; transition: transform .2s ease; }
.row:hover .frame { transform: translateY(-4px); }
.row .kicker { margin-bottom: 10px; color: var(--text-muted); }
.row h3 { font-size: 2rem; margin-bottom: 14px; }
.row h3 a { text-decoration: none; }
.row h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-top: 10px;
  background: var(--signal);
  transition: width .2s ease;
}
.row:hover h3::after { width: 100%; }
.row p { max-width: 36em; }
.row .stack { margin-top: 12px; }
.rows-note { margin-top: 28px; }

/* Photo strip: five squares, full bleed, hairline gaps, one line beneath.
   Full color at rest; the hover lifts the photo a touch. */
.strip-section { padding-block: 0 64px; margin-bottom: 40px; }
.strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
}
.strip figure {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-panel);
}
.strip img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .2s ease;
}
.strip figure:hover img { transform: translateY(-4px) scale(1.02); }
.strip .slot { padding: 14px; }
.strip-note { margin-top: 14px; }

/* Numbers band: asymmetric bento, oversized numerals in signal */
.band {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg-panel);
  box-shadow: 12px 12px 0 #23282D;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-areas: "a b c" "a d e";
}
.band .cell:nth-child(1) { grid-area: a; }
.band .cell:nth-child(2) { grid-area: b; }
.band .cell:nth-child(3) { grid-area: c; }
.band .cell:nth-child(4) { grid-area: d; border-top: 1px solid var(--line-soft); }
.band .cell:nth-child(5) { grid-area: e; border-top: 1px solid var(--line-soft); }
.band .cell {
  padding: 34px 28px 26px;
  border-left: 1px solid var(--line-soft);
  transition: background .2s ease;
}
.band .cell:hover { background: #23282D; }
.band .cell:first-child { border-left: 0; }
.band .figure {
  display: block;
  font: 600 clamp(2.5rem, 4.8vw, 4.25rem)/1.02 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
.band .src {
  display: block;
  margin-top: 14px;
  font: 400 0.75rem/1.5 'IBM Plex Mono', 'Plex Mono Fallback', monospace;
  color: var(--text-muted);
  max-width: 24em;
}
/* Notes: index rows and the post body at the case study measure */
.note-row { padding: 22px 0; border-top: 1px solid var(--line-soft); }
.note-row:last-child { border-bottom: 1px solid var(--line-soft); }
.note-row .mono { font-size: 0.75rem; color: var(--text-muted); }
.note-row h2 { margin: 6px 0 8px; font: 600 1.5rem/1.15 'Barlow', 'Barlow Fallback', sans-serif; letter-spacing: -0.01em; }
.note-row h2 a { color: var(--text); text-decoration: none; }
.note-row h2 a:hover { color: var(--signal); }
.note-row p { margin: 0; color: var(--text-muted); max-width: 60ch; }
.note-body > p:first-child { margin-top: 0; }
.note-body .fig { margin: 32px 0; }
/* Demo call: native audio behind custom controls, the transcript, the report card beside it */
.demo-call { margin: 0 0 56px; }
.demo-call .made::before { content: "REC \00B7 "; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 8fr); gap: 32px; align-items: start; }
.player, .report { border: 1px solid var(--line); border-radius: 4px; background: var(--bg-panel); padding: 20px 22px; }
.pc { display: flex; align-items: center; gap: 16px; }
.play { position: relative; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: var(--bg); cursor: pointer; transition: border-color .15s ease; }
.play::before, .play::after { content: ""; position: absolute; }
.play::before { left: 15px; top: 12px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--text); }
.play[aria-pressed="true"]::before { left: 13px; top: 12px; width: 4px; height: 16px; border: 0; background: var(--text); }
.play[aria-pressed="true"]::after { left: 22px; top: 12px; width: 4px; height: 16px; background: var(--text); }
.play:hover, .play[aria-pressed="true"] { border-color: var(--signal); }
.play:focus-visible { outline: 1px solid var(--signal); outline-offset: 3px; }
.bar { position: relative; flex: 1 1 auto; height: 14px; cursor: pointer; }
.bar::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--line); }
.bar .fill { position: absolute; left: 0; top: 6px; height: 2px; width: 0; background: var(--signal); }
.bar:focus-visible { outline: 1px solid var(--signal); outline-offset: 4px; }
.pc .time { flex: none; font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.transcript { position: relative; list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line-soft); max-height: 250px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.transcript li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 6px 10px; font: 400 0.8125rem/1.5 'Barlow', 'Barlow Fallback', sans-serif; color: var(--text-muted); box-shadow: inset 2px 0 transparent; transition: color .2s ease, box-shadow .2s ease; }
.transcript li b { font: 600 0.75rem/1.6 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.transcript li.on { color: var(--text); box-shadow: inset 2px 0 var(--signal); }
.transcript li.on b { color: var(--signal); }
.report-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.report-head .mono { font-size: 0.6875rem; color: var(--text-muted); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tile { border: 1px solid var(--line-soft); padding: 14px 16px 12px; }
.tile .big { display: block; font: 600 2rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif; color: var(--signal); font-variant-numeric: tabular-nums; }
.tile .lbl { display: block; margin-top: 6px; font-size: 0.625rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.rows { list-style: none; margin: 0; padding: 0; font-size: 0.75rem; line-height: 1.5; }
.rows li { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-soft); color: var(--text-muted); }
.rows li .amt { color: var(--text); font-variant-numeric: tabular-nums; }
.rows li.new { color: var(--text); animation: rowin .5s ease both; }
.rows li.new .amt { color: var(--signal); }
.tile .big.bump { animation: rowin .5s ease both; }
@keyframes rowin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* Proof model: arithmetic on two inventory numbers, inside the tall cell */
.model { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.model .note { margin: 0 0 18px; font-size: 0.75rem; line-height: 1.5; color: var(--text-muted); max-width: 46em; }
.model-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: end; }
.model label { display: flex; justify-content: space-between; gap: 12px; font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.model label output { color: var(--text); font-variant-numeric: tabular-nums; }
.model input[type="range"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 14px; margin: 0; background: transparent; cursor: pointer; }
.model input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
.model input[type="range"]::-moz-range-track { height: 2px; background: var(--line); }
.model input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; background: var(--text); border: 0; border-radius: 0; transition: background .15s ease; }
.model input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: var(--text); border: 0; border-radius: 0; }
.model input[type="range"]:active::-webkit-slider-thumb, .model input[type="range"]:focus-visible::-webkit-slider-thumb { background: var(--signal); }
.model input[type="range"]:active::-moz-range-thumb, .model input[type="range"]:focus-visible::-moz-range-thumb { background: var(--signal); }
.model input[type="range"]:focus { outline: 0; }
.model input[type="range"]:focus-visible { outline: 1px solid var(--signal); outline-offset: 6px; }
.model .seg { display: flex; margin-top: 16px; border: 1px solid var(--line); }
.model .seg button { flex: 1 1 auto; padding: 9px 8px; background: transparent; border: 0; color: var(--text-muted); font: 500 0.6875rem/1 'IBM Plex Mono', 'Plex Mono Fallback', monospace; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; transition: background .15s ease, color .15s ease; }
.model .seg button + button { border-left: 1px solid var(--line); }
.model .seg button:hover { color: var(--text); }
.model .seg button[aria-pressed="true"] { background: var(--signal); color: var(--bg); }
.model .seg button:focus-visible { outline: 1px solid var(--signal); outline-offset: 2px; }
.model .out { text-align: right; }
.model .lbl { display: block; font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.model .val { display: block; font: 600 clamp(2.25rem, 3.4vw, 3rem)/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif; letter-spacing: 0.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.model .foot { margin: 18px 0 0; font-size: 0.6875rem; line-height: 1.5; color: var(--text-muted); }

/* Stack, short */
.stack-short { max-width: 46em; font-size: clamp(1.3125rem, 2.4vw, 1.6875rem); line-height: 1.65; }
.stack-short b { font-weight: 600; }
.stack-note { margin-top: 20px; }

/* Off hours: text left, one photo at full strength right. Photos on this
   site run at full strength or they do not run. No opacity washes. */
.offhours .grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px;
  align-items: start;
}
.grain { position: relative; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.offhours .copy { max-width: 26em; margin-top: -0.3em; font-size: clamp(1.25rem, 2.2vw, 1.5625rem); line-height: 1.6; }
.offhours .caption { margin-top: 14px; font-size: 0.9375rem; color: var(--photo-warm); }

/* Diagram language, shared by all inline SVGs */
.dg-node { fill: var(--bg-panel); stroke: var(--line); }
.dg-own { stroke: var(--signal); stroke-width: 1.5; }
.dg-edge { stroke: var(--line); stroke-width: 1; fill: none; }
.dg-label {
  font: 600 12px 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--text);
}
.dg-sub { font: 400 10px 'IBM Plex Mono', 'Plex Mono Fallback', monospace; fill: var(--text-muted); }
.dg-legend { font: 400 11px 'IBM Plex Mono', 'Plex Mono Fallback', monospace; fill: var(--text-muted); }
/* Plates inside card frames: type runs 2px up so it reads at card size */
.frame .dg-label { font-size: 13px; letter-spacing: 0.02em; }
.frame .dg-sub { font-size: 11px; }
.frame .dg-legend { font-size: 12px; }

/* Case studies */
.cs-header { position: relative; padding-block: 76px 12px; overflow: hidden; }
.cs-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grid-tile);
  opacity: .4;
  pointer-events: none;
}
.cs-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('assets/img/steel-texture.jpg') center/cover;
  opacity: .06;
  filter: grayscale(1) brightness(.55);
  pointer-events: none;
  z-index: 0;
}
.cs-header .wrap { position: relative; z-index: 1; }
.cs-header .meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.cs-header h1 {
  font-size: clamp(2.25rem, 5.4vw, 4.125rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 15em;
}
.cs-header .outcome {
  margin-top: 22px;
  font-size: clamp(1.1875rem, 2vw, 1.4375rem);
  line-height: 1.5;
  max-width: 30em;
}
.cs-body { padding-block: 48px 24px; }
.cs-body .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 72px;
  align-items: start;
}
.cs-main > h2, .cs-built > .wrap > h2 {
  font: 600 0.875rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
  margin: 44px 0 16px;
  position: relative;
}
.cs-main > h2::before, .cs-built > .wrap > h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--signal);
}
.cs-main > h2:first-child, .cs-built > .wrap > h2 { margin-top: 0; }
.cs-main p { max-width: 38em; margin-bottom: 12px; }
.cs-main ul { list-style: square; padding-left: 22px; max-width: 38em; }
.cs-main li { margin-bottom: 10px; }
.cs-main li::marker { color: var(--signal); }
.cs-main .mono { display: block; }
.cs-aside { position: sticky; top: 56px; }
.cs-aside .note {
  font: 400 0.8125rem/1.65 'IBM Plex Mono', 'Plex Mono Fallback', monospace;
  color: var(--text-muted);
  border-left: 2px solid var(--line);
  padding: 4px 0 4px 18px;
  margin-bottom: 28px;
  transition: border-color .25s ease;
}
.cs-aside .note:hover { border-color: var(--signal); }
.cs-aside .note b {
  display: block;
  font: 600 0.75rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}
.cs-visual { padding-block: 24px 64px; }
.cs-visual figure { border-top: 1px solid var(--line-soft); padding-top: 32px; }
.cs-visual svg, .cs-visual img { width: 100%; height: auto; display: block; max-width: 900px; }

/* Case study build sections: two or three subsections, one figure each.
   .side puts the figure in the right column; .plate runs it full width. */
.cs-built { padding-block: 8px 16px; }
.cs-built + .cs-body { padding-top: 24px; }
.built {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 32px 72px;
  align-items: start;
  border-top: 1px solid var(--line-soft);
  padding-top: 28px;
  margin-top: 32px;
}
.built:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }
.built .text { min-width: 0; }
.built h3 { font-size: clamp(1.375rem, 2.2vw, 1.625rem); margin-bottom: 12px; }
.built p { max-width: 36em; margin-bottom: 12px; }
.built ul { list-style: square; padding-left: 22px; max-width: 36em; }
.built li { margin-bottom: 8px; }
.built li::marker { color: var(--signal); }
.built.plate { grid-template-columns: 1fr; }
.built.plate .text { max-width: 46em; }
.fig { margin: 0; min-width: 0; }
.fig > svg, .fig > img, .fig .dg-scroll svg { width: 100%; height: auto; display: block; }
.frame.auto { aspect-ratio: auto; }
.frame.auto > img, .frame.auto > video { height: auto; }
.frame.top > img { object-position: center top; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 440px)); gap: 28px; }

/* Callouts: a real screenshot with numbered signal pins and a mono key */
.callouts { max-width: 900px; }
.callouts .photo-frame { position: relative; }
.callouts .pin {
  position: absolute;
  z-index: 3;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--signal);
  color: var(--signal-ink);
  font: 600 12px/24px 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(21, 24, 27, .85);
}
.callouts .key { list-style: none; padding: 0; margin-top: 14px; counter-reset: pin; }
.callouts .key li { position: relative; padding-left: 32px; margin-bottom: 6px; counter-increment: pin; }
.callouts .key li::before {
  content: counter(pin);
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--signal);
  color: var(--signal);
  font: 600 11px/20px 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  text-align: center;
}

/* About carousel: scroll-snap track, square hairline buttons on the eyebrow
   row, dot indicators. No autoplay, no library. */
.carousel-nav { display: flex; align-items: center; gap: 10px; }
.car-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font: 600 1.125rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.car-btn:hover { border-color: var(--signal); color: var(--signal); }
.carousel { position: relative; margin-top: 28px; }
.carousel .track {
  position: relative;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.carousel .track::-webkit-scrollbar { display: none; }
/* trailing space so the last slide can still snap to the left edge */
.carousel .track::after { content: ""; flex: 0 0 calc(100% - (100% - 16px) / 2.3); }
.carousel .track:focus-visible { outline: 2px solid var(--signal); outline-offset: 6px; }
.carousel .slide { flex: 0 0 calc((100% - 16px) / 2.3); min-width: 0; margin: 0; scroll-snap-align: start; }
.carousel figcaption { margin-top: 10px; }
.carousel .dots { display: flex; gap: 8px; margin-top: 18px; }
.carousel .dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}
.carousel .dots button[aria-current="true"] { background: var(--signal); border-color: var(--signal); }
@media (max-width: 720px) {
  .carousel .slide { flex-basis: 86%; }
  .carousel .track::after { flex-basis: 14%; }
}

/* Drawing plate title line under every diagram */
.made {
  display: block;
  margin-top: 16px;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
  max-width: 900px;
}
.made::before {
  content: "DWG \00B7 ";
  color: var(--signal);
  letter-spacing: 0.06em;
}
.cs-next { padding-block: 8px 80px; }
.cs-next a {
  display: inline-block;
  font: 600 0.875rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 0;
  text-decoration: none;
  border-bottom: 2px solid var(--line);
  transition: border-color .2s ease;
}
.cs-next a:hover { border-color: var(--signal); }

/* Work index */
.index-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 48px;
  padding: 30px 24px;
  margin-inline: -24px;
  border-top: 1px solid var(--line-soft);
  border-radius: 2px;
  align-items: baseline;
  transition: background .2s ease;
}
.index-row:hover { background: var(--bg-panel); }
.index-row:first-child { border-top: 0; }
.index-row .years { text-align: right; }
.index-row h3 { font-size: 1.75rem; margin: 8px 0; }
.index-row h3 a { text-decoration: none; }
.index-row h3 a::after {
  content: "\2192";
  display: inline-block;
  margin-left: 12px;
  color: var(--signal);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .2s ease, transform .2s ease;
}
.index-row:hover h3 a::after { opacity: 1; transform: none; }
.index-row p { max-width: 36em; }
.index-row .stack { margin-top: 8px; }

/* Prose pages */
.prose { max-width: 46em; }
.prose p { margin-bottom: 14px; }
.prose ul { list-style: square; padding-left: 22px; margin-bottom: 14px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--signal); }
.prose h3 { font-size: 1.4375rem; margin: 34px 0 10px; }
.principle {
  position: relative;
  border-top: 1px solid var(--line-soft);
  padding-top: 26px;
  margin-bottom: 36px;
  max-width: 46em;
}
.principle::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--signal);
  transition: width .3s ease;
}
.principle:hover::before { width: 56px; }
.principle h3 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); margin-bottom: 10px; letter-spacing: -0.02em; }
.principle p { color: var(--text-muted); max-width: 40em; font-size: 1.125rem; }
.changelog-entry { border-top: 1px solid var(--line-soft); padding-block: 22px; display: grid; grid-template-columns: 150px 1fr; gap: 24px; max-width: 52em; }
.changelog-entry:first-of-type { border-top: 0; padding-top: 0; }

/* Lab entries */
.lab-entry { border-top: 1px solid var(--line-soft); padding-block: 40px; }
.lab-entry:first-of-type { border-top: 0; padding-top: 0; }
.lab-entry .grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: start; }
.lab-entry h3 { font-size: clamp(1.625rem, 3vw, 2.125rem); margin-bottom: 12px; }
.lab-entry dl { max-width: 38em; }
.lab-entry dt {
  font: 600 0.75rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 16px 0 4px;
}
.lab-entry dd { margin: 0; }
.lab-entry figure svg, .lab-entry figure img { width: 100%; height: auto; display: block; }

.lab-plate { margin-top: 28px; }
.lab-plate svg { max-width: 1000px; }

/* Stack page */
.stack-group { margin-bottom: 48px; }
.stack-group h2 {
  position: relative;
  font: 600 0.875rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
  margin-bottom: 18px;
}
.stack-group h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--signal);
}
.stack-group ul { list-style: none; max-width: 46em; }
.stack-group li { margin-bottom: 10px; padding-left: 0; }
.stack-group li b { font-weight: 600; }

/* About */
.about-hero { position: relative; padding-block: 76px 24px; overflow: hidden; }
.about-hero .grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 72px; align-items: start; }
.about-hero .bio { font-size: clamp(1.1875rem, 2vw, 1.375rem); line-height: 1.65; max-width: 28em; }
.about-hero .bio p { margin-bottom: 16px; }
.about-photo { margin: 0; }
.about-photo img { width: 100%; height: auto; display: block; border-radius: 0; box-shadow: var(--shadow); }
.about-photo figcaption { margin-top: 12px; font-size: 0.9375rem; color: var(--photo-warm); }
.about .photo-block { margin-block: 30px; }
/* Farm and shop: a two-up, the prose, then a wide and a narrow, aligned top */
.photo-row { display: grid; gap: 2px 24px; align-items: start; margin-block: 30px; }
.photo-row.two { grid-template-columns: 1fr 1fr; gap: 2px; }
.photo-row.wide-narrow { grid-template-columns: 2fr 1fr; }
.photo-cell { margin: 0; min-width: 0; }
.photo-cell .caption { margin-top: 12px; }
.frame.r34 { aspect-ratio: 3 / 4; }
#outside { padding-bottom: 40px; margin-bottom: 8px; }
.about .photo-block.offset { margin-left: auto; width: 66%; }
.about-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.about-links .btn {
  display: inline-block;
  border: 1px solid var(--signal);
  color: var(--text);
  border-radius: 2px;
  padding: 13px 22px;
  font: 600 0.8125rem/1 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.about-links .btn:hover {
  background: var(--signal);
  color: var(--signal-ink);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #23282D;
}

/* 404, the one centered page */
.err { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }

.shot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; border-top: 1px solid var(--line-soft); padding-top: 32px; }
.shot-pair figure { position: relative; margin: 0; }
.shot-pair img { width: 100%; height: auto; display: block; border: 1px solid var(--line-soft); border-radius: 2px; }
@media (max-width: 900px) { .shot-pair { grid-template-columns: 1fr; } }

/* Photo frames */
.photo-frame { margin: 0; position: relative; }
.photo-frame img { width: 100%; height: auto; display: block; border-radius: 2px; box-shadow: 10px 10px 0 #23282D; }
.photo-block .caption { margin-top: 14px; font-size: 0.9375rem; color: var(--photo-warm); }
figure.shot { max-width: 420px; }
figure.shot img { width: 100%; height: auto; display: block; border-radius: 2px; border: 1px solid var(--line-soft); }

/* Diagram figures */
figure.diagram { margin: 0; }
figure.diagram svg { width: 100%; height: auto; display: block; }
.dg-scroll { overflow-x: auto; }
.dg-scroll svg { width: 100%; height: auto; display: block; }

/* Footer: bigger, grounded, with the coordinates */
footer {
  position: relative;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  overflow: hidden;
}
footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grid-tile);
  opacity: .35;
  pointer-events: none;
}
footer .wrap {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 34px 48px;
}
footer a { color: var(--text-muted); padding-block: 14px; display: inline-block; }
footer a:hover { color: var(--text); }
footer .links { display: flex; gap: 20px; }

/* Responsive */
@media (max-width: 900px) {
  .hero { padding-block: 60px 68px; min-height: 0; display: block; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero .shot { max-width: 520px; }
  .row, .row:nth-child(even) {
    grid-template-columns: 1fr;
    grid-template-areas: "img" "text";
    row-gap: 22px;
    padding-inline: 16px;
    margin-inline: -16px;
  }
  .band { grid-template-columns: 1fr 1fr; grid-template-areas: none; box-shadow: 8px 8px 0 #23282D; }
  .demo-grid { grid-template-columns: 1fr; gap: 20px; }
  .band .cell:nth-child(n) { grid-area: auto; border-top: 1px solid var(--line-soft); }
  .band .cell:first-child { grid-column: 1 / -1; border-top: 0; }
  .band .cell:nth-child(2), .band .cell:nth-child(4) { border-left: 0; }
  .offhours .grid { grid-template-columns: 1fr; gap: 28px; }
  .cs-body .wrap { grid-template-columns: 1fr; gap: 40px; }
  .cs-aside { position: static; }
  .built { grid-template-columns: 1fr; gap: 24px; }
  .two-up { grid-template-columns: 1fr; max-width: 440px; }
  .index-row { grid-template-columns: 1fr; gap: 6px; padding-inline: 16px; margin-inline: -16px; }
  .index-row .years { text-align: left; }
  .lab-entry .grid { grid-template-columns: 1fr; gap: 24px; }
  .about-hero .grid { grid-template-columns: 1fr; gap: 40px; }
  .about .photo-block.offset { width: 100%; }
  .photo-row.two, .photo-row.wide-narrow { grid-template-columns: 1fr; gap: 24px; }
  .changelog-entry { grid-template-columns: 1fr; gap: 6px; }
}
.nav-fold { display: none; margin-top: 14px; }
@media (max-width: 768px) {
  /* Stack and How I work fold into Work on small screens */
  .nav li:has(> a[href$="stack/"]), .nav li:has(> a[href$="how-i-work/"]) { display: none; }
  .nav-fold { display: block; }
}
@media (max-width: 720px) {
  .strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .strip::-webkit-scrollbar { display: none; }
  .strip figure { flex: 0 0 52vw; scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .rail .wrap { flex-direction: column; align-items: flex-start; overflow-x: visible; row-gap: 6px; padding-block: 9px; }
  .rail .dot { display: none; }
}
@media (max-width: 480px) {
  .nav ul { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; gap: 0; }
  .nav ul a { display: block; text-align: center; white-space: nowrap; padding: 14px 4px; }
  .nav ul a::after { left: 50%; right: auto; width: 28px; transform: translateX(-50%) scaleX(0); }
  .nav ul a:hover::after { transform: translateX(-50%) scaleX(1); }
}
@media (max-width: 480px) {
  .band { grid-template-columns: 1fr; }
  .model-row { grid-template-columns: 1fr; gap: 18px; }
  .model .out { text-align: left; }
  .band .cell:nth-child(n) { border-left: 0; border-top: 1px solid var(--line-soft); }
  .band .cell:first-child { border-top: 0; }
  .stack-short { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rows li.new, .tile .big.bump { animation: none; }
  .transcript li, .play { transition: none; }
  html { scroll-behavior: auto; }
  .rail .dot, .hero h1, .hero .sub, .hero .lede, .hero figure, .kinetic .kw,
  .cs-header h1, .cs-header .outcome, .cs-header .meta { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  .row:hover .frame { transform: none; }
  * { transition-duration: 0.01ms !important; }
}
