/* ==========================================================================
   Bob Kelly — Portfolio
   Direction: "Ink & Paper" — print-bred, pixel-fluent.
   Edit the tokens below to re-skin the whole site.
   ========================================================================== */

:root {
  /* Colour */
  --ink: #121110;
  --ink-2: #1c1a18;
  --ink-3: #2a2724;
  --paper: #f4efe7;
  --paper-2: #e9e2d6;
  --white: #fffdf9;
  --accent: #6ea8ff;        /* cool blue — on dark (8:1 on ink) */
  --accent-deep: #1d4ed8;   /* cool blue — text on paper (5.9:1 on paper) */
  --mute-ink: #a59e92;      /* secondary text on dark */
  --mute-paper: #6a635a;    /* secondary text on paper */
  --line-ink: rgba(244, 239, 231, 0.14);
  --line-paper: rgba(18, 17, 16, 0.14);

  /* Type */
  --serif: "Playfair Display", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* Layout */
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1320px;
  --radius: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; } /* the floating nav is ~76px tall: keeps anchor jumps and keyboard focus from landing underneath it (WCAG 2.4.11) */
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums; /* Playfair defaults to old-style figures; keep numbers full height */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
/* On cream sections the light blue ring is too faint (needs 3:1), so use the deep blue there */
.on-paper :focus-visible, .on-paper-2 :focus-visible { outline-color: var(--accent-deep); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--ink); padding: 10px 16px; border-radius: 8px;
  font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Type helpers ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.display em { font-style: italic; }
/* Playfair's f and i sit too tight at headline size once the tracking is pulled in. This adds room after the f. */
.display .fi { letter-spacing: 0.06em; }
.dot { color: var(--accent); }
.on-paper .dot, .on-paper-2 .dot { color: var(--accent-deep); }

.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute-ink);
}
.on-paper .label, .on-paper-2 .label { color: var(--mute-paper); }
.label b { color: var(--accent); font-weight: 500; }
.on-paper .label b, .on-paper-2 .label b { color: var(--accent-deep); }

.lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; }
.mute { color: var(--mute-ink); }
.on-paper .mute, .on-paper-2 .mute { color: var(--mute-paper); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 150px); position: relative; }
.on-paper { background: var(--paper); color: var(--ink); }
.on-paper-2 { background: var(--paper-2); color: var(--ink); }
.on-ink-2 { background: var(--ink-2); }

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 28px;
  margin-bottom: clamp(32px, 5vw, 64px);
  border-bottom: 1px solid var(--line-ink);
}
.on-paper .section-head, .on-paper-2 .section-head { border-color: var(--line-paper); }
.section-head h2 { font-size: clamp(44px, 7vw, 104px); }
.section-head .label { padding-bottom: 12px; text-align: right; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500; line-height: 1;
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
  white-space: nowrap;
}
.btn .arr { display: inline-block; transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translate(3px, -3px); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--paper); }
.btn-ghost { border-color: var(--line-ink); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); }
.on-paper .btn-ghost, .on-paper-2 .btn-ghost { border-color: var(--line-paper); color: var(--ink); }
.on-paper .btn-ghost:hover, .on-paper-2 .btn-ghost:hover { border-color: var(--ink); }

.link-u {
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.3s var(--ease), color 0.2s;
}
.link-u:hover { color: var(--accent); background-size: 0 1px; background-position: 100% 100%; }
.on-paper .link-u:hover, .on-paper-2 .link-u:hover { color: var(--accent-deep); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 100;
  top: 16px; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--gutter) + 24px), calc(var(--max) - 2 * var(--gutter) + 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: rgba(24, 22, 20, 0.93); /* nearly solid, so it stays a clean dark pill over cream sections too */
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  color: var(--paper);
  transition: transform 0.4s var(--ease);
}
.nav.hide { transform: translate(-50%, -140%); }
.nav:focus-within { transform: translateX(-50%); } /* never hide the nav while something in it has focus */
.brand { font-family: var(--serif); font-size: 26px; line-height: 1; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 10px 16px; border-radius: 999px; font-size: 15px; color: var(--mute-ink);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--paper); background: rgba(244, 239, 231, 0.08); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav .btn { padding: 12px 18px; }
/* "Let's connect": a quiet outline with a blue dot while the page's opening section is on screen,
   so it doesn't compete with the buttons there. Once that section scrolls away (main.js adds .cta-on)
   it fills in solid blue and becomes the one blue action on screen. */
.nav .btn-accent { background: transparent; color: var(--paper); border-color: rgba(244, 239, 231, 0.32); }
.nav .btn-accent::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transition: background 0.25s var(--ease); }
.nav .btn-accent:hover { background: rgba(244, 239, 231, 0.08); border-color: var(--paper); }
.nav.cta-on .btn-accent { background: var(--accent); color: var(--ink); border-color: transparent; }
.nav.cta-on .btn-accent::before { background: var(--ink); }
.nav.cta-on .btn-accent:hover { background: var(--paper); }
.menu-btn { display: none; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line-ink); font-size: 15px; }

.menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 110px var(--gutter) 40px;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.menu.open { opacity: 1; visibility: visible; }
.menu a.big { font-family: var(--serif); font-size: clamp(52px, 15vw, 96px); line-height: 1.05; display: block; }
.menu a.big:hover { color: var(--accent); }
.menu .menu-foot { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-ink); display: flex; justify-content: space-between; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: 140px; padding-bottom: clamp(28px, 4vw, 56px);
  position: relative; overflow: hidden;
}
.hero > .wrap { position: relative; z-index: 1; }

/* Hero background: slow, soft organic forms in the site's own cream-on-ink tones.
   Tune here: --form-strength (visibility), blur (softness), durations (speed). */
.hero-bg {
  --form-strength: 1;
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 50%, transparent 88%);
  mask-image: linear-gradient(#000 50%, transparent 88%);
}
.hero-bg .form {
  position: absolute; display: block;
  border-radius: 42% 58% 63% 37% / 45% 38% 62% 55%;
  background: radial-gradient(circle at 34% 32%, rgba(244, 239, 231, 0.16), rgba(244, 239, 231, 0.05) 55%, rgba(244, 239, 231, 0) 78%);
  opacity: var(--form-strength);
  filter: blur(26px);
  will-change: transform;
  animation: drift var(--t, 48s) ease-in-out infinite alternate;
}
.hero-bg .f1 { width: 58vmax; height: 50vmax; right: -12vmax; top: -16vmax; --t: 52s; --r: 38deg; --x: -7vmax; --y: 5vmax; }
.hero-bg .f2 { width: 40vmax; height: 46vmax; right: 14vmax; top: 6vmax; --t: 41s; --r: -52deg; --x: 6vmax; --y: -4vmax; filter: blur(16px); border-radius: 61% 39% 44% 56% / 38% 57% 43% 62%; }
.hero-bg .f3 { width: 34vmax; height: 30vmax; left: -8vmax; top: 4vmax; --t: 63s; --r: 70deg; --x: 9vmax; --y: 6vmax; filter: blur(40px); }
.hero-bg .f4 { width: 22vmax; height: 26vmax; right: 2vmax; top: 20vmax; --t: 35s; --r: -80deg; --x: -8vmax; --y: -6vmax; filter: blur(10px); border-radius: 36% 64% 55% 45% / 58% 41% 59% 42%;
  background: radial-gradient(circle at 60% 40%, rgba(244, 239, 231, 0.11), rgba(244, 239, 231, 0) 72%); }
@keyframes drift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
  50%  { transform: translate(calc(var(--x) * 0.6), calc(var(--y) * 1.1)) rotate(calc(var(--r) * 0.55)) scale(1.12, 0.92); }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(0.94, 1.1); }
}
.hero-bg .grain {
  position: absolute; inset: 0; opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Pause control for the ticker + hero background (WCAG 2.2.2) */
/* Icon-only is fine for accessibility because the button carries an aria-label + tooltip.
   It sits at the right edge of the hero, centred on the last headline line ("effortless."). */
.hero { --h1: clamp(46px, 15vw, 208px); }
.hero-head { position: relative; }
.motion-toggle {
  position: absolute; right: 0; bottom: calc(var(--h1) * 0.17); /* = the headline's baseline, so the circle sits on it */
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--paper); border: 1px solid var(--mute-ink);
  transition: background 0.2s, color 0.2s;
}
/* Bob's call (Nov 2026): no visible pause button. It stays in the page for keyboard and screen-reader users,
   invisible until it is tabbed to. Motion still switches off for anyone with reduced-motion set, and the
   ticker still pauses on hover. To bring the visible button back, delete the next two rules. */
.motion-toggle { opacity: 0; pointer-events: none; }
.motion-toggle:focus-visible { opacity: 1; pointer-events: auto; }
.motion-toggle svg { fill: currentColor; display: block; }
.motion-toggle .ico-play { display: none; }
.motion-paused .motion-toggle .ico-pause { display: none; }
.motion-paused .motion-toggle .ico-play { display: block; }
.motion-toggle:hover { background: var(--paper); color: var(--ink); }
.motion-paused .marquee-track, .motion-paused .hero-bg .form { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .motion-toggle { display: none; } }

.hero-slug { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(24px, 4vw, 48px); }
.hero h1 { font-size: var(--h1); margin-left: -0.04em; line-height: 1; } /* Playfair needs a little more room between lines */
/* Each line sits in a mask box for the rise-in animation. The box reaches 0.3em below the baseline so Playfair's
   descenders (the g in "Making", the p in "complex", the italic f's) are never cut off; the matching negative
   margin keeps the layout exactly where it was. */
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.3em; margin-bottom: -0.3em; }
.hero h1 .line > span { display: inline-block; }
.js .hero h1 .line > span { transform: translateY(150%); animation: rise 1s var(--ease) forwards; } /* starts far enough down to stay hidden inside the taller mask */
.js .hero h1 .line:nth-child(2) > span { animation-delay: 0.09s; }
.js .hero h1 .line:nth-child(3) > span { animation-delay: 0.18s; }
@keyframes rise { to { transform: none; } }

