/* Fonts are self-hosted (SIL OFL, licences in fonts/): no request to Google from the visitor's browser. */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 820; font-stretch: 96% 125%; font-display: swap; src: url("fonts/archivo-latin.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 820; font-stretch: 96% 125%; font-display: swap; src: url("fonts/archivo-latin-ext.woff2") format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/courier-prime-400-latin.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/courier-prime-400-latin-ext.woff2") format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/courier-prime-700-latin.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/courier-prime-700-latin-ext.woff2") format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Orbit Plate (Lab Notebook Collage) with the Specimen Strips hero.
   Light = the notebook palette. Dark = carbon / mint / purple, taken from Carbon & Mint. */

:root {
  /* light */
  --paper: #E2DED5;
  --paper-hi: #ECE9E2;
  --plate: #D3CEC4;
  --ink: #1E1A1A;
  --ink-2: #4A4340;
  --kraft: #D1C9BA;
  --mint: #CAD7C7;
  --accent: #E15610;
  --on-accent: #1E1A1A;
  --stand: #7A736C;
  --rule: rgba(30, 26, 26, .28);
  --grain: .42;

  --btn-li-bg: var(--ink);   --btn-li-fg: var(--paper);
  --btn-gh-bg: var(--ink);   --btn-gh-fg: var(--paper);
  --btn-hover-bg: var(--accent); --btn-hover-fg: var(--on-accent);
  --focus-ring: var(--accent);

  --gut: 48px;
  --half: 56px;
  --g: clamp(16px, 4.4vw, 64px);
  --pw: min(55vw, 1060px);          /* hero plate width: right 55% */
  --bleed: calc(var(--pw) * .12);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Courier Prime", "Courier New", monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* cursors: ink crosshair, accent ring on anything clickable, ink I-beam on text; a paper halo keeps them visible on the photo */
  --cur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg stroke-linecap='round'%3E%3Cpath d='M12 3v6M12 15v6M3 12h6M15 12h6' stroke='%23E2DED5' stroke-width='3.5'/%3E%3Cpath d='M12 3v6M12 15v6M3 12h6M15 12h6' stroke='%231E1A1A' stroke-width='1.5'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='2.6' fill='%23E2DED5'/%3E%3Ccircle cx='12' cy='12' r='1.6' fill='%231E1A1A'/%3E%3C/svg%3E") 12 12;
  --cur-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='14' cy='14' r='10' fill='none' stroke='%23E2DED5' stroke-width='4'/%3E%3Ccircle cx='14' cy='14' r='10' fill='none' stroke='%23E15610' stroke-width='2'/%3E%3Ccircle cx='14' cy='14' r='3' fill='%23E2DED5'/%3E%3Ccircle cx='14' cy='14' r='2' fill='%23E15610'/%3E%3C/svg%3E") 14 14;
  --cur-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='24'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M8 4v16M5 3.5h6M5 20.5h6' stroke='%23E2DED5' stroke-width='3.5'/%3E%3Cpath d='M8 4v16M5 3.5h6M5 20.5h6' stroke='%231E1A1A' stroke-width='1.5'/%3E%3C/g%3E%3C/svg%3E") 8 12;
  color-scheme: light;
}

