/* eastfra.com
   Colours: a rice-white ground and Sanzo Wada's combination no. 139 (Deep
   Indigo, Salvia Blue, Neutral Gray). The quieter tones are mixed from those,
   so changing the four values below recolours the site. Two files have the
   ink colour drawn into them and must be remade with it: the logos in
   /logos (their hollow strokes) and the footer engraving in /img.
   Type: wide black capitals for names of places (the greeting, section
   names), Inter for everything else, and Newsreader for one thing only: the
   text of a blog post. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-expanded-black.woff2") format("woff2");
  font-weight: 900;
  font-stretch: 125%;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* How strongly a dark tile glows under the pointer. Registered so it can ease. */
@property --glow { syntax: "<percentage>"; inherits: false; initial-value: 0%; }

:root {
  color-scheme: light;
  --paper: #f5f0e3; /* rice white */
  --ink: #051230;   /* Deep Indigo, Wada no. 139 */
  --mark: #97acc8;  /* Salvia Blue, Wada no. 139 */
  --mist: #b6bfc1;  /* Neutral Gray, Wada no. 139 */
  --tile: color-mix(in oklab, var(--ink) 7%, var(--paper));
  --soft: color-mix(in oklab, var(--ink) 70%, var(--paper));
  --rule: color-mix(in oklab, var(--ink) 18%, transparent);
  --on-ink: color-mix(in oklab, var(--paper) 66%, var(--ink));      /* quiet text on a dark tile */
  --on-ink-rule: color-mix(in oklab, var(--paper) 16%, var(--ink));
  --well: color-mix(in oklab, var(--paper) 9%, var(--ink));         /* a dent in a dark tile */
  --text: "Inter", "Helvetica Neue", Arial, sans-serif;
  --read: "Newsreader", "Iowan Old Style", Georgia, serif;
  --display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --voice: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", "Courier New", monospace;
  --radius: 1.4rem;
  --gutter: 0.75rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1); /* fast start, long soft landing */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: var(--paper); }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
p, h1, h2, h3, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.ink :focus-visible, .term :focus-visible, .palette :focus-visible, .ask :focus-visible { outline-color: var(--mark); }

/* A link in running text: the underline draws itself in from the left. */
.quiet a, .crumb a, .links a, .lost a, .prose a, .smaller a, .credit a, .terms a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 0.08em no-repeat;
  padding-bottom: 0.12em;
  transition: background-size 0.5s var(--ease);
}
.quiet a:hover, .crumb a:hover, .links a:hover, .lost a:hover, .prose a:hover, .smaller a:hover, .credit a:hover, .terms a:hover { background-size: 0 0.08em; background-position: 100% 100%; }

/* The two display voices */
.caps, .hello h1, .name h2, .foot-name, .section h2 {
  font-family: var(--display); font-weight: 900; font-stretch: 125%;
  text-transform: uppercase; letter-spacing: -0.035em;
}
.proj h3, .entry h3, .page-head h1, .posts .title, .lost h1, .prose h2, .prose h3 {
  font-family: var(--voice); font-weight: 600; letter-spacing: -0.022em;
}
.page-head h1.caps { font-family: var(--display); font-weight: 900; letter-spacing: -0.035em; }

.wrap { max-width: 84rem; margin-inline: auto; padding-inline: clamp(0.75rem, 2.5vw, 2rem); }
.term + main { padding-top: calc(2.75rem + 2 * var(--gutter)); } /* room for the terminal line, which stays over the page */
html { scroll-padding-top: calc(2.75rem + 2 * var(--gutter)); } /* a #link lands below the line, not under it */
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; padding: 0.5rem 0.75rem; background: var(--ink); color: var(--paper); z-index: 20; border-radius: 0.5rem; }

.label { font: 600 0.875rem/1.5 var(--text); letter-spacing: 0; text-transform: none; }
.quiet { font-size: 0.875rem; color: var(--soft); }
.empty { color: var(--soft); }
.ink .label, .ink .quiet, .ink dt { color: var(--on-ink); }

/* ---------- The terminal line ---------- */
/* A dark strip across the top that reads like a shell prompt: where you are on
   the site, then "ls" and the sections. Its text lives in the page's column
   (.wrap), so the prompt starts on the tiles' left edge and the last icon's
   drawn line ends on their right edge. */
.term {
  position: fixed; z-index: 10; inset: 0 0 auto;
  background: var(--ink); color: var(--paper); font: 500 0.84rem/1 var(--mono);
  view-transition-name: term;
  transition: translate 0.5s var(--ease);
}
/* While someone scrolls down to read, the line lifts out of the way (site.js adds
   the class); the first scroll up brings it back. Reached with the Tab key it
   shows itself, so the keyboard never lands on something off screen. */