.hero-foot {
  margin-top: calc(clamp(32px, 5vw, 64px) + 20px);
  padding-top: 28px;
  border-top: 1px solid var(--line-ink);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 6vw, 96px); align-items: end;
}
.stats { display: flex; gap: clamp(24px, 4vw, 64px); flex-wrap: wrap; }
.stat .num { font-family: var(--serif); font-size: clamp(44px, 5.4vw, 80px); line-height: 1; letter-spacing: -0.02em; }
.stat .num sup { font-size: 0.5em; color: var(--accent); vertical-align: top; position: relative; top: 0.12em; margin-left: 2px; }
.stat .label { margin-top: 10px; display: block; line-height: 1.5; white-space: nowrap; } /* each label is set as exactly two lines (see the <br> in the markup) */
.hero-intro p { max-width: 46ch; text-wrap: balance; } /* balance: the browser evens out the line lengths so the right edge rags cleanly */
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* Desktop + tablet: hero and logo ticker share the first screen.
   The hero stops one ticker-height short of the viewport, and the headline
   scales with viewport height so everything still fits on short laptop screens. */
@media (min-width: 721px) {
  .hero {
    --ticker-h: 109px;
    /* Space above the logo ticker flexes with screen height: 66px on tall screens,
       down to 24px on short laptops, so the headline keeps its size and nothing clips. */
    --gap: clamp(24px, calc(12svh - 54px), 66px);
    /* Headline: scales with the width (14vw, up to 184px), unless the screen is too short for that. */
    --h1: clamp(48px, min(14vw, calc(33.3svh - 173px - var(--gap) * 0.333)), 184px);
    /* On tall, narrow screens the headline is limited by width, which used to leave a big empty band
       under the nav. So the hero is never taller than its own content plus a small margin (--natural):
       the text stays close to the nav and the ticker simply follows it up the page. */
    --natural: calc(var(--h1) * 3 + 424px + var(--gap));
    min-height: calc(100svh - var(--ticker-h));
    /* 40px under the nav; only the very shortest windows tighten that to 16px */
    padding-top: clamp(92px, calc(92px + (100svh - 650px) * 0.4), 116px); padding-bottom: var(--gap);
  }
  .stats { flex-wrap: nowrap; gap: clamp(22px, 3.6vw, 64px); } /* three stats always share one row here, so the hero height stays predictable */
  .hero-slug { margin-bottom: 18px; }
  /* The headline hangs from the top (close to the nav) and the stats row sits at the bottom (flush above the
     ticker). Any spare height on tall screens opens up between them, never above the text or below the ticker. */
  .hero > .wrap { flex: 1; display: flex; flex-direction: column; }
  .hero-head { margin-bottom: 42px; } /* minimum space so the italic f's clear the line */
  .hero-foot { margin-top: auto; padding-top: 20px; }
  .hero-cta { margin-top: 18px; }
}

/* The hero fills the screen (ticker flush at the bottom) as long as that opens no more than about 160px
   in the middle. On very tall, narrow screens it stops there and the ticker follows it up instead. */
@media (min-width: 721px) {
  .hero { min-height: min(calc(100svh - var(--ticker-h)), calc(var(--natural) + 160px)); }
}
@media (min-width: 721px) and (max-width: 960px) {
  .hero { padding-top: 116px; } /* single-column hero: keep a clear 40px under the nav */
}

/* ---------- Client marquee ---------- */
.clients { padding-block: 28px; border-bottom: 1px solid var(--line-paper); overflow: hidden; }
.clients-row { display: flex; align-items: center; gap: 32px; }
.clients .label { flex: none; }
.marquee { overflow: hidden; flex: 1; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 72px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee img { height: 30px; width: auto; max-width: 170px; object-fit: contain; mix-blend-mode: multiply; opacity: 0.75; filter: grayscale(1); }
.marquee img.tall { height: 52px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Work grid ---------- */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(36px, 4vw, 64px) clamp(16px, 2.4vw, 32px); }
.card { grid-column: span 6; display: block; }
.card:nth-child(4n + 1) { grid-column: span 7; }
.card:nth-child(4n + 2) { grid-column: span 5; }
.card:nth-child(4n + 3) { grid-column: span 5; }
.card:nth-child(4n + 4) { grid-column: span 7; }
.card:last-child:nth-child(odd) { grid-column: span 12; }
.card-media {
  position: relative; overflow: hidden;
  height: clamp(260px, 36vw, 520px);
  border-radius: var(--radius);
  background: var(--tint, var(--paper-2));
}
.card-media img {
  position: absolute; left: 50%; top: 13%;
  width: min(56%, 360px); height: auto;
  transform: translateX(-50%);
  box-shadow: 0 30px 60px -20px rgba(18, 17, 16, 0.45), 0 2px 6px rgba(18, 17, 16, 0.12);
  border-radius: 3px;
  transition: transform 0.7s var(--ease);
  background: #fff;
}
.card-media.wide img { width: min(78%, 560px); top: 20%; }
.card:hover .card-media img { transform: translateX(-50%) translateY(-5%) scale(1.02); }
.card-media .view {
  position: absolute; right: 14px; bottom: 14px;
  background: var(--accent-deep); color: var(--white);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 9px 13px; border-radius: 999px;
  opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s var(--ease);
}
.card:hover .view, .card:focus-visible .view { opacity: 1; transform: none; }
.card-meta { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: baseline; padding-top: 16px; }
.card-meta .n { font-family: var(--mono); font-size: 12px; color: var(--accent-deep); }
.card-meta h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; letter-spacing: -0.01em; }
.card-meta .tags { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute-paper); text-align: right; }