/* dark: Carbon & Mint. mint = lines, markers and the LinkedIn button; grey = the GitHub button; purple = hover. */
:root[data-theme="dark"] {
  --paper: #0F1417;
  --paper-hi: #1E272C;
  --plate: #151C20;
  --ink: #E9ECEE;
  --ink-2: #A3ADB3;
  --kraft: #232D33;
  --mint: #14302F;
  --accent: #53E6D4;
  --on-accent: #0F1417;
  --stand: #2A353B;
  --rule: rgba(233, 236, 238, .24);
  --grain: 0;

  --btn-li-bg: #53E6D4;  --btn-li-fg: #0F1417;
  --btn-gh-bg: #EBEBED;  --btn-gh-fg: #0F1417;
  --btn-hover-bg: #6045F4; --btn-hover-fg: #FFFFFF;
  --focus-ring: #53E6D4;
  --cur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg stroke-linecap='round'%3E%3Cpath d='M12 3v6M12 15v6M3 12h6M15 12h6' stroke='%230F1417' stroke-width='3.5'/%3E%3Cpath d='M12 3v6M12 15v6M3 12h6M15 12h6' stroke='%23E9ECEE' stroke-width='1.5'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='2.6' fill='%230F1417'/%3E%3Ccircle cx='12' cy='12' r='1.6' fill='%23E9ECEE'/%3E%3C/svg%3E") 12 12;
  --cur-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='14' cy='14' r='10' fill='none' stroke='%230F1417' stroke-width='4'/%3E%3Ccircle cx='14' cy='14' r='10' fill='none' stroke='%2353E6D4' stroke-width='2'/%3E%3Ccircle cx='14' cy='14' r='3' fill='%230F1417'/%3E%3Ccircle cx='14' cy='14' r='2' fill='%2353E6D4'/%3E%3C/svg%3E") 14 14;
  --cur-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='24'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M8 4v16M5 3.5h6M5 20.5h6' stroke='%230F1417' stroke-width='3.5'/%3E%3Cpath d='M8 4v16M5 3.5h6M5 20.5h6' stroke='%23E9ECEE' stroke-width='1.5'/%3E%3C/g%3E%3C/svg%3E") 8 12;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #0F1417; --paper-hi: #1E272C; --plate: #151C20;
    --ink: #E9ECEE; --ink-2: #A3ADB3; --kraft: #232D33; --mint: #14302F;
    --accent: #53E6D4; --on-accent: #0F1417; --stand: #2A353B;
    --rule: rgba(233, 236, 238, .24); --grain: 0;
    --btn-li-bg: #53E6D4; --btn-li-fg: #0F1417;
    --btn-gh-bg: #EBEBED; --btn-gh-fg: #0F1417;
    --btn-hover-bg: #6045F4; --btn-hover-fg: #FFFFFF;
    --focus-ring: #53E6D4;
    --cur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg stroke-linecap='round'%3E%3Cpath d='M12 3v6M12 15v6M3 12h6M15 12h6' stroke='%230F1417' stroke-width='3.5'/%3E%3Cpath d='M12 3v6M12 15v6M3 12h6M15 12h6' stroke='%23E9ECEE' stroke-width='1.5'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='2.6' fill='%230F1417'/%3E%3Ccircle cx='12' cy='12' r='1.6' fill='%23E9ECEE'/%3E%3C/svg%3E") 12 12;
    --cur-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='14' cy='14' r='10' fill='none' stroke='%230F1417' stroke-width='4'/%3E%3Ccircle cx='14' cy='14' r='10' fill='none' stroke='%2353E6D4' stroke-width='2'/%3E%3Ccircle cx='14' cy='14' r='3' fill='%230F1417'/%3E%3Ccircle cx='14' cy='14' r='2' fill='%2353E6D4'/%3E%3C/svg%3E") 14 14;
    --cur-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='24'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M8 4v16M5 3.5h6M5 20.5h6' stroke='%230F1417' stroke-width='3.5'/%3E%3Cpath d='M8 4v16M5 3.5h6M5 20.5h6' stroke='%23E9ECEE' stroke-width='1.5'/%3E%3C/g%3E%3C/svg%3E") 8 12;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--ink-2) var(--kraft); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-variation-settings: "wdth" 100;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
svg path { vector-effect: non-scaling-stroke; }

.mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; color: var(--ink-2); line-height: 1.4; }

/* paper grain (light only). A pre-rendered tile on its own layer: no blend mode,
   so scrolling doesn't re-blend the whole screen every frame. */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  opacity: var(--grain); will-change: transform;
  background-image: url("images/grain.png");
}
:root[data-theme="dark"] .grain { display: none; }

.page { position: relative; padding: 0 var(--gut); overflow-x: clip; }

/* the axis: one line through the page centre, down the sections */
.spine {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; margin-left: -.5px;
  background: var(--accent);
  z-index: 4; pointer-events: none;
  transform-origin: 50% 0;
}

