/* Painted film concept.
 *
 * The paint is a fixed canvas behind everything (film.js). Everything written sits on
 * cut paper laid over it: big type gets a paper cut-out that follows the letters
 * (.cut), running text sits on hand-cut sheets (.sheet), small labels are ink tabs (.tab)
 * and imagery is black on a dab of dye (.dab). No shadows: it is all lit from behind.
 */

:root {
  --paper: #fbf6ea;
  --paper-hi: #fffdf6;
  --ink: #17140f;
  --ink-2: #4d463c;
  --ink-3: #8b8172;
  --rule: rgb(23 20 15 / .14);

  --yellow: #f6b92f;
  --orange: #f0642a;
  --red: #e8413c;
  --pink: #ee5c8b;
  --lilac: #b978f6;
  --blue: #1b25e6;
  --sky: #8eb1ea;
  --lime: #8dc428;

  --display: "Inknut Antiqua", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gut: clamp(16px, 4vw, 56px);

  /* Paper tooth: a little fractal noise, tiled. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .26 0 0 0 0 .16 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* The cut-out around big type: the letters, thickened a touch, then stamped round four
     rings so the paper follows their outline about a quarter of an em out. Generated; see
     the note at the bottom of this file. */
  --halo-r: .24em;
  --halo: 0.220em 0.000em 0, 0.219em 0.025em 0, 0.214em 0.049em 0, 0.208em 0.073em 0, 0.198em 0.095em 0, 0.186em 0.117em 0, 0.172em 0.137em 0, 0.156em 0.156em 0, 0.137em 0.172em 0, 0.117em 0.186em 0, 0.095em 0.198em 0, 0.073em 0.208em 0, 0.049em 0.214em 0, 0.025em 0.219em 0, 0.000em 0.220em 0, -0.025em 0.219em 0, -0.049em 0.214em 0, -0.073em 0.208em 0, -0.095em 0.198em 0, -0.117em 0.186em 0, -0.137em 0.172em 0, -0.156em 0.156em 0, -0.172em 0.137em 0, -0.186em 0.117em 0, -0.198em 0.095em 0, -0.208em 0.073em 0, -0.214em 0.049em 0, -0.219em 0.025em 0, -0.220em 0.000em 0, -0.219em -0.025em 0, -0.214em -0.049em 0, -0.208em -0.073em 0, -0.198em -0.095em 0, -0.186em -0.117em 0, -0.172em -0.137em 0, -0.156em -0.156em 0, -0.137em -0.172em 0, -0.117em -0.186em 0, -0.095em -0.198em 0, -0.073em -0.208em 0, -0.049em -0.214em 0, -0.025em -0.219em 0, -0.000em -0.220em 0, 0.025em -0.219em 0, 0.049em -0.214em 0, 0.073em -0.208em 0, 0.095em -0.198em 0, 0.117em -0.186em 0, 0.137em -0.172em 0, 0.156em -0.156em 0, 0.172em -0.137em 0, 0.186em -0.117em 0, 0.198em -0.095em 0, 0.208em -0.073em 0, 0.214em -0.049em 0, 0.219em -0.025em 0, 0.165em 0.000em 0, 0.163em 0.026em 0, 0.157em 0.051em 0, 0.147em 0.075em 0, 0.133em 0.097em 0, 0.117em 0.117em 0, 0.097em 0.133em 0, 0.075em 0.147em 0, 0.051em 0.157em 0, 0.026em 0.163em 0, 0.000em 0.165em 0, -0.026em 0.163em 0, -0.051em 0.157em 0, -0.075em 0.147em 0, -0.097em 0.133em 0, -0.117em 0.117em 0, -0.133em 0.097em 0, -0.147em 0.075em 0, -0.157em 0.051em 0, -0.163em 0.026em 0, -0.165em 0.000em 0, -0.163em -0.026em 0, -0.157em -0.051em 0, -0.147em -0.075em 0, -0.133em -0.097em 0, -0.117em -0.117em 0, -0.097em -0.133em 0, -0.075em -0.147em 0, -0.051em -0.157em 0, -0.026em -0.163em 0, -0.000em -0.165em 0, 0.026em -0.163em 0, 0.051em -0.157em 0, 0.075em -0.147em 0, 0.097em -0.133em 0, 0.117em -0.117em 0, 0.133em -0.097em 0, 0.147em -0.075em 0, 0.157em -0.051em 0, 0.163em -0.026em 0, 0.110em 0.000em 0, 0.107em 0.026em 0, 0.097em 0.051em 0, 0.082em 0.073em 0, 0.062em 0.091em 0, 0.039em 0.103em 0, 0.013em 0.109em 0, -0.013em 0.109em 0, -0.039em 0.103em 0, -0.062em 0.091em 0, -0.082em 0.073em 0, -0.097em 0.051em 0, -0.107em 0.026em 0, -0.110em 0.000em 0, -0.107em -0.026em 0, -0.097em -0.051em 0, -0.082em -0.073em 0, -0.062em -0.091em 0, -0.039em -0.103em 0, -0.013em -0.109em 0, 0.013em -0.109em 0, 0.039em -0.103em 0, 0.062em -0.091em 0, 0.082em -0.073em 0, 0.097em -0.051em 0, 0.107em -0.026em 0, 0.055em 0.000em 0, 0.050em 0.024em 0, 0.034em 0.043em 0, 0.012em 0.054em 0, -0.012em 0.054em 0, -0.034em 0.043em 0, -0.050em 0.024em 0, -0.055em 0.000em 0, -0.050em -0.024em 0, -0.034em -0.043em 0, -0.012em -0.054em 0, 0.012em -0.054em 0, 0.034em -0.043em 0, 0.050em -0.024em 0;
}

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