.card-media .badge {
  position: absolute; left: 14px; top: 14px;
  background: var(--accent-deep); color: var(--white);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 999px;
}

/* ---------- Halftone: the site's print signature ----------
   A 45° dot screen, the way a press builds a tint. It sits behind every piece of work
   (cards and case-study panels) and over the portrait. Tune: dot size / spacing / strength. */
.card-media::before, .study-fig::before, .video-fig::before, .portrait::after, .tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(18, 17, 16, var(--ht, 0.27)) 1.3px, transparent 1.8px),
    radial-gradient(circle, rgba(18, 17, 16, var(--ht, 0.27)) 1.3px, transparent 1.8px);
  background-size: 9px 9px; background-position: -4.5px -4.5px, 0 0; /* dots are centred in their tile, so shift by half a tile: the screen then runs right to the panel's edge */
}
/* Behind the work: the screen fades in from the bottom-left corner of the tinted panel */
.card-media::before, .study-fig::before, .video-fig::before {
  -webkit-mask-image: linear-gradient(to top right, #000, transparent 60%);
  mask-image: linear-gradient(to top right, #000, transparent 60%);
}
.study-fig { position: relative; }
.study-shot { position: relative; }
/* Over the portrait: a finer screen, like a newspaper photo */
.portrait::after, .tile::after { --ht: 0.38; background-size: 5px 5px; background-position: 0 0, 2.5px 2.5px; mix-blend-mode: multiply; }
/* Collage photos: same screen, turned down so the photos read as photos (portrait keeps the full 0.38) */
.tile::after { --ht: 0.17; }

/* ---------- Work index (everything that isn't a featured card) ---------- */
.work-index:empty { display: none; }
.work-index { margin-top: clamp(56px, 7vw, 104px); }
.work-index-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.work-index-head h3 { font-weight: 400; color: var(--ink); }
.work-index .row {
  display: grid; grid-template-columns: 28px 72px 1fr auto 20px; gap: clamp(14px, 2vw, 28px); align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line-paper);
  transition: padding 0.35s var(--ease), color 0.2s;
}
.work-index .row:hover { padding-left: 12px; color: var(--accent-deep); }
.work-index .n { font-family: var(--mono); font-size: 12px; color: var(--accent-deep); }
.work-index .thumb { width: 72px; height: 56px; border-radius: 6px; background: var(--tint, var(--paper-2)); display: grid; place-items: center; overflow: hidden; }
.work-index .thumb img { width: auto; height: auto; max-width: 62%; max-height: 78%; border-radius: 1px; box-shadow: 0 4px 10px -4px rgba(18, 17, 16, 0.45); background: #fff; }
.work-index .info { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 24px; flex-wrap: wrap; min-width: 0; }
.work-index .t { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; letter-spacing: -0.01em; }
.work-index .tags, .work-index .when { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute-paper); }
.work-index .when { min-width: 13ch; text-align: right; }
.work-index .arr { transition: transform 0.25s var(--ease); }
.work-index .row:hover .arr { transform: translate(3px, -3px); }

/* ---------- Chapters (about teaser) ---------- */
.about-top { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 6vw, 96px); align-items: start; }
.portrait { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--ink-3); aspect-ratio: 1 / 1.02; }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.about-top h2 { font-size: clamp(36px, 4.6vw, 68px); line-height: 1.02; margin-bottom: 28px; }
.about-top p + p { margin-top: 1em; }
.chapters { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line-ink); }
.chapter { padding: 28px 28px 0 0; }
.chapter + .chapter { padding-left: 28px; border-left: 1px solid var(--line-ink); }
.chapter h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; margin: 14px 0 12px; }
.chapter p { color: var(--mute-ink); font-size: 16px; }

/* ---------- Capabilities ---------- */
.caps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 48px); }
.cap h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line-paper); }
.cap li { padding: 5px 0; font-size: 16px; }

/* ---------- Testimonials ---------- */
.voices { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.voice { background: var(--white); border-radius: var(--radius); padding: clamp(24px, 2.6vw, 36px); display: flex; flex-direction: column; gap: 20px; border: 1px solid var(--line-paper); }
.voice .pull { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.12; letter-spacing: -0.01em; }
.voice .pull::before { content: "\201C"; color: var(--accent-deep); }
.voice .pull::after { content: "\201D"; color: var(--accent-deep); }
.voice details { font-size: 15px; color: var(--mute-paper); }
.voice summary { cursor: pointer; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); list-style: none; }
.voice summary::-webkit-details-marker { display: none; }
.voice summary::after { content: " +"; color: var(--accent-deep); }
.voice details[open] summary::after { content: " \2212"; }
.voice details p { margin-top: 12px; }
.voice .who { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-paper); }
.voice .who strong { display: block; font-weight: 600; }
.voice .who span { font-size: 14px; color: var(--mute-paper); }

