/* ==========================================================================
   rohitswami.com
   A technical report about one engineer. Paper, ink, and two working colours:
   hot (before, on fire) and cool (after, boring). They mean the same thing
   everywhere on the page, the way red and blue do in a differential flame graph.
   ========================================================================== */

@property --r {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

:root {
  --paper: #f3f2ee;
  --paper-2: #eae9e3;
  --paper-3: #dfded7;
  --ink: #141413;
  --ink-2: #4b4a45;
  --ink-3: #65635c;
  --rule: #d8d6cf;
  --rule-2: #bfbdb4;

  --hot: #e5481a;
  --hot-ink: #b2350c;
  --hot-wash: #f6d9cc;
  --cool: #2b52c4;
  --cool-ink: #2448b3;
  --cool-wash: #d5def6;

  --print: #f2f1ec;           /* the portrait is always a print */

  /* Newsreader has no arrows; Plex Mono's fill in, glyph by glyph */
  --serif: "Newsreader", "IBM Plex Mono", ui-serif, Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --mast-h: 56px;
  --gutter: clamp(16px, 4.2vw, 56px);
  --maxw: 1240px;
  --hang: 0px;                /* left margin that section numerals hang into */
  --measure: 40em;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e0f11;
    --paper-2: #16171a;
    --paper-3: #202125;
    --ink: #ecebe6;
    --ink-2: #b4b2aa;
    --ink-3: #8c8a82;
    --rule: #26272b;
    --rule-2: #3a3b40;
    --hot: #ff6a3d;
    --hot-ink: #ff8a63;
    --hot-wash: #3a1c12;
    --cool: #86a6ff;
    --cool-ink: #9cb5ff;
    --cool-wash: #172341;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0e0f11;
  --paper-2: #16171a;
  --paper-3: #202125;
  --ink: #ecebe6;
  --ink-2: #b4b2aa;
  --ink-3: #8c8a82;
  --rule: #26272b;
  --rule-2: #3a3b40;
  --hot: #ff6a3d;
  --hot-ink: #ff8a63;
  --hot-wash: #3a1c12;
  --cool: #86a6ff;
  --cool-ink: #9cb5ff;
  --cool-wash: #172341;
  color-scheme: dark;
}

@media (min-width: 1100px) {
  :root { --hang: 184px; }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--mast-h) + 24px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(17px, 15.6px + .4vw, 20px);
  line-height: 1.55;
  font-optical-sizing: auto;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; font-variant-numeric: lining-nums; }
p, li, dd { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
strong, b { font-weight: 600; }
code, kbd { font-family: var(--mono); font-size: .86em; }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: .05em .4em;
  border: 1px solid var(--rule-2);
  border-bottom-width: 2px;
  border-radius: 3px;
  font-size: .78em;
  line-height: 1.4;
  text-align: center;
  color: var(--ink-2);
  font-variant-numeric: lining-nums;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  text-decoration-color: color-mix(in srgb, currentColor 32%, transparent);
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease), text-decoration-thickness .2s var(--ease);
}
a:hover {
  color: var(--hot-ink);
  text-decoration-color: var(--hot);
  text-decoration-thickness: 2px;
}

:where(a, button, [tabindex], summary, canvas):focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: color-mix(in srgb, var(--hot) 26%, transparent); color: var(--ink); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font: 500 13px var(--mono);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.mono { font-family: var(--mono); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: 500 13px/1.2 var(--mono);
  font-variant-numeric: lining-nums;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--quiet { border-color: var(--rule-2); color: var(--ink-2); }
.btn--quiet:hover { border-color: var(--ink); }

/* small instrument buttons, shared by the figures and the products board */
.pbtn {
  padding: 6px 11px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: 500 12px/1 var(--mono);
  cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease);
}
.pbtn:hover { border-color: var(--ink); }
.pbtn--solid { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.pbtn--solid:hover { background: var(--hot-ink); border-color: var(--hot-ink); color: var(--paper); }
.pbtn:disabled { opacity: .45; cursor: default; }


.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  text-decoration-color: color-mix(in srgb, currentColor 32%, transparent);
  cursor: pointer;
}
.linkish:hover { color: var(--hot-ink); text-decoration-color: var(--hot); }

.fig-no {
  margin-right: .55em;
  font: 500 .74em/1 var(--mono);
  letter-spacing: .02em;
  color: var(--hot-ink);
  white-space: nowrap;
}

figcaption {
  font-size: .8em;
  line-height: 1.5;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.mast {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--mast-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding-inline: var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .35s var(--ease);
  animation: mast-in .6s var(--ease-out) both;
}
.mast.is-scrolled { border-bottom-color: var(--rule); }

@keyframes mast-in { from { opacity: 0; transform: translateY(-8px); } }

.mast__name {
  flex: none;
  font: 500 19px/1 var(--serif);
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.mast__name:hover { color: var(--ink); text-decoration: none; }

.mast__nav {
  display: none;
  margin-inline: auto;
  gap: clamp(12px, 1.4vw, 22px);
  font: 400 12.5px/1 var(--mono);
  font-variant-numeric: lining-nums;
}
.mast__nav a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.mast__nav a span { margin-right: .45em; color: var(--ink-3); }
.mast__nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.mast__nav a:hover { color: var(--ink); text-decoration: none; }
.mast__nav a.is-active { color: var(--ink); }
.mast__nav a.is-active span { color: var(--hot-ink); }
.mast__nav a.is-active::after, .mast__nav a:hover::after { transform: scaleX(1); }

.mast__tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  font: 400 12.5px/1 var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
}
.mast__nav + .mast__tools { margin-left: 0; }

.clock { color: var(--ink); white-space: nowrap; }
.clock__city { color: var(--ink-3); }
.clock.is-3am .clock__time { color: var(--hot-ink); }

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: transparent;
  color: var(--ink-2);
  font: 500 12px/1 var(--mono);
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.theme-btn:hover { border-color: var(--ink); color: var(--ink); }
.theme-btn svg { width: 13px; height: 13px; }
.theme-btn__sun { display: none; }
.theme-btn__label::before { content: "3am"; }
:root[data-theme="dark"] .theme-btn__moon { display: none; }
:root[data-theme="dark"] .theme-btn__sun { display: block; }
:root[data-theme="dark"] .theme-btn__label::before { content: "9am"; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn__moon { display: none; }
  :root:not([data-theme="light"]) .theme-btn__sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn__label::before { content: "9am"; }
}

.mast__resume {
  padding: 8px 12px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ease);
}
.mast__resume:hover { background: var(--hot-ink); color: var(--paper); text-decoration: none; }