/* ---------- theme toggle ---------- */
.theme-toggle {
  position: absolute; top: 18px; right: var(--g); z-index: 7;
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 0 14px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 0;
  font: 400 .8125rem/1 var(--mono); letter-spacing: .04em;
  cursor: var(--cur-link), pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.theme-toggle:hover { background: var(--btn-hover-bg); color: var(--btn-hover-fg); border-color: var(--btn-hover-bg); }
.tt-icon {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid currentColor;
  box-shadow: inset 7px 0 0 currentColor;     /* half-filled disc */
}
.theme-toggle[aria-pressed="true"] .tt-icon { box-shadow: inset -7px 0 0 currentColor; }

/* ---------- masthead ---------- */
.masthead {
  position: absolute; top: 0; left: 0; z-index: 5;
  width: calc(100% - var(--pw));
  padding: 24px var(--g) 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font: 400 .8125rem/1.3 var(--mono);
}
.masthead .mark { font-weight: 700; text-decoration: none; letter-spacing: .02em; white-space: nowrap; }
/* the same monogram, drawn from the ASCII grid at name height */
.mark { display: inline-flex; align-items: center; gap: 10px; }
.mono-mark { width: auto; height: 22px; flex: none; fill: currentColor; }
.masthead nav { display: flex; gap: 14px; white-space: nowrap; }
.masthead nav a { text-decoration: none; }
/* a hairline runs between the name and the sections, so the two read apart */
.masthead::after, .peek::after {
  content: ""; order: 1; flex: 1; min-width: 24px; height: 1px;
  align-self: center; background: var(--rule);
}
.masthead nav, .peek nav { order: 2; }
@media (min-width: 1101px) { .masthead { padding-right: 24px; } }
/* too narrow for one line: the name sits above, the sections run on one line below */
@media (min-width: 1101px) and (max-width: 1519px) {
  .masthead { flex-direction: column; align-items: flex-start; gap: 10px; }
  .masthead::after { display: none; }
}
.masthead nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* peek nav: a slim copy of the masthead that slides in from the top edge */
.peek {
  position: fixed; top: 0; left: 0; right: 0; z-index: 19;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 16px var(--g) 14px;
  font: 400 .8125rem/1.3 var(--mono);
  background: var(--paper); border-bottom: 1px solid var(--rule);
  transform: translateY(-101%); transition: transform .45s var(--ease);
}
.peek.show { transform: none; }
.peek .mark { font-weight: 700; text-decoration: none; letter-spacing: .02em; white-space: nowrap; }
.peek nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.peek nav a { text-decoration: none; }
.peek .theme-toggle { position: static; order: 3; min-height: 32px; padding: 0 12px; flex: none; }
.peek nav a:hover, .peek nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- hero: specimen strips ---------- */
.sp-hero {
  position: relative;
  min-height: calc(var(--pw) * 1.25 - var(--bleed));
  overflow: clip;
}
.sp-plate {
  position: absolute; right: 0; top: calc(var(--bleed) * -1);
  width: var(--pw); aspect-ratio: 4 / 5;
  z-index: 1;
}
.sp-cut {
  position: absolute; inset: 0;
  background: var(--stand);
  clip-path: inset(var(--t) calc(100% - var(--x) - var(--w) + .35%) var(--b) calc(var(--x) + .35%));
  transform: translateY(var(--dy));
}
.sp-ht {
  position: absolute; inset: 0;
  background: #fff;
  filter: grayscale(1) contrast(14);
  mix-blend-mode: multiply;
  overflow: hidden;
}
.sp-ht img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 28%;
  filter: blur(.8px) brightness(1.3);
}
.sp-ht::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(closest-side, #777, #fff) 0 0 / 5px 5px;
  mix-blend-mode: multiply;
}
.sp-plate.no-photo .sp-ht { display: none; }
.sp-plate.has-photo .sp-cut { background: var(--paper); }
/* dark: light dots on carbon, the same print read the other way round */
:root[data-theme="dark"] .sp-ht { mix-blend-mode: screen; filter: grayscale(1) contrast(11); }
:root[data-theme="dark"] .sp-ht img { filter: blur(.8px) brightness(1.4); }
:root[data-theme="dark"] .sp-plate.has-photo .sp-cut::after { content: ""; position: absolute; inset: 0; background: #EBEBED; mix-blend-mode: multiply; pointer-events: none; }

.sp-strip {
  position: absolute;
  left: var(--x); width: var(--w); top: var(--t); height: var(--h);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(var(--pw) * .016) 0;
  overflow: hidden;
  color: var(--ink);
}
.sp-strip.accent { background: var(--accent); color: var(--on-accent); }
.sp-strip.kraft { background: var(--kraft); }
.sp-strip.mint  { background: var(--mint); }
.sp-strip.paper { background: var(--paper-hi); justify-content: center; }
.sp-strip.ink   { background: var(--ink); padding: 0; }
.sp-read {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 800 calc(var(--pw) * .05)/1 var(--display);
  font-stretch: 125%;
  letter-spacing: -.02em;
}
.sp-tag {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 400 clamp(11px, calc(var(--pw) * .0135), 12px)/1.15 var(--mono);
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--paper-hi); color: var(--ink);
  padding: 8px 3px;
}
.sp-tag.bare { background: none; padding: 0; text-transform: none; letter-spacing: .02em; }