.term.away:not(:focus-within) { translate: 0 -100%; }
.term-row { display: flex; align-items: center; gap: 1.6rem; height: 2.75rem; white-space: nowrap; }
.ps1 { display: flex; align-items: center; min-width: 0; }
.prompt { display: flex; min-width: 0; }
.prompt .user { color: var(--mark); }
.prompt .dim, .prompt .path { color: color-mix(in oklab, var(--paper) 55%, transparent); }
.prompt .path { min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* a long post name gives way first */
.cmd { margin-left: 0.6em; }
.cmd i, .ls-toggle i { font-style: normal; }
.caret { flex: none; width: 0.55em; height: 1.1em; margin-left: 0.15em; background: var(--mark); }
.caret.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ls { display: flex; gap: 1.6rem; }
.ls a { padding: 0.3rem 0.35rem; margin: -0.3rem -0.35rem; border-radius: 0.25rem; color: color-mix(in oklab, var(--paper) 82%, transparent); }
.ls a[aria-current] { color: var(--paper); }
.ls a[aria-current]::before { content: "> " / ""; color: var(--mark); }
.ls a:hover, .ls a:focus-visible, .ls-toggle:hover, .ls-toggle:focus-visible { background: var(--mark); color: var(--ink); outline: none; }
.ls a:hover::before, .ls a:focus-visible::before { color: inherit; }
.ls .run, .ls-toggle { display: none; }
.term .end { display: flex; align-items: center; gap: 0.9rem; margin-left: auto; margin-right: -0.62rem; } /* the space beside the last icon's drawn line */
.keys { padding: 0.25rem 0.45rem; border: 0; border-radius: 0.35rem; background: none; color: inherit; font: inherit; font-size: 0.75rem; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--paper) 30%, transparent); cursor: pointer; }
.keys:hover, .keys:focus-visible { color: var(--mark); box-shadow: inset 0 0 0 1px var(--mark); outline: none; }
.reach { display: flex; }
.reach a { display: grid; place-items: center; width: 2.5rem; height: 2.75rem; transition: color 0.3s var(--ease); }
.reach a:hover, .reach a:focus-visible { color: var(--mark); outline: none; }
/* 1.55rem: the LinkedIn square, stroke included, is as tall as the 1.25rem ⌘K box */
.reach svg { width: 1.55rem; height: 1.55rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* Phones: the five names drop down from "ls ▾". */
@media (max-width: 50rem) {
  .cmd, .caret, .keys { display: none; }
  .ls-toggle { display: flex; align-items: center; gap: 0.5em; margin: -0.3rem 0 -0.3rem 0.25em; padding: 0.3rem 0.35rem; border: 0; border-radius: 0.25rem; background: none; color: inherit; font: inherit; cursor: pointer; }
  .ls-toggle b { font-weight: inherit; transition: rotate 0.4s var(--ease); }
  .term.open .ls-toggle b { rotate: 180deg; }
  .ls { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 0.3rem clamp(0.75rem, 2.5vw, 2rem) 0.8rem; background: var(--ink); border-top: 1px solid var(--on-ink-rule); }
  .term.open .ls { display: flex; }
  .ls a, .ls .run { margin: 0; padding: 0.85rem 0; border-radius: 0; font-size: 0.95rem; }
  .ls a::before { content: "> " / ""; visibility: hidden; }
  .ls a[aria-current]::before { visibility: visible; }
  .ls .run { display: block; margin-top: 0.4rem; border: 0; border-top: 1px solid var(--on-ink-rule); background: none; color: color-mix(in oklab, var(--paper) 55%, transparent); font: inherit; font-size: 0.95rem; text-align: left; cursor: pointer; }
}
/* Without the script nothing can open, so the line scrolls sideways instead. */
html:not(.js) .ls-toggle, html:not(.js) .keys, html:not(.js) .ls .run { display: none; }
html:not(.js) .term-row { overflow-x: auto; }
html:not(.js) .ls { display: flex; position: static; flex-direction: row; gap: 1.6rem; padding: 0; border: 0; background: none; }
html:not(.js) .ls a { margin: 0; padding: 0; font-size: inherit; }
html:not(.js) .cmd { display: inline; }

/* The command palette (⌘K, Ctrl K or /): a native dialog. Its box sits on
   columns 4 to 9 of the tiles' grid. */
.row12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.palette { width: 100%; max-width: none; max-height: none; margin: 7.5rem 0 0; padding: 0; border: 0; background: none; color: var(--paper); overflow: visible; }
.palette::backdrop { background: color-mix(in oklab, var(--ink) 50%, transparent); }
.palette .box { grid-column: 4 / span 6; overflow: hidden; border-radius: var(--radius); background: var(--ink); font: 500 0.92rem/1.25 var(--mono); box-shadow: 0 0 0 1px var(--on-ink-rule), 0 1.5rem 4rem color-mix(in oklab, var(--ink) 40%, transparent); }
.palette .q { display: flex; gap: 0.7em; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--on-ink-rule); font-size: 1.05rem; }
.palette .q span { color: var(--mark); }
.palette input { flex: 1; min-width: 0; padding: 0; border: 0; outline: none; background: none; color: inherit; font: inherit; caret-color: var(--mark); }
.palette input::placeholder { color: color-mix(in oklab, var(--paper) 40%, transparent); }
.hits { max-height: 22rem; margin: 0; padding: 0.3rem 0; overflow-y: auto; list-style: none; }
.hits li { display: flex; justify-content: space-between; gap: 1.5rem; padding: 0.75rem 1.3rem; color: color-mix(in oklab, var(--paper) 80%, transparent); cursor: pointer; }
.hits li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hits li span:last-child { flex: none; color: color-mix(in oklab, var(--paper) 50%, transparent); }
.hits li[aria-selected="true"] { background: color-mix(in oklab, var(--paper) 10%, transparent); color: var(--paper); }
.out { margin: 0; padding: 1rem 1.3rem 1.2rem; color: color-mix(in oklab, var(--paper) 88%, transparent); font: inherit; white-space: pre-wrap; }
.out .echo { color: var(--mark); }
.hint { padding: 0.7rem 1.3rem; border-top: 1px solid var(--on-ink-rule); color: color-mix(in oklab, var(--paper) 50%, transparent); font-size: 0.75rem; }
@media (max-width: 50rem) {
  .palette { margin-top: 3.5rem; }
  .palette .box { grid-column: 1 / -1; }
  .hint { display: none; }
}