.mast__menu {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: transparent;
  font: 500 12px/1 var(--mono);
  cursor: pointer;
}

.mast__progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}
.mast__progress span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--hot), var(--cool));
  background-size: 100vw 100%;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

@media (max-width: 1239px) {
  .mast { gap: 14px; }
  .mast__resume { display: none; }
}
@media (min-width: 1240px) {
  .mast__nav { display: flex; }
  .mast__menu { display: none; }
}
@media (max-width: 520px) {
  .clock__city { display: none; }
  .theme-btn__label { display: none; }
  .theme-btn { width: 30px; justify-content: center; padding: 0; }
}

/* mobile contents sheet */
.toc {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--paper);
  overflow-y: auto;
  animation: toc-in .32s var(--ease-out);
}
.toc[hidden] { display: none; }
@keyframes toc-in { from { opacity: 0; transform: translateY(-10px); } }
.toc__inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
}
.toc__title {
  margin-bottom: 24px;
  font: 500 12px var(--mono);
  color: var(--ink-3);
}
.toc__list a {
  display: flex;
  align-items: baseline;
  gap: .5em;
  padding: 10px 0;
  font-size: 22px;
  line-height: 1.25;
  text-decoration: none;
}
.toc__list a::after {
  content: "";
  flex: 1;
  order: 2;
  min-width: 1em;
  border-bottom: 1px dotted var(--rule-2);
  transform: translateY(-.3em);
}
.toc__name { order: 1; }
.toc__no { order: 3; font: 500 13px var(--mono); color: var(--hot-ink); }
.toc__close { margin-top: 28px; }
.toc__close {
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  font: 500 13px var(--mono);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Hero. The stage pins while the page scrolls past it; flame.js reads that
   scroll distance as "how much of the fire is out".
   -------------------------------------------------------------------------- */

.hero { position: relative; }

.hero__stage {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--mast-h));
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(18px, 4svh, 52px) var(--gutter) clamp(14px, 2.4svh, 28px);
}

.js .hero__pin { height: calc(100svh - var(--mast-h) + 120svh); }
.js .hero__stage {
  position: sticky;
  top: var(--mast-h);
  height: calc(100svh - var(--mast-h));
}

.hero__kicker {
  font: 400 12.5px/1.5 var(--mono);
  font-variant-numeric: lining-nums;
  color: var(--ink-3);
  animation: fade-in .5s .1s var(--ease) both;
}

.hero__title {
  margin: clamp(8px, 1.6svh, 20px) 0 clamp(12px, 2.4svh, 28px);
  font-size: clamp(40px, min(6.9vw, 12.5svh), 132px);
  font-weight: 400;
  line-height: .94;
  letter-spacing: -.028em;
  font-variation-settings: "opsz" 72;
}
.hero__title em { font-style: italic; letter-spacing: -.035em; }

.hero__line {
  position: relative;
  display: block;
  padding-bottom: .06em;
  animation: raster .7s var(--ease) both;
}
.hero__line:nth-child(2) { animation-delay: .16s; }
.hero__line::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--hot);
  opacity: 0;
  animation: scan .7s var(--ease) both;
}
.hero__line:nth-child(2)::after { animation-delay: .16s; }

@keyframes raster {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(-12% -4% -18% -4%); }
}
@keyframes scan {
  0% { top: 0; opacity: .9; }
  85% { opacity: .9; }
  100% { top: 100%; opacity: 0; }
}
@keyframes fade-in { from { opacity: 0; } }

@media (min-width: 1100px) {
  .hero__text {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    grid-template-areas: "kicker kicker" "title lede";
    align-items: end;
    column-gap: clamp(32px, 4vw, 72px);
  }
  .hero__kicker { grid-area: kicker; }
  .hero__title { grid-area: title; margin-bottom: 0; }
  .hero__lede { grid-area: lede; padding-bottom: .55em; }
}

.hero__lede {
  max-width: 37em;
  font-size: clamp(17px, 15.4px + .45vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  animation: fade-in .7s .38s var(--ease) both;
}

.flamefig {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: clamp(14px, 3svh, 36px);
}

.flame {
  position: relative;
  flex: 1 1 auto;
  min-height: 200px;
  margin-inline: calc(-1 * min(var(--gutter), 24px));
}
.flame__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.flame__canvas:focus-visible { outline-offset: -2px; }

.flame__tip {
  position: absolute;
  left: 0; top: 0;
  z-index: 3;
  max-width: min(330px, 80vw);
  padding: 9px 11px 10px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font: 400 12px/1.5 var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
  pointer-events: none;
  box-shadow: 0 10px 30px -12px rgb(0 0 0 / .45);
}
.flame__tip b { font-weight: 600; }
.flame__tip .tip__note { display: block; margin-top: 4px; color: color-mix(in srgb, var(--paper) 72%, var(--ink)); font-style: italic; }
.flame__tip .tip__hot { color: #ff9a74; }
.flame__tip .tip__act { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); color: color-mix(in srgb, var(--paper) 80%, var(--ink)); }
.flame__tip .tip__cool { color: #9fb8ff; }
:root[data-theme="light"] .flame__tip .tip__hot, :root:not([data-theme]) .flame__tip .tip__hot { color: #ff9a74; }

.flame__reset {
  position: absolute;
  right: min(var(--gutter), 24px);
  top: 6px;
  z-index: 2;
  padding: 5px 9px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: var(--paper);
  font: 500 11.5px/1 var(--mono);
  cursor: pointer;
}
.flame__reset:hover { border-color: var(--ink); }

.flame__hint {
  position: absolute;
  left: min(var(--gutter), 24px);
  top: 4px;
  font: 400 12px/1 var(--mono);
  color: var(--ink-3);
  pointer-events: none;
  transition: opacity .3s var(--ease);
  animation: fade-in .6s 1.4s var(--ease) both;
}
.flame__hint.is-after { color: var(--cool-ink); }
.flame__hint.is-done { color: var(--cool-ink); }

.flamefig__cap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 32px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  animation: fade-in .6s .7s var(--ease) both;
}
.flamefig__cap > p { max-width: 62ch; font-size: clamp(13.5px, 12.6px + .2vw, 15.5px); }
.flamefig__how { color: var(--ink-3); }
.flamefig__ctrl { display: flex; align-items: center; gap: 18px; }
.flamefig__total {
  min-width: 5.2em;
  font: 500 clamp(18px, 16px + .6vw, 24px)/1 var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
  text-align: right;
  color: var(--flame-color, var(--hot-ink));
  transition: color .2s linear;
}

.seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--rule-2);
  border-radius: 3px;
}
.seg button {
  padding: 6px 11px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink-2);
  font: 500 12px/1 var(--mono);
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