.sp-crop { position: absolute; width: 18px; height: 18px; border: 0 solid var(--ink); }
.sp-crop.tl { left: calc(5% - 10px); top: calc(var(--bleed) + 18px); border-left-width: 1px; border-top-width: 1px; }

.sp-pencil {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 2; pointer-events: none; overflow: visible;
}
.sp-pencil path { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; }
.sp-pencil-main { stroke-width: 2.8; stroke-dasharray: 1; stroke-dashoffset: 0; }
.sp-pencil-ghost { stroke-width: 1; opacity: .6; stroke-dasharray: 5 3 14 2; }

.sp-copy {
  position: relative; z-index: 3;
  width: calc(100% - var(--pw));
  min-height: calc(var(--pw) * 1.25 - var(--bleed));
  padding: clamp(96px, 12vh, 132px) var(--g) 56px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
}
.sp-name {
  margin: 0 0 .28em -.04em;
  font: 800 clamp(3.4rem, 6.9vw, 6.6rem)/.86 var(--display);
  font-stretch: 125%;
  letter-spacing: -.035em;
}
.sp-lede {
  max-width: 24ch;
  font: 500 clamp(1.35rem, 2.1vw, 2.05rem)/1.16 var(--display);
  font-stretch: 100%;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.sp-where { margin: 0 0 14px; font: 400 .8125rem/1 var(--mono); letter-spacing: .02em; color: var(--ink-2); }
.sub { margin: 1.1rem 0 0; max-width: 46ch; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.sp-badges {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  font: 700 .8125rem/1.25 var(--mono); letter-spacing: .01em;
}
.sp-badges li { padding: 6px 10px 5px; }
.b-kraft { background: var(--kraft); }
.b-mint  { background: var(--mint); }
.b-rights { background: var(--accent); color: var(--on-accent); }

.sp-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 1.75rem; }
.cta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 150px; min-height: 48px; padding: 0 22px;
  text-decoration: none;
  font-weight: 700; font-variation-settings: "wdth" 112; font-size: 1.0625rem; letter-spacing: .01em;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.btn--li { background: var(--btn-li-bg); color: var(--btn-li-fg); }
.btn--gh { background: var(--btn-gh-bg); color: var(--btn-gh-fg); }
.btn:hover { background: var(--btn-hover-bg); color: var(--btn-hover-fg); }
.btn svg, .view svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; flex: none; }
.view {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-variation-settings: "wdth" 112;
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px;
}
.cv { font-family: var(--mono); font-size: .8125rem; color: var(--ink-2); }

/* numbers strip */
.sp-numbers { padding: 28px var(--g) 96px; position: relative; }
.sp-numbers dl { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
/* a quiet ruled strip, not a row of cards: four figures, one line of context each */
.sp-numbers dl > div { display: flex; flex-direction: column; padding: 18px 24px 4px 0; }
.sp-numbers dl > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.sp-numbers dt {
  font: 800 clamp(1.9rem, 2.6vw, 2.5rem)/.95 var(--display); font-stretch: 125%;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.sp-numbers dd { margin: 12px 0 0; font: 700 .8125rem/1.35 var(--mono); }
.sp-numbers dd span { display: block; font-weight: 400; color: var(--ink-2); margin-top: 4px; }

/* ---------- sections hang from the axis ---------- */
.sec {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  padding-top: 150px;
}
.side { padding-right: var(--half); text-align: right; min-width: 0; }
.body { padding-left: var(--half); min-width: 0; }
.node {
  position: absolute; left: 50%; top: 160px;
  width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%;
  background: var(--accent); z-index: 5;
}
.node::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  border: 1px dotted var(--accent);
}
h2 {
  font-weight: 820; font-variation-settings: "wdth" 112;
  font-size: clamp(2.4rem, 4.4vw, 4.6rem); line-height: .92; letter-spacing: -.03em;
  text-transform: uppercase; text-wrap: balance;
}
.tag { margin-top: 12px; }

.prose { max-width: 66ch; padding-top: 4px; }
.prose p + p { margin-top: 1.05em; }

/* portrait print */
.print {
  display: inline-block; max-width: 100%; box-sizing: border-box; margin-top: 40px; text-align: left;
  background: var(--kraft); padding: 14px 14px 12px;
  transform: rotate(-1.2deg);
}
.photo {
  position: relative; width: 300px; max-width: 100%; aspect-ratio: 4 / 5; overflow: hidden;
  background: #B9B1A3; isolation: isolate;
}
.photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(1) contrast(1.35) brightness(1.05);
  mix-blend-mode: multiply;
}
.photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at center, transparent 0 38%, rgba(209, 201, 186, .7) 62%) 0 0 / 4px 4px;
  mix-blend-mode: screen;
}
.photo.missing::after { display: none; }
:root[data-theme="dark"] .photo { background: var(--accent); }
:root[data-theme="dark"] .photo img { filter: grayscale(1) contrast(1.25) brightness(1.1); }
:root[data-theme="dark"] .photo::after { display: none; }