html {
  background: #eef0fa;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font: 400 1.0625rem/1.45 var(--body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { overflow-x: clip; }

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrap { width: min(1180px, 100% - 2 * var(--gut)); margin-inline: auto; }

/* ------------------------------- the canvas ------------------------------ */

#film {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100lvh;
}

/* No WebGL: a still of the title reel, in plain stripes. */
.no-film #film { display: none; }
.no-film body {
  background: linear-gradient(-25deg, #1b25e6 0 22%, #f6b92f 22% 40%, #eef0fa 40% 47%, #17140f 47% 55%, #e8413c 55% 82%, #eef0fa 82%) fixed;
}

/* --------------------------------- pieces -------------------------------- */

/* Big type on a paper cut-out that follows the letters. Two copies of the text: a
   paper-coloured one underneath that is swollen into the cut-out, and the ink on top. */
.cut {
  position: relative;
  width: fit-content;
  margin-left: var(--halo-r);
  font-family: var(--display);
  color: var(--ink);
}
.cut em { font-style: normal; }
.cut-ink { position: relative; display: block; }
.cut-halo {
  position: absolute;
  inset: 0;
  display: block;
  color: var(--paper);
  -webkit-text-stroke: .04em var(--paper);
  text-shadow: var(--halo);
  user-select: none;
  pointer-events: none;
}

/* A sheet of paper, cut by hand: no two edges quite parallel. */
.sheet {
  position: relative;
  padding: clamp(22px, 3vw, 44px);
  background: var(--grain), var(--paper);
  clip-path: polygon(0 5px, 100% 0, calc(100% - 4px) 100%, 3px calc(100% - 6px));
}
.sheet.cut-b { clip-path: polygon(4px 0, calc(100% - 2px) 6px, 100% calc(100% - 3px), 0 100%); }
.sheet.cut-c { clip-path: polygon(0 0, 100% 7px, calc(100% - 6px) calc(100% - 2px), 5px 100%); }

/* A small ink label. */
.tab {
  display: inline-block;
  padding: .72em .95em .68em;
  font: 500 .7rem/1 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  rotate: -1.4deg;
}

/* A dab of dye: flat colour, lighter where the wash thinned, pooled darker at the rim. */
.dab {
  position: relative;
  display: block;
  background:
    var(--grain),
    radial-gradient(70% 90% at 18% 12%, rgb(255 255 255 / .3), transparent 70%),
    radial-gradient(80% 70% at 88% 92%, rgb(0 0 0 / .09), transparent 70%),
    var(--dye, var(--yellow));
  border-radius: 22px 30px 24px 34px / 30px 22px 34px 24px;
  box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / .14), inset 0 0 26px rgb(0 0 0 / .08);
}