@media (max-width: 700px) {
  .flamefig__how { display: none; }
  .flamefig__cap { flex-direction: column; align-items: stretch; }
  .flamefig__ctrl { justify-content: space-between; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.sec {
  position: relative;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(80px, 11vw, 150px) var(--gutter) 0;
}
.sec::before {
  content: "";
  position: absolute;
  left: var(--gutter); right: var(--gutter);
  top: clamp(40px, 5.5vw, 75px);
  height: 1px;
  background: var(--rule);
  transform-origin: left;
}
.js .sec::before { transform: scaleX(0); transition: transform 1.1s var(--ease-out); }
.js .sec.is-in::before { transform: scaleX(1); }

.sec__head {
  display: grid;
  grid-template-columns: var(--hang) minmax(0, 1fr);
  margin-bottom: clamp(36px, 5vw, 64px);
}
.sec__no {
  grid-column: 1;
  grid-row: 1;
  padding-top: .6em;
  font: 500 13px/1 var(--mono);
  color: var(--hot-ink);
}
.sec__title {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  font-size: clamp(34px, 26px + 2.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -.022em;
}
.js .sec .sec__title { clip-path: inset(0 0 100% 0); }
.js .sec.is-in .sec__title { animation: raster .8s .12s var(--ease) both; }
.js .sec.is-in .sec__title::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--hot);
  opacity: 0;
  animation: scan .8s .12s var(--ease) both;
}

.sec__sub {
  grid-column: 2;
  max-width: 36em;
  margin-top: 16px;
  font-size: clamp(18px, 16.4px + .45vw, 22px);
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-2);
}
@media (max-width: 1099px) {
  .sec__head { grid-template-columns: minmax(0, 1fr); }
  .sec__no { padding: 0 0 14px; }
  .sec__title, .sec__sub { grid-column: 1; }
  .sec__title { grid-row: 2; }
}

.hang { padding-left: var(--hang); }

/* ---------------------------------------------------------------- §1 about */

.about {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  padding-left: var(--hang);
}
@media (max-width: 860px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 320px; }
}

.about__lede {
  max-width: 30em;
  font-size: clamp(20px, 17px + .8vw, 26px);
  line-height: 1.42;
  letter-spacing: -.005em;
}
.about__lede strong { font-weight: 500; }