/* ---------- Good fit ---------- */
/* Two columns: the "yes" side is a cream card so it carries the weight; the "no" side is outline only. */
.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 28px); }
.fit-col { border-radius: var(--radius); padding: clamp(24px, 3vw, 44px); border: 1px solid var(--line-ink); }
.fit-col.on-paper { border-color: transparent; }
.fit-col h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.05; letter-spacing: -0.01em; margin: 14px 0 clamp(20px, 2.4vw, 32px); text-wrap: balance; } /* balance keeps "if…" from sitting alone on its own line */
.fit-list li { display: grid; grid-template-columns: 28px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line-ink); }
.fit-list li:last-child { padding-bottom: 0; }
.on-paper .fit-list li { border-color: var(--line-paper); }
.fit-list strong { display: block; font-weight: 600; line-height: 1.4; }
.fit-list p { font-size: 16px; margin-top: 4px; text-wrap: pretty; } /* avoids a single word alone on the last line */
.fit-mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--mute-ink); color: var(--mute-ink); }
.on-paper .fit-mark { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--white); }
.fit-foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: clamp(32px, 4vw, 56px); padding-top: 28px; border-top: 1px solid var(--line-ink); }
.fit-foot p { max-width: 44ch; }
.fit-foot .keep { display: inline-block; } /* the last sentence wraps as one piece, so it starts its own line instead of splitting after "I'll give you" */

/* ---------- Contact / footer ---------- */
.contact { padding-top: clamp(80px, 12vw, 180px); padding-bottom: 0; overflow: hidden; }
.contact h2 { font-size: clamp(44px, 7.8vw, 104px); margin-left: -0.03em; text-wrap: balance; } /* kept well under the hero headline (184px) so the opening statement stays the loudest type on the page */
.contact h2 em { color: var(--accent); }
.contact h2 .ln { display: block; text-wrap: balance; } /* two set lines: "Ready to build" / "something great together?" */
.contact-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-top: clamp(32px, 5vw, 64px); }
.contact-row p { max-width: 58ch; }
.contact-row .nb { display: inline-block; } /* the last sentence wraps as one piece, so it always starts the second line */
/* Footer contact: the address itself is the link (set in the display serif), with a round LinkedIn icon beside it */
/* The icons sit level with the bottom of the paragraph's last line. 4px lifts the circles' bottom edge
   from the line box to the bottom of the letters. The "copied" label hangs below without taking up space. */
.contact-links { position: relative; display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 4px; }
.email-line { display: flex; align-items: center; gap: clamp(14px, 2vw, 22px); flex-wrap: wrap; }
/* Round icon buttons (email, LinkedIn): 47px, 10% smaller than the first version (52px) */
.icon-btn {
  flex: none; width: 47px; height: 47px; border-radius: 50%; display: grid; place-items: center;
  color: var(--paper); border: 1px solid rgba(244, 239, 231, 0.32);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.icon-btn[hidden] { display: none; }
.hero-icons { display: flex; gap: 12px; margin-top: 32px; } /* résumé page: PDF + LinkedIn */
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.icon-btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
/* "Email address copied" confirmation: space is always reserved so nothing jumps when it appears */
.copy-hint { position: absolute; left: 0; top: calc(100% + 10px); margin: 0; white-space: nowrap; opacity: 0; transition: opacity 0.2s; }
.copy-hint.show { opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.contact .btn { padding: 18px 28px; font-size: 16px; }
.footer { margin-top: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line-ink); padding-block: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---------- Inner pages ---------- */
.page-hero { padding-top: clamp(150px, 18vw, 240px); padding-bottom: clamp(48px, 6vw, 88px); position: relative; }
.page-hero h1 { font-size: clamp(52px, 9.6vw, 160px); margin-left: -0.03em; margin-top: 20px; }
.back { display: inline-flex; gap: 8px; align-items: center; }

/* About */
.bio { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(28px, 6vw, 96px); align-items: start; }
.bio-text p { max-width: 62ch; }
.bio-text p + p { margin-top: 1.2em; }
/* Chapter labels in the story: small mono headings that mark newsprint / agency / healthcare */
.chapter-tag { display: block; font-weight: 400; margin: 44px 0 10px; }
/* Quick facts under the portrait; hidden on narrow screens where the portrait stacks above the text */
.bio-facts { margin: 32px 0 0; display: grid; gap: 22px; max-width: 44ch; }
.bio-facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute-ink); margin-bottom: 4px; }
.bio-facts dd { margin: 0; font-size: 16px; line-height: 1.45; }
.bio-facts .co { display: inline-block; }
.way .nb { display: inline-block; }
.btn:hover .arr-r { transform: translateX(4px); } /* a right arrow slides right instead of up-and-right */
.bio-text p:first-child { font-family: var(--serif); font-size: clamp(28px, 3vw, 44px); line-height: 1.12; letter-spacing: -0.01em; max-width: 26ch; margin-bottom: 1em; }
.bio-text p:first-child em { font-style: italic; color: var(--accent); } /* for the whole sentence in blue, move the colour to p:first-child */
/* How I work: three principles, each with a line of proof, then the toolkit as one quiet row */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); }
.way { display: flex; flex-direction: column; align-items: flex-start; } /* proof lines pin to the bottom so the three always line up */
.way h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; letter-spacing: -0.01em; margin: 14px 0 12px; }
.way p { font-size: 16px; max-width: 38ch; text-wrap: pretty; }
.way .proof { display: block; margin-top: auto; padding-top: 18px; }
.toolkit { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 28px; align-items: baseline; margin-top: clamp(40px, 5vw, 72px); padding-top: 20px; border-top: 1px solid var(--line-paper); }
.toolkit h3 { font-weight: 400; color: var(--ink); }
.toolkit p { font-size: 15px; color: var(--mute-paper); }
.toolkit a { display: inline-flex; align-items: center; min-height: 24px; color: var(--ink); }
/* The person: one large sentence instead of a list */
.person h2 { font-weight: 400; }
.person-line { font-family: var(--serif); font-size: clamp(34px, 5vw, 76px); line-height: 1.03; letter-spacing: -0.02em; max-width: 21ch; margin-top: 22px; }
.person-line em { font-style: normal; }
.person-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 6vw, 96px); align-items: stretch; }
/* Photo collage: same column width, but it runs from the top edge of the section to the bottom.
   The section's own padding moves onto the text so the photos can touch both edges. */
