/* Left Adjoints — Petko Petsev
   Type: Archivo variable (weight + WIDTH axis). Width, not weight, is the hierarchy device:
   the display sits expanded, structure sits at normal width. The subject is bed geometry and
   plates — things of different widths that have to be placed correctly — so the type system
   carries the same idea the work does.
   Colour: green marks what a reader can go and verify; steel marks what is described only.
   The palette is a legend, not decoration. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-var-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-var-latin.woff2') format('woff2');
}

:root {
  --ground: #080a09;
  --surface: #0c100e;
  --surface-raised: #121816;
  --ink: #eceee9;
  --muted: #949c96;
  /* --faint carries 9–13px label text, so it must clear 4.5:1 on --surface, not merely look quiet */
  --faint: #78827c;
  --line: #1e2622;
  --line-strong: #333c37;

  /* green = public, inspectable, verifiable */
  --green: #4aae68;
  --green-deep: #12301c;
  /* steel = real, described, deliberately not published */
  --steel: #8298a8;
  --steel-deep: #19212a;

  --sans: 'Archivo', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, 'Liberation Mono', monospace;

  --shell: 1240px;
  --gutter: 44px;
}

* { box-sizing: border-box; }

html {
  background: var(--ground);
  color: var(--ink);
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) var(--ground);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(74, 174, 104, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 174, 104, 0.022) 1px, transparent 1px),
    var(--ground);
  background-size: 48px 48px;
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 2px;
}

::selection { background: var(--green); color: var(--ground); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--ground);
  font: 600 12px/1 var(--mono);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.page-shell {
  width: min(var(--shell), 100%);
  min-height: 100dvh;
  margin-inline: auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
}

/* ---------- header ---------- */

.site-header {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 700 12px/1 var(--mono);
  letter-spacing: .17em;
  white-space: nowrap;
}

.brand span { padding-top: 1px; }

.site-header nav { display: flex; gap: 30px; }

.site-header nav a {
  color: var(--muted);
  font: 500 12px/1.3 var(--mono);
  letter-spacing: .07em;
  transition: color .18s ease;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--ink); }

.eyebrow {
  margin: 0;
  color: var(--green);
  font: 700 10px/1.2 var(--mono);
  letter-spacing: .2em;
}

/* ---------- hero ---------- */

.home-main { flex: 1; display: flex; flex-direction: column; }

.hero {
  padding: 78px 0 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 64px;
}

h1 {
  margin: 0;
  font-weight: 600;
  font-stretch: 118%;
  line-height: .96;
  letter-spacing: -.028em;
}

.hero-copy h1 {
  margin-top: 22px;
  font-size: clamp(40px, 5.3vw, 70px);
}

.hero-statement {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
}

.hero-links { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 34px; }

.hero-links a,
.back-link,
.back-foot,
.project-outbound {
  font: 600 12px/1.3 var(--mono);
  letter-spacing: .08em;
}

.hero-links a { color: var(--steel); transition: color .18s ease; }
.hero-links a:hover { color: var(--ink); }
.hero-links .primary-link { color: var(--ink); }
.hero-links a span { color: var(--green); }

.hero-mark {
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
  background: radial-gradient(circle at center, rgba(74, 174, 104, .10), transparent 62%);
}

/* ---------- evidence strip ---------- */
/* Each figure is a link to the page section that holds its receipt. */