/* Logos are only ever a black silhouette; the dab carries the colour. Sized on optical
   height, trimmed per mark with --logo-scale. */
.plate img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 62%;
  max-height: calc(42% * var(--logo-scale, 1));
  filter: brightness(0);
  opacity: .9;
}
.plate { transition: rotate .35s cubic-bezier(.2, .7, .2, 1), scale .35s cubic-bezier(.2, .7, .2, 1); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .95em 1.45em;
  font: 600 .98rem/1 var(--body);
  text-decoration: none;
  color: var(--ink);
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn-ink { color: var(--paper); background: var(--ink); }
.btn-ink:hover { background: var(--blue); border-color: var(--blue); }
.btn-line:hover { background: var(--yellow); }

/* A link underlined with a stroke of the entry's dye; the stroke fills in on hover. */
.go {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .1em .15em;
  margin-left: -.15em;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(var(--dye, var(--yellow)), var(--dye, var(--yellow))) 0 100% / 100% .38em no-repeat;
  transition: background-size .25s cubic-bezier(.2, .7, .2, 1);
}
.go:hover { background-size: 100% 100%; }
.go svg { transition: translate .25s; }
.go:hover svg { translate: 2px -2px; }

.prose p + p { margin-top: 1em; }
.prose p:first-child {
  font: 400 clamp(1rem, 1.34vw, 1.16rem)/1.52 var(--display);
}
.prose { color: var(--ink-2); }
.prose p:first-child { color: var(--ink); }

/* ---------------------------------- nav ---------------------------------- */

.nav {
  position: fixed;
  z-index: 20;
  top: max(12px, env(safe-area-inset-top));
  left: var(--gut);
  right: var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-mark {
  opacity: 0;
  translate: 0 -10px;
  visibility: hidden;
  transition: opacity .3s, translate .3s, visibility 0s .3s;
}
.nav.is-past .nav-mark { opacity: 1; translate: none; visibility: visible; transition-delay: 0s; }
/* Ink, not paper: the nav rides over the sheets as well as the paint, and has to read on both. */
.nav-links {
  display: flex;
  gap: 2px;
  padding: 5px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
}
.nav-links a {
  display: block;
  padding: .78em 1.05em .72em;
  font: 500 .7rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color .2s, color .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--yellow); }

/* Edge print, up the left margin like the lettering on the edge of a film strip. */
.edge {
  position: fixed;
  z-index: 15;
  left: 12px;
  bottom: 18px;
  display: none;
  gap: 1.6em;
  padding: .95em .6em;
  font: 500 .64rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--paper);
  background: var(--ink);
  writing-mode: vertical-rl;
  rotate: 180deg;
  contain: layout paint;
}
.edge b { font-weight: 500; font-variant-numeric: tabular-nums; }
@media (min-width: 1000px) { .edge { display: flex; } }

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

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 110px 0 clamp(18px, 4.5vh, 52px);
}
.hero-inner { position: relative; display: grid; justify-items: start; }

.name {
  margin-top: clamp(30px, 4.6vw, 70px);
  margin-bottom: clamp(30px, 5.4vw, 82px);
  font-size: clamp(3.4rem, 11.4vw, 11.4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.035em;
  word-spacing: .1em;
  white-space: nowrap;
}

.hero-card { max-width: 36rem; padding: clamp(20px, 2.4vw, 30px) clamp(20px, 2.6vw, 34px) clamp(22px, 2.6vw, 32px); }
.lede {
  font: 400 clamp(1rem, 1.42vw, 1.2rem)/1.5 var(--display);
  text-wrap: pretty;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.25em; }

.hint { position: absolute; right: 0; bottom: 0; rotate: 1.6deg; }
.hint span { display: inline-block; margin-left: .5em; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 0 3px; } }

/* The hero rises in once the paint is up (film.js adds .is-lit). */
.js .hero [data-rise] { opacity: 0; translate: 0 22px; }
.js .hero.is-lit [data-rise] {
  opacity: 1;
  translate: none;
  transition: opacity .7s ease, translate 1s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i) * 110ms + 500ms);
}

/* --------------------------------- strip --------------------------------- */