/* ---------- Tiles ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.bento + .bento, .page-head + .bento { margin-top: var(--gutter); }
.cards { display: contents; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; border-radius: var(--radius); padding: 1.4rem; background: var(--tile); }
/* A dark tile carries a soft light that follows the pointer (site.js moves --mx and --my). */
.tile.ink {
  color: var(--paper);
  background: radial-gradient(24rem circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklab, var(--mark) var(--glow), transparent), transparent 72%), var(--ink);
  transition: --glow 0.7s var(--ease);
}
.tile.ink:hover { --glow: 24%; }
.tile.mark { background: var(--mark); }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; }
.s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s9 { grid-column: span 9; } .s12 { grid-column: span 12; }

/* The greeting */
.hello { min-height: clamp(17rem, 33vw, 27rem); justify-content: flex-end; }
.hello h1 { font-size: clamp(2.5rem, 8.4vw, 8.2rem); line-height: 0.98; text-wrap: balance; } /* tall enough that a comma's tail clears the capitals on the next line */

/* The greeting's lockup, built by site.js (see "The greeting" there). Column
   one is as wide as the name up to the end of its copied letters; the top words
   spread across it, so the first stands over the name's first letter and the
   last over the letters it shares with the name. */
.hi { display: inline-grid; grid-template-columns: auto auto; }
.hi-top { grid-area: 1 / 1; display: flex; justify-content: space-between; overflow: clip; }
.hi-name { grid-area: 2 / 1; display: flex; }
.hi-post { grid-area: 2 / 2; display: flex; overflow: clip; }
.hi-word, .hi-mask { display: flex; }
.hi-mask { overflow: clip; }

/* The portrait */
.face { padding: 0; align-items: center; justify-content: flex-end; min-height: 17rem; }
.face img { width: 84%; margin-top: 8%; }
.face canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.face.live img { visibility: hidden; }