.person { padding-block: 0; }
.person-text { align-self: center; padding-block: clamp(72px, 10vw, 150px); }
.collage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(6, 1fr); gap: 6px; width: 100%; max-width: 440px; justify-self: end; }
.tile { position: relative; overflow: hidden; min-height: 0; background: #cfc6b6; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.tile:nth-child(1) { grid-area: 1 / 1 / 4 / 2; }
.tile:nth-child(2) { grid-area: 1 / 2 / 3 / 3; }
.tile:nth-child(3) { grid-area: 3 / 2 / 5 / 3; }
.tile:nth-child(4) { grid-area: 4 / 1 / 7 / 2; }
.tile:nth-child(5) { grid-area: 5 / 2 / 7 / 3; }

/* Resume */
.resume-grid { display: grid; grid-template-columns: 3fr 9fr; gap: clamp(20px, 5vw, 80px); padding-block: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line-paper); }
.resume-grid > h2 { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-deep); padding-top: 8px; }
.job { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line-paper); }
.job:last-child { border: 0; margin: 0; padding: 0; }
.job h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.8vw, 38px); line-height: 1.08; }
.job .co { color: var(--mute-paper); grid-column: 1; }
.job .when { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute-paper); padding-top: 10px; white-space: nowrap; }
.job .body { grid-column: 1 / -1; max-width: 70ch; margin-top: 10px; }
.job .body ul { margin-top: 14px; }
.job .body li { position: relative; padding: 6px 0 6px 22px; }
.job .body li::before { content: ""; position: absolute; left: 0; top: 17px; width: 10px; height: 1px; background: var(--accent-deep); }
.skill-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px clamp(24px, 4vw, 64px); }
.skill-cols h3, .cert h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; margin-bottom: 8px; }
.cert-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(24px, 4vw, 64px); }
.cert { padding: 14px 0; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.cert h3 { font-size: 22px; margin: 0; }
.cert span { font-size: 14px; color: var(--mute-paper); }
.cert .when { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }

/* Project page */
.proj-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-block: 24px; border-block: 1px solid var(--line-ink); margin-top: clamp(32px, 5vw, 64px); }
.proj-meta dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute-ink); margin-bottom: 6px; }
.proj-meta dd { margin: 0; }
.proj-intro { margin-top: clamp(32px, 5vw, 56px); }
.intro-body { max-width: 64ch; }
.intro-body p + p { margin-top: 1em; }
.proj-intro.single .intro-body p { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; } /* a one-paragraph intro reads as a summary */
/* Longer intros: a serif pull line on the left, even body copy on the right */
.proj-intro.has-pull { display: grid; grid-template-columns: 4fr 8fr; gap: 24px clamp(28px, 6vw, 96px); align-items: start; }
.pull-line { font-family: var(--serif); font-size: clamp(28px, 3vw, 44px); line-height: 1.1; letter-spacing: -0.01em; max-width: 13ch; }
.pull-line::before { content: "\201C"; color: var(--accent); }
.pull-line::after { content: "\201D"; color: var(--accent); }
/* Case study */
.study-top { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 6vw, 96px); align-items: end; }
.study-top:not(:has(.study-facts)) { grid-template-columns: 1fr; } /* no stats beside it: the summary line runs the full width */
.study-summary { font-family: var(--serif); font-size: clamp(32px, 4vw, 60px); line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
.study-facts { display: flex; gap: clamp(24px, 3vw, 48px); flex-wrap: wrap; }
.study-facts .num { display: block; font-family: var(--serif); font-size: clamp(44px, 5vw, 72px); line-height: 1; letter-spacing: -0.02em; }
.study-facts .label { display: block; margin-top: 8px; max-width: 17ch; }
.study-part {
  display: grid; grid-template-columns: 4fr 8fr; gap: 20px clamp(28px, 6vw, 96px);
  margin-top: clamp(48px, 7vw, 104px); padding-top: clamp(28px, 3.4vw, 48px);
  border-top: 1px solid var(--line-paper);
}
.study-part > .label { padding-top: 12px; }
.study-text h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -0.01em; max-width: 34ch; text-wrap: balance; margin-bottom: 20px; }
.study-text p { max-width: 62ch; }
.study-text p + p { margin-top: 1em; }
.study-fig {
  grid-column: 1 / -1; margin-top: clamp(8px, 2vw, 24px);
  background: var(--tint, var(--paper-2)); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 56px); max-height: clamp(300px, 46vw, 600px); overflow: hidden;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 340px); justify-content: center; align-items: start;
  gap: clamp(12px, 2.4vw, 32px);
}
.study-fig.n1 { grid-auto-columns: minmax(0, 620px); }
.study-shot { display: block; background: #fff; border-radius: 3px; box-shadow: 0 30px 60px -20px rgba(18, 17, 16, 0.45), 0 2px 6px rgba(18, 17, 16, 0.12); }
.study-shot img { width: 100%; height: auto; border-radius: 3px; }
/* A device mockup with a transparent background sits straight on the tinted panel, with no white card behind it */
.study-shot.mock { background: none; box-shadow: none; }
.study-shot.mock img { border-radius: 0; }
/* Tall banners beside a wide graphic: shown whole (no crop), the banners a little smaller so their bold copy all fits */
.study-fig.mixed { grid-template-columns: minmax(0, 245px) minmax(0, 245px) minmax(0, 490px); grid-auto-flow: row; max-height: none; align-items: center; }
@media (max-width: 720px) {
  .study-fig.mixed { grid-template-columns: 1fr 1fr; }
  .study-fig.mixed .study-shot.wide { grid-column: 1 / -1; }
}
.study-fig.n1:has(.mock) { grid-auto-columns: minmax(0, 1000px); max-height: none; align-items: center; } /* no height cap: the laptop sits centred with equal space on every side */

/* The work: grouped by type, each group laid out to suit its format */
.group-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(40px, 5vw, 72px); }
.group-nav a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-paper); border-radius: 999px; font-size: 15px; transition: border-color 0.2s; }
.group-nav a:hover { border-color: var(--ink); }
.group-nav a span { font-family: var(--mono); font-size: 12px; color: var(--accent-deep); }
.work-group { scroll-margin-top: 96px; }
.work-group + .work-group { margin-top: clamp(56px, 7vw, 104px); }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 16px; margin-bottom: clamp(20px, 2.6vw, 36px); border-bottom: 1px solid var(--ink); }
.group-head h3, .pair-side h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -0.01em; }
.pieces { display: grid; gap: clamp(24px, 3vw, 40px) clamp(14px, 2vw, 28px); align-items: start; }
.pieces.feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Campaign: the landing page on the left, the two booth banners beside it, then the wide LinkedIn graphic beneath the landing page */
.pieces.campaign { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pieces.campaign > .piece:nth-child(1) { grid-column: span 2; }
.pieces.campaign > .piece:nth-child(4) { grid-column: 1 / span 2; }
.pieces.long { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pieces.squares { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pieces.sheets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pieces.sheets.few { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Two photos stacked on the left, one long piece on the right */
.pieces.sheets.stackfirst { grid-template-columns: repeat(2, minmax(0, 440px)); justify-content: center; grid-auto-flow: column; grid-template-rows: auto auto; }
.pieces.stackfirst > .piece:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
.piece { min-width: 0; }
/* Front-and-back pairs: name on the left, the two sides together on the right */
.pair { display: grid; grid-template-columns: 4fr 8fr; gap: 20px clamp(28px, 6vw, 96px); padding-top: clamp(28px, 3.4vw, 48px); border-top: 1px solid var(--line-paper); }
.pair:first-child { border-top: 0; padding-top: 0; }
.pair + .pair { margin-top: clamp(40px, 5vw, 72px); }
.pair-side h3 { margin-top: 14px; }
.pair-pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pair-pages.stack { grid-template-columns: minmax(0, 1fr); }
/* Video: sits in a tinted panel above the pieces */
.pair-side p { margin-top: 14px; max-width: 34ch; }
.work-video + .pieces { margin-top: clamp(48px, 6vw, 88px); }
.video-fig { position: relative; background: var(--tint, var(--paper-2)); border-radius: var(--radius); padding: clamp(20px, 4vw, 56px); display: grid; place-items: center; overflow: hidden; }
.video-fig video { position: relative; display: block; width: min(100%, 340px); height: auto; border-radius: 8px; background: var(--ink); box-shadow: 0 30px 60px -20px rgba(18, 17, 16, 0.45), 0 2px 6px rgba(18, 17, 16, 0.12); }
.piece-frame { display: block; width: 100%; background: var(--white); border-radius: 6px; overflow: hidden; border: 1px solid var(--line-paper); cursor: zoom-in; position: relative; }
.piece-frame img { width: 100%; height: auto; }
.piece.tall .piece-frame { max-height: 620px; overflow-y: auto; cursor: zoom-in; scrollbar-width: thin; }
.piece.tall .piece-frame::after { content: "Scroll \2193"; position: sticky; display: block; bottom: 10px; margin: -38px 10px 10px auto; width: max-content; background: var(--accent-deep); color: var(--white); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; }
.piece figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; align-items: baseline; padding-top: 10px; font-size: 14px; }
.piece figcaption a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-deep); white-space: nowrap; }
.piece figcaption a:hover { text-decoration: underline; }
.next-proj { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-ink); }
.next-proj a { padding: clamp(32px, 5vw, 72px) 0; display: block; transition: color 0.2s; }
.next-proj a + a { text-align: right; border-left: 1px solid var(--line-ink); }
.next-proj a:hover { color: var(--accent); }
.next-proj .t { font-family: var(--serif); font-size: clamp(30px, 4.6vw, 68px); line-height: 1; display: block; margin-top: 10px; }