/* experience */
.role {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr;
  margin-top: 56px; padding-top: 28px;
}
/* role and group separators stop short of the axis; a hollow node marks each stop */
.split { position: relative; }
.split::before, .split::after { content: ""; position: absolute; top: 0; border-top: 1px solid var(--ink); }
.split::before { left: 0; right: calc(50% + 16px); transform: scaleX(var(--line, 1)); transform-origin: right center; }
.split::after { left: calc(50% + 16px); right: 0; transform: scaleX(var(--line, 1)); transform-origin: left center; }
.rnode {
  position: absolute; left: 50%; top: 0; z-index: 5;
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--accent);
}
/* with the motion layer, nodes start hollow and fill as the axis reaches them */
.motion .node { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--accent); transition: background-color .4s var(--ease); }
.motion .node::after { opacity: 0; transform: scale(.5); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.motion .node.lit { background: var(--accent); }
.motion .node.lit::after { opacity: 1; transform: none; }
.motion .rnode { transition: background-color .4s var(--ease); }
.motion .rnode.lit { background: var(--accent); }
.motion .spine { animation: none; }
.motion .more.open { animation: none; }
.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
picture { display: contents; }
html.lenis { scroll-behavior: auto; }
.motion-pending #hero-title { visibility: hidden; }

/* loader: covers the first paint while fonts, hero images and the landing spot
   settle. Sits under the grain so the paper texture runs straight through. */
.loader { display: none; }
.loading .loader, .loader.lifting {
  position: fixed; inset: 0; z-index: 40; display: grid;
  grid-template-columns: 1fr auto; grid-template-rows: 1fr auto auto; gap: 18px 24px;
  padding: var(--gut) var(--gut) calc(var(--gut) + 8px);
  background: var(--paper); color: var(--ink);
}
/* the monogram from initial_ascii.txt: rows fill in from the top as the page loads */
.ld-art {
  grid-column: 1 / -1; align-self: center; justify-self: center; margin: 0;
  font: 700 clamp(7px, 1.25vw, 13px)/1.12 var(--mono); letter-spacing: 0; color: var(--ink);
}
.ld-row { opacity: .12; transition: opacity .25s ease-out; }
.ld-row.on { opacity: 1; }
.ld-who { font: 400 .8125rem/1.5 var(--mono); letter-spacing: .04em; color: var(--ink-2); align-self: end; }
.ld-n {
  font: 700 clamp(3.5rem, 9vw, 7.5rem)/.8 var(--mono); letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; text-align: right;
}
.ld-bar { grid-column: 1 / -1; height: 2px; background: var(--rule); }
.ld-bar span { display: block; height: 100%; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
/* the hero's entrance waits behind the loader and plays as it lifts */
.loading .sp-cut, .loading .sp-strip, .loading .sp-pencil-main,
.loading .sp-pencil-ghost, .loading .spine { animation-play-state: paused; }
.role + .role { margin-top: 64px; }
.co { font-weight: 760; font-variation-settings: "wdth" 108; font-size: clamp(1.6rem, 2.6vw, 2.5rem); line-height: 1; letter-spacing: -.02em; }
.co span { display: block; font-weight: 500; font-size: .5em; letter-spacing: 0; margin-top: 8px; color: var(--ink-2); }
.role-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.role-h .r { flex: 1 1 auto; min-width: 0; }
.role-h .d { flex: none; white-space: nowrap; }
.role-h .r { font-weight: 700; font-variation-settings: "wdth" 108; font-size: 1.125rem; }
.role-h .r2 { display: block; font-weight: 500; font-size: .85em; color: var(--ink-2); margin-top: 2px; }
.role-h .d { font-variant-numeric: tabular-nums; }
.role .body > p:not(.role-h) { max-width: 66ch; }
.bul { list-style: none; padding: 0; margin-top: 18px; max-width: 66ch; }
.bul li { position: relative; padding-left: 26px; }
.bul li + li { margin-top: 10px; }
.bul li::before { content: ""; position: absolute; left: 0; top: .78em; width: 14px; height: 1px; background: var(--ink); }
.bul strong { font-weight: 700; }
.more-btn {
  margin-top: 18px; background: none; border: 1px solid var(--ink); color: var(--ink);
  font: 600 .9375rem/1 var(--display); font-variation-settings: "wdth" 108;
  padding: 10px 14px; cursor: var(--cur-link), pointer; display: inline-flex; gap: 10px; align-items: baseline;
}
.more-btn:hover { background: var(--kraft); }
.more-btn .mono { color: var(--ink-2); }
.js .more:not(.open) { display: none; }
.more.open { animation: unfold .5s var(--ease); }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
/* dark: the Carbon & Mint outlined button */
:root[data-theme="dark"] .more-btn { border-color: var(--accent); color: var(--accent); }
:root[data-theme="dark"] .more-btn .mono { color: inherit; }
:root[data-theme="dark"] .more-btn:hover { background: var(--accent); color: var(--on-accent); }

/* periodic tiles */
.tiles { list-style: none; padding: 0; margin-top: 24px; display: flex; flex-wrap: wrap; gap: 4px; }
.tile {
  width: 116px; min-height: 72px; padding: 5px 8px 8px;
  border: 1px solid var(--ink); background: var(--paper);
  display: flex; flex-direction: column; line-height: 1.1;
}
.tile.m { background: var(--mint); }
.tile.k { background: var(--kraft); }
.tile .z { font-family: var(--mono); font-size: .6875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* the tool's own name leads; the number is the only periodic-table touch left */
.tile .n { margin-top: auto; padding-top: 10px; font-weight: 700; font-variation-settings: "wdth" 100; font-size: .875rem; line-height: 1.15; overflow-wrap: break-word; }
.strip .tile { background: var(--paper); }
.strip .tile.m { background: var(--mint); }
:root[data-theme="dark"] .tile { border-color: var(--rule); }
.tile[hidden] { display: none; }
.tile-more { padding: 0; }
.tile-more button {
  flex: 1; width: 100%; border: 0; background: none; cursor: var(--cur-link), pointer;
  font: 800 1.5rem/1 var(--display); color: var(--ink);
}
.tile-more button:hover { background: var(--kraft); }
:root[data-theme="dark"] .tile-more { border-color: var(--accent); }
:root[data-theme="dark"] .tile-more button { color: var(--accent); }
:root[data-theme="dark"] .tile-more button:hover { background: var(--accent); color: var(--on-accent); }

/* projects */
.case {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr;
  margin-top: 64px;
}
.case + .case { margin-top: 96px; }
.strip { position: relative; text-align: left; padding: 30px 32px 34px; margin-right: var(--half); }
.strip.mint { background: var(--mint); }
.strip.kraft { background: var(--kraft); }
.strip.paper { background: var(--plate); }
.strip .cm.tl { top: -8px; left: -8px; }
.strip .cm.br { bottom: -8px; right: -8px; }
.cm { position: absolute; width: 16px; height: 16px; border: 0 solid var(--ink); }
.cm.tl { top: -10px; left: -10px; border-top-width: 1px; border-left-width: 1px; }
.cm.br { bottom: -10px; right: -10px; border-bottom-width: 1px; border-right-width: 1px; }
.case h3 {
  font-weight: 800; font-variation-settings: "wdth" 104;
  font-size: clamp(1.7rem, 2.5vw, 2.4rem); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance;
}
.card { margin-top: 14px; max-width: 46ch; }
.repo { margin-top: 18px; font-weight: 700; font-variation-settings: "wdth" 112; }
.repo a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.steps { padding-top: 26px; }
.body .steps { padding-top: 26px; }
.case > .body.steps, .case > .body > .steps { max-width: 66ch; }
.steps > div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); }
.steps > div:first-child { border-top-color: var(--ink); }
.steps dt { font-family: var(--mono); font-size: .8125rem; color: var(--ink-2); padding-top: 3px; }

.group { grid-column: 1 / -1; margin-top: 112px; }
.more-cases { grid-column: 1 / -1; }
.group-h {
  padding-top: 14px;
  font-weight: 400; font-size: .8125rem; letter-spacing: .02em; color: var(--ink-2);
}

/* tables */
.tbl { width: 100%; border-collapse: collapse; margin-top: 26px; font-variant-numeric: tabular-nums; font-size: .9375rem; line-height: 1.4; }
.tbl caption { text-align: left; padding-bottom: 8px; }
.tbl.wide + .tbl.wide { margin-top: 56px; }
.hl { list-style: none; padding: 0; margin: 0; }
.hl li + li { margin-top: 10px; }
/* themed cursors, for mouse and trackpad only */
@media (hover: hover) and (pointer: fine) {
  html { cursor: var(--cur), crosshair; }
  p, li, dd, dt, td, th, h1, h2, h3, figcaption { cursor: var(--cur-text), text; }
  a, button, label, summary, [role="button"] { cursor: var(--cur-link), pointer; }
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 60; padding: 10px 14px;
  background: var(--ink); color: var(--paper); font: 700 .875rem/1 var(--display); text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }
[tabindex="-1"]:focus { outline: none; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tbl thead th { font-family: var(--mono); font-weight: 400; font-size: .75rem; color: var(--ink-2); text-align: left; padding: 6px 14px 6px 0; border-bottom: 1px solid var(--ink); }
.tbl tbody th, .tbl td { text-align: left; vertical-align: top; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--rule); }
.tbl tbody th { font-weight: 650; }
.nw { white-space: nowrap; }
/* Education reads as two entries: degree and dates, then the school, then the highlights at full width */
.tbl.edu thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tbl.edu { border-top: 1px solid var(--ink); }
.tbl.edu tbody tr { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.tbl.edu tbody th, .tbl.edu td { display: block; padding: 0; border: 0; }
.tbl.edu tbody th { grid-area: 1 / 1; font-size: 1.0625rem; }
.tbl.edu td:nth-of-type(1) { grid-area: 2 / 1; color: var(--ink-2); margin-top: 2px; }
.tbl.edu td:nth-of-type(2) { grid-area: 1 / 2; font-family: var(--mono); font-size: .8125rem; color: var(--ink-2); padding-top: 3px; }
.tbl.edu td:nth-of-type(3) { grid-area: 3 / 1 / 4 / 3; margin-top: 12px; }
.wide { max-width: 760px; }
.wide + .wide { margin-top: 44px; }
.notes { margin-top: 44px; display: grid; gap: 8px; max-width: 700px; }
.note { padding: 14px 18px 16px; }
.note.mint { background: var(--mint); }
.note.kraft { background: var(--kraft); }
.note .bk { display: block; margin-bottom: 4px; }

/* contact */
.contact { padding-bottom: 120px; }
.close { font-weight: 600; font-variation-settings: "wdth" 96; font-size: clamp(1.35rem, 1.9vw, 1.85rem); line-height: 1.22; letter-spacing: -.012em; max-width: 30ch; }
.facts { margin-top: 20px; font-size: .8125rem; max-width: 60ch; }
.contact .cta { margin-top: 30px; }
.contact .cv { margin-left: 14px; }

.foot { display: flex; justify-content: space-between; gap: 8px 24px; padding: 18px 0 26px; border-top: 1px solid var(--rule); position: relative; z-index: 5; background: var(--paper); }
.foot > span { white-space: nowrap; }
.foot > .stack { white-space: normal; flex: 1; text-align: center; text-wrap: balance; }

/* motion: strips slide into register, the pencil draws, the axis draws down */
@keyframes slide { from { transform: translateY(calc(var(--dy, 0%) + var(--rise, 0%))); } }
@keyframes pdraw { from { stroke-dashoffset: 1; } }
@keyframes fade  { from { opacity: 0; } }
@keyframes draw  { from { transform: scaleY(.04); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: no-preference) {
  .sp-cut, .sp-strip { animation: slide 1.6s var(--ease) both; }
  .sp-cut:nth-child(2) { animation-delay: .06s; } .sp-cut:nth-child(3) { animation-delay: .12s; }
  .sp-cut:nth-child(4) { animation-delay: .18s; } .sp-cut:nth-child(5) { animation-delay: .24s; }
  .sp-cut:nth-child(6) { animation-delay: .3s; }
  .sp-strip { animation-delay: .2s; }
  .sp-strip:nth-of-type(odd) { animation-delay: .32s; }
  /* the pencil draws alongside the strips, so the whole entrance ends together */
  .sp-pencil-main  { animation: pdraw 1.5s .15s cubic-bezier(.65, 0, .35, 1) both; }
  .sp-pencil-ghost { animation: fade .8s .9s ease-out both; }
  .spine { animation: draw 2.6s var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .theme-toggle, .peek { transition: none; }
  .more.open { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  :root { --gut: 36px; --half: 40px; }
  .sp-numbers dl { grid-template-columns: repeat(2, 1fr); }
  .sp-numbers dl > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .sp-numbers dl > div:nth-child(n+3) { border-top: 1px solid var(--rule); margin-top: 14px; }
}

@media (max-width: 1100px) {
  .masthead nav, .masthead::after { display: none; }
  .nw { white-space: normal; }
}

@media (max-width: 960px) {
  :root { --gut: 16px; --half: 0px; }
  .page { padding: 0 16px 0 44px; }
  .spine { left: 22px; }
  .sec, .role, .case { grid-template-columns: 1fr; }
  .split::before { right: 0; transform-origin: left center; }
  .split::after { display: none; }
  .rnode { left: -22px; }
  .sec { padding-top: 96px; }
  .node { left: -22px; top: 104px; }
  .side { text-align: left; padding-right: 0; }
  .body { padding-left: 0; }
  .print { margin-top: 28px; }
  .prose { margin-top: 32px; }
  .role-h { margin-top: 18px; }
  .strip { margin-right: 0; padding: 24px 18px 26px; }
  .steps > div { grid-template-columns: 1fr; gap: 2px; }
  .tile { width: calc((100% - 8px) / 3); }
  .tile .n { font-size: .8125rem; }
  .tbl { font-size: .875rem; }
  .tbl.wide thead { display: none; }
  .tbl.wide tbody tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .tbl.wide tbody th, .tbl.wide td { display: block; border: 0; padding: 0; }
  .tbl.wide tbody th { margin-bottom: 2px; }
  .nw { white-space: normal; }
  .contact .cv { margin-left: 0; flex-basis: 100%; margin-top: 10px; }
  .foot { flex-direction: column; gap: 6px; }
  .foot > span { white-space: normal; }
  .foot > .stack { text-align: left; }
}

@media (max-width: 820px) {
  :root { --pw: 74vw; --bleed: calc(var(--pw) * .1); }
  .role-h { flex-wrap: wrap; }
  .masthead {
    width: auto; padding: 18px 0 0 16px;
    writing-mode: vertical-rl; transform: rotate(180deg) translateY(0);
    top: 0; left: 0; height: calc(var(--pw) * 1.25 - var(--bleed));
    flex-direction: row; justify-content: flex-end;
  }
  .masthead .mark { font-size: .75rem; }
  .masthead .mono-mark { display: none; }
  .masthead nav { display: none; }
  .theme-toggle { top: 12px; right: 12px; }
  .sp-hero { min-height: 0; display: flex; flex-direction: column; }
  .sp-plate { position: relative; top: auto; margin-top: calc(var(--bleed) * -1); margin-inline: auto; left: calc(var(--pw) * .025); } /* stacked: centred above the text; the strips span 5-90% of the plate, so it shifts 2.5% to look centred */
  .sp-crop.tl { top: calc(var(--bleed) + 8px); }
  .sp-copy { width: 100%; min-height: 0; padding: 0 16px 48px; margin-top: 2rem; justify-content: flex-start; }
  .sp-name { font-size: clamp(3rem, 15vw, 4.4rem); margin-bottom: .22em; }
  .sp-lede { font-size: 1.3rem; max-width: none; }
  .sub { font-size: .9375rem; margin-top: .8rem; }
  .sp-badges { margin-top: 1rem; font-size: .75rem; gap: 5px; }
  .sp-badges li { padding: 5px 8px 4px; }
  .sp-links { margin-top: 1.4rem; gap: 14px 20px; }
  .btn { padding: 0 16px; }
  .sp-pencil { display: none; }
  /* narrow plates: the readout strips grow so the caption fits under the figure */
  .sp-strip.kraft { --h: 38% !important; }
  .sp-strip.mint { --t: 51% !important; --h: 40% !important; }
  .sp-numbers { padding-top: 16px; padding-bottom: 64px; }
  .sp-numbers dl > div { padding: 14px 12px 4px 0; }
  .sp-numbers dl > div + div { padding-left: 12px; }
  .sp-numbers dl > div:nth-child(3) { padding-left: 0; }
  .sp-numbers dt { font-size: 1.9rem; }
  .sp-numbers dd { margin-top: 10px; }
}