.spec { margin-top: clamp(28px, 4vw, 44px); border-top: 1px solid var(--rule); }
.spec__row {
  display: grid;
  grid-template-columns: 10em minmax(0, 1fr);
  gap: 8px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.spec dt {
  padding-top: .35em;
  font: 500 12px/1.3 var(--mono);
  color: var(--ink-3);
}
.spec li { position: relative; padding-left: 1.1em; }
.spec li + li { margin-top: .3em; }
.spec li::before { content: "–"; position: absolute; left: 0; color: var(--ink-3); }
@media (max-width: 560px) {
  .spec__row { grid-template-columns: minmax(0, 1fr); }
}

.portrait figcaption { margin-top: 12px; }
.portrait__how { color: var(--ink-3); }

.dither {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 2px;
  background: var(--print);
  cursor: crosshair;
  touch-action: manipulation;
  box-shadow: 0 1px 0 var(--rule-2);
}
.dither__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.dither__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  -webkit-mask-image: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), #000 0 var(--r), transparent calc(var(--r) + 1.5px));
  mask-image: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), #000 0 var(--r), transparent calc(var(--r) + 1.5px));
  transition: --r .5s var(--ease-out), opacity .2s var(--ease);
}
.js .dither:not(.is-ready) .dither__photo { opacity: 1; -webkit-mask-image: none; mask-image: none; }
.dither.is-loupe .dither__photo { opacity: 1; --r: 62px; }
.dither.is-developed .dither__photo { opacity: 1; --r: 140%; }
.dither__toggle {
  position: absolute;
  left: 8px; bottom: 8px;
  padding: 5px 8px;
  border: 1px solid rgb(20 20 19 / .25);
  border-radius: 2px;
  background: rgb(242 241 236 / .9);
  color: #141413;
  font: 500 11px/1 var(--mono);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.dither:hover .dither__toggle, .dither__toggle:focus-visible, .dither.is-developed .dither__toggle { opacity: 1; }
@media (hover: none) { .dither__toggle { opacity: 1; } }
.no-js .dither__toggle { display: none; }

.skills { margin-top: clamp(48px, 6vw, 80px); padding-left: var(--hang); }
.skills__title, .writing__title, .col__title, .index__title {
  margin-bottom: 14px;
  font: 500 12.5px/1.3 var(--mono);
  color: var(--ink-3);
}
.skills__list { border-top: 1px solid var(--rule); }
.skills__list > div {
  display: grid;
  grid-template-columns: 15em minmax(0, 1fr);
  gap: 4px 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.skills__list dt { padding-top: .3em; font: 400 12px/1.4 var(--mono); color: var(--ink-3); }
.skills__list dd { font-size: .95em; line-height: 1.6; }
@media (max-width: 680px) { .skills__list > div { grid-template-columns: minmax(0, 1fr); } }

.about__cta {
  margin-top: clamp(32px, 4vw, 48px);
  padding-left: var(--hang);
  font-size: clamp(20px, 17px + .8vw, 26px);
  font-style: italic;
}

/* ---------------------------------------------------------- §2 experience */

.careerfig { margin-bottom: clamp(56px, 7vw, 96px); }

.career {
  --label-w: 84px;
  --dur: 2.4s;
  position: relative;
  padding: 26px 0 6px var(--label-w);
  user-select: none;
  -webkit-user-select: none;
}
.no-js .careerfig { display: none; }

.career__axis {
  position: absolute;
  left: var(--label-w); right: 0; top: 0;
  height: 100%;
  pointer-events: none;
}
.career__tick {
  position: absolute;
  top: 0; bottom: 0;
  border-left: 1px dashed var(--rule);
  font: 400 11px/1 var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink-3);
}
.career__tick span { position: absolute; top: 4px; left: 5px; }
.career__now {
  position: absolute;
  top: 0; bottom: 0;
  border-left: 1px solid var(--hot);
  pointer-events: none;
}
.career__now span {
  position: absolute;
  top: 4px; right: 5px;
  font: 500 11px/1 var(--mono);
  color: var(--hot-ink);
}

.lane {
  position: relative;
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
  margin-left: calc(-1 * var(--label-w));
  padding: 4px 0;
  border-top: 1px solid var(--rule);
}
.lane__label {
  padding-top: 5px;
  font: 400 11.5px/1 var(--mono);
  color: var(--ink-3);
}
.lane__rows { display: grid; gap: 3px; }
.lane__row { position: relative; height: 22px; }

.span {
  position: absolute;
  top: 0; bottom: 0;
  left: calc(var(--s) * 100%);
  width: calc((var(--e) - var(--s)) * 100%);
  min-width: 3px;
  padding: 0 6px;
  overflow: hidden;
  border-left: 2px solid var(--ink);
  background: var(--paper-3);
  color: var(--ink);
  font: 500 11.5px/22px var(--mono);
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.span:hover, .span.is-hot { background: var(--ink); color: var(--paper); text-decoration: none; }
.span--quiet { border-left-color: var(--rule-2); background: transparent; box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); }
.span--live { border-left-color: var(--hot); background: var(--hot-wash); }
.span--live::after {
  /* still running */
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--hot);
  animation: live 1.6s ease-in-out infinite;
}
@keyframes live { 50% { opacity: .2; } }

.mark {
  position: absolute;
  top: 50%;
  left: calc(var(--s) * 100%);
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  display: grid;
  place-items: center;
}
.mark::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--ink-2);
  transform: rotate(45deg);
  transition: transform .2s var(--ease-out), background-color .2s var(--ease);
}
.mark--paper::before { background: var(--cool); }
.mark--hot::before { background: var(--hot); }
.mark:hover::before, .mark.is-hot::before { transform: rotate(45deg) scale(1.5); background: var(--ink); }

.lane--gh .lane__label { padding-top: 26px; }
.lane__row--gh { height: 46px; }
.ghbar {
  position: absolute;
  bottom: 0;
  left: calc(var(--s) * 100%);
  width: calc((var(--e) - var(--s)) * 100%);
  padding: 0 2px;
}
.ghbar i {
  display: block;
  height: max(1px, calc(var(--h) * 46px));
  background: var(--ink-2);
  opacity: .55;
  transform-origin: bottom;
}
.ghbar.is-peak i { background: var(--cool); opacity: 1; }
.ghbar.is-hot i { opacity: 1; background: var(--ink); }

.career__cursor {
  position: absolute;
  top: 18px; bottom: 0;
  left: calc(var(--label-w) + var(--x, 0px));
  width: 1px;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s var(--ease);
}
.career.is-scrub .career__cursor { opacity: .8; }
.career__date {
  position: absolute;
  top: -18px;
  left: 0;
  transform: translateX(-50%);
  padding: 3px 6px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font: 500 11px/1 var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

.career__readout {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  height: 2.9em;
  margin-top: 10px;
  padding-left: var(--hang);
  font: 400 12.5px/1.45 var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink-2);
}
.career__readout b { color: var(--ink); font-weight: 500; }
.careerfig figcaption { padding-left: var(--hang); max-width: calc(var(--hang) + 46em); }