/* GitHub activity: the contribution calendar, laid out the way GitHub lays it out.
   It is one grid filled column by column, eight cells to a column: the weekday
   names first, then for every week its month's name (or nothing) and seven days.
   Each day wears the shade GitHub itself gives it, from l0 (nothing) to l4. */
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.4rem 1rem; }
.head > * { white-space: nowrap; }
.pulse b { font-weight: 600; color: var(--paper); }
.cal { display: grid; grid-auto-flow: column; grid-template-rows: auto repeat(7, auto); grid-template-columns: max-content; grid-auto-columns: minmax(0, 1fr); gap: 3px; margin-block: auto; padding-block: 1.1rem; font-size: 0.72rem; line-height: 1; color: var(--on-ink); }
.pulse .cal { gap: 5px; grid-auto-columns: minmax(0, 1.5rem); } /* squares stop growing at 1.5rem however wide the tile */
.cal span { white-space: nowrap; } /* a month's name runs on over the weeks after it */
.cal span:nth-child(-n + 8) { align-self: center; padding-right: 0.3rem; line-height: 0; } /* the weekday names: no height, so the rows stay as tall as the squares */
.cal i, .legend i { aspect-ratio: 1; border-radius: 22%; }
.l0 { background: color-mix(in oklab, var(--paper) 13%, var(--ink)); }
.l1 { background: color-mix(in oklab, var(--mark) 40%, var(--ink)); }
.l2 { background: color-mix(in oklab, var(--mark) 62%, var(--ink)); }
.l3 { background: color-mix(in oklab, var(--mark) 84%, var(--ink)); }
.l4 { background: color-mix(in oklab, var(--paper) 35%, var(--mark)); }
.legend { display: flex; align-items: center; gap: 3px; }
.legend i { width: 0.7rem; }
.legend i:first-of-type { margin-left: 0.35rem; }
.legend i:last-of-type { margin-right: 0.35rem; }

/* The picture of a post */
.shot { display: block; overflow: hidden; border-radius: 0.8rem; background: #fff; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: scale 1.2s var(--ease); }
a.shot:hover img, .entry:hover .shot img, .posts > li:has(.title:hover) .shot img { scale: 1.05; }

/* What is playing: its label on top, the piece at the foot. The words are the
   typed piece until site.js hears a live one from /listening.json. */
.tune { container-type: inline-size; justify-content: space-between; gap: 2rem; }
.tune .label { display: flex; align-items: center; gap: 0.5rem; }
.piece { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; font: 600 clamp(1.25rem, 9cqi, 1.6rem)/1.12 var(--voice); letter-spacing: -0.022em; text-wrap: balance; overflow-wrap: anywhere; }
.by { margin-top: 0.6rem; font-size: 0.875rem; font-weight: 500; }
/* The record: a disc in the ink colour with grooves and two bands of light,
   a paper label in the middle and the spindle hole on top. The picture of the
   piece's video, when there is one, covers the label and is the part that turns. */
.disc {
  position: relative; flex: none; align-self: center; display: grid; place-items: center;
  width: min(66cqi, 12rem); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle closest-side, var(--paper) 0 43%, transparent 44%),
    conic-gradient(from 25deg, transparent 0 6%, rgb(255 255 255 / 0.2) 12%, transparent 18% 56%, rgb(255 255 255 / 0.2) 62%, transparent 68%),
    repeating-radial-gradient(circle, transparent 0 2px, rgb(255 255 255 / 0.07) 2.5px 3px), /* whole pixels: finer rings shimmer on an ordinary screen */
    var(--ink);
  box-shadow: 0 0.6rem 1.4rem color-mix(in oklab, var(--ink) 32%, transparent);
}
.disc img { width: 44%; height: 44%; border-radius: 50%; object-fit: cover; animation: spin 14s linear infinite; }
.disc::after { content: ""; position: absolute; inset: 0; margin: auto; width: 4.5%; height: 4.5%; border-radius: 50%; background: var(--mark); }
@keyframes spin { to { rotate: 1turn; } }
/* The whole tile is the link to the piece; its title is underlined while the pointer is over the tile. */
.piece a::after { content: ""; position: absolute; inset: 0; }
.piece a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 0.06em no-repeat; transition: background-size 0.5s var(--ease); }
.tune:hover .piece a, .piece a:focus-visible { background-size: 100% 0.06em; }
/* three bars that rise and fall while a song is playing */
.tune.playing .label::before {
  content: ""; width: 0.85rem; height: 0.8rem;
  background: linear-gradient(var(--ink) 0 0) 0 100% / 0.19rem 55% no-repeat, linear-gradient(var(--ink) 0 0) 50% 100% / 0.19rem 100% no-repeat, linear-gradient(var(--ink) 0 0) 100% 100% / 0.19rem 40% no-repeat;
  animation: bars 0.8s ease-in-out infinite alternate;
}
@keyframes bars { to { background-size: 0.19rem 100%, 0.19rem 35%, 0.19rem 85%; } }

