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

@view-transition { navigation: auto; }

: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', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
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%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(14, 165, 233, 0.18); }

/* ---------- 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; }
.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: 64px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.nav__brand img { width: 28px; height: 28px; border-radius: 9px; object-fit: cover; }
.nav__links { display: flex; align-items: center; gap: 6px; }

.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 h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 54px); line-height: 1.04;
  font-weight: 600; letter-spacing: -0.035em;
}
.hero h1 .soft { color: var(--faint); }
.hero__intro { margin: 0; font-size: 18px; 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 { font-size: 14px; font-weight: 600; color: var(--muted); padding-top: 4px; }
.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 { 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: 480px; 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; }

/* 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; }
.silk::after {
  opacity: 0.35; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
}
.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: #fbf3cf; }
.silk--paper::before {
  background:
    radial-gradient(60% 55% at 15% 15%, #fef08a 0%, transparent 70%),
    radial-gradient(55% 60% at 90% 30%, #d9f99d 0%, transparent 70%),
    radial-gradient(70% 60% at 50% 110%, #fde68a 0%, transparent 70%),
    linear-gradient(160deg, #fffbe6, #fef9c3);
  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__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: #1f4fe0; --accent-soft: #c9d6fb; --accent-ink: #1a3fb8; --tint: #f4f7ff; --tint-line: rgba(31, 79, 224, 0.12); }
[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: #d6457a; --accent-soft: #f3d98a; --accent-ink: #2b2118; --tint: #fffbea; --tint-line: rgba(176, 140, 30, 0.2); }
[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); }

/* ---------- 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; }

/* ---------- 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; }
}

/* Beyond software: design and cooking */
.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); }
.make__cover--food { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; background: #fff; }
.make__cover--food img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.make__cover--food img:first-child { grid-row: span 2; }
.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; }
.figs { display: grid; gap: 12px; margin-top: 22px; }
.figs--2 { grid-template-columns: 1fr 1fr; }
.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: a 3-column grid of 3:4 tiles; the first spans two columns. */
.dishes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dish { position: relative; margin: 0; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.dish--wide { grid-column: span 2; aspect-ratio: auto; }
.dish img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.dish:hover img { transform: scale(1.03); }

.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.52s; animation-timing-function: var(--ease); }
/* Shared elements: swap the old and new pictures quickly so text never ghosts mid-flight. */
::view-transition-old(*) { animation: 0.1s 0.2s linear both vt-fade-out; mix-blend-mode: normal; height: 100%; object-fit: cover; object-position: top left; }
::view-transition-new(*) { animation: 0.2s ease-out both vt-fade-in; mix-blend-mode: normal; height: 100%; object-fit: cover; object-position: top left; }
/* The page itself: the old page clears out, the new one builds itself in (see .hydrate). */
::view-transition-old(root) { animation: 0.16s 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; }
  .reach__row { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .reach__label { grid-column: 1 / -1; }
  .work li { grid-template-columns: 40px 1fr; }
  .makes, .figs--2 { grid-template-columns: 1fr; }
  .dishes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dish--wide, .dish:last-child { grid-column: span 2; aspect-ratio: 4 / 3; }
  .work__time { grid-column: 2; }
}