/* recording sweep, the first time the chart scrolls into view */
.career__head {
  position: absolute;
  top: 18px; bottom: 0;
  left: var(--label-w);
  width: 2px;
  background: var(--hot);
  opacity: 0;
  pointer-events: none;
}
.js .careerfig:not(.is-in) .span,
.js .careerfig:not(.is-in) .mark,
.js .careerfig:not(.is-in) .ghbar i { visibility: hidden; }
.js .careerfig.is-in .span { animation: record calc((var(--e) - var(--s)) * var(--dur)) calc(var(--s) * var(--dur)) linear both; }
.js .careerfig.is-in .mark::before { animation: pop .35s calc(var(--s) * var(--dur)) var(--ease-out) both; }
.js .careerfig.is-in .ghbar i { animation: grow .5s calc(var(--s) * var(--dur)) var(--ease-out) both; }
.js .careerfig.is-in .career__head { animation: sweep var(--dur) linear both; }
@keyframes record { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pop { from { transform: rotate(45deg) scale(0); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes sweep {
  0% { left: var(--label-w); opacity: 1; }
  96% { opacity: 1; }
  100% { left: calc(100% - 2px); opacity: 0; }
}

@media (max-width: 640px) {
  .career { --label-w: 0px; padding-top: 30px; }
  .lane { grid-template-columns: minmax(0, 1fr); margin-left: 0; padding-top: 16px; }
  .lane__label { position: absolute; top: 3px; left: 0; padding: 0; font-size: 10.5px; }
  .lane--gh .lane__label { padding: 0; }
  .span { padding: 0 4px; font-size: 10.5px; }
  .career__tick span { font-size: 10px; left: 3px; }
  .career__tick:nth-child(even) span,
  .career__tick:nth-last-child(2) span { display: none; }
}

/* jobs */
.jobs { border-top: 1px solid var(--rule); }
.job {
  display: grid;
  grid-template-columns: var(--hang) minmax(0, 1fr);
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: calc(var(--mast-h) + 16px);
}
.job:target { background: linear-gradient(90deg, var(--hot-wash), transparent 70%); }
.job__when {
  font: 400 12.5px/1.5 var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink-2);
}
.job__dur { color: var(--ink-3); }
.job__logo {
  width: 36px;
  height: 36px;
  margin-top: 14px;
  border-radius: 3px;
  object-fit: contain;
  background: #fff;
  filter: grayscale(1) contrast(1.05);
  opacity: .82;
  transition: filter .3s var(--ease), opacity .3s var(--ease);
}
.job:hover .job__logo { filter: none; opacity: 1; }
.job__role {
  font-size: clamp(24px, 19px + 1.2vw, 34px);
  line-height: 1.1;
  letter-spacing: -.015em;
}
.job--current .job__role::after {
  content: "current";
  display: inline-block;
  margin-left: .7em;
  padding: 3px 7px;
  border: 1px solid var(--hot);
  border-radius: 2px;
  color: var(--hot-ink);
  font: 500 11px/1 var(--mono);
  vertical-align: .45em;
}
.job__org { margin-top: 6px; color: var(--ink-2); }
.job__points { max-width: var(--measure); margin-top: 18px; }
.job__points li { position: relative; padding-left: 1.1em; }
.job__points li + li { margin-top: .55em; }
.job__points li::before { content: "–"; position: absolute; left: 0; color: var(--ink-3); }
.job__points strong { font-weight: 600; }
.js .job:not(.is-expanded) .job__more { display: none; }
.job.is-expanded .job__more { animation: fade-in .5s var(--ease) both; }
.job__expand {
  margin-top: 14px;
  padding: 6px 10px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: transparent;
  font: 500 12px/1 var(--mono);
  cursor: pointer;
}
.job__expand:hover { border-color: var(--ink); }
.job__stack {
  max-width: var(--measure);
  margin-top: 18px;
  font: 400 12px/1.6 var(--mono);
  color: var(--ink-3);
}
@media (max-width: 1099px) {
  .job { grid-template-columns: minmax(0, 1fr); }
  .job__when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-bottom: 10px; }
  .job__logo { order: -1; width: 28px; height: 28px; margin: 0; }
}

/* ------------------------------------------------------------ §3 products */

.board { padding-left: var(--hang); scroll-margin-top: calc(var(--mast-h) + 16px); }
.board__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--ink);
}
.board__status {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 400 12.5px/1.4 var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink-2);
}
.board__status b { color: var(--ink); font-weight: 500; }
.board__lamp, .prod__lamp {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink-3) 16%, transparent);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.board.is-up .board__lamp, .prod.is-up .prod__lamp {
  background: var(--cool);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cool) 22%, transparent), 0 0 14px color-mix(in srgb, var(--cool) 60%, transparent);
}
.board.is-down .board__lamp, .prod.is-down .prod__lamp {
  background: var(--hot);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hot) 22%, transparent), 0 0 14px color-mix(in srgb, var(--hot) 55%, transparent);
}
.board.is-checking .board__lamp, .prod.is-checking .prod__lamp { animation: lamp .9s ease-in-out infinite; }
@keyframes lamp { 50% { opacity: .25; } }

.prod { border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--mast-h) + 16px); }
.prod:target { background: linear-gradient(90deg, var(--cool-wash), transparent 70%); }
.prod__row {
  display: grid;
  grid-template-columns: 12px 10.5em minmax(0, 1fr) 13em 4.8em;
  align-items: start;
  gap: 4px 20px;
  padding: 20px 4px 22px;
  text-decoration: none;
  transition: background-color .2s var(--ease), padding .3s var(--ease-out);
}
.prod__row:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .prod__row:hover { padding-left: 14px; } }
.prod__lamp { grid-row: 1; margin-top: .5em; }
.prod__name { grid-column: 2; grid-row: 1; font-size: clamp(19px, 16px + .6vw, 24px); line-height: 1.2; letter-spacing: -.01em; }
.prod__dom { display: block; margin-top: 5px; font: 400 12px/1.3 var(--mono); color: var(--ink-3); letter-spacing: 0; }
.prod__what { grid-column: 3; grid-row: 1; font-size: .95em; line-height: 1.5; color: var(--ink-2); }
.prod__stack { display: block; margin-top: 7px; font: 400 11.5px/1.4 var(--mono); color: var(--ink-3); }
.prod__state, .prod__when, .prod__ms {
  font: 400 12px/1.45 var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink-3);
}
.prod__meta { grid-column: 4; grid-row: 1; display: flex; flex-direction: column; gap: 4px; padding-top: .3em; }
.prod__state { color: var(--ink-2); }
.prod__ms { grid-column: 5; grid-row: 1; padding-top: .3em; text-align: right; white-space: nowrap; }
.prod.is-up .prod__ms { color: var(--cool-ink); }
.prod.is-down .prod__ms { color: var(--hot-ink); }
@media (max-width: 1099px) {
  .prod__row { grid-template-columns: 12px minmax(0, 1fr) auto; grid-template-rows: auto; }
  .prod__lamp { grid-row: 1; }
  .prod__name { grid-column: 2; grid-row: 1; }
  .prod__ms { grid-column: 3; grid-row: 1; }
  .prod__what { grid-column: 2 / -1; grid-row: 2; }
  .prod__meta { grid-column: 2 / -1; grid-row: 3; flex-direction: row; justify-content: space-between; gap: 12px; padding-top: 2px; }
}