.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(12, 11, 10, 0.94); display: none; overflow: auto; padding: 64px 20px 40px; cursor: zoom-out; }
.lightbox.open { display: block; }
.lightbox img { margin: 0 auto; max-width: min(1100px, 100%); height: auto; border-radius: 4px; background: #fff; }
.lightbox .lb-bar { position: fixed; top: 14px; left: 20px; right: 20px; display: flex; justify-content: space-between; align-items: center; color: var(--paper); }
.lightbox button { border: 1px solid var(--line-ink); background: var(--ink); border-radius: 999px; padding: 10px 16px; font-size: 14px; }
.lightbox button:hover { border-color: var(--paper); }
.lb-nav { display: flex; gap: 8px; }

/* ---------- Comfortable tap targets (24px minimum, WCAG 2.5.8) ---------- */
.footer nav a, .piece figcaption a, .back, .menu-foot a { display: inline-flex; align-items: center; min-height: 24px; }
.voice summary { display: flex; align-items: center; min-height: 24px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-foot, .about-top, .bio, .fit-grid, .study-top, .study-part { grid-template-columns: 1fr; }
  .study-part > .label { padding-top: 0; }
  .bio .portrait { position: relative; top: 0; max-width: 420px; }
  .bio-facts { display: none; }
  .about-top .portrait { max-width: 420px; }
  .caps { grid-template-columns: repeat(2, 1fr); }
  .voices { grid-template-columns: 1fr; }
  .chapters { grid-template-columns: 1fr; }
  .chapter, .chapter + .chapter { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line-ink); }
  .pair, .proj-intro.has-pull, .ways, .toolkit { grid-template-columns: 1fr; }
  .pull-line { max-width: 20ch; }
  .pieces.sheets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proj-meta { grid-template-columns: repeat(2, 1fr); }
  .resume-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links, .nav .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .nav { padding-left: 18px; }
  .card, .card:nth-child(n) { grid-column: span 12; }
  .card-media { height: 78vw; }
  .card-meta { grid-template-columns: auto 1fr; }
  .card-meta .tags { grid-column: 2; text-align: left; }
  /* Phones: the hero is as tall as its content, so the text sits just under the nav with the shapes behind it */
  .hero { min-height: 0; padding-top: 118px; }
  /* Phones: the photo collage is hidden so the page doesn't get longer for little gain */
  .person-grid { grid-template-columns: minmax(0, 1fr); }
  .collage { display: none; }
  .pieces.feature { grid-template-columns: minmax(0, 1fr); }
  .pieces.campaign { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pieces.campaign > .piece:nth-child(1), .pieces.campaign > .piece:nth-child(4) { grid-column: 1 / -1; }
  .pieces.campaign > .piece:nth-child(2), .pieces.campaign > .piece:nth-child(3) { grid-column: auto; }
  .pieces.long, .pieces.sheets, .pieces.sheets.few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pieces.squares { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .piece.tall .piece-frame { max-height: 440px; }
  .work-index .row { grid-template-columns: 24px 56px 1fr 16px; }
  .work-index .thumb { width: 56px; height: 44px; }
  .work-index .when { display: none; }
  .work-index .info { flex-direction: column; align-items: flex-start; }
  .section-head { grid-template-columns: 1fr; }
  .section-head .label { text-align: left; padding: 0; }
  .clients-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .marquee { width: 100%; }
  .cert-list, .skill-cols { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; }
  .job .when { padding: 0; }
  .next-proj { grid-template-columns: 1fr; }
  .next-proj a + a { text-align: left; border-left: 0; border-top: 1px solid var(--line-ink); }
}
@media (max-width: 520px) {
  .caps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .hero h1 .line > span { transform: none; }
}

/* ---------- Print (résumé → PDF) ---------- */
@media print {
  .nav, .menu, .contact, .no-print { display: none !important; }
  body, .on-paper, .page-hero { background: #fff !important; color: #000 !important; }
  .page-hero { padding: 0 0 16px; }
  .page-hero h1 { font-size: 44px; }
  .section { padding-block: 0; }
  .resume-grid { padding-block: 16px; grid-template-columns: 1fr; gap: 8px; }
  .job { break-inside: avoid; padding-bottom: 12px; margin-bottom: 12px; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  body { font-size: 11pt; }
}