.evidence {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.evidence a {
  height: 100%;
  padding: 26px 18px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.evidence strong {
  color: var(--ink);
  font: 600 26px/1 var(--mono);
  letter-spacing: -.02em;
  transition: color .18s ease;
}

.evidence span {
  max-width: 24ch;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.45;
}

.evidence .evidence-arrow { color: var(--green); transition: margin .18s ease; }
.evidence a:hover strong { color: var(--green); }
.evidence a:hover .evidence-arrow { margin-left: 3px; }
/* ---------- work ---------- */

.work-section { padding: 56px 0 40px; display: flex; flex-direction: column; gap: 54px; }

.group-heading {
  padding-bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 30px;
  border-bottom: 1px solid var(--line-strong);
}

.group-note {
  margin: 0;
  max-width: 62ch;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.55;
}

.work-group-closed .eyebrow { color: var(--steel); }

.work-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.work-row .group-heading { flex-direction: column; gap: 10px; }
.project-grid-single .project-card { height: 100%; }

.project-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-top: 0; }
/* The track count is the number of cards, emitted by the build, because a spare track paints an
   empty cell that reads as a missing project. Adding or removing work cannot reintroduce it. */
.project-cols-1 { grid-template-columns: 1fr; }
.project-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.project-card {
  padding: 26px 24px 22px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: background .2s ease;
}

.project-card:hover { background: var(--surface-raised); }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.card-kind {
  color: var(--faint);
  font: 600 9px/1.2 var(--mono);
  letter-spacing: .16em;
}

.card-arrow { color: var(--faint); font-size: 13px; transition: color .2s ease, transform .2s ease; }
.project-card:hover .card-arrow { color: var(--green); transform: translate(2px, -2px); }

.card-body { flex: 1; }

.project-card h3 {
  margin: 0 0 10px;
  font-weight: 600;
  font-stretch: 104%;
  letter-spacing: -.018em;
}

.project-card p { margin: 0; color: var(--muted); line-height: 1.55; }

.card-foot { display: flex; flex-direction: column; gap: 10px; }

.card-reach {
  color: var(--ink);
  font: 500 11.5px/1.4 var(--mono);
  letter-spacing: -.01em;
}

.card-access {
  color: var(--steel);
  font: 500 10px/1.4 var(--mono);
  letter-spacing: .02em;
}

.card-access-open {
  align-self: flex-start;
  padding: 4px 9px;
  color: var(--green);
  background: var(--green-deep);
  font-size: 9px;
  letter-spacing: .16em;
}

/* open cards read larger — they are the ones a reader can actually verify */
.project-card-open { padding: 34px 30px 30px; gap: 28px; }
.project-card-open h3 { font-size: 27px; font-stretch: 108%; }
.project-card-open p { max-width: 46ch; font-size: 15px; }
.project-card-open .card-kind { color: var(--green); }

.project-card-closed h3 { font-size: 18px; }
.project-card-closed p { font-size: 13px; }
.project-card-closed .card-reach { font-size: 10.5px; color: var(--muted); }
.project-card-closed:hover .card-arrow { color: var(--steel); }

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .03em;
}

.site-footer a { min-height: 26px; display: inline-flex; align-items: center; transition: color .18s ease; }
.site-footer a:hover { color: var(--ink); }
.footer-rule { flex: 1; height: 1px; background: var(--line); }

/* ---------- project pages ---------- */

.project-main { flex: 1; padding: 30px 0 70px; }

.back-link, .back-foot { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); transition: color .18s ease; }
.back-link:hover, .back-foot:hover { color: var(--ink); }
.back-foot { margin-top: 52px; }

.project-hero { padding: 56px 0 46px; }
.project-hero h1 { margin-top: 20px; font-size: clamp(42px, 6.6vw, 78px); }

.project-statement {
  max-width: 62ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.58;
}

.project-outbound {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color .18s ease;
}

.project-outbound span { color: var(--green); }
.project-outbound:hover { border-color: var(--green); }