/* ------------------------------------------------------------ §4 projects */

.feature { padding-left: var(--hang); scroll-margin-top: calc(var(--mast-h) + 16px); }
.feature__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; }
.feature__title {
  font-size: clamp(40px, 30px + 3vw, 76px);
  line-height: 1;
  letter-spacing: -.03em;
}
.feature__meta { font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); font-variant-numeric: lining-nums; }
.feature__lede { max-width: 30em; margin-top: 16px; font-size: clamp(20px, 17px + .8vw, 26px); line-height: 1.42; }
.feature__body { max-width: var(--measure); margin-top: clamp(28px, 4vw, 40px); }
.feature__points { margin-top: 14px; }
.feature__points li { position: relative; padding-left: 1.1em; }
.feature__points li + li { margin-top: .6em; }
.feature__points li::before { content: "–"; position: absolute; left: 0; color: var(--ink-3); }

.links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 22px; font: 500 13px/1.4 var(--mono); }
.links .btn { font-size: 13px; }

.flakyfig { margin-top: clamp(28px, 4vw, 44px); }
.flakyfig figcaption { margin-top: 12px; max-width: 54em; }
.flaky {
  font: 400 12.5px/1.2 var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.flaky__row {
  display: grid;
  grid-template-columns: 13.5em minmax(0, 1fr) 4em 5.6em 6.4em;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  padding: 0 4px;
  border-top: 1px solid var(--rule);
}
.flaky__row--head { min-height: 34px; border-top: 0; color: var(--ink-3); font-size: 11.5px; }
.flaky__row--head code { font-size: 1em; color: var(--ink-2); transition: color .3s var(--ease); }
.flaky__row--head code.is-new { color: var(--hot-ink); }
.flaky__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flaky__runs { display: flex; gap: 6px; min-width: 0; overflow: hidden; }
.run {
  flex: none;
  position: relative;
  width: 16px;
  height: 16px;
}
.run::before, .run::after { content: ""; position: absolute; }
.run--pass::before { inset: 4px; border-radius: 50%; background: var(--ink-2); }
.run--fail::before, .run--fail::after {
  left: 2px; right: 2px; top: 7px;
  height: 2px;
  background: var(--hot);
  transform: rotate(45deg);
}
.run--fail::after { transform: rotate(-45deg); }
.run.is-new { animation: run-in .4s var(--ease-out) both; }
@keyframes run-in { from { transform: scale(0); opacity: 0; } 60% { transform: scale(1.25); } }
.flaky__score { text-align: right; }
.flaky__verdict { white-space: nowrap; }
.flaky__verdict i {
  font-style: normal;
  padding: 3px 6px;
  border-radius: 2px;
  font-weight: 500;
}
.v-stable i { color: var(--cool-ink); background: var(--cool-wash); }
.v-flaky i { color: var(--hot-ink); background: var(--hot-wash); }
.v-broken i { color: var(--paper); background: var(--ink); }
.v-none i { color: var(--ink-3); }
.flaky__conf { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.flaky__row.is-changed .flaky__verdict i { animation: flash .6s var(--ease); }
@keyframes flash { 30% { transform: scale(1.08); } }
@media (max-width: 720px) {
  .flaky__row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 8px 2px; }
  .flaky__row--head span:nth-child(3), .flaky__row--head span:nth-child(4), .flaky__row--head span:nth-child(5) { display: none; }
  .flaky__row--head span:nth-child(2) { text-align: right; }
  .flaky__runs { grid-column: 1 / -1; grid-row: 2; gap: 4px; }
  .run { width: 14px; height: 14px; }
  .run--pass::before { inset: 3px; }
  .run--fail::before, .run--fail::after { left: 1px; right: 1px; top: 6px; }
  .flaky__score, .flaky__conf { display: none; }
}

/* index */
.index { position: relative; margin-top: clamp(64px, 8vw, 110px); padding-left: var(--hang); }
.index__bar { margin-bottom: 14px; }
.index__title { margin: 0; }
.index__list { border-top: 1px solid var(--ink); }
.proj { border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--mast-h) + 16px); }
.proj[hidden] { display: none; }
.proj__row {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr) 11em 15em 18px;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  padding: 15px 4px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s var(--ease), padding .3s var(--ease-out);
}
.proj__row:hover { background: var(--paper-2); }
@media (hover: hover) and (pointer: fine) {
  .proj__row:hover { padding-left: 14px; }
}
.proj__year, .proj__kind, .proj__stack { font: 400 12.5px/1.3 var(--mono); font-variant-numeric: lining-nums tabular-nums; color: var(--ink-3); }
.proj__name { font-size: clamp(18px, 16px + .5vw, 22px); line-height: 1.25; }
.proj__stack { color: var(--ink-2); }
.proj__plus { position: relative; width: 12px; height: 12px; align-self: center; }
.proj__plus::before, .proj__plus::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.5px;
  margin-top: -.75px;
  background: currentColor;
  transition: transform .35s var(--ease-out);
}
.proj__plus::after { transform: rotate(90deg); }
.proj.is-open .proj__plus::after { transform: rotate(0deg); }
.proj.is-open .proj__row { background: var(--paper-2); }

.js .proj__detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.js .proj.is-open .proj__detail { grid-template-rows: 1fr; }
.proj__inner {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 28px;
  min-height: 0;
  overflow: hidden;
}
.proj__img {
  margin: 22px 0 28px 4px;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.proj__text { max-width: 38em; padding: 20px 4px 30px 0; font-size: .95em; }
.proj__text > * + * { margin-top: .8em; }
.proj__text ul li { position: relative; padding-left: 1.1em; }
.proj__text ul li + li { margin-top: .4em; }
.proj__text ul li::before { content: "–"; position: absolute; left: 0; color: var(--ink-3); }
.proj__text .links { margin-top: 1.2em; }

.meta { display: grid; gap: 4px; font-size: .92em; }
.meta > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; }
.meta dt { padding-top: .2em; font: 400 12px/1.4 var(--mono); color: var(--ink-3); }

