/* Ink on cool paper, one heraldic red. The board is the only ornament. */
:root {
  --paper: #f6f7f9;
  --ink: #14213d;
  --ink-2: #334060;
  --muted: #5b6474;
  --rule: #d9dde4;
  --cell-0: #e7eaef;
  --cell-1: #cdd3dd;
  --accent: #9b1c31;
  --accent-soft: #f3e3e6;
  --shadow: 0 1px 2px rgb(20 33 61 / 0.06), 0 12px 32px -12px rgb(20 33 61 / 0.18);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1628;
    --ink: #e8ebf1;
    --ink-2: #c3cad6;
    --muted: #93a0b4;
    --rule: #25324c;
    --cell-0: #17223a;
    --cell-1: #22304e;
    --accent: #e0566b;
    --accent-soft: #3a1c27;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.65 var(--text);
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
code { font: 0.92em/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--cell-0); padding: 0.12em 0.35em; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 0.75rem; z-index: 2; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2rem, 6vw, 5rem); align-items: end;
  max-width: 72rem; margin: 0 auto; padding: clamp(3rem, 9vw, 7.5rem) clamp(1rem, 5vw, 3rem) clamp(2.5rem, 6vw, 4.5rem);
}
.handle { margin: 0 0 1rem; font: 700 0.95rem/1 var(--display); font-stretch: 112%; letter-spacing: 0.01em; color: var(--accent); }
.handle a { text-decoration: none; }
h1 {
  margin: 0; font: 800 clamp(3.4rem, 10.5vw, 7.75rem)/0.88 var(--display); font-stretch: 125%;
  letter-spacing: -0.035em; color: var(--ink);
}
.thesis { margin: 1.6rem 0 0; font: 700 clamp(1.3rem, 2.6vw, 1.75rem)/1.25 var(--display); font-stretch: 112%; letter-spacing: -0.01em; max-width: 26ch; }
.lede { margin: 1rem 0 0; color: var(--ink-2); max-width: 58ch; }
.elsewhere { display: flex; gap: 1.5rem; margin: 1.6rem 0 0; font: 700 1rem/1 var(--display); font-stretch: 112%; }

.board { margin: 0; width: clamp(12rem, 24vw, 17.5rem); }
.board svg { display: block; width: 100%; height: auto; }
.board figcaption { margin-top: 0.6rem; font-size: 0.85rem; color: var(--muted); }
#cells rect.b0 { fill: var(--cell-0); }
#cells rect.b1 { fill: var(--cell-1); }
#path { stroke: var(--accent); stroke-width: 0.9; stroke-linecap: round; stroke-linejoin: round; }
#stops circle { fill: var(--accent); }
#knight { fill: var(--accent); }
#landing { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 0.5; }

/* ---------- work ---------- */
main { max-width: 72rem; margin: 0 auto; padding: 0 clamp(1rem, 5vw, 3rem); }
.project:first-child { border-top: 1px solid var(--rule); }
.project { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 4.5rem); padding: clamp(2.75rem, 6vw, 4.5rem) 0; border-bottom: 1px solid var(--rule); }
.project > header { grid-column: 1; }
.project > :not(header) { grid-column: 2; }
.project > header { position: sticky; top: 2rem; align-self: start; }
h2 { margin: 0; font: 800 clamp(1.75rem, 3.2vw, 2.35rem)/1.05 var(--display); font-stretch: 112%; letter-spacing: -0.02em; }
h2 a { text-decoration: none; }
h2 a:hover { text-decoration: underline; }
.what { margin: 0.75rem 0 0; color: var(--ink-2); font-size: 1.05rem; line-height: 1.5; }
.body p { margin: 0 0 1.1rem; max-width: 66ch; }
.body p:last-child { margin-bottom: 0; }
.facts { margin: 1.4rem 0 0; font-size: 0.9rem; color: var(--muted); }

.evidence { margin: 1.8rem 0 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rule); box-shadow: var(--shadow); background: #fff; }
.evidence figcaption { margin-top: 0.7rem; font-size: 0.9rem; color: var(--muted); max-width: 62ch; }

/* The measurement is the artifact: three readings, drawn to scale. */
.scores { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.scores li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.score {
  position: relative; font: 800 1.9rem/1 var(--display); font-stretch: 112%; letter-spacing: -0.02em; color: var(--ink);
  padding-bottom: 0.45rem; border-bottom: 3px solid var(--rule);
}
.score::after { content: ""; position: absolute; left: 0; bottom: -3px; height: 3px; width: calc(var(--s) * 1%); background: var(--accent); }
.scores .label { padding-top: 0.35rem; color: var(--ink-2); }

.play { display: flex; flex-wrap: wrap; gap: 1.5rem; font: 700 1rem/1 var(--display); font-stretch: 112%; }

.also { max-width: 72rem; padding: clamp(2.25rem, 5vw, 3.5rem) 0; border-bottom: 1px solid var(--rule); }
.also p { margin: 0; max-width: 62ch; margin-left: calc(min(20rem, 30vw) + clamp(2rem, 5vw, 4.5rem)); color: var(--ink-2); }

footer { max-width: 72rem; margin: 0 auto; padding: 2.5rem clamp(1rem, 5vw, 3rem) 4rem; color: var(--muted); font-size: 0.95rem; }
footer p { margin: 0; }

/* ---------- narrow screens ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .board { width: min(10.5rem, 48vw); }
  .board figcaption { font-size: 0.8rem; }
  .project { grid-template-columns: 1fr; }
  .project > header, .project > :not(header) { grid-column: 1; }
  .project > header { position: static; margin-bottom: 1.4rem; }
  .also p { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