.access-note {
  margin: 30px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--steel-deep);
  color: var(--steel);
  font: 500 12px/1.5 var(--mono);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.fact { padding: 24px 22px 22px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.fact strong { font: 600 25px/1 var(--mono); letter-spacing: -.02em; color: var(--ink); }
.fact span { max-width: 26ch; color: var(--faint); font-size: 12.5px; line-height: 1.45; }

.project-details { padding-top: 8px; }

/* heading rail + prose column: the full-bleed rules need content under them, or they
   read as an unfinished page rather than a generous one */
.detail-section {
  padding: 38px 0;
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 56px;
  border-bottom: 1px solid var(--line);
}

.detail-section h2 { margin: 0; font-size: 24px; font-weight: 600; font-stretch: 106%; letter-spacing: -.02em; }
.detail-section p { max-width: 68ch; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.72; }

/* ---------- evidence pages ---------- */
/* A project page is a sequence of evidence sections. Each opens with a rail heading and a lede
   that says what the evidence proves, then shows the evidence itself at full width: an excerpt
   at a commit, a transcript, a chart computed from a measurement file, a screenshot, a diagram. */

.project-hero-mark { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 56px; }
.project-mark { margin: 0; width: 190px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.project-mark px-glider { display: grid; place-items: center; width: 150px; height: 150px; background: radial-gradient(circle at center, rgba(74, 174, 104, .10), transparent 62%); }
.project-mark figcaption { color: var(--faint); font: 500 10px/1.5 var(--mono); letter-spacing: .02em; text-align: center; }

.access-note-inline { margin-top: 18px; }
.access-note-excerpt { color: var(--green); border-left-color: var(--green-deep); }

.fact-receipt { margin-top: auto; padding-top: 6px; color: var(--faint); font: 500 10.5px/1.5 var(--mono); letter-spacing: .01em; }

.ev-index {
  padding: 18px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 22px;
  border-bottom: 1px solid var(--line);
}

.ev-index-k { color: var(--faint); font: 700 9.5px/1.2 var(--mono); letter-spacing: .18em; }
.ev-index a { color: var(--muted); font: 500 12px/1.4 var(--mono); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: color .18s ease, border-color .18s ease; }
.ev-index a:hover { color: var(--ink); border-color: var(--green); }

.ev-section { padding: 46px 0 50px; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.ev-head { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 56px; }
.ev-k { margin: 0 0 12px; color: var(--green); font: 700 9.5px/1.3 var(--mono); letter-spacing: .18em; }
.project-closed .ev-k { color: var(--steel); }
.ev-rail h2 { margin: 0; font-size: 24px; font-weight: 600; font-stretch: 106%; line-height: 1.12; letter-spacing: -.02em; }
.ev-lede { max-width: 70ch; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.72; }
.ev-lede a, .evidence-note a, .shot figcaption a, .boundary a, .walk a, .about-now a {
  color: var(--ink);
  border-bottom: 1px solid var(--green);
  transition: color .18s ease;
}
.ev-lede a:hover, .evidence-note a:hover, .shot figcaption a:hover, .boundary a:hover, .walk a:hover, .about-now a:hover { color: var(--green); }
.ev-lede strong { color: var(--ink); font-weight: 600; }
.ev-lede code, .walk code, .flow code { font: 500 .88em/1 var(--mono); color: var(--ink); }

.ev-body { margin-top: 34px; display: flex; flex-direction: column; gap: 30px; }
.ev-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
/* what a pair becomes when a figure is wider than half the column — see pair() in lib/components */
.ev-stack { display: flex; flex-direction: column; gap: 30px; }

.evidence-note { max-width: 78ch; margin: 12px 0 0; color: var(--faint); font-size: 13px; line-height: 1.55; }

/* code excerpts: real line numbers, a link to the exact lines at the exact commit */

figure { margin: 0; }
.code, .term, .doc-quote { min-width: 0; }

.code-head, .term-head {
  padding: 11px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-bottom: 0;
  font: 500 11px/1.45 var(--mono);
}

.code-path { color: var(--ink); overflow-wrap: anywhere; }
.code-meta, .term-meta { color: var(--faint); }
.code-source { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.code-link, .term-meta a { color: var(--green); transition: color .18s ease; }
.code-link:hover, .term-meta a:hover { color: var(--ink); }
.code-private { color: var(--steel); }

.code-body, .term-body {
  display: flex;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) var(--surface);
}

.code-body:focus-visible, .term-body:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.code-body pre, .term-body pre { margin: 0; padding: 16px 0; font: 400 12.5px/1.7 var(--mono); tab-size: 4; }
.code-gutter { flex: none; padding-inline: 14px 12px !important; color: var(--faint); text-align: right; user-select: none; border-right: 1px solid var(--line); }
.code-src { flex: 1; padding-inline: 16px 20px !important; color: #cdd3ce; }
.code-gap { display: inline-block; width: 100%; }
.term-body pre { padding-inline: 16px 20px; color: #c3cac5; }

/* the type-fit ladder. The build measures the longest line in a figure and picks the largest of
   these that keeps it inside the column, so an excerpt steps down a size rather than clipping. */
.fig-s2 .code-body pre, .fig-s2 .term-body pre { font-size: 11.5px; }
.fig-s3 .code-body pre, .fig-s3 .term-body pre { font-size: 10.5px; }
/* and when even the smallest step is too narrow, the figure says so rather than looking broken */
.fig-scrolls { display: block; margin-top: 8px; color: var(--faint); font: 500 10px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }

.term-cmd { color: var(--ink); overflow-wrap: anywhere; }
.term-prompt { color: var(--green); }

/* syntax colour: restrained, from the site palette, every token >= 4.5:1 on --surface */
.hljs-keyword, .hljs-built_in, .hljs-type, .hljs-meta, .hljs-literal { color: #8fb0c4; }
.hljs-string, .hljs-regexp, .hljs-attr + .hljs-string { color: #93c7a2; }
.hljs-comment, .hljs-quote { color: #7d8781; font-style: italic; }
.hljs-number { color: #e0c98f; }
.hljs-title, .hljs-title.function_, .hljs-title.class_, .hljs-section { color: var(--ink); font-weight: 600; }
.hljs-attr, .hljs-property, .hljs-variable, .hljs-params { color: #cdd3ce; }
.hljs-strong { color: var(--ink); font-weight: 700; }
.hljs-emphasis { font-style: italic; }
.hljs-code { color: #93c7a2; }
.hljs-bullet, .hljs-symbol { color: #8fb0c4; }

/* a quoted public document */

.doc-quote blockquote { margin: 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); }
.doc-quote blockquote p { margin: 0; color: #cdd3ce; font: 400 13px/1.75 var(--mono); }
.doc-quote strong { color: var(--ink); }

/* screenshots */

.shot { min-width: 0; }
.shot-frame { display: block; background: var(--surface); border: 1px solid var(--line); transition: border-color .18s ease; }
.shot-frame:hover { border-color: var(--line-strong); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { max-width: 86ch; margin-top: 12px; color: var(--faint); font-size: 13px; line-height: 1.55; }
.shot-kind { margin-right: 6px; color: var(--muted); font: 600 9.5px/1 var(--mono); letter-spacing: .14em; }

/* mechanism diagrams: text in boxes, so they stay legible when they reflow onto a phone */

.flow {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 30px;
}

.flow-node {
  position: relative;
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.flow-node:not(:last-child)::after {
  content: '→';
  position: absolute;
  top: 50%;
  right: -23px;
  transform: translateY(-50%);
  color: var(--faint);
  font: 500 14px/1 var(--mono);
}

.flow-k { color: var(--faint); font: 700 9px/1.3 var(--mono); letter-spacing: .16em; }
.flow-node strong { color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.flow-d { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.flow-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.flow-chips span { padding: 3px 7px; color: var(--muted); background: var(--surface-raised); border: 1px solid var(--line); font: 500 10.5px/1.4 var(--mono); overflow-wrap: anywhere; }
.flow-green { border-color: var(--green); box-shadow: inset 0 2px 0 var(--green); }
.flow-green .flow-k { color: var(--green); }
.flow-steel { border-color: var(--steel); box-shadow: inset 0 2px 0 var(--steel); }
.flow-steel .flow-k { color: var(--steel); }

/* stat row and boundary notes */

.stat-row { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat-row div { padding: 18px 18px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.stat-row dt { color: var(--ink); font: 600 20px/1.1 var(--mono); letter-spacing: -.02em; }
.stat-row dd { margin: 0; color: var(--faint); font-size: 12.5px; line-height: 1.45; }

.boundary { padding: 18px 20px; background: var(--steel-deep); border-left: 2px solid var(--steel); }
.boundary-k { margin: 0 0 8px; color: var(--steel); font: 700 9.5px/1.3 var(--mono); letter-spacing: .18em; }
.boundary p:last-child { max-width: 82ch; margin: 0; color: #b5c0c8; font-size: 14px; line-height: 1.65; }

/* charts: bars are SVG presentation attributes (the CSP forbids inline styles), labels are text */

.chart, .dots-fig, .quad-fig { padding: 22px 22px 18px; background: var(--surface); border: 1px solid var(--line); }
.chart-title { margin: 0 0 14px; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.4; }
.chart-legend { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font: 500 11.5px/1.4 var(--mono); }
.chart-legend li { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 14px; height: 10px; border-radius: 2px; }
.swatch-before { background: #5d6661; }
.swatch-after { background: var(--green); }

.bars { display: flex; flex-direction: column; gap: 18px; }
.bar-group { display: flex; flex-direction: column; gap: 4px; }
.bar-label { margin: 0 0 4px; color: var(--muted); font-size: 12.5px; }
.bar { display: block; overflow: visible; }
.bar-before { fill: #5d6661; }
.bar-after { fill: var(--green); }
.bar text { fill: var(--ink); font: 500 11.5px var(--mono); }

.table-view { margin-top: 18px; color: var(--muted); font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--faint); font: 600 11px/1.4 var(--mono); letter-spacing: .06em; }
.table-view summary:hover { color: var(--ink); }
.table-view table { margin-top: 12px; border-collapse: collapse; font: 400 12px/1.5 var(--mono); font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { padding: 6px 18px 6px 0; border-bottom: 1px solid var(--line); text-align: left; }
.table-view th { color: var(--muted); font-weight: 500; }
.table-view td { color: var(--ink); text-align: right; }

.dots-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) 52px; align-items: center; gap: 14px; padding: 8px 0; }
.dots-label { color: var(--muted); font: 500 11.5px/1 var(--mono); }
.dots { display: flex; flex-wrap: wrap; gap: 4px; }
.dots i { width: 11px; height: 11px; border-radius: 2px; }
.dots-before i { background: #5d6661; }
.dots-after i { background: var(--green); }
.dots-n { color: var(--ink); font: 600 13px/1 var(--mono); text-align: right; }

/* the evals outcome grid */

.quad-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.quad-title { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.quad-blurb { margin: 4px 0 12px; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.quad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.quad { position: relative; min-height: 138px; padding: 12px 12px 14px; background: var(--surface-raised); }
.quad-k { margin: 0; color: var(--faint); font: 600 9.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.quad-n { margin: 6px 0 6px; color: var(--ink); font: 600 26px/1 var(--mono); }
.quad ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.quad li { padding: 2px 6px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); font: 500 10px/1.4 var(--mono); }
.quad-empty .quad-n { color: var(--line-strong); }
.quad-success_safe { box-shadow: inset 0 2px 0 var(--green); }
.quad-flag { background: #1d1a12; box-shadow: inset 0 0 0 1px #c9a55a; }
.quad-flag .quad-k, .quad-flag .quad-n { color: #e3c47d; }
/* the flag is a footnote on the cell, in the flow: floated over the corner it landed on top of
   the cell's own heading, and it says the thing the whole page is about */
.quad-flag-note { margin: 10px 0 0; color: #e3c47d; font: 600 9.5px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; }

/* the interview block */

.interview { margin-top: 56px; padding: 30px 30px 26px; background: var(--surface); border: 1px solid var(--line-strong); border-top: 2px solid var(--green); scroll-margin-top: 20px; }
.interview-head h2 { margin: 12px 0 0; font-size: 26px; font-weight: 600; font-stretch: 106%; letter-spacing: -.02em; }
.walk { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.walk li { padding: 15px 0; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 18px; border-top: 1px solid var(--line); }
.walk-t { color: var(--green); font: 600 12px/1.6 var(--mono); }
.walk-do { margin: 0; color: var(--ink); font-size: 15.5px; line-height: 1.55; }
.walk-proves { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.about-available { color: var(--green) !important; font: 600 12px/1.4 var(--mono) !important; letter-spacing: .08em; }
/* ---------- about ---------- */

.about-main { flex: 1; padding: 66px 0 76px; }

.about-intro { padding-bottom: 54px; border-bottom: 1px solid var(--line-strong); }
.about-intro h1 { margin-top: 22px; font-size: clamp(40px, 5.9vw, 76px); }
.about-lede { max-width: 66ch; margin: 30px 0 0; color: var(--muted); font-size: 19px; line-height: 1.65; }

.about-now, .about-route, .about-tools, .about-contact {
  padding: 46px 0;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 30px;
  border-bottom: 1px solid var(--line);
}

.about-contact { border-bottom: 0; }
.rail { padding-top: 6px; }

.rail-body h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
  font-stretch: 106%;
  letter-spacing: -.02em;
}

.rail-body > p { max-width: 72ch; margin: 14px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.route-lede { color: var(--muted); }

.timeline { margin: 30px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; }

.timeline li {
  position: relative;
  padding: 20px 0 20px 30px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 22px;
  border-left: 1px solid var(--line-strong);
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 27px;
  width: 5px;
  height: 5px;
  background: var(--line-strong);
}

.timeline .timeline-current::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-deep); }
.timeline li:last-child { border-left-color: transparent; }
.timeline li:last-child::after {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: 27px;
  background: var(--line-strong);
}

.timeline-when { color: var(--faint); font: 500 10.5px/1.6 var(--mono); letter-spacing: .06em; }
.timeline-current .timeline-when { color: var(--green); }
.timeline h3 { margin: 0 0 7px; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.timeline p { max-width: 66ch; margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.62; }

.tool-list { margin: 26px 0 0; display: flex; flex-direction: column; }
.tool-list div { padding: 15px 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; border-top: 1px solid var(--line); }
.tool-list dt { color: var(--faint); font: 500 10.5px/1.7 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.tool-list dd { margin: 0; max-width: 62ch; color: var(--muted); font-size: 14.5px; line-height: 1.62; }

.contact-links { display: flex; flex-wrap: wrap; gap: 34px; }

/* ---------- 404 ---------- */

.not-found-main { flex: 1; padding: clamp(96px, 18vh, 180px) 0; }
.not-found-main h1 { margin-top: 20px; font-size: clamp(44px, 7vw, 84px); }
.not-found-main p:not(.eyebrow) { max-width: 52ch; margin: 26px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  :root { --gutter: 32px; }
  .hero { gap: 44px; }
  /* the mark renders at a fixed 150px, so the box may never be smaller than that */
  .hero-mark { width: 172px; height: 172px; }
  .evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-now, .about-route, .about-tools, .about-contact { grid-template-columns: 1fr; gap: 18px; }
  .rail { padding-top: 0; }
}

@media (max-width: 900px) {
  .ev-head { grid-template-columns: 1fr; gap: 14px; }
  .ev-pair { grid-template-columns: 1fr; }
  .quad-panels { grid-template-columns: 1fr; }
  .flow { grid-auto-flow: row; grid-auto-columns: auto; gap: 24px; }
  .flow-node:not(:last-child)::after { content: '↓'; top: auto; right: auto; bottom: -20px; left: 18px; transform: none; }
  .project-hero-mark { grid-template-columns: 1fr; gap: 26px; }
  .project-mark { width: auto; flex-direction: row; align-items: center; order: -1; justify-content: flex-start; }
  .project-mark px-glider { width: 120px; height: 120px; flex: none; }
  .project-mark figcaption { max-width: 30ch; text-align: left; }
}

@media (max-width: 760px) {
  .work-row { grid-template-columns: 1fr; gap: 42px; }
  .project-grid-open, .project-grid-closed { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: 1fr; }
  .detail-section { grid-template-columns: 1fr; gap: 14px; }
  .group-heading { flex-direction: column; gap: 12px; }
  .project-card-open h3 { font-size: 24px; }
}

@media (max-width: 620px) {
  :root { --gutter: 20px; }
  .site-header { height: 68px; gap: 12px; }
  .brand { font-size: 10.5px; letter-spacing: .12em; gap: 9px; }
  .site-header nav { gap: 16px; }
  .site-header nav a { font-size: 10.5px; letter-spacing: .04em; }

  .hero { padding: 48px 0 40px; grid-template-columns: 1fr; gap: 34px; }
  .hero-mark { width: 158px; height: 158px; justify-self: start; order: -1; }
  .hero-copy h1 { margin-top: 18px; font-size: 40px; font-stretch: 112%; line-height: 1.0; }
  .hero-statement { font-size: 15.5px; }
  .hero-links { gap: 22px; margin-top: 28px; }

  .evidence strong { font-size: 21px; }
  .evidence span { font-size: 11.5px; }
  .evidence a { padding: 20px 12px 22px 0; }

  .work-section { padding: 42px 0 32px; gap: 42px; }
  .project-card { padding: 22px 20px 20px; gap: 18px; }
  .project-card-open { padding: 24px 20px 22px; gap: 20px; }
  .project-card-open h3 { font-size: 22px; }
  .project-card-open p { font-size: 14px; }

  .site-footer { padding: 20px 0; flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-rule { display: none; }

  .project-main { padding-top: 24px; }
  .project-hero { padding: 40px 0 36px; }
  .project-hero h1 { font-size: 40px; font-stretch: 112%; overflow-wrap: anywhere; }
  .project-statement { font-size: 16.5px; }
  .fact { padding: 18px 20px; }
  .fact strong { font-size: 21px; }
  .detail-section { padding: 30px 0; }
  .detail-section h2 { font-size: 20px; }
  .detail-section p { font-size: 15px; }

  .about-main { padding: 46px 0 56px; }
  .about-intro { padding-bottom: 40px; }
  .about-intro h1 { font-size: 38px; font-stretch: 112%; }
  .about-lede { font-size: 16.5px; }
  .about-now, .about-route, .about-tools, .about-contact { padding: 34px 0; }
  .rail-body h2 { font-size: 21px; }
  .timeline li { padding-left: 22px; grid-template-columns: 1fr; gap: 8px; }
  .tool-list div { grid-template-columns: 1fr; gap: 7px; }
  .contact-links { flex-direction: column; gap: 18px; }

  .not-found-main { padding: 96px 0; }

  .ev-section { padding: 34px 0 38px; }
  .ev-rail h2 { font-size: 20px; }
  .ev-lede { font-size: 15px; }
  .ev-body { margin-top: 24px; gap: 24px; }
  .code-body pre, .term-body pre { font-size: 11.5px; }
  .code-source { margin-left: 0; }
  .chart, .dots-fig, .quad-fig { padding: 16px 14px 14px; }
  .dots-row { grid-template-columns: 48px minmax(0, 1fr) 40px; gap: 10px; }
  .dots i { width: 9px; height: 9px; }
  .quad { min-height: 0; }
  .quad-flag::after { position: static; display: block; margin-top: 6px; }
  .interview { margin-top: 40px; padding: 22px 18px 18px; }
  .interview-head h2 { font-size: 21px; }
  .walk li { grid-template-columns: 1fr; gap: 4px; }
  .walk-do { font-size: 15px; }
  .ev-index { gap: 10px 16px; }
  .not-found-main h1 { font-size: 40px; font-stretch: 112%; }
}

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