/* What I build, as a strip of film laid across the table. film.js runs the track sideways
   as the strip crosses the screen (.is-run), starting it a length of blank leader in from
   the left (--leader) so the title is still in view when the strip reaches the middle.
   Without film.js the strip just scrolls sideways by hand. The sprocket holes are real
   holes (a mask), so the paint shows through. */
.builds { margin-top: clamp(10px, 4vh, 44px); }
.strip {
  --perf: clamp(17px, 1.9vw, 25px);
  --cel-w: clamp(222px, 22vw, 330px);
  margin: 0 -5vw;
  rotate: -1.6deg;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.builds.is-run .strip { overflow: hidden; }
.strip-track {
  --holes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 26' preserveAspectRatio='none'%3E%3Cpath fill-rule='evenodd' d='M0 0h28v26H0z M8 7h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 46px);
  width: max-content;
  min-width: 100%;
  padding: calc(var(--perf) + 10px) 8vw calc(var(--perf) + 8px) calc(8vw + var(--leader, 0px));
  color: var(--paper);
  background: var(--ink);
  -webkit-mask:
    var(--holes) 0 0 / calc(var(--perf) * 1.08) var(--perf) repeat-x,
    var(--holes) 0 100% / calc(var(--perf) * 1.08) var(--perf) repeat-x,
    linear-gradient(#000, #000) 0 50% / 100% calc(100% - 2 * var(--perf) + 4px) no-repeat;
  mask:
    var(--holes) 0 0 / calc(var(--perf) * 1.08) var(--perf) repeat-x,
    var(--holes) 0 100% / calc(var(--perf) * 1.08) var(--perf) repeat-x,
    linear-gradient(#000, #000) 0 50% / 100% calc(100% - 2 * var(--perf) + 4px) no-repeat;
}
.strip-lead {
  font: 500 clamp(1.3rem, 2.5vw, 2.3rem)/1.2 var(--display);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.strip-frames { display: flex; gap: clamp(8px, 1vw, 14px); }
.strip-frames li { display: grid; gap: 8px; width: var(--cel-w); }

/* A frame of clear film with a drawing on it, and the name on a paper label. */
.cel-box {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #eef0fa;
  border-radius: 5px;
}
.defs { position: absolute; }

/* The drawings: paper for screens (pp), ink line in three weights (ln, hl, bd), faded
   ink for the tired and the incidental (gy), and washes of dye (ws), which multiply
   like the paint behind the page. Each wash is the shape of the thing it colours. */
.cel-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.cel-art .pp { fill: var(--paper); }
.cel-art .old { fill: #e6dfce; }
.cel-art .old2, .cel-art .gyf { fill: #cfc7b5; }
.cel-art .cur { fill: var(--paper); stroke: var(--ink); stroke-width: .8; stroke-linejoin: round; }
.cel-art .ik { fill: var(--ink); }
.cel-art .ws { fill: var(--dye); filter: url(#wash); mix-blend-mode: multiply; opacity: .94; }
.cel-art .ln { fill: none; stroke: var(--ink); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.cel-art .hl, .cel-art .hl rect { stroke-width: .8; }
.cel-art .bd { stroke-width: 1.9; }
.cel-art .gy { stroke: #9a9184; }
.cel-art .dash { stroke-dasharray: 1.5 3; }
.cel-art text { fill: var(--ink); font-family: var(--body); }
.cel-art .sf { font-family: var(--display); }
.cel-art .hd { font-weight: 500; letter-spacing: -.02em; }
.cel-art .mn { font-family: var(--mono); letter-spacing: .03em; }
.cel-art .md { font-weight: 500; letter-spacing: -.02em; }
.cel-art .b { font-weight: 600; }
.cel-art .sub { fill: var(--ink-2); }
.cel-art .gyt { fill: #8b8172; }
.cel-art .pt { fill: var(--paper); }
.cel-art .ol { fill: #7d7468; font-family: "Times New Roman", Times, serif; }
.cel-art .ul { text-decoration: underline; }

.cel-name {
  position: absolute;
  left: 5%;
  bottom: 7%;
  padding: .3em .7em .34em;
  font: 500 clamp(.8rem, 1.18vw, 1.05rem)/1.2 var(--display);
  letter-spacing: -.01em;
  white-space: nowrap;
  color: var(--paper);
  background: var(--ink);
  clip-path: polygon(0 3px, 100% 0, calc(100% - 3px) 100%, 2px calc(100% - 2px));
  rotate: -1.5deg;
}
.strip-frames li:nth-child(even) .cel-name { rotate: 1.2deg; }

.cel-no, .strip-end {
  font: 500 .62rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgb(251 246 234 / .45);
}

/* --------------------------------- reels --------------------------------- */

.reel { padding-block: clamp(70px, 13vh, 150px); }

.reel-no { margin-bottom: clamp(24px, 2.6vw, 42px); }
.title {
  margin-bottom: .5em;
  font-size: clamp(2.1rem, 5.6vw, 5.2rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.03em;
}

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(10px, 1.4vw, 18px);
  align-items: start;
}
.about-help { margin-top: clamp(0px, 6vw, 84px); }

.bio {
  display: grid;
  grid-template-columns: clamp(140px, 16vw, 210px) minmax(0, 1fr);
  gap: clamp(18px, 2.8vw, 38px);
  align-items: start;
}
/* The photograph, cut to the shape of a dab, with a dab of yellow behind it. */
.portrait { position: relative; margin: 4px 0 0 8px; aspect-ratio: 4 / 5; }
.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  translate: -9px 10px;
  rotate: -3deg;
  background: var(--yellow);
  border-radius: 22px 30px 24px 34px / 30px 22px 34px 24px;
  box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / .14);
}
.portrait img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px 30px 24px 34px / 30px 22px 34px 24px;
}

.about-help h3, .frame h3, .tile h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.about-help h3 { font-size: clamp(1.2rem, 1.7vw, 1.45rem); margin-bottom: .7em; }
.help li {
  position: relative;
  padding: .85em 0 .85em 1.9em;
  border-top: 1.5px solid var(--rule);
  line-height: 1.4;
}
.help li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: .95em;
  height: .95em;
  background: var(--yellow);
  border-radius: 55% 45% 52% 48% / 48% 56% 44% 52%;
  box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / .16);
}
.help li:nth-child(2)::before { background: var(--pink); }
.help li:nth-child(3)::before { background: var(--sky); }
.help li:nth-child(4)::before { background: var(--lime); }

/* Work: one sheet per job, stacked like frames on a strip, paint showing between. */
.frames { display: grid; gap: clamp(10px, 1.2vw, 16px); counter-reset: frame; }
.frame {
  display: grid;
  grid-template-columns: clamp(150px, 21vw, 260px) minmax(0, 1fr);
  gap: clamp(18px, 3.2vw, 46px);
  align-items: center;
  counter-increment: frame;
}
.frame::after {
  content: counter(frame, decimal-leading-zero);
  position: absolute;
  top: 18px;
  right: 22px;
  font: 500 .68rem/1 var(--mono);
  letter-spacing: .1em;
  color: var(--ink-3);
}
.frame .plate { aspect-ratio: 5 / 4; }
.frame:hover .plate, .tile:hover .plate { rotate: -1.6deg; scale: 1.02; }
.frame h3 { font-size: clamp(1.35rem, 2.05vw, 1.9rem); margin-bottom: .35em; }
.frame p, .tile p { color: var(--ink-2); }
.frame-body { padding-right: clamp(0px, 3vw, 44px); }
.frame .go, .tile .go { margin-top: 1em; }

.sticker {
  display: inline-block;
  margin-left: .9em;
  padding: .6em .75em .55em;
  font: 500 .64rem/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #fff;
  background: var(--red);
  rotate: 3deg;
}

/* Projects */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
  align-items: start;
}
.tile { padding: clamp(14px, 1.5vw, 20px) clamp(14px, 1.5vw, 20px) clamp(20px, 2vw, 26px); }
.tile:nth-child(even) { margin-top: clamp(0px, 3vw, 40px); }
.tile .plate { aspect-ratio: 4 / 3; margin-bottom: 1.2em; }
.tile h3 { font-size: clamp(1.15rem, 1.55vw, 1.35rem); margin-bottom: .4em; }
.tile p { font-size: .98rem; line-height: 1.42; }

/* Contact */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(10px, 1.4vw, 18px);
  align-items: start;
}
/* Sent: the sheet is flicked off the table, the paint washes out and blooms back, and a
   cut-out thank-you is left where the sheet was. The sheet only goes invisible, so nothing
   below it moves. */
.send { position: relative; margin-top: clamp(0px, 3vw, 40px); }
.send.is-sent .contact-form-sheet { animation: flick 1.05s ease-out forwards; pointer-events: none; }
@keyframes flick {
  30% { translate: -16px 14px; rotate: -3deg; animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
  100% { translate: 75vw -70vh; rotate: 30deg; visibility: hidden; }
}

.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label {
  font: 500 .68rem/1 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.field input, .field textarea {
  width: 100%;
  padding: .8em .95em;
  font: inherit;
  color: inherit;
  background: var(--paper-hi);
  border: 1.5px solid var(--ink);
  border-radius: 10px 14px 11px 15px / 14px 10px 15px 11px;
}
.field textarea { display: block; resize: vertical; min-height: 8.5em; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 2px; }

.cf-turnstile { margin-bottom: 18px; }
.btn-submit .btn-loading { display: none; }
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .btn-loading { display: inline; }
.btn-submit:disabled { opacity: .6; cursor: default; }
.form-status { min-height: 1.4em; margin-top: 12px; font-size: .95rem; }
.form-status.error { color: #b5231f; }
.sent {
  position: absolute;
  left: 0;
  top: 50%;
  margin: 0 0 0 var(--halo-r);
  font-size: clamp(1.9rem, 4.1vw, 3.7rem);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.03em;
  translate: 0 -50%;
}
.sent[hidden] { display: none; }
.sent em { display: block; }
.sent:focus { outline: none; }
.send.is-sent .sent { animation: arrive .9s cubic-bezier(.2, .7, .2, 1) .6s backwards; }
@keyframes arrive { from { opacity: 0; translate: 0 calc(-50% + 28px); } }

/* Footer */
.foot { padding: 0 0 clamp(22px, 5vh, 54px); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; }
.social { display: flex; gap: 2px; padding: 5px; color: var(--paper); background: var(--ink); border-radius: 999px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; transition: background-color .2s, color .2s; }
.social a:hover { color: var(--ink); background: var(--yellow); }

/* -------------------------------- narrower ------------------------------- */

@media (max-width: 1080px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .about, .contact { grid-template-columns: minmax(0, 1fr); }
  .about-help, .send { margin-top: 0; }
}

@media (max-width: 640px) {
  .nav { justify-content: center; }
  .nav-mark { display: none; }
  .nav-links a { padding-inline: .82em; }

  .hero { padding-top: 84px; }
  .name { font-size: 23.5vw; line-height: .98; white-space: normal; }
  .name .w { display: block; }
  .hint { display: none; }

  .bio { grid-template-columns: minmax(0, 1fr); }
  .portrait { width: min(46%, 180px); }

  .frame { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .frame .plate { aspect-ratio: 16 / 7; }
  .frame::after { display: none; }

  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile:nth-child(even) { margin-top: 0; }
  .tile .plate { aspect-ratio: 16 / 8; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero [data-rise] { opacity: 1; translate: none; }
  .js .hero.is-lit [data-rise] { transition: none; }
  .hint span { animation: none; }
  .plate, .go, .go svg { transition: none; }
  .send.is-sent .contact-form-sheet { animation: none; visibility: hidden; }
  .send.is-sent .sent { animation: none; }
}

/* --halo is generated, not written by hand:
 *
 *   node -e 'const o=[];for(const [r,n] of [[.22,56],[.165,40],[.11,26],[.055,14]])for(let i=0;i<n;i++){
 *     const a=i/n*2*Math.PI;o.push((r*Math.cos(a)).toFixed(3)+"em "+(r*Math.sin(a)).toFixed(3)+"em 0")}
 *     console.log(o.join(","))'
 *
 * Four rings, close enough together (with the .04em stroke on .cut-halo) that even a
 * hairline serif leaves no gap between one stamp and the next, and enough stamps per ring
 * that a sharp serif tip does not show up as a row of bumps along the edge.
 */
