/* Kevin Wang — portfolio. Aside-inspired: white page, hairline frame,
   soft silk gradients behind product shots, ink pills. */

@view-transition { navigation: auto; }

/* Until Manrope arrives, text is set in Arial scaled to Manrope's width and line box (measured on this
   site's own text, regular and bold separately), so the swap moves as little as possible. */
@font-face {
  font-family: 'Manrope Fallback'; font-weight: 100 500; src: local('Arial'), local('Helvetica Neue'), local('Roboto');
  size-adjust: 102.4%; ascent-override: 104.1%; descent-override: 29.3%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Manrope Fallback'; font-weight: 600 900; src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Neue Bold'), local('Roboto Bold');
  size-adjust: 100%; ascent-override: 106.6%; descent-override: 30%; line-gap-override: 0%;
}
/* Manrope, one variable file for every weight, served from this site. */
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/manrope.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0a0a0a;
  --ink-2: #404040;
  --muted: #737373;
  --faint: #a3a3a3;
  --line: rgba(10, 10, 10, 0.08);
  --line-strong: rgba(10, 10, 10, 0.14);
  --surface: #fafafa;
  --surface-2: #f4f4f5;
  --brand: #0ea5e9;
  --brand-ink: #0284c7;
  --radius: 22px;
  --radius-sm: 14px;
  --frame: 1120px;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --font: 'Manrope', 'Manrope Fallback', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 92px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}
img { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(14, 165, 233, 0.18); }

/* ---------- Texture: paper grain over everything ---------- */

:root {
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.1 -.35'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background-image: var(--grain); background-size: 220px 220px;
  opacity: 0.11; mix-blend-mode: multiply;
}

/* ---------- Frame: hairline rails like Aside ---------- */

.frame {
  max-width: var(--frame);
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 100vh;
}
/* Like Aside: tinted panels fill the frame between the rails, and the
   hairline above them runs the full width of the window. */