@media (max-width: 900px) {
  .proj__row { grid-template-columns: 3.6em minmax(0, 1fr) 14px; gap: 4px 12px; }
  .proj__kind { display: none; }
  .proj__stack { grid-column: 2; grid-row: 2; }
  .proj__plus { grid-column: 3; grid-row: 1; }
  .proj__inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .proj__img { max-width: 360px; margin: 18px 0 0; }
}

/* the floating preview that follows the cursor down the index */
.peek {
  position: fixed;
  left: 0; top: 0;
  z-index: 40;
  width: 320px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  clip-path: inset(50% 50% 50% 50%);
  transition: clip-path .45s var(--ease-out), opacity .2s var(--ease), visibility 0s .45s;
  will-change: transform;
  box-shadow: 0 30px 50px -30px rgb(0 0 0 / .5);
}
.peek img { display: block; width: 100%; height: 100%; object-fit: cover; }
.peek.is-on { opacity: 1; visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .45s var(--ease-out), opacity .2s var(--ease), visibility 0s; }
@media (hover: none), (pointer: coarse) { .peek { display: none; } }

/* ----------------------------------------------- §5 writing & research */

/* the list of posts, here and on the writing pages */
.posts { border-top: 1px solid var(--ink); }
.posts li { border-bottom: 1px solid var(--rule); }
.posts a {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr) auto;
  gap: 4px 18px;
  align-items: baseline;
  padding: 18px 4px;
  text-decoration: none;
  transition: background-color .2s var(--ease), padding .3s var(--ease-out);
}
.posts a:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .posts a:hover { padding-left: 14px; } }
.posts__no { font: 500 12.5px var(--mono); color: var(--hot-ink); font-variant-numeric: lining-nums; }
.posts__title { font-size: clamp(20px, 16px + .9vw, 27px); line-height: 1.2; letter-spacing: -.01em; }
.posts__title em { font-style: italic; }
.posts__dek { grid-column: 2; font-size: 16.5px; font-style: italic; color: var(--ink-2); line-height: 1.45; }
.posts__meta { grid-column: 3; grid-row: 1; font: 400 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
@media (max-width: 640px) {
  .posts a { grid-template-columns: 2.4em minmax(0, 1fr); }
  .posts__meta { grid-column: 2; grid-row: auto; }
}
.posts__all { margin-top: 14px; font: 500 13px/1.4 var(--mono); }

.papers { margin-top: clamp(56px, 7vw, 88px); padding-left: var(--hang); scroll-margin-top: calc(var(--mast-h) + 16px); }
.papers__title { margin-bottom: 10px; font: 500 12.5px/1.3 var(--mono); color: var(--ink-3); }
.papers__sub { max-width: 40em; margin-bottom: 20px; font-style: italic; color: var(--ink-2); }
.papers .refs { padding-left: 0; }

/* the career chart's products lane is a tight stack */
.lane--prod .lane__rows { gap: 0; }
.lane--prod .lane__row { height: 15px; }
.lane--prod .lane__label { padding-top: 2px; }
.mark--prod::before { width: 7px; height: 7px; background: var(--cool); }

/* ---------------------------------------------------------------- papers */

.refs { padding-left: var(--hang); border-top: 1px solid var(--rule); }
.ref {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr);
  gap: 8px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: calc(var(--mast-h) + 16px);
}
.ref:target { background: linear-gradient(90deg, var(--cool-wash), transparent 70%); }
.ref__no { padding-top: .35em; font: 500 12.5px/1 var(--mono); color: var(--cool-ink); font-variant-numeric: lining-nums; }
.ref__title { max-width: 34em; font-size: clamp(19px, 17px + .5vw, 23px); line-height: 1.3; }
.ref__title a { text-decoration-color: transparent; }
.ref__title a:hover { text-decoration-color: var(--hot); }
.ref__where { max-width: 40em; margin-top: 6px; font-size: .92em; font-style: italic; color: var(--ink-2); }
.ref__id { font: normal 400 12px/1.4 var(--mono); color: var(--ink-2); white-space: nowrap; }

.writing { margin-top: clamp(40px, 5vw, 64px); padding-left: var(--hang); }
.writing__list li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.writing__list li:first-child { border-top: 1px solid var(--rule); }
.writing__list a { text-decoration-color: transparent; }
.writing__list a:hover { text-decoration-color: var(--hot); }

/* ---------------------------------------------------------- §6 education */

.twocol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
  padding-left: var(--hang);
}
@media (max-width: 860px) { .twocol { grid-template-columns: minmax(0, 1fr); } }

.ledger { border-top: 1px solid var(--rule); }
.ledger li {
  display: grid;
  grid-template-columns: 9.6em minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-size: .95em;
}
.ledger__when { padding-top: .3em; font: 400 12px/1.4 var(--mono); color: var(--ink-3); font-variant-numeric: lining-nums tabular-nums; }
.ledger__when--hot { color: var(--hot-ink); font-weight: 500; }
.ledger__what b { font-weight: 600; }
.ledger__what a { font: 400 12px var(--mono); white-space: nowrap; }
@media (max-width: 460px) { .ledger li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ------------------------------------------------------------ §7 contact */

.sec--contact { padding-bottom: clamp(80px, 10vw, 140px); }

.mail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 28px;
  padding-left: var(--hang);
}
.mail__addr {
  font-size: clamp(28px, 13px + 5vw, 88px);
  line-height: 1.05;
  letter-spacing: -.03em;
  text-decoration: none;
  background: linear-gradient(var(--hot), var(--hot)) 0 100% / 0 2px no-repeat;
  transition: background-size .5s var(--ease-out), color .2s var(--ease);
  overflow-wrap: anywhere;
}
.mail__addr:hover { color: var(--ink); text-decoration: none; background-size: 100% 2px; }
.mail__copy {
  padding: 8px 12px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: transparent;
  font: 500 12.5px/1 var(--mono);
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease);
}
.mail__copy:hover { border-color: var(--ink); }
.mail__copy.is-done { border-color: var(--cool); color: var(--cool-ink); background: var(--cool-wash); }