/* What I am working on: a breathing dot beside the label, the words at the foot. */
.doing { justify-content: space-between; gap: 2rem; }
.doing .label { display: flex; align-items: center; gap: 0.6rem; }
.doing .label::before { content: ""; flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--ink); animation: breathe 1.8s ease-in-out infinite alternate; }
@keyframes breathe { from { box-shadow: 0 0 0 0 color-mix(in oklab, var(--ink) 30%, transparent); } to { box-shadow: 0 0 0 0.45rem color-mix(in oklab, var(--ink) 0%, transparent); } }
.task { font: 600 clamp(1.15rem, 1.5vw, 1.4rem)/1.25 var(--voice); letter-spacing: -0.022em; text-wrap: balance; }

/* A group's name, then its projects.
   Every project tile has the same four bands: logo, question, name with date,
   tools. A tile does not size those bands itself. It takes four rows of the
   grid it sits in (subgrid), so tiles side by side share them: across a row
   every question starts on the same line, and so does each band under it,
   however long the texts are and however many projects are added. Nothing
   here is set per tile or per project. */
.group > .name, .proj, .entry { grid-row: span 4; }
.name { container-type: inline-size; justify-content: space-between; }
.name .quiet { font-weight: 600; color: color-mix(in oklab, var(--ink) 82%, var(--mark)); }
.name h2 { font-size: clamp(1.2rem, 10cqi, 2.6rem); line-height: 0.94; }
.proj { display: grid; grid-template-rows: subgrid; row-gap: 0; padding: 0 0 1.3rem; }
.proj .logo { display: grid; place-items: center; min-height: 11rem; }
.proj .logo img { width: min(46%, 11rem); transition: scale 1.1s var(--ease), rotate 1.1s var(--ease); }
.proj:hover .logo img { scale: 1.09; rotate: -3deg; }
.proj h3, .proj .row, .proj .stack { margin-inline: 1.4rem; }
.proj h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); line-height: 1.15; text-wrap: balance; }
.proj h3 a::after { content: ""; position: absolute; inset: 0; } /* the whole tile is the link */
/* A post tile on the home page takes the same four shared rows: picture, title, what it is about, date. */
.entry { display: grid; grid-template-rows: subgrid; row-gap: 0; padding: 1rem 1rem 1.2rem; }
/* The picture's shape is set on the image, not on its frame: Safari does not
   count a frame that only has an aspect-ratio when it sizes a shared (subgrid)
   row, so the row came out too short and the title was printed over the picture. */
.entry .shot img { aspect-ratio: 16 / 10; height: auto; }
.entry h3 { margin-top: 1rem; font-size: clamp(1.15rem, 1.45vw, 1.35rem); line-height: 1.2; text-wrap: balance; }
.entry h3 a::after { content: ""; position: absolute; inset: 0; } /* the whole tile is the link */
.entry .sum { margin-top: 0.5rem; font-size: 0.95rem; color: var(--soft); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.entry .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; margin-top: 0.8rem; font-size: 0.875rem; color: var(--soft); }
/* The name on the left and the date on the right; where both do not fit, the date takes the next line. */
.proj .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; margin-top: 0.7rem; font-size: 0.875rem; color: var(--on-ink); }
.proj .row b { color: var(--paper); font-weight: 600; white-space: nowrap; }
.stack { display: flex; flex-wrap: wrap; align-content: start; gap: 0.3rem; margin-top: 0.75rem; }
.stack li { padding: 0.12rem 0.55rem; border-radius: 999px; background: color-mix(in oklab, var(--ink) 10%, transparent); font-size: 0.78rem; font-weight: 500; }
.ink .stack li { background: var(--well); color: var(--on-ink); }

/* ---------- The other pages ---------- */
.page-head { padding-block: clamp(1.75rem, 4.5vw, 3.25rem) clamp(1.5rem, 3vw, 2.5rem); }
.crumb { margin-bottom: 0.9rem; font-weight: 600; }
.page-head h1 { max-width: 22ch; font-size: clamp(2.1rem, 4.4vw, 3.6rem); line-height: 1.06; text-wrap: balance; view-transition-name: title; }
.page-head h1.caps { max-width: none; font-size: clamp(2.8rem, 11vw, 10rem); line-height: 0.84; }
.lede { margin-top: 1.25rem; max-width: 44ch; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3; font-weight: 500; text-wrap: balance; }
.page-head .quiet { margin-top: 0.6rem; }
.page-head .quiet + .quiet, .posts .quiet + .quiet { margin-top: 0.15rem; }