.section--grey, .section--lilac, #writing, .footer { position: relative; border-top: 0; }
.section--grey::before, .section--lilac::before, #writing::before, .footer::before {
  --rule: var(--line-strong);
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  /* A shadow is paint only, so the line can run edge to edge without widening the page. */
  background: var(--rule); box-shadow: 0 0 0 100vmax var(--rule); clip-path: inset(0 -100vmax);
  pointer-events: none;
}
.section--grey { background: var(--surface); }
/* Both schools are purple, so the section is too. */
.section--lilac {
  --line: rgba(91, 33, 182, 0.1);
  background: linear-gradient(180deg, #f7f3fe 0%, #f3edfd 100%);
}
.section--lilac::before { --rule: rgba(91, 33, 182, 0.14); }
.section--lilac .lede__label { color: #6d3fc0; }
.section--lilac .lede__text span { color: #a68bd6; }
.section--lilac .work__time { color: #9a84c4; }
.section { padding: 72px var(--gutter); border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
/* Drafting marks: a small plus where each section rule crosses the rails. */
.section { position: relative; }
.frame > .section + .section::after {
  --m: var(--faint);
  content: ''; position: absolute; top: -6px; left: -6px; right: -6px; height: 11px; pointer-events: none;
  background:
    linear-gradient(var(--m), var(--m)) left 5px top 0 / 1px 11px,
    linear-gradient(var(--m), var(--m)) left 0 top 5px / 11px 1px,
    linear-gradient(var(--m), var(--m)) right 5px top 0 / 1px 11px,
    linear-gradient(var(--m), var(--m)) right 0 top 5px / 11px 1px;
  background-repeat: no-repeat;
}
.section--dotted { border-top: 0; position: relative; }
.section--dotted::before {
  content: '';
  position: absolute; left: var(--gutter); right: var(--gutter); top: 0;
  border-top: 1px dashed var(--line-strong);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  view-transition-name: site-nav;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--frame); margin: 0 auto; height: 76px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.nav__brand img { width: 60px; height: 60px; border-radius: 15px; object-fit: cover; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link { padding: 8px 14px; border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--muted); transition: color 0.15s, background 0.15s; }
.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__link.is-current { color: var(--ink); }
.nav__brand, .nav .pill { white-space: nowrap; }
.nav .pill--sm { height: 40px; padding: 0 18px; font-size: 15px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  transition: transform 0.15s var(--ease), background 0.15s;
}
.pill:hover { background: #262626; }
.pill:active { transform: scale(0.97); }
.pill--sm { height: 34px; padding: 0 14px; font-size: 13px; }
.pill--ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pill--ghost:hover { background: var(--surface); }
.pill svg { width: 15px; height: 15px; }

/* ---------- Hero ---------- */

.hero { display: grid; grid-template-columns: 180px 1fr; gap: 48px; align-items: start; padding-top: 64px; padding-bottom: 80px; }
.hero__photo {
  aspect-ratio: 1; width: 100%; border-radius: 22px; overflow: hidden; margin-top: 8px;
  background: var(--surface-2);
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -30px rgba(2, 132, 199, 0.35);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__intro { margin: 0; font-size: 18px; font-weight: 400; letter-spacing: normal; line-height: 1.65; color: var(--muted); max-width: 34em; }
.hero__intro strong { color: var(--ink); font-weight: 650; }
.hero__intro mark { background: #fde68a; color: var(--ink); padding: 0 4px; border-radius: 3px; }
.hero .inline { white-space: nowrap; color: var(--ink); border-bottom: 1.5px solid var(--line-strong); transition: border-color 0.15s; }
.hero .inline:hover { border-color: var(--ink); }
.hero .inline img { display: inline-block; width: 1.05em; height: 1.05em; margin: 0 0.3em 0 0.1em; vertical-align: -0.15em; border-radius: 4px; object-fit: contain; }
.hero__social { display: flex; align-items: center; gap: 22px; margin-top: 28px; }
.hero__social a { color: var(--ink-2); display: grid; place-items: center; transition: color 0.15s, transform 0.2s var(--ease); }
.hero__social a:hover { color: var(--ink); transform: translateY(-1px); }
.hero__social svg { width: 22px; height: 22px; }
/* The outline mail glyph sits inside padding; scale it to match the solid logos. */
.hero__social a[aria-label="Email"] svg { width: 26px; height: 26px; }

/* ---------- Section headers ---------- */

.lede { display: grid; grid-template-columns: 160px 1fr; gap: 24px; margin-bottom: 56px; }
.lede__label { margin: 0; white-space: nowrap; display: flex; align-items: center; gap: 6px; align-self: start; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-2); padding-top: 5px; }
.lede__text { margin: 0; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; }
.lede__text span { color: var(--faint); font-weight: 500; }
/* A lede with nothing under it doesn't need the gap. */
.lede:last-child { margin-bottom: 0; }

/* ---------- Project blocks ---------- */

.project { margin-top: 88px; }
.project:first-of-type { margin-top: 0; }

.phead { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; width: fit-content; }
.phead__logo { width: 32px; height: 32px; border-radius: 9px; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.phead__name { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.phead__people { display: flex; margin-left: 2px; }
.phead__people img {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px #fff; margin-left: -6px;
}
.phead__people img:first-child { margin-left: 0; }
.phead__role { font-size: 14px; color: var(--muted); font-weight: 500; }

.pgrid { display: grid; gap: 16px; }
.pgrid--side { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); }
.pgrid--side .stack { display: grid; gap: 16px; grid-auto-rows: 1fr; }
.pgrid--wide { grid-template-columns: 1fr 1fr; }
.pgrid--wide .shot { grid-column: 1 / -1; }
.pgrid--pair { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); }
/* Mirrored: cards lead on the left, the product sits on the right. */
.pgrid--reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.85fr); }
.pgrid--reverse .shot { order: 2; padding: 22px 22px 0 0; }
.pgrid--reverse .shot .shot__caption { margin: 0 0 18px 22px; }
.pgrid--reverse .shot .shot__window { margin: 0 36px 0 0; border-radius: 0 14px 0 0; }
.pgrid--reverse .stack { display: grid; gap: 16px; grid-template-rows: auto 1fr auto; }

.pgrid--pair .stack { display: grid; gap: 16px; grid-template-rows: 1fr 1fr auto; }
.pgrid--pair .stack > .card--wide { grid-column: 1 / -1; }

/* Clickable surfaces */
.card {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden; cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s var(--ease);
}
a.card:hover, .card.is-link:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 12px 32px -18px rgba(0, 0, 0, 0.18); }
a.card:active { transform: scale(0.995); }

/* Product shot card with silk background */
.shot { min-height: 420px; padding: 22px 0 0 22px; isolation: isolate; }
.shot__caption {
  position: relative; z-index: 2;
  margin: 0 22px 18px 0; font-size: 15px; font-weight: 500; color: var(--ink-2);
  max-width: 36em;
}
.shot__caption b { color: var(--ink); font-weight: 650; }
.shot__window {
  position: relative; z-index: 1; flex: 1;
  margin-left: 36px; min-height: 0;
  border-radius: 14px 0 0 0; overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 24px 60px -20px rgba(15, 23, 42, 0.35);
}
.shot__bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #fbfbfb; }
.shot__bar i { width: 10px; height: 10px; border-radius: 50%; background: #e5e5e5; }
.shot__bar i:nth-child(1) { background: #ff5f57; }
.shot__bar i:nth-child(2) { background: #febc2e; }
.shot__bar i:nth-child(3) { background: #28c840; }
.shot__url { margin-left: 14px; font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 3px 12px; border-radius: 999px; }
.shot__img { width: 100%; height: auto; object-fit: cover; object-position: top left; }
.shot--wide { min-height: 0; padding: 40px 0 0 0; align-items: center; }
.shot--wide .shot__caption { margin: 0 auto 26px; text-align: center; }
.shot--wide .shot__window { margin: 0 auto; width: min(82%, 860px); border-radius: 14px 14px 0 0; }
.shot--wide .shot__window { flex: none; height: 368px; }
.shot--wide.detail-shot { min-height: 0; }

/* Silk gradients. Each layer is a blurred radial; the noise keeps them from banding. */
.silk { background-color: #eef6fb; }
.silk::before, .silk::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* The grain sits heavier on the gradients, like a risograph print. */
.silk::after { opacity: 0.3; mix-blend-mode: multiply; background-image: var(--grain); background-size: 220px 220px; }
.silk--sky { background-color: #bfe6fb; }
.silk--sky::before {
  background:
    radial-gradient(38% 30% at 18% 24%, rgba(255,255,255,.95), transparent 70%),
    radial-gradient(30% 22% at 34% 30%, rgba(255,255,255,.85), transparent 70%),
    radial-gradient(34% 26% at 84% 18%, rgba(255,255,255,.9), transparent 70%),
    radial-gradient(28% 20% at 70% 26%, rgba(255,255,255,.7), transparent 70%),
    radial-gradient(60% 50% at 50% 110%, rgba(255,255,255,.9), transparent 70%),
    linear-gradient(180deg, #7dd3fc 0%, #bae6fd 55%, #e0f2fe 100%);
  filter: blur(6px);
}
.silk--dusk { background-color: #fde2d4; }
.silk--dusk::before {
  background:
    radial-gradient(55% 60% at 12% 20%, #fbcfe8 0%, transparent 70%),
    radial-gradient(50% 55% at 88% 12%, #fde68a 0%, transparent 70%),
    radial-gradient(60% 60% at 70% 95%, #fdba74 0%, transparent 70%),
    radial-gradient(50% 60% at 20% 100%, #c4b5fd 0%, transparent 70%),
    linear-gradient(135deg, #fff1e6, #ffe4e6);
  filter: blur(20px); inset: -40px;
}
.silk--paper { background-color: #fbfaf7; }
.silk--paper::before {
  background:
    radial-gradient(55% 55% at 12% 15%, #f8d96f 0%, transparent 70%),
    radial-gradient(50% 60% at 92% 25%, #f7bccb 0%, transparent 70%),
    radial-gradient(70% 60% at 55% 115%, #fbe3a0 0%, transparent 70%),
    linear-gradient(160deg, #fdfcf8, #fbf6ea);
  filter: blur(18px); inset: -40px;
}
.silk--gold { background-color: #f6efe1; }
.silk--gold::before {
  background:
    radial-gradient(55% 60% at 10% 10%, #f3e3b5 0%, transparent 70%),
    radial-gradient(55% 55% at 92% 20%, #cfe9df 0%, transparent 70%),
    radial-gradient(70% 60% at 60% 105%, #e8d3a2 0%, transparent 70%),
    linear-gradient(160deg, #fbf8f1, #f1ead8);
  filter: blur(18px); inset: -40px;
}
.silk--ink { background-color: #f4f4f5; }
.silk--ink::before {
  background:
    radial-gradient(50% 60% at 10% 0%, #e0e7ff 0%, transparent 70%),
    radial-gradient(50% 60% at 100% 100%, #e0f2fe 0%, transparent 70%),
    linear-gradient(160deg, #fafafa, #f4f4f5);
  filter: blur(16px); inset: -40px;
}

/* Metric cards */
.metric { padding: 18px 18px 14px; min-height: 150px; gap: 8px; }
.metric__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.metric__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.metric__srcs { display: flex; gap: 4px; }
.metric__src { width: 18px; height: 18px; border-radius: 5px; object-fit: contain; flex: none; opacity: 0.9; }
.metric__value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric__value small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.metric__chart { margin-top: auto; height: 56px; }
.metric__chart svg { width: 100%; height: 100%; overflow: visible; }
.metric__note { font-size: 13px; color: var(--muted); }
/* Fixed stats sit on the project's silk, centered, like a small poster. */
.metric--static { justify-content: center; align-items: center; text-align: center; gap: 4px; isolation: isolate; background-color: transparent; }
.metric--static .metric__label { color: var(--ink-2); }
.metric--static .metric__value { font-size: 44px; letter-spacing: -0.04em; color: var(--accent-ink); }
.metric--static .metric__note { color: var(--ink-2); opacity: 0.75; max-width: 18em; }

.repo { flex-direction: row; align-items: center; gap: 14px; padding: 18px; min-height: 0; }
.repo svg.gh { width: 34px; height: 34px; flex: none; }
.repo__name { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.repo__meta { font-size: 13px; color: var(--muted); }
.repo__eyebrow { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }

/* Project themes: each project's cards and charts take its product's colors. */
[data-theme] { --accent: var(--ink); --accent-soft: #d4d4d8; --accent-ink: var(--ink); --tint: var(--surface); --tint-line: var(--line); }
[data-theme='anyapi'] { --accent: #0ea5e9; --accent-soft: #bae6fd; --accent-ink: #0369a1; --tint: #f0f9ff; --tint-line: rgba(14, 165, 233, 0.18); }
[data-theme='hotelsallow'] { --accent: #0b3a8c; --accent-soft: #f6d66b; --accent-ink: #0b3a8c; --tint: #fffaec; --tint-line: rgba(214, 160, 20, 0.2); }
[data-theme='pencil'] { --accent: #e0668a; --accent-soft: #f5a9bb; --accent-ink: #9c3557; --tint: #fffaf0; --tint-line: rgba(224, 102, 138, 0.18); }
[data-theme='transfertogatech'] { --accent: #a47a2c; --accent-soft: #e7d6ad; --accent-ink: #7a5a1e; --tint: #fbf8f1; --tint-line: rgba(164, 122, 44, 0.18); }
[data-theme] .metric:not(.metric--static), [data-theme] .repo { background: var(--tint); box-shadow: inset 0 0 0 1px var(--tint-line); }
[data-theme] a.metric:hover, [data-theme] .dash .metric:not(.is-focus):hover { box-shadow: inset 0 0 0 1px var(--accent-soft), 0 12px 32px -18px rgba(0, 0, 0, 0.18); }

/* Charts */
.bar { fill: var(--accent-soft); transition: fill 0.15s; }
.bar.is-last { fill: var(--accent); }
.line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-axis { font-size: 11px; fill: var(--faint); font-family: var(--font); }
.chart-grid { stroke: var(--tint-line, var(--line)); stroke-dasharray: 2 4; }
.dot { fill: var(--accent); }

.bar.is-hover { fill: var(--accent); }
.tooltip[data-theme] { --accent: var(--ink); }

/* One system for every project: the same type and the same halftone charts
   (the dots of the hero graphic). Only the colour changes per project. */
[data-theme] .metric__label { color: var(--accent-ink); opacity: 0.72; }
[data-theme] .metric__value small { color: var(--accent-ink); opacity: 0.7; }
[data-theme] .metric--static .metric__label { color: var(--muted); opacity: 1; }
[data-theme] .bar { fill: var(--dots); }
[data-theme] .bar.is-last, [data-theme] .bar.is-hover { fill: var(--accent); }
[data-theme] pattern circle { fill: var(--accent); }
[data-theme] .area { fill: var(--dots); opacity: 0.5; }
[data-theme] .dot { stroke: var(--tint); stroke-width: 2; }
[data-theme] .chart-axis { fill: var(--accent-ink); opacity: 0.55; }

/* ---------- Other work ---------- */

.work { list-style: none; margin: 0; padding: 0; }
.work li {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.work li:first-child { border-top: 0; }
.work img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.work__name { font-weight: 650; letter-spacing: -0.01em; }
.work__role { color: var(--muted); font-size: 15px; }
.work__time { color: var(--faint); font-size: 14px; font-variant-numeric: tabular-nums; }
.work__role .narrow { display: none; }

/* ---------- Footer ---------- */

.posts { list-style: none; margin: 0; padding: 0; }
.post {
  display: grid; grid-template-columns: 160px 1fr auto; gap: 24px; align-items: baseline;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.post:first-child { border-top: 0; }
.post__date { font-size: 14px; color: var(--faint); font-variant-numeric: tabular-nums; }
.post__title { font-size: 18px; font-weight: 650; letter-spacing: -0.015em; }
.post__excerpt { margin: 4px 0 0; color: var(--muted); font-size: 15px; max-width: 36em; }
.post__tag { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
@media (max-width: 860px) {
  .post { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .post__date { grid-column: 1 / -1; }
}

/* Music: live Spotify card beside favorites */
.np__live { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-right: 2px; }
.np__live i { width: 3px; background: #1db954; border-radius: 1px; animation: eq 0.9s ease-in-out infinite alternate; }
.np__live i:nth-child(2) { animation-delay: -0.3s; }
.np__live i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
.np__track { display: flex; align-items: center; gap: 14px; }
.np__track img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.np__track b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.np__track div { min-width: 0; }
.np__track span { color: var(--muted); font-size: 14px; }
.np__track b, .np__track span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np:hover .np__track b { text-decoration: underline; text-underline-offset: 3px; }
.np__noart { display: block; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.np__track .np__noart { width: 64px; height: 64px; border-radius: 10px; flex: none; }

/* Reading: a Kobo with the current book, and a shelf of covers */
.reading { display: grid; grid-template-columns: 230px 1fr; gap: 56px; align-items: start; }
.kobo { margin: 0; position: sticky; top: 96px; }
.kobo__body { position: relative; display: grid; grid-template-columns: 1fr 34px; padding: 14px 0 14px 14px; border-radius: 18px; background: linear-gradient(145deg, #2a2a2c, #111113); box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.kobo__screen { aspect-ratio: 3 / 4; border-radius: 3px; background: #e9e7e1; padding: 14px 18px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.kobo__screen img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; }
.kobo__body i { position: absolute; right: 13px; width: 5px; height: 34px; border-radius: 3px; background: #3a3a3d; }
.kobo__body i:nth-of-type(1) { top: 34%; }
.kobo__body i:nth-of-type(2) { top: 50%; }
.kobo figcaption { margin-top: 20px; display: grid; gap: 2px; }
.kobo__now { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.kobo figcaption b { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.kobo figcaption span:last-child, .book span { color: var(--muted); font-size: 14px; }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 20px; }
.book { display: flex; flex-direction: column; min-width: 0; }
.book b { margin-top: 12px; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.book__cover img, .book__stack img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 6px 6px 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 12px 22px -14px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.06); transition: transform 0.3s var(--ease); }
.book:hover .book__cover img { transform: translateY(-4px); }
.book--series { grid-column: span 2; }
.book__stack { position: relative; aspect-ratio: 1.45; }
.book__stack img { position: absolute; top: 0; width: 46%; left: calc(var(--k) * 54% / (var(--n) - 1)); z-index: calc(20 - var(--k)); }
.book--series:hover .book__stack img { transform: translateY(calc(var(--k) * -1.5px - 3px)); }

/* Misc: music and money, in the same card language as the projects */
[data-theme='music'] { --accent: #1db954; --accent-soft: #bbf7d0; --accent-ink: #15803d; --tint: #f6fdf8; --tint-line: rgba(29, 185, 84, 0.16); }
#music .metric { background: var(--tint); box-shadow: inset 0 0 0 1px var(--tint-line); cursor: default; }
#music .shot { min-height: 0; }
#music .metric__value small { display: block; margin: 4px 0 0; }
.song__player { position: relative; z-index: 1; width: min(340px, 82%); margin: 8px auto 28px; padding: 16px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 24px 60px -24px rgba(15, 23, 42, 0.35); transition: transform 0.3s var(--ease); }
.song:hover .song__player { transform: translateY(-3px); }
.song__player img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.song__meta { margin-top: 14px; display: grid; }
.song__meta b { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.song__meta span { font-size: 13px; color: var(--muted); }
.song__bar { margin-top: 14px; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.song__bar i { display: block; width: 44%; height: 100%; background: var(--ink); border-radius: 99px; }
.song__times { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.covers { display: flex; margin-top: auto; }
.covers img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; box-shadow: 0 0 0 2px var(--tint), 0 4px 10px -4px rgba(0, 0, 0, 0.3); }
.covers img + img { margin-left: -8px; }
#music .pgrid--side .stack { grid-auto-rows: auto; grid-template-rows: auto auto 1fr; }
#music .metric { min-height: 0; }
.repeat { display: flex; align-items: center; gap: 14px; }
.repeat img { width: 64px; height: 64px; flex: none; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px var(--tint-line), 0 6px 14px -8px rgba(0, 0, 0, 0.35); }
.repeat .metric__value small { display: block; margin: 4px 0 0; }
#music .np { cursor: pointer; }
.np__status { display: inline-flex; align-items: center; gap: 6px; }
.genres { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 9px; }
.genres li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--ink-2); }
.genres__none { grid-row: span 2; width: 30px; height: 30px; border-radius: 7px; background: var(--accent-soft); display: grid; place-items: center; font-style: normal; color: var(--accent); }
.genres__none::before { content: '♪'; font-size: 14px; }
.genres img { grid-row: span 2; width: 30px; height: 30px; border-radius: 7px; object-fit: cover; box-shadow: 0 0 0 1px var(--tint-line); }
.genres b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.genres li::after { content: ''; grid-column: 2 / -1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) calc(var(--s) * 100%), var(--accent-soft) 0); opacity: 0.9; }
.wall { margin-top: 56px; }
.wall__label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 18px; }
.wall__label span { font-weight: 500; color: var(--faint); margin-left: 6px; }
.albums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px 20px; }
.album { display: flex; flex-direction: column; min-width: 0; }
.album img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--line), 0 14px 26px -16px rgba(0, 0, 0, 0.45); transition: transform 0.3s var(--ease); }
.album:hover img { transform: translateY(-4px); }
.album b { margin-top: 12px; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.album span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Beyond software: design and cooking */
.makes.makes--3 { grid-template-columns: repeat(3, 1fr); }
.makes.makes--5 { grid-template-columns: repeat(6, 1fr); }
.makes--5 .make { grid-column: span 2; }
.makes--5 .make:nth-child(n+4) { grid-column: span 3; }
.makes--5 .make__cover { aspect-ratio: 16 / 10; }
.make__cover--img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.make .make__cover--fit { display: grid; place-items: center; background: #fff; }
.make__cover--fit img { max-width: 80%; max-height: 86%; object-fit: contain; transition: transform 0.5s var(--ease); }
.make:hover .make__cover--img img, .make:hover .make__cover--fit img { transform: scale(1.03); }
.makes--3 .make__cover { aspect-ratio: 16 / 10; }
.make__cover--books { position: relative; background: linear-gradient(180deg, #f7f5f0, #ece8df); }
.make__cover--books img { position: absolute; bottom: -18%; width: 30%; left: calc(14% + var(--k) * 22%); aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px 4px 4px 2px; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5); transform: rotate(calc((var(--k) - 1) * 6deg)); transition: transform 0.35s var(--ease); }
.make:hover .make__cover--books img { transform: rotate(calc((var(--k) - 1) * 9deg)) translateY(-6px); }
.side-page .detail-insight span { color: var(--faint); }
.misc-head { padding-bottom: 8px; }
.misc-head .detail-insight { margin-bottom: 0; }
.makes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.make { display: block; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.2s, transform 0.25s var(--ease); }
.make:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 12px 32px -18px rgba(0, 0, 0, 0.18); }
.make__cover { aspect-ratio: 16 / 9; background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.make__cover--cad { display: grid; place-items: center; background: #eaeef3; }
.make__cover--cad img, .fig--hero img { mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); mask-composite: intersect; mix-blend-mode: normal; }
.make__cover--cad img { width: 100%; transition: transform 0.4s var(--ease); }
.make:hover .make__cover--cad img { transform: rotate(-3deg) scale(1.03); }
/* Cooking: cut-out dishes scattered on silk, like the product covers. */
.make__cover--food img { position: absolute; height: auto; filter: drop-shadow(0 14px 18px rgba(80, 40, 10, 0.28)); transition: transform 0.5s var(--ease); }
.make__cover.silk.make__cover--food img { mix-blend-mode: normal; }
.food--pizza { width: 38%; left: 12%; top: 12%; transform: rotate(-8deg); }
.food--bread { width: 23%; right: 13%; top: 11%; transform: rotate(6deg); }
.food--steak { width: 40%; left: 40%; bottom: 9%; transform: rotate(-3deg); }
.make:hover .food--pizza { transform: rotate(-14deg) translate(-4px, -2px); }
.make:hover .food--bread { transform: rotate(11deg) translateY(-6px); }
.make:hover .food--steak { transform: rotate(0deg) translateY(-4px) scale(1.03); }
/* Misc covers sit on the same silk as the home project shots. */
.make__cover.silk { position: relative; isolation: isolate; background: none; }
.make__cover.silk img { mix-blend-mode: multiply; }
.make__cover--win { padding: 20px 0 0 24px; }
.make__win { height: 100%; border-radius: 10px 0 0 0; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 18px 40px -18px rgba(15, 23, 42, 0.35); transition: transform 0.5s var(--ease); }
.make__win .shot__bar { height: 22px; gap: 4px; padding: 0 8px; }
.make__win .shot__bar i { width: 6px; height: 6px; }
.make__win img { display: block; width: 100%; height: calc(100% - 22px); object-fit: cover; object-position: left top; mix-blend-mode: normal !important; }
.make:hover .make__win { transform: translate(-4px, -4px); }
.make__text { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; }
.make__name { font-weight: 650; letter-spacing: -0.01em; }
.make__role { color: var(--muted); font-size: 15px; }
.make__go { color: var(--faint); font-size: 18px; transition: transform 0.2s var(--ease), color 0.2s; }
.make:hover .make__go { color: var(--ink); transform: translateX(3px); }

.design-title { margin: 0 0 14px; font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.035em; line-height: 1.05; }
.fig { margin: 0; border-radius: var(--radius-sm); overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.fig img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.fig--hero { margin-bottom: 16px; padding: 40px 0; border-radius: var(--radius); background: #eaeef3; }
.fig--hero.fig--photo, .fig--hero.fig--tall, .fig--hero.fig--shot { padding: 0; background: #fff; }
.fig--hero.fig--photo img, .fig--hero.fig--tall img, .fig--hero.fig--shot img { mask-image: none; }
.fig--hero.fig--photo img { max-height: 460px; object-fit: contain; padding: 24px; }
.fig--hero.fig--tall img { max-height: 560px; object-fit: contain; padding: 28px 0; }
.figs { display: grid; gap: 12px; margin-top: 22px; }
.figs--2 { grid-template-columns: 1fr 1fr; }
.figs--1 .fig { aspect-ratio: 16 / 10; }
.figs--1 .fig img { object-fit: cover; }
.figs--3 { grid-template-columns: repeat(3, 1fr); }
.figs--2 .fig, .figs--3 .fig { aspect-ratio: 4 / 3; }
.figs--2 .fig img, .figs--3 .fig img { object-fit: cover; }
.figs .fig--contain { display: grid; place-items: center; background: #f6f7f9; }
.figs .fig--contain img { object-fit: contain; height: auto; }

/* Cooking gallery: tiles of mixed sizes, packed so each grid still ends square. */
#kitchen { container-type: inline-size; }
.dishes { --gap: 10px; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: calc((100cqw - 3 * var(--gap)) / 4); gap: var(--gap); }
.dish { position: relative; margin: 0; padding: 0; border: 0; cursor: zoom-in; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); grid-column: var(--c) / span var(--w); grid-row: var(--r) / span var(--h); }
.dish img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--op, 50% 50%); transition: transform 0.6s var(--ease); }
.dish:hover img { transform: scale(1.03); }
.dish:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cats { position: sticky; top: 76px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; margin-bottom: 8px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); }
.cats a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); background: #fff; }
.cats a:hover { background: var(--surface-2); }
.cats span, .cat h2 span { color: var(--faint); font-weight: 500; margin-left: 2px; }
.cat { padding-top: 40px; scroll-margin-top: 132px; }
.cat__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.dishes[hidden] { display: none; }
.dishes--rest { margin-top: var(--gap); max-height: 9999px; overflow: hidden; transition: max-height 0.7s var(--ease), filter 0.5s var(--ease), opacity 0.5s var(--ease); }
/* The rest of a category peeks out under the preview, blurred and fading, until it's opened. */
.dishes--rest.is-peek {
  max-height: 160px; overflow: hidden; filter: blur(7px); opacity: 0.85; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000, transparent 92%); mask-image: linear-gradient(#000, transparent 92%);
}
.cat__more {
  position: relative; z-index: 1; display: block; margin: -104px auto 40px;
  padding: 11px 22px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600;
  color: #fff; background: var(--ink); cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45); transition: transform 0.2s var(--ease);
}
.cat__more:hover { transform: translateY(-1px); }
.cat__more[hidden] { display: none; }
.cat h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(10, 10, 10, 0.86); backdrop-filter: blur(6px); animation: lb-in 0.18s ease-out; }
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } }
.lightbox__img { max-width: min(92vw, 1100px); max-height: 86vh; border-radius: 12px; object-fit: contain; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6); }
.lightbox button { position: absolute; border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, 0.12); border-radius: 999px; display: grid; place-items: center; transition: background 0.15s; }
.lightbox button:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox__close { top: 18px; right: 18px; width: 40px; height: 40px; font-size: 24px; line-height: 1; }
.lightbox__nav { top: 50%; width: 48px; height: 48px; margin-top: -24px; font-size: 30px; line-height: 1; }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
.lightbox__count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 13px; font-variant-numeric: tabular-nums; }

.footer { padding: 40px var(--gutter) 56px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--faint); font-size: 13px; }
.footer a:hover { color: var(--ink); }
.footer__links { display: flex; align-items: center; gap: 16px; }
.footer__links a { color: var(--faint); display: grid; place-items: center; transition: color 0.15s; }
.footer__links a:hover { color: var(--ink); }
.footer__links svg { width: 18px; height: 18px; }

/* ---------- Project page ---------- */

.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 500; margin-bottom: 28px; }
.back:hover { color: var(--ink); }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-head .phead { margin: 0; }
.detail-head .phead__logo { width: 44px; height: 44px; border-radius: 12px; }
.detail-head .phead__name { font-size: 34px; letter-spacing: -0.035em; }
.detail-head .phead__people img { width: 34px; height: 34px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.detail-insight { margin: 0 0 36px; max-width: 34em; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.35; letter-spacing: -0.02em; font-weight: 600; color: var(--ink-2); }
/* The caption lives on the home page; here the insight above says it. */
.detail-shot .shot__caption { display: none; }
.detail-shot.shot { padding-top: 32px; }
.detail-meta b { color: var(--ink); font-weight: 600; }

.dash { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
/* Stacked cards split the big card's height evenly. */
.dash__side { display: grid; gap: 16px; grid-auto-rows: 1fr; }
.dash .metric.is-focus { min-height: 380px; padding: 24px 24px 18px; cursor: default; }
.dash .metric.is-focus .metric__value { font-size: 44px; }
.dash .metric.is-focus .metric__chart { height: 240px; margin-top: 18px; }
.dash .metric:not(.is-focus) { min-height: 0; }
.dash .metric:not(.is-focus) .metric__chart { height: auto; flex: 0 1 120px; min-height: 44px; margin-top: auto; }
.dash .metric:not(.is-focus):hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.dash .metric.is-selected-ring { box-shadow: inset 0 0 0 1.5px var(--ink); }

.detail-shot { min-height: 520px; margin-bottom: 16px; }
.detail-shot + .dash, .dash + .detail-shot { margin-bottom: 64px; }
.story { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 48px 0; border-top: 1px solid var(--line); }
.story h2 { margin: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.story__body { font-size: 17px; color: var(--ink-2); max-width: 38em; }
.story__body p { margin: 0 0 14px; }
.story__body ul { margin: 0; padding: 0; list-style: none; }
.story__body li { padding: 10px 0; border-top: 1px solid var(--line); }
.story__body li:first-child { border-top: 0; padding-top: 0; }
.story__body li b { color: var(--ink); font-weight: 650; }
.next { display: flex; justify-content: space-between; align-items: center; padding: 28px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); margin-top: 24px; }
.next:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.next__label { color: var(--muted); font-size: 13px; font-weight: 600; }
.next .phead { margin: 4px 0 0; }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 9px; border-radius: 8px; transform: translate(-50%, calc(-100% - 10px));
  white-space: nowrap; opacity: 0; transition: opacity 0.1s;
}
.tooltip.is-on { opacity: 1; }

/* ---------- Contact ---------- */

.contact { padding-top: 88px; padding-bottom: 104px; }
.contact h1 { margin: 0 0 14px; font-size: clamp(40px, 6vw, 64px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 600; }
.contact > p { margin: 0 0 56px; max-width: 32em; font-size: 18px; color: var(--muted); }

/* One row per channel: quiet label, large value, action that wakes on hover. */
.reach { border-top: 1px solid var(--line); }
.reach__row {
  display: grid; grid-template-columns: 160px 1fr auto; align-items: center; gap: 24px;
  padding: 26px 4px; border-bottom: 1px solid var(--line);
  transition: padding 0.25s var(--ease), background 0.25s;
}
.reach__row:hover { padding-left: 14px; padding-right: 14px; background: linear-gradient(90deg, var(--surface), transparent); }
.reach__label { font-size: 14px; font-weight: 600; color: var(--muted); }
.reach__value { display: flex; align-items: center; gap: 14px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.025em; }
.reach__icon { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ink); }
.reach__icon svg { width: 22px; height: 22px; }
.reach__icon--li { color: #0a66c2; }
.reach__action { font-size: 14px; font-weight: 600; color: var(--faint); transition: color 0.2s, transform 0.25s var(--ease); }
.reach__row:hover .reach__action { color: var(--ink); transform: translateX(-4px); }
.reach__action.is-done { color: var(--brand-ink); }

/* ---------- Transitions ---------- */

::view-transition-group(*) { animation-duration: 0.5s; animation-timing-function: cubic-bezier(0.2, 0.9, 0.1, 1); }
/* Shared elements: swap the old and new pictures in the first few frames so text never ghosts mid-flight. */
::view-transition-old(*) { animation: 0.1s linear both vt-fade-out; mix-blend-mode: normal; height: 100%; object-fit: cover; object-position: top left; }
::view-transition-new(*) { animation: 0.1s linear both vt-fade-in; mix-blend-mode: normal; height: 100%; object-fit: cover; object-position: top left; }
/* Same picture on both pages: only the new one flies. */
::view-transition-old(*.solid) { display: none; }
::view-transition-new(*.solid) { animation: none; }
/* The page itself: the old page clears out, the new one builds itself in (see .hydrate). */
::view-transition-old(root) { animation: 0.14s ease-out both vt-fade-out; height: auto; object-fit: fill; }
::view-transition-new(root) { animation: none; height: auto; object-fit: fill; }
::view-transition-group(site-nav) { animation: none; }
::view-transition-old(site-nav), ::view-transition-new(site-nav) { animation: none; height: auto; }
::view-transition-old(site-nav) { display: none; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

/* Everything that wasn't carried over fills in after the moved element lands. */
html.is-arriving .hydrate { animation: hydrate 0.55s var(--ease) both; animation-delay: calc(260ms + var(--i, 0) * 70ms); }
@keyframes hydrate { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  html.is-arriving .hydrate { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .hero__photo { width: 112px; border-radius: 18px; }
  .lede, .story { grid-template-columns: 1fr; gap: 10px; }
  .pgrid--side, .pgrid--wide, .pgrid--pair, .pgrid--reverse, .dash { grid-template-columns: 1fr; }
  .pgrid--reverse .shot { order: 0; }
  .pgrid--side .stack { grid-auto-rows: auto; }
  .shot { min-height: 300px; }
  .detail-shot { min-height: 340px; }
  .shot--wide, .shot--wide.detail-shot { min-height: 0; padding-top: 26px; }
  .shot--wide .shot__window { width: 86%; height: 170px; }
  .reach__row { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .reach__label { grid-column: 1 / -1; }
  /* Name on its own line; role and time share the second, so no row wraps to three. */
  .work li { grid-template-columns: 36px 1fr auto; grid-template-areas: 'logo name name' 'logo role time'; gap: 2px 12px; }
  .work li > div:not(.work__time) { display: contents; }
  .work img { grid-area: logo; width: 36px; height: 36px; }
  .work__name { grid-area: name; }
  .work__role { grid-area: role; font-size: 14px; }
  .work__time { grid-area: time; align-self: baseline; font-size: 13px; white-space: nowrap; }
  .makes, .makes.makes--3, .makes.makes--5, .figs--2, .music.is-live { grid-template-columns: 1fr; }
  .makes--5 .make, .makes--5 .make:nth-child(n+4) { grid-column: auto; }
  .albums { grid-template-columns: repeat(2, 1fr); }
  .nav__inner { padding: 0 12px; }
  .nav__links { gap: 0; }
  .nav__link { padding: 6px 7px; font-size: 13px; }
  .nav__brand { gap: 9px; font-size: 16px; }
  .nav .pill--sm { height: 36px; padding: 0 12px; margin-left: 4px; font-size: 13px; }
  .reading { grid-template-columns: 1fr; gap: 36px; }
  .kobo { position: static; max-width: 220px; }
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .dishes { --gap: 8px; grid-template-columns: repeat(2, 1fr); grid-auto-rows: calc((100cqw - var(--gap)) / 2); }
  .dish { grid-column: var(--mc) / span var(--mw); grid-row: var(--mr) / span var(--mh); }
}

/* ---------- Home page motion (motion.js) ---------- */
.reveal { opacity: 0; translate: 0 18px; transition: opacity 0.7s var(--ease), translate 0.8s var(--ease); }
.reveal.is-in { opacity: 1; translate: 0 0; }
.motion .silk::before { animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(-2%, -1%, 0) scale(1.06); } to { transform: translate3d(2%, 1.5%, 0) scale(1.1); } }
.motion .is-in .bar { transform-box: fill-box; transform-origin: bottom; animation: grow 0.9s var(--ease) both; }
.motion .is-in .bar:nth-child(odd) { animation-delay: 0.08s; }
.motion .is-in .line { stroke-dasharray: 1200; animation: draw 1.4s var(--ease) both; }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes draw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }

/* Text-only hero: the intro and links, centered in their space */
.hero--text { display: block; padding-top: 124px; padding-bottom: 140px; }
.hero--text p { margin: 0; max-width: 40em; font-size: clamp(19px, 2vw, 22px); line-height: 1.6; letter-spacing: -0.01em; }
.hero--text .hero__intro { color: var(--ink); }
.hero--text .hero__intro strong { font-weight: 700; }
.hero--text .hero__social { margin-top: 24px; }
@media (max-width: 480px) { .work__role .wide { display: none; } .work__role .narrow { display: inline; } }
@media (max-width: 860px) { .hero--text { padding-top: 72px; padding-bottom: 88px; } }

/* Hero graphic: a halftone field of grey dots that drifts along the bottom of the hero (field.js). */
.hero--text { overflow: hidden; padding-bottom: 270px; }
.hero--text > * { position: relative; z-index: 1; }
.hero__field { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
@media (max-width: 720px) { .hero--text { padding-bottom: 220px; } }

/* Project and music stats sit open beside the panel, with hairlines between
   them instead of boxes. Only the panel keeps a frame. */
:is(#projects, #music) .pgrid .metric, :is(#projects, #music) .pgrid .repo { background: none; box-shadow: none; border-radius: 0; min-height: 0; padding: 18px 4px; }
:is(#projects, #music) .pgrid a.metric:active, :is(#projects, #music) .pgrid a.repo:active { transform: none; }
:is(#projects, #music) .pgrid a.metric:hover .metric__label, :is(#projects, #music) .pgrid a.repo:hover .repo__name { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
:is(#projects, #music) .pgrid .metric--static.silk::before, :is(#projects, #music) .pgrid .metric--static.silk::after { display: none; }
:is(#projects, #music) .pgrid .metric--static { align-items: flex-start; text-align: left; justify-content: flex-start; }
:is(#projects, #music) .pgrid .metric--static .metric__label { color: var(--accent-ink); opacity: 0.72; }
:is(#projects, #music) .pgrid .metric--static .metric__value { font-size: 28px; letter-spacing: -0.03em; color: var(--ink); }
:is(#projects, #music) .pgrid .dot { stroke: #fff; }
:is(#projects, #music) .pgrid .stack { gap: 0; padding-left: 8px; }
:is(#projects, #music) .pgrid--reverse .stack { padding: 0 8px 0 0; }
:is(#projects, #music) .pgrid .stack > * + * { border-top: 1px solid var(--line); }
:is(#projects, #music) .pgrid--wide > .metric { padding-top: 8px; }
:is(#projects, #music) .pgrid--wide > .metric + .metric { border-left: 1px solid var(--line); padding-left: 24px; }
@media (max-width: 720px) {
  :is(#projects, #music) .pgrid .stack, :is(#projects, #music) .pgrid--reverse .stack { padding: 0; }
  :is(#projects, #music) .pgrid--wide > .metric + .metric { border-left: 0; border-top: 1px solid var(--line); padding-left: 4px; padding-top: 18px; }
}

/* Making tiles follow the same rule: the picture keeps its frame, the name sits open under it. */
.make { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.make:hover { box-shadow: none; }
.make__cover { border-bottom: 0; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.2s; }
.make__cover.silk { overflow: hidden; }
.make:hover .make__cover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 12px 32px -18px rgba(0, 0, 0, 0.18); }
.make__text { padding: 14px 4px 10px; }
.make:hover .make__name { text-decoration: underline; text-underline-offset: 3px; }

/* Home: design projects as one small row. */
.makes.makes--4 { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.makes--4 .make__cover { aspect-ratio: 4 / 3; border-radius: 14px; }
.makes--4 .make__text { padding: 10px 2px 0; }
.makes--4 .make__name { font-size: 14px; }
.makes--4 .make__role { font-size: 13px; line-height: 1.35; }
.makes--4 .make__cover--win { padding: 12px 0 0 14px; }
/* Misc: cooking is one wide tile, a collage of plates cut out as circles plus three cut-out dishes. */
.makes.makes--1 { grid-template-columns: 1fr; }
.makes--1 .make__cover { aspect-ratio: 3 / 1; }
.plate { position: absolute; left: var(--l); top: var(--t); width: var(--w); aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 14px 22px -8px rgba(80, 40, 10, 0.4); transition: transform 0.5s var(--ease); }
.make__cover.silk.make__cover--food .plate img { position: absolute; max-width: none; height: auto; filter: none; mix-blend-mode: normal; }
.make:hover .plate { transform: scale(1.04); }
.makes--1 .food--pizza { width: 19%; left: 27%; top: 3%; }
.makes--1 .food--bread { width: 11%; left: 78%; right: auto; top: 22%; }
.makes--1 .food--steak { width: 21%; left: 44%; bottom: 4%; }
@media (max-width: 720px) {
  .makes.makes--4 { grid-template-columns: 1fr 1fr; }
  .makes--1 .make__cover { aspect-ratio: 16 / 10; }
  .makes--1 .food--pizza { width: 38%; left: 8%; top: 10%; }
  .makes--1 .food--bread { width: 22%; left: 62%; right: auto; top: 6%; }
  .makes--1 .food--steak { width: 40%; left: 34%; bottom: 6%; }
  .plate { left: var(--ml); top: var(--mt); width: var(--mw); }
  .plate--wide { display: none; }
}

/* ---------- Project groups (home) ----------
   Each project is one panel in its own gradient: the name and one-line pitch
   on top, then a bare browser window beside its numbers in white boxes. */
#projects .project { position: relative; isolation: isolate; overflow: hidden; margin-top: 28px; padding: 26px; border-radius: 28px; }
#projects .project:first-of-type { margin-top: 0; }
/* Panels and lists below the first screen are laid out and painted only as they come near the viewport. */
#projects .project, #work, #education { content-visibility: auto; contain-intrinsic-size: auto 640px; }
#work, #education { contain-intrinsic-size: auto 240px; }
/* The gradient holds still here: drifting a layer this large stalls the chart animations on phones. */
#projects .project.silk::before { animation: none; }
.project__top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 22px; }
.project__top .phead { margin: 0; flex: none; }
.project__lede { margin: 0; flex: 1 1 340px; font-size: 17px; line-height: 1.45; color: var(--ink-2); }
.project__lede b { color: var(--ink); font-weight: 650; }

#projects .pgrid { gap: 14px; }
#projects .shot { min-height: 0; padding: 0; background: none; box-shadow: none; overflow: visible; border-radius: 16px; }
#projects .shot.silk::before, #projects .shot.silk::after { display: none; }
#projects .shot__window { flex: 1; display: flex; flex-direction: column; width: 100%; height: auto; margin: 0; border-radius: 16px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 18px 40px -26px rgba(15, 23, 42, 0.4); }
#projects .shot__img { flex: 1; min-height: 0; }
/* The wide layout (shot on top, numbers below) crops the shot to a band. */
#projects .shot--wide .shot__window { flex: none; aspect-ratio: 5 / 2; }

#projects .pgrid .stack { gap: 14px; padding: 0; }
#projects .pgrid .stack > * + * { border-top: 0; }
#projects .pgrid :is(.metric, .repo) { background: rgba(255, 255, 255, 0.84); border-radius: 16px; padding: 18px 20px 16px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); }
#projects .pgrid--wide > .metric + .metric { border-left: 0; padding-left: 20px; }
#projects .pgrid a:is(.metric, .repo):hover { box-shadow: inset 0 0 0 1px var(--accent-soft), 0 12px 28px -18px rgba(0, 0, 0, 0.25); }

@media (max-width: 760px) {
  #projects .project { padding: 16px; border-radius: 22px; }
  #projects .shot--wide .shot__window { aspect-ratio: auto; }
  .project__lede { flex-basis: 100%; font-size: 16px; }
}

/* Misc and Cooking: blocks below the first screen are laid out, painted and have their images fetched only as they come near the viewport. */
#reading .reading, #music .pgrid, #music .wall, #kitchen .cat + .cat { content-visibility: auto; contain-intrinsic-size: auto 700px; }

/* The drafting marks hang 6px past the rails. Once the frame fills the screen that would make the page scroll sideways, so they are cut at its edge. */
@media (max-width: 1132px) { .frame { overflow-x: clip; } }

/* ---------- Home: drafting lines and wings ----------
   Every rule between sections runs to the edge of the window, and each project is ruled off from the
   next the same way. The lines and the rails cut the margins into cells, one on each side of a project:
   its wings. */
[data-page='home'] .frame > .section + .section { border-top: 0; }
[data-page='home'] .frame > .section + .section::before, .band::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; border: 0; pointer-events: none;
  /* A shadow is paint only, so the line can run edge to edge without widening the page. */
  background: var(--rule, var(--line)); box-shadow: 0 0 0 100vmax var(--rule, var(--line)); clip-path: inset(0 -100vmax);
}
[data-page='home'] .frame > .section + .section::after { top: -5px; }
#projects-section { padding-bottom: 0; }
#projects-section .lede { margin-bottom: 44px; }
.band { position: relative; padding: 44px 0; }
/* The same plus as the sections have, where a project's line crosses the rails. */
.band::after {
  --m: var(--faint);
  content: ''; position: absolute; top: -5px; left: calc(-6px - var(--gutter)); right: calc(-6px - var(--gutter)); height: 11px; pointer-events: none;
  background:
    linear-gradient(var(--m), var(--m)) left 5px top 0 / 1px 11px,
    linear-gradient(var(--m), var(--m)) left 0 top 5px / 11px 1px,
    linear-gradient(var(--m), var(--m)) right 5px top 0 / 1px 11px,
    linear-gradient(var(--m), var(--m)) right 0 top 5px / 11px 1px;
  background-repeat: no-repeat;
}
/* The strip of margin under each project: ruled like a band, and left empty from edge to edge. */
.band--gap { padding: 0; height: 72px; }
@media (max-width: 760px) { .band { padding: 22px 0; } .band--gap { padding: 0; height: 24px; } #projects-section .lede { margin-bottom: 28px; } }

/* Wings: pieces of each product's own interface in its margin cells (src/wings.js), drawn as grey
   outlines in the same hand as the drafting lines. Nothing about them reacts to the pointer.
   On a phone the only margin is the gutter beside a project, so each piece hangs off the screen
   and just its inner end shows. */
.wing {
  --ln: #cfcfcf;
  position: absolute; top: 0; bottom: 0; width: var(--gutter); pointer-events: none;
  font: 500 12px/1.35 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: 0; color: var(--faint);
}
.wing--l { right: 100%; }
.wing--r { left: 100%; }
.bit { position: absolute; top: var(--y); zoom: 0.8; }
.wing--l .bit { right: 5px; }
.wing--r .bit { left: 5px; }
/* Once the frame stops filling the window, the wings move out past the rails, and each piece is
   placed from the rail outward. Until the margin is as wide as a piece, the window's edge cuts it. */
@media (min-width: 1133px) {
  /* The window's edge cuts the wings; clipping the body as well keeps the page from being scrolled sideways to them. */
  html, [data-page='home'] { overflow-x: clip; }
  .wing { width: calc((100vw - var(--frame)) / 2); }
  .wing--l { right: calc(100% + var(--gutter)); }
  .wing--r { left: calc(100% + var(--gutter)); }
  .bit { zoom: 0.74; }
  .wing--l .bit { right: var(--x); }
  .wing--r .bit { left: var(--x); }
}
@media (min-width: 1520px) { .bit { zoom: 0.86; } }
@media (min-width: 1600px) { .bit { zoom: 1; } }
/* The handwriting and the serif are fetched only where a whole piece can be read. */
@font-face { font-family: 'Caveat'; font-weight: 600; font-display: swap; src: url(/fonts/caveat-600.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-display: swap; src: url(/fonts/instrument-serif.woff2) format('woff2'); }
.wing { --hand: cursive; --serif: Georgia, serif; }
@media (min-width: 1440px) { .wing { --hand: 'Caveat', cursive; --serif: 'Instrument Serif', Georgia, serif; } }
.wing b { font-weight: 650; }
.wing small { font-size: 10.5px; }
.wing i { font-style: normal; }
.wing img { filter: grayscale(1); opacity: 0.4; }

/* Shared: the outline every piece is drawn with, pills, the check, and what holds a scrap to the page. */
:is(.w-pill, .w-ok, .w-scrap, .w-sticky, .w-ask, .w-calls, .w-tile, .w-policy, .w-marker, .w-map, .w-stay, .w-step, .w-select, .w-match) { border: 1px solid var(--ln); }
.w-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.w-ok { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; }
.w-ok svg { width: 11px; height: 11px; }
.pin { position: absolute; z-index: 1; border: 1px solid var(--ln); background: #fff; }
.pin--tack { top: 5px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; }
.pin--tape { width: 52px; height: 16px; }
.pin--tl { top: -3px; left: -24px; rotate: -42deg; }
.pin--tr { top: -3px; right: -24px; rotate: 42deg; }
.pin--br { bottom: -3px; right: -24px; rotate: -42deg; }

/* pencil.nu: paper scraps, as pinned around its own home page. */
.w-scrap { position: relative; padding: 8px 9px; border-radius: 4px; }
.w-scrap--hung { padding-top: 24px; }
.w-kpi { display: flex; flex-direction: column; gap: 4px; min-width: 96px; }
.w-kpi span b { display: inline-block; padding: 0 7px; border: 1px solid var(--ln); border-radius: 6px; font-size: 20px; }
.w-sticky { width: 98px; height: 96px; padding: 12px 10px; font: 600 17px/1.12 var(--hand); }
.w-course { display: flex; flex-direction: column; gap: 1px; width: 150px; }
.w-course > b { font-size: 11px; }
.w-course > span { font-size: 10.5px; white-space: nowrap; }
.w-course small { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--ln); font-size: 10px; }
.w-ticket { position: relative; display: grid; gap: 2px; padding: 9px 20px; border: 1px dashed var(--ln); }
.w-ticket span { font-size: 8px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.w-ticket b { font-size: 12px; white-space: nowrap; }

/* AnyAPI: a question, the calls it ran, and the platforms they reach. */
.w-ask { width: 164px; padding: 10px 13px; border-radius: 14px 14px 4px 14px; font-size: 12.5px; line-height: 1.4; }
.w-ask img { display: inline; width: 14px; height: 14px; margin: 0 1px; vertical-align: -2px; }
.w-calls { width: 176px; padding: 4px 10px; border-radius: 10px; font: 9.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.w-calls > div { display: flex; justify-content: space-between; gap: 6px; padding: 6px 0; white-space: nowrap; }
.w-calls > div + div { border-top: 1px solid var(--ln); }
.w-calls__head b { font: 600 11px/1.3 ui-sans-serif, system-ui, -apple-system, sans-serif; }
.w-tile { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; }
.w-tile img { width: 25px; height: 25px; }

/* HotelsAllow: a verified policy with its source, the marker, the map count, the search pill. */
.w-policy { width: 172px; padding: 12px 13px 10px; border-radius: 12px; }
.w-policy__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.w-policy__head b { font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.w-policy__where { margin-top: 3px; font-size: 8.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.w-policy p { margin: 8px 0; font: italic 11px/1.4 Georgia, 'Times New Roman', serif; }
.w-policy__foot { padding-top: 7px; border-top: 1px solid var(--ln); font: 9px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.w-marker { padding: 0 12px 3px; border-radius: 7px; font-size: 36px; font-weight: 800; letter-spacing: -0.045em; line-height: 1.1; }
/* The map's roads are the same hairline, crossing behind the pins. */
.w-map {
  position: relative; width: 164px; height: 116px; border-radius: 12px; overflow: hidden;
  background:
    linear-gradient(118deg, transparent calc(48% - 0.5px), var(--ln) calc(48% - 0.5px) calc(48% + 0.5px), transparent calc(48% + 0.5px)),
    linear-gradient(24deg, transparent calc(61% - 0.5px), var(--ln) calc(61% - 0.5px) calc(61% + 0.5px), transparent calc(61% + 0.5px)),
    linear-gradient(90deg, transparent 31%, var(--ln) 31% calc(31% + 1px), transparent calc(31% + 1px));
}
.w-map > i { position: absolute; width: 9px; height: 9px; border: 1px solid var(--faint); border-radius: 50%; background: #fff; }
.w-map__count { position: absolute; top: 8px; left: 8px; padding: 4px 9px; border: 1px solid var(--ln); border-radius: 999px; background: #fff; font-size: 8.5px; font-weight: 600; white-space: nowrap; }
.w-stay { display: flex; align-items: center; height: 36px; padding: 0 5px 0 14px; border-radius: 999px; font-size: 11px; }
.w-stay span { padding-right: 22px; font-weight: 800; }
.w-stay b { display: grid; place-items: center; height: 26px; padding: 0 13px; border: 1px solid var(--ln); border-radius: 999px; font-weight: 700; }

/* transfertogatech: its first step, and the course matches it produces. */
.w-step { width: 166px; padding: 13px 14px 14px; border-radius: 14px; }
.w-step__n { display: grid; place-items: center; width: 22px; height: 22px; margin-bottom: 9px; border: 1px solid var(--ln); border-radius: 50%; font-size: 11px; font-weight: 700; }
.w-step b { display: block; font: 400 18px/1.12 var(--serif); }
.w-step p { margin: 5px 0 0; font-size: 10.5px; line-height: 1.45; }
.w-select { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 158px; height: 36px; padding: 0 11px; border-radius: 9px; font-size: 11.5px; }
.w-select svg { width: 13px; height: 13px; }
.w-match { width: 166px; padding: 4px 12px; border-radius: 12px; font: 10.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.w-match > div { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.w-match > div + div { border-top: 1px solid var(--ln); }
.w-match span::after { content: '→'; margin-left: 9px; }
.w-match b { font-weight: 600; }

/* ---------- Wings: the bench and the notebook ----------
   The margin reads as a measured work surface. Each project's rails carry a ruler (in CSS px down
   from its drafting line), the line itself carries one in each wing (px out from the rail), and a
   dot grid on the same 16px pitch fades out from the rail. */
.bench { position: absolute; pointer-events: none; font: 500 8.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; letter-spacing: 0.02em; color: #b8b8b8; white-space: nowrap; }
/* Pieces sit on the bench: white, so the grid stops at their outline. */
.wing .bit > :not(.pin) { background-color: #fff; }
.bench-ry { top: 0; bottom: 0; width: 7px; -webkit-mask: linear-gradient(transparent 0 4px, #000 4px); mask: linear-gradient(transparent 0 4px, #000 4px); }
.bench-ry--l { left: calc(-1 * var(--gutter)); background:
    linear-gradient(#d4d4d4 1px, transparent 1px) left 0 top 0 / 6px 40px repeat-y, linear-gradient(#e3e3e3 1px, transparent 1px) left 0 top 0 / 3px 8px repeat-y; }
.bench-ry--r { right: calc(-1 * var(--gutter)); background:
    linear-gradient(#d4d4d4 1px, transparent 1px) right 0 top 0 / 6px 40px repeat-y, linear-gradient(#e3e3e3 1px, transparent 1px) right 0 top 0 / 3px 8px repeat-y; }
/* The rail's numbers are one column of text, a line every 80px; the band cuts it off at its own height. */
.bench-ny { top: 0; bottom: 0; overflow: hidden; padding-top: 40px; line-height: 80px; white-space: pre;
  -webkit-mask: linear-gradient(to top, transparent 0 6px, #000 22px); mask: linear-gradient(to top, transparent 0 6px, #000 22px); }
.bench-ny--l { left: calc(9px - var(--gutter)); }
.bench-ny--r { right: calc(9px - var(--gutter)); text-align: right; }
.bench-rx { top: 0; height: 7px; left: 0; right: 0; }
.wing--l .bench-rx { background:
    linear-gradient(to left, #d4d4d4 1px, transparent 1px) right 0 top 0 / 40px 6px repeat-x, linear-gradient(to left, #e3e3e3 1px, transparent 1px) right 0 top 0 / 8px 3px repeat-x; }
.wing--r .bench-rx { background:
    linear-gradient(to right, #d4d4d4 1px, transparent 1px) left 0 top 0 / 40px 6px repeat-x, linear-gradient(to right, #e3e3e3 1px, transparent 1px) left 0 top 0 / 8px 3px repeat-x; }
.bench-nx { inset: 0; }
.bench-n { position: absolute; top: 10px; }
.wing--l .bench-n { right: var(--at); translate: 50% 0; }
.wing--r .bench-n { left: var(--at); translate: -50% 0; }
.bench-grid { top: 8px; bottom: 0; background-image: radial-gradient(circle, #e3e3e3 0.75px, transparent 1.15px); background-size: 16px 16px; }
.wing--l .bench-grid { left: 0; right: 8px; background-position: right 0 top 0;
  -webkit-mask: linear-gradient(to left, #000 0, transparent 260px); mask: linear-gradient(to left, #000 0, transparent 260px); }
.wing--r .bench-grid { right: 0; left: 8px; background-position: left 0 top 0;
  -webkit-mask: linear-gradient(to right, #000 0, transparent 260px); mask: linear-gradient(to right, #000 0, transparent 260px); }
.wing--l :is(.bench-rx, .bench-nx) { -webkit-mask: linear-gradient(to left, #000 0 200px, transparent 360px); mask: linear-gradient(to left, #000 0 200px, transparent 360px); }
.wing--r :is(.bench-rx, .bench-nx) { -webkit-mask: linear-gradient(to right, #000 0 200px, transparent 360px); mask: linear-gradient(to right, #000 0 200px, transparent 360px); }
/* Until the frame stops filling the window the wings are only the gutter: no bench there. */
@media (max-width: 1132px) { .bench { display: none; } }

/* The pencil line. Only the outlines waver: each piece's border is redrawn on a layer of its own and
   the filter goes on that, so the small type inside stays crisp. */
.wing { --ln: #c2c2c2; }
:is(.w-pill, .w-scrap, .w-sticky, .w-ask, .w-calls, .w-tile, .w-policy, .w-marker, .w-map, .w-stay, .w-step, .w-select, .w-match, .w-ticket) { position: relative; border-color: transparent; }
.w-map { overflow: visible; }
:is(.w-pill, .w-scrap, .w-sticky, .w-ask, .w-calls, .w-tile, .w-policy, .w-marker, .w-map, .w-stay, .w-step, .w-select, .w-match, .w-ticket)::before {
  content: ''; position: absolute; inset: -1px; z-index: 1; pointer-events: none;
  border-width: 1px; border-style: inherit; border-color: var(--ln); border-radius: inherit; filter: url(#nb-pencil);
}
:is(.pin, .w-ok) { filter: url(#nb-pencil); }
.w-tile img { filter: url(#nb-pencil) grayscale(1); }
/* Handwritten notes, each hung off the piece it explains. */
.nb-note {
  position: absolute; z-index: 2; width: max-content; pointer-events: none;
  font: 600 19px/1.02 'Caveat', cursive; color: #959595; letter-spacing: 0; text-align: left;
  rotate: var(--r, 0deg);
}
.nb-note svg { position: absolute; overflow: visible; fill: none; stroke: #ababab; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; filter: url(#nb-pencil); }
.nb-arrow { left: 0; top: 0; }
.nb-note .nb-under { display: block; position: static; margin-top: -1px; }
.nb-x { position: relative; text-decoration: none; color: #b4b4b4; }
.nb-x::after { content: ''; position: absolute; left: -3px; right: -3px; top: 52%; height: 1.3px; background: #ababab; rotate: -3deg; }
/* Notes are read only where the margin holds them whole; below that the cut pieces stand alone. */
@media (max-width: 1519px) { .nb-note { display: none; } }