.reach {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-left: var(--hang);
}
.reach__list { border-top: 1px solid var(--rule); max-width: 40em; }
.reach__list > div {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.reach__list dt { padding-top: .3em; font: 400 12px/1.4 var(--mono); color: var(--ink-3); }
.reach__list dd a { text-decoration-color: transparent; }
.reach__list dd a:hover { text-decoration-color: var(--hot); }
.reach__time { color: var(--ink-2); font-style: italic; }

.qr { align-self: start; width: 150px; padding: 8px; border: 1px solid var(--rule); background: #fff; }
.qr img { width: 100%; image-rendering: pixelated; }
.qr figcaption { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #4b4a45; font: 400 10.5px/1.3 var(--mono); }
.qr svg { width: 12px; height: 12px; flex: none; }
@media (max-width: 640px) {
  .reach { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------ colophon */

.colophon {
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 36px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}
.colophon__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  padding-left: var(--hang);
}
.colophon__text { max-width: 36em; }
.colophon__text > * + * { margin-top: .7em; }
.colophon__title { font: 500 12.5px var(--mono); color: var(--ink-3); }
.colophon__git { font-style: italic; }
.colophon__git code { font-style: normal; color: var(--ink); }
.colophon__fine {
  margin-top: 32px;
  padding-left: var(--hang);
  font: 400 11.5px/1.4 var(--mono);
  color: var(--ink-3);
  font-variant-numeric: lining-nums;
}

/* the button nobody should press */
.estop { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.estop__btn {
  position: relative;
  width: 74px;
  height: 74px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 25px, rgb(0 0 0 / .18) 26px 27px, transparent 28px),
    #f2c318;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / .18), 0 1px 0 rgb(0 0 0 / .2);
  cursor: pointer;
}
.estop__cap {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #ff7a5c 0 10%, #e3261b 40%, #a3140d 100%);
  box-shadow: 0 5px 0 #7c0f09, 0 8px 10px rgb(0 0 0 / .35);
  transform: translateY(-4px);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.estop__btn:hover .estop__cap { transform: translateY(-5px); }
.estop__btn:active .estop__cap, .estop__btn.is-down .estop__cap { transform: translateY(0); box-shadow: 0 1px 0 #7c0f09, 0 2px 3px rgb(0 0 0 / .3); }
.estop__label {
  font: 500 10px/1.35 var(--mono);
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink-3);
}
.estop__label span { font: italic 400 12px var(--serif); letter-spacing: 0; text-transform: none; }

@media (max-width: 640px) {
  .colophon__grid { grid-template-columns: minmax(0, 1fr); }
  .estop { align-items: flex-start; flex-direction: row; }
  .estop__label { text-align: left; }
}

/* --------------------------------------------------------------- keys */

.keys {
  width: min(380px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / .5);
}
.keys::backdrop { background: rgb(14 15 17 / .35); }
.keys[open] { animation: toast .25s var(--ease-out); }
@keyframes toast { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.keys__title { margin-bottom: 14px; font: 500 12.5px var(--mono); color: var(--ink-3); }
.keys__list > div { display: grid; grid-template-columns: 7em 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.keys form { margin-top: 18px; }

/* ----------------------------------------------------- lights (theme switch) */

.lights {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #050506;
  opacity: 0;
  pointer-events: none;
}

/* ----------------------------------------------- without JavaScript
   Everything readable stays; anything that only works when scripted goes. */

.no-js .flamefig, .no-js .flakyfig, .no-js .theme-btn,
.no-js .mast__menu, .no-js .mail__copy, .no-js .estop, .no-js .colophon__keys,
.no-js .dither__canvas, .no-js .portrait figcaption, .no-js .clock { display: none; }
.no-js .dither__photo { opacity: 1; -webkit-mask-image: none; mask-image: none; }
.no-js .hero__stage { min-height: 0; }

/* --------------------------------------------------------- reveal helpers */

.js [data-reveal] { opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js .hero__pin { height: auto; }
  .js .hero__stage { position: relative; top: 0; height: auto; min-height: calc(100svh - var(--mast-h)); }
  .flame { min-height: clamp(220px, 38svh, 400px); }
  .flame__hint { display: none; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .js .hero__pin { height: auto; }
  .js .hero__stage { position: relative; top: 0; height: auto; }
  .flame { min-height: 260px; }
  .flame__hint { display: none; }
}

/* ---------------------------------------------------------------- print */

@media print {
  :root { --paper: #fff; --ink: #000; --ink-2: #222; --ink-3: #555; --rule: #bbb; --hang: 0px; }
  body { font-size: 11pt; background: #fff; }
  .mast, .toc, .skip, .flamefig, .careerfig, .flakyfig, .portrait, .estop, .colophon__keys,
  .peek, .lights, .keys, .job__expand, .proj__plus, .proj__img, .qr, .egg { display: none !important; }
  .js .hero__pin, .js .hero__stage { height: auto; position: static; min-height: 0; }
  .sec { padding-top: 28pt; break-inside: auto; }
  .sec::before { transform: none !important; }
  .js .job:not(.is-expanded) .job__more { display: list-item; }
  .js .proj__detail { grid-template-rows: 1fr !important; }
  .job, .ref, .proj { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font: 8pt var(--mono); color: #555; word-break: break-all; }
  .mail__addr { font-size: 22pt; }
}

.posts__group { margin-top: clamp(36px, 4.5vw, 52px); }
.board__more { max-width: 46em; margin-top: 22px; padding-left: var(--hang); font-size: .95em; line-height: 1.6; color: var(--ink-2); }
.board__more a { color: var(--ink); }