/* A project page: the figure beside its sheet */
.body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gutter); align-items: start; }
.body figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--rule); }
figure.bare img { border: 0; }
figcaption { margin-top: 0.6rem; padding-inline: 0.4rem; font-size: 0.875rem; line-height: 1.4; color: var(--soft); max-width: 60ch; }
.sheet dl > div { display: grid; grid-template-columns: 6.75rem minmax(0, 1fr); gap: 1rem; padding-block: 0.85rem; border-top: 1px solid var(--rule); }
.sheet dl > div:first-child { border-top: 0; padding-top: 0; }
.sheet dt { color: var(--soft); font-size: 0.9rem; padding-top: 0.12em; }
.sheet .stack { margin-top: 0.1em; }
.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 2rem; margin-top: clamp(2.5rem, 5vw, 4rem); font-size: 1.25rem; font-weight: 700; }
.pager span { display: block; font-size: 0.875rem; font-weight: 400; color: var(--soft); }
.pager a[rel="next"] { margin-left: auto; text-align: right; }
.pager a { transition: translate 0.6s var(--ease); }
.pager a[rel="next"]:hover { translate: 0.4rem 0; }
.pager a[rel="prev"]:hover { translate: -0.4rem 0; }

/* Smaller things on the projects page */
.section { margin-top: clamp(2.5rem, 5vw, 4rem); }
.section h2 { margin-bottom: 1rem; font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1; }
.smaller { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.smaller a { width: fit-content; font-weight: 700; font-size: 1.25rem; }
.smaller p { margin-top: 0.4rem; color: var(--soft); max-width: 48ch; }

/* The list of posts */
.posts { display: grid; gap: var(--gutter); }
.posts > li { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 1.4rem; align-items: center; padding: 1rem; border-radius: var(--radius); background: var(--tile); }
.posts .shot { aspect-ratio: 16 / 10; }
.posts .title { display: block; font-size: clamp(1.4rem, 2.3vw, 2rem); line-height: 1.12; text-wrap: balance; }
.posts .sum { margin-top: 0.5rem; max-width: 62ch; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.posts .quiet { margin-top: 0.6rem; }

/* The text of a note */
.prose { max-width: 40rem; font: 400 1.2rem/1.65 var(--read); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.7em; font-size: 1.7rem; line-height: 1.15; }
.prose h3 { margin-top: 1.5em; font-size: 1.35rem; line-height: 1.2; }
.prose ul { list-style: disc; padding-left: 1.2em; }
.prose code { font-family: var(--mono); font-size: 0.9em; }
.prose pre { overflow: auto; padding: 1rem; border-radius: 0.8rem; background: var(--tile); font: 0.95rem/1.5 var(--mono); }
.prose img { border-radius: 0.8rem; border: 1px solid var(--rule); }
.prose blockquote { margin-inline: 0; padding-left: 1rem; border-left: 3px solid var(--mark); }
/* A link to a spot on the same page (a post's list of terms) is a chip, not an
   underline, and the spot it opens is marked. Chosen by the address, not a
   class, because the blog editor drops classes when it saves. */
.prose a[href^="#"] { display: inline-block; margin: 0.12rem 0.05rem; padding: 0.08rem 0.7rem 0.14rem; border-radius: 999px; background: color-mix(in oklab, var(--ink) 9%, transparent); font: 600 0.9rem/1.5 var(--text); transition: background-color 0.4s var(--ease), color 0.4s var(--ease); }
.prose a[href^="#"]:hover { background: var(--ink); color: var(--paper); }
.prose [id] { scroll-margin-top: 5rem; }
.prose li:target { border-radius: 0.3rem; background: color-mix(in oklab, var(--mark) 40%, transparent); box-shadow: 0 0 0 0.4rem color-mix(in oklab, var(--mark) 40%, transparent); }

/* Tags: on a post, beside each post in a list, and as the row that filters a list. */
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.8rem; }
.tags a { display: block; padding: 0.16rem 0.7rem; border-radius: 999px; background: color-mix(in oklab, var(--ink) 9%, transparent); font-size: 0.82rem; font-weight: 600; transition: background-color 0.4s var(--ease), color 0.4s var(--ease); }
.tags a:hover, .tags a[aria-current] { background: var(--ink); color: var(--paper); }
.tags.filter { margin: 0 0 var(--gutter); }
.tags.filter a { padding: 0.35rem 0.95rem; font-size: 0.95rem; }
.tags.filter span { font-weight: 500; opacity: 0.6; }

/* Under a post: the like button, then where to share it. blog.js shows the
   buttons that need it; the three share links work without it. */
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; max-width: 40rem; margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.acts button, .acts a, .say button, .reply, .choose button { display: inline-block; border: 0; border-radius: 999px; padding: 0.4rem 0.95rem; background: color-mix(in oklab, var(--ink) 9%, transparent); color: inherit; font: 600 0.9rem/1.5 var(--text); cursor: pointer; transition: background-color 0.4s var(--ease), color 0.4s var(--ease), scale 0.4s var(--ease); }
.acts button:hover, .acts a:hover, .reply:hover, .say [data-cancel]:hover, .terms .choose button:hover, .terms .choose [aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.like { display: inline-flex; align-items: center; gap: 0.45rem; }
.like svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; transition: scale 0.5s var(--ease); }
.like[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.like[aria-pressed="true"] svg { fill: currentColor; scale: 1.15; }
.like:active { scale: 0.94; }
.share { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-left: auto; }

/* Comments under a post. An answer hangs under its comment, one level deep. */
.talk { max-width: 40rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.talk h2 { margin-bottom: 1rem; font: 600 1.7rem/1.15 var(--voice); letter-spacing: -0.022em; }
.said, .replies { display: grid; gap: var(--gutter); margin: 0; padding: 0; list-style: none; }
.said > li { padding: 1.1rem 1.2rem; border-radius: var(--radius); background: var(--tile); }
.replies { margin-top: 0.9rem; padding-left: 1rem; border-left: 3px solid var(--mark); }
.who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }
.badge { padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--mark); font-size: 0.75rem; font-weight: 600; }
.words { margin-top: 0.35rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { margin-top: 0.6rem; padding: 0.2rem 0.75rem; font-size: 0.82rem; }
.say { display: grid; gap: 0.9rem; margin-top: 1.4rem; }
.say label { display: grid; gap: 0.3rem; font-size: 0.875rem; font-weight: 600; }
.say input, .say textarea { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--rule); border-radius: 0.8rem; background: color-mix(in oklab, var(--paper) 55%, white); color: var(--ink); font: 400 1.0625rem/1.5 var(--text); resize: vertical; }
.say .trap { position: absolute; left: -999rem; } /* the field no person sees (src/blog.js) */
.send { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.say [type="submit"] { padding: 0.5rem 1.3rem; background: var(--ink); color: var(--paper); }
.say [type="submit"]:disabled { opacity: 0.5; }
.say [data-cancel] { padding: 0.05rem 0.6rem; font-size: 0.82rem; }

/* A post on a wide screen: the text sits in a column in the middle of the page,
   and beside it a rail that stays in view while reading, with the like button
   and where to share. Newer and older posts and the comments follow in the
   text's column. On narrower screens the rail is the row under the text. */
@media (min-width: 62.01rem) {
  .note { display: grid; grid-template-columns: minmax(0, 44rem) 13rem; column-gap: clamp(2.5rem, 6vw, 6rem); justify-content: center; }
  .note > * { grid-column: 1; }
  .note > .page-head { grid-column: 1 / -1; }
  .note > .page-head h1 { max-width: 20ch; }
  .note > .prose, .note > .talk { max-width: none; }
  .note > .acts { grid-column: 2; grid-row: 2; position: sticky; top: 5.5rem; align-self: start; flex-direction: column; align-items: flex-start; gap: 1.2rem; margin-top: 0.3rem; padding-top: 0; border-top: 0; }
  .note > .acts .share { flex-direction: column; align-items: flex-start; margin-left: 0; }
  .note > .acts .share::before { content: "Share"; margin-bottom: 0.2rem; font-size: 0.875rem; font-weight: 600; color: var(--soft); }
}

/* ---------- Footer: the engraving ---------- */
footer.wrap { margin-top: var(--gutter); padding-bottom: clamp(0.75rem, 2.5vw, 2rem); }
.foot { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--tile); }
/* Its top is the site as lists of links: the name, then a column for each list. */
.foot-top { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); align-items: start; gap: 1.5rem 2rem; padding: 1.8rem 1.8rem 0; }
.foot-name { font-size: 1.45rem; }
.foot nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 1.25rem; }
.foot nav h2 { margin-bottom: 0.55rem; font: 600 0.8rem/1.5 var(--text); color: var(--soft); }
.foot nav ul { display: grid; gap: 0.3rem; }
.foot nav a, .legal a { display: inline-block; font-size: 0.9375rem; font-weight: 600; transition: translate 0.6s var(--ease); }
.foot nav a:hover, .legal a:hover { translate: 0 -0.2rem; }
/* The sky of the picture fades out, so it is pulled up under the links. */
.plate { width: 100%; margin-top: -7%; }
/* The picture slides down a little until the page ends (site.js): this row is solid and in front, so its words never sit on the picture. */
.foot-end { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.4rem 2rem; padding: 0.4rem 1.8rem 1.2rem; background: var(--tile); }
.credit { font-size: 0.8rem; color: var(--soft); }
.legal { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }

/* Not-found page */
/* ---------- Being remembered: the question on every page, which first.js
   shows until it is answered, and the same two buttons on /privacy/ ---------- */
.ask {
  position: fixed; z-index: 9; left: 0.75rem; bottom: 0.75rem;
  width: min(25rem, calc(100vw - 1.5rem));
  display: grid; gap: 0.9rem; padding: 1.1rem 1.25rem 1.2rem;
  border-radius: 1.75rem; background: var(--ink); color: var(--on-ink); font-size: 0.9375rem;
  box-shadow: 0 0 0 1px var(--on-ink-rule), 0 0.5rem 1.6rem color-mix(in oklab, var(--ink) 22%, transparent);
}
.ask b { display: block; margin-bottom: 0.25rem; color: var(--paper); font-size: 1.0625rem; }
.ask a { color: var(--paper); text-decoration: underline; text-underline-offset: 0.2em; }
.choose { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ask .choose button { flex: 1; padding-block: 0.5rem; background: color-mix(in oklab, var(--paper) 16%, transparent); color: var(--paper); }
.ask .choose button:hover { background: var(--paper); color: var(--ink); }
.terms { max-width: 40rem; display: grid; gap: 0.9rem; }
.terms h2 { margin-top: 1.4rem; font: 600 1.4rem/1.2 var(--voice); letter-spacing: -0.02em; }
.terms ul { display: grid; gap: 0.4rem; padding-left: 1.2em; list-style: disc; }

.lost { min-height: 60vh; display: grid; align-content: center; gap: 2.4rem; padding-block: 3rem; }
.lost h1 { font-size: clamp(2.6rem, 8vw, 6rem); line-height: 1; }
.lost p { font-size: 1.35rem; font-weight: 600; }

/* ---------- Motion ---------- */
/* Going from one page of the site to another, the browser fades the old page up
   and out and the new one in; first.js lets a title travel between the two. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.3s cubic-bezier(0.4, 0, 1, 1) both leave; }
::view-transition-new(root) { animation: 0.75s var(--ease) both arrive; }
@keyframes leave { to { opacity: 0; transform: translateY(-1.2rem) scale(0.985); } }
@keyframes arrive { from { opacity: 0; transform: translateY(2.2rem); } }
::view-transition-group(title) { animation-duration: 0.75s; animation-timing-function: var(--ease); }

/* On a fresh visit site.js brings the pieces in one after another, so they start
   unseen. first.js sets .js; site.js sets .ready when it takes over. If site.js
   never arrives, the pieces show themselves after four seconds. */
.js:not(.arrived):not(.ready) [data-in] { opacity: 0; animation: appear 0.6s 4s forwards; }
/* The terminal line's "ls" and names wait for site.js to type them (or first.js to give up). */
.js:not(.arrived):not(.ready) .term :is(.cmd i, .ls-toggle i, .ls-toggle b, .ls a) { visibility: hidden; }
@keyframes appear { to { opacity: 1; } }

/* What the smooth scrolling (Lenis) asks of the page */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- Narrower screens ---------- */
@media (max-width: 62rem) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .foot-top { grid-template-columns: minmax(0, 1fr); }
  .s3 { grid-column: span 2; }
  .s4 { grid-column: span 3; }
  .s5, .s6, .s7, .s8, .s9, .s12 { grid-column: span 6; }
  .hello { grid-column: span 4; }
  .face { grid-column: span 2; }
  .group > .name { grid-column: span 6; grid-row: auto; min-height: 9rem; }
  .m2 { grid-column: span 2; } .m3 { grid-column: span 3; } .m4 { grid-column: span 4; } .m5 { grid-column: span 5; } .m6 { grid-column: span 6; }
  .body, .smaller { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  .foot nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s3, .s4, .hello, .face, .m2, .m3, .m4, .m5 { grid-column: span 6; }
  .share { margin-left: 0; }
  .face { aspect-ratio: 1; }
  /* One project per row here, so there is no neighbour to line up with: the logo sits left of the text. */
  .proj { grid-row: auto; grid-template: auto auto auto / 34% minmax(0, 1fr); align-content: center; min-height: 9rem; padding-block: 1.2rem 1.1rem; }
  .proj .logo { grid-area: 1 / 1 / span 3; min-height: 0; }
  .proj .logo img { width: 66%; }
  .proj h3, .proj .row, .proj .stack { grid-column: 2; margin-inline: 0 1.2rem; }
  .pulse .cal { gap: 3px; }
  .posts > li { grid-template-columns: minmax(0, 1fr); }
  .sheet dl > div { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .plate { margin-top: 0; }
}
