/* ==========================================================
   Mahnoor Umar · portfolio
   Theme values are copied from the live site (mahnoor.cloudordinate.com).
   ========================================================== */
:root {
  --bg: #ECEAE3;        /* cream */
  --card: #FFFFFF;
  --ink: #111111;
  --muted: #6B6A64;
  --yellow: #FFE45C;    /* highlight yellow: name box, EMAIL, stickers */
  --yellow-soft: #FBF3B9;
  --marker: #F7DF7E;    /* flat marker band behind "AI systems" */
  --blue: #1F4FE0;
  --red: #E23B2E;
  --orange: #F09A1E;
  --grey: #7F9CC9;
  --green: #2F9E44;
  --dash: #CFCAB8;
  --panel: #F7F6F2;
  --disc: #DEDBD1;      /* cream, slightly darker (photo circle) */
  --line-y: #C9A227;    /* yellow darkened ~25%: construction lines */

  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", Menlo, Consolas, monospace;
  --display: "Archivo", "Arial Black", sans-serif;
  --grotesk: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
figure { margin: 0; }
.wrap { max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 20; background: var(--ink); color: var(--bg); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ---------- Contour background (drawn by main.js) ----------
   Fixed behind everything. The nav and the dark contact/footer have solid backgrounds, so the lines only show in between. */
.contour { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- Nav ---------- */
.nav { background: var(--bg); border-bottom: 2px solid var(--ink); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { font-weight: 700; font-size: 18px; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--blue); }
.links { display: flex; align-items: center; gap: 24px; }
.links a { text-decoration: none; font-size: 15px; }
.links a:hover { color: var(--blue); }
.links .btn-cv { background: var(--ink); color: var(--bg); border: 2px solid var(--ink); padding: 6px 12px; font: 600 13px var(--sans); box-shadow: 3px 3px 0 var(--yellow); transition: transform .12s, box-shadow .12s; }
.links .btn-cv:hover { color: var(--bg); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--yellow); }

/* ==========================================================
   HERO
   ========================================================== */
.hero { padding: 24px 0 28px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  grid-template-areas: "text photo" "stats stats";
  column-gap: 40px; row-gap: 26px; align-items: center;
}
.hero-text { grid-area: text; min-width: 0; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.avail { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(47, 158, 68, .2); }

.hello { font-weight: 400; }
.hello .tagline {
  display: block; margin-top: 6px; color: #111;
  font-family: var(--grotesk); font-weight: 500; font-style: normal;
  font-size: clamp(2.25rem, 4.8vw, 3.875rem); line-height: 1.05; letter-spacing: -.02em;
}
.tagline .tl { display: block; }
/* marker band behind the lower ~45% of "AI systems"; sweeps in once (main.js adds .on to #tag-hl) */
.tagline .hl { position: relative; z-index: 0; white-space: nowrap; }
.tagline .hl::before {
  content: ""; position: absolute; z-index: -1; left: -.04em; right: -.04em; bottom: .1em; height: 45%;
  background: var(--marker); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s cubic-bezier(.45, 0, .2, 1);
}
.tagline .hl.on::before, html:not(.js) .tagline .hl::before { transform: none; }

.reach { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.reach a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  background: var(--card); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font: 700 14px var(--sans); letter-spacing: .3px; text-transform: uppercase; text-decoration: none;
  transition: transform .12s, box-shadow .12s;
}
.reach a.r-yellow { background: var(--yellow); }
.reach a.r-dark { background: var(--ink); color: var(--bg); }
.reach a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.reach a:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- Name block: construction drawing + looping letter highlight ---------- */
.wm {
  display: block; position: relative;
  font-size: clamp(48px, min(5.8vw, 10.5vh), 84px);
  padding: .5em 0 .5em .4em; margin: 2px 0 4px;
}
.wm-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(17, 17, 17, .15) 1px, transparent 1.1px);
  background-size: 16px 16px;
}
.wm-row {
  display: block; position: relative; z-index: 2;
  font-family: var(--display); font-style: italic; font-weight: 900; text-transform: uppercase;
  line-height: .95; letter-spacing: -2px; white-space: nowrap;
}
.wm-row .im { font-size: .5em; vertical-align: .62em; letter-spacing: -1px; }
.wm-row .name {
  display: inline-block; position: relative;
  background-color: var(--yellow); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  padding: 0 .16em .02em .1em; margin-left: .08em;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .15s ease;
}
.wm-word { position: relative; z-index: 2; }
.wm-base { display: inline-block; width: 0; height: 0; }
/* looping highlight: one yellow block per letter, laid edge to edge so all seven together fill the box.
   Each block grows from its left edge, holds, then shrinks towards its right edge (transform only).
   Cycle 3.64s: fill 7 × 120ms (+200ms ease), hold 1.5s, clear the same way, 300ms pause. Block i starts i × 120ms late. */
.wm-fill { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.wm-fill i { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--yellow); transform-origin: 0 50%; transform: translateX(0) scaleX(0); will-change: transform; }
.wm.loop .wm-fill i { animation: hl 3.64s cubic-bezier(.45, 0, .2, 1) infinite; animation-delay: calc(var(--i) * 120ms); }
@keyframes hl {
  0%     { transform: translateX(0) scaleX(0); }
  5.5%   { transform: translateX(0) scaleX(1); }
  66.5%  { transform: translateX(0) scaleX(1); }
  72%    { transform: translateX(100%) scaleX(0); }
  100%   { transform: translateX(100%) scaleX(0); }
}
.wm-hover {
  position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: 0;
  background: rgba(201, 162, 39, .3); opacity: 0; pointer-events: none;
  transition: left .15s ease, width .15s ease, opacity .15s ease;
}

.wm-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.wm-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line-y); transform-origin: left; }
.wm-line.dash { border-top-style: dashed; }
.wm-frame { position: absolute; border: 1px dashed var(--line-y); }
.wm-corner { position: absolute; width: .52em; height: .52em; margin: -.26em 0 0 -.26em; border: 1px solid var(--line-y); }
.wm-corner::before, .wm-corner::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 1px; margin: -.5px 0 0 -4.5px; background: var(--line-y); transform: rotate(45deg); }
.wm-corner::after { transform: rotate(-45deg); }
.wm-cross { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 1px solid var(--line-y); border-radius: 50%; }
.wm-cross::before, .wm-cross::after { content: ""; position: absolute; background: var(--line-y); }
.wm-cross::before { left: 6px; top: -4px; width: 1px; height: 20px; }
.wm-cross::after { top: 6px; left: -4px; height: 1px; width: 20px; }

/* load sequence: JS adds .go to .hero once fonts are ready, then .boxed, .done and .loop to .wm */
@keyframes drawX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up12 { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.js .wm .name { background-color: transparent; border-color: transparent; box-shadow: 0 0 0 transparent; }
.js .wm.boxed .name { background-color: var(--bg); border-color: var(--ink); box-shadow: 0 0 0 var(--ink); }
.js .wm.done .name { background-color: var(--bg); border-color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.js .hero:not(.go) .wm-grid, .js .hero:not(.go) .wm-layer, .js .hero:not(.go) .wm-row .im,
.js .hero:not(.go) .wm-word, .js .hero:not(.go) .hero-up { opacity: 0; }
.hero.go .wm-grid { animation: fade .3s ease both; }
.hero.go .wm-line { animation: drawX .21s var(--ease) both; animation-delay: calc(150ms + var(--i) * 60ms); }
.hero.go .wm-frame, .hero.go .wm-corner, .hero.go .wm-cross { animation: fade .2s ease .45s both; }
.hero.go .wm-row .im, .hero.go .wm-word { animation: up12 .4s var(--ease) .3s both; }
.hero.go .hello .tagline { animation: up12 .4s var(--ease) .7s both; }
.hero.go .reach { animation: up12 .4s var(--ease) .78s both; }
.hero.go .stats { animation: up12 .4s var(--ease) .86s both; }

/* ---------- Round sticker photo ---------- */
/* --d is the circle's diameter (25% smaller than before). The head sticks out 28% of --d above the circle and the
   ring 14px below it, so margin-top = .28 × --d − 14px centres the whole sticker against the text column. */
.portrait {
  --d: min(285px, 34vh, 75%);
  grid-area: photo; position: relative; justify-self: center; width: var(--d); aspect-ratio: 1;
  margin-top: calc(var(--d) * .28 - 14px); container-type: inline-size;
}
.disc { position: absolute; inset: 0; border-radius: 50%; background: var(--disc); box-shadow: 0 18px 34px rgba(17, 17, 17, .14), 0 2px 0 rgba(17, 17, 17, .06); }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ink); transform: translate(14px, 14px); }
.person {
  position: absolute; left: 0; right: 0; bottom: 0; height: 128%;
  clip-path: url(#sticker-clip);
}
/* same box the old <img> had: 140% wide, 1000:815, bottom-centred; the sticker outline follows the PNG/WebP alpha */
.person-img {
  position: absolute; left: 50%; bottom: 0; width: 140%; aspect-ratio: 1000 / 815; transform: translateX(-50%);
  background: url("assets/mahnoor-cutout.png") center / 100% 100% no-repeat;
  background-image: image-set(url("assets/mahnoor-cutout.webp") type("image/webp"), url("assets/mahnoor-cutout.png") type("image/png"));
  filter: drop-shadow(6px 0 0 var(--yellow)) drop-shadow(-6px 0 0 var(--yellow)) drop-shadow(0 6px 0 var(--yellow)) drop-shadow(0 -6px 0 var(--yellow));
}
/* transparent layer over the photo: clicks, drags and long-presses land here, not on the picture */
.photo-shield { position: absolute; inset: 0; z-index: 1; background: transparent; }
.protect-photo, .protect-photo * { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.tag { position: absolute; z-index: 3; border: 2px solid var(--ink); padding: .5em .83em; font: 600 max(10px, 3.16cqw) var(--mono); white-space: nowrap; } /* 12px at the old 380px photo, scales with it */
.tag-role { top: 30%; left: -10%; background: var(--ink); color: var(--bg); box-shadow: 3px 3px 0 var(--yellow); }
/* fallback: original photo cropped into the circle, no sticker outline */
.portrait.no-cutout .person { height: 100%; border-radius: 50%; overflow: hidden; clip-path: none; }
.portrait.no-cutout .person-img { filter: none; left: 0; width: 100%; height: 100%; aspect-ratio: auto; transform: none; background: url("assets/mahnoor.jpg") center / cover no-repeat; }

@keyframes pop { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
@keyframes ringIn { from { opacity: 0; transform: translate(0, 0); } to { opacity: 1; transform: translate(14px, 14px); } }
.disc, .person { animation: pop .4s var(--ease) both; }
.ring { animation: ringIn .35s var(--ease) .35s both; }
.tag { animation: fade .25s ease .55s both; }

/* ---------- Stats ---------- */
.stats {
  grid-area: stats; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
}
.stat { padding: 14px 16px; border-left: 2px solid var(--ink); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: 32px; letter-spacing: -1px; line-height: 1; }
.stat b em { font-style: normal; color: var(--blue); }
.stat span { display: block; margin-top: 6px; font-size: 13px; color: #444; line-height: 1.35; }

/* ==========================================================
   SECTIONS
   ========================================================== */
.section { padding: 72px 0; border-top: 2px solid var(--ink); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
h2 { font-size: 40px; letter-spacing: -1px; line-height: 1.1; }
.sec-head p { color: var(--muted); max-width: 420px; }

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Work: image grid ---------- */
.chip { display: inline-block; font: 600 11px var(--mono); color: #fff; padding: 4px 8px; background: var(--grey); }
.chip.live { background: var(--green); }
.chip.client { background: var(--ink); }
.chip.testing { background: var(--grey); }
.chip.progress { background: var(--orange); }

/* 6-track grid: the first two cards take half each, the rest a third each */
.pgrid { list-style: none; margin: 0 auto; padding: 0; max-width: 1200px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px; }
.pc { grid-column: span 2; display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
/* first project: full-width featured row (media 60% / text 40%) */
.pc-lg { grid-column: 1 / -1; flex-direction: row; }
.pc-lg .pc-stage { flex: 0 0 60%; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 22px 0; border-bottom: 0; border-right: 2px solid var(--ink); }
/* 3-column grid: an incomplete last row is filled (2 cards split it, 1 card is centred) */
@media (min-width: 1101px) {
  .pc:not(.pc-lg):nth-last-child(2):nth-child(3n+2), .pc:not(.pc-lg):nth-last-child(2):nth-child(3n+2) + .pc { grid-column: span 3; }
  .pc:not(.pc-lg):last-child:nth-child(3n+2) { grid-column: 3 / span 2; }
}
.pc-lg .pc-body { justify-content: center; gap: 12px; padding: 32px 32px; }
.pc-lg .pc-sum { -webkit-line-clamp: 3; }
.pc-lg .pc-links { margin-top: 4px; }
.pc.pc-lg .stack { margin-top: 0; }

/* area behind the browser frame: cream, turns yellow on hover */
.pc-stage { padding: 16px 16px 0; background: var(--panel); border-bottom: 2px solid var(--ink); transition: background-color .2s ease; }
.pc-frame { border: 1.5px solid var(--ink); border-bottom: 0; background: #fff; }
.pc-bar { display: flex; gap: 5px; align-items: center; height: 18px; padding: 0 8px; border-bottom: 1.5px solid var(--ink); background: var(--bg); }
.pc-bar i { width: 7px; height: 7px; border-radius: 50%; border: 1.2px solid var(--ink); }
.pc-bar i:first-child { background: var(--red); }
.pc-bar i:nth-child(2) { background: var(--yellow); }
.pc-bar i:nth-child(3) { background: var(--green); }
.pc-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }

.pc-shot { all: unset; box-sizing: border-box; cursor: zoom-in; display: block; width: 100%; height: 100%; overflow: hidden; }
.pc-shot:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.pc-shot img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 0; transition: transform .4s ease; }
.pc-shot.tall img { transition: object-position 3s linear; }
.pc-shot.wide { display: grid; place-items: center; padding: 12px; }
.pc-shot.wide img { height: auto; object-fit: contain; }
.pc-hint { position: absolute; right: 8px; bottom: 8px; font: 600 10.5px var(--mono); color: var(--bg); background: var(--ink); padding: 3px 7px; pointer-events: none; transition: opacity .2s; }

/* project without a screenshot: title on pale yellow with the dotted grid */
.pc-type {
  display: flex; align-items: center; padding: 22px 26px;
  background-color: var(--yellow-soft);
  background-image: radial-gradient(circle at 1px 1px, rgba(17, 17, 17, .18) 1px, transparent 1.1px);
  background-size: 16px 16px;
}
.pc-type .tp-title { font: italic 900 clamp(24px, 2.3vw, 32px)/1.02 var(--display); text-transform: uppercase; letter-spacing: -1px; }

.pc-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; }
.pc h3 { font: 700 20px/1.22 var(--sans); letter-spacing: -.3px; }
.pc-lg h3 { font-size: 28px; line-height: 1.15; letter-spacing: -.6px; }
.pc-sum { font: 400 12.5px/1.5 var(--mono); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-more summary { cursor: pointer; width: max-content; font: 600 12px var(--mono); list-style: none; border-bottom: 1.5px solid var(--ink); }
.pc-more summary::-webkit-details-marker { display: none; }
.pc-more summary::after { content: " +"; }
.pc-more[open] summary::after { content: " −"; }
.pc-more summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.pc-more p { margin-top: 8px; font-size: 14.5px; color: #2a2a2a; }

/* project demo video (fills the browser frame like a screenshot) */
.demo-video { margin: 0; width: 100%; height: 100%; position: relative; }
.demo-video__player { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; background: #fff; cursor: pointer; }
.demo-video__sound { position: absolute; right: 10px; bottom: 10px; min-height: 44px; padding: 0 14px; font: 600 12px var(--mono); color: var(--ink); background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.demo-video__sound:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.demo-video__sound:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.demo-video__sound:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.demo-transcript { margin-top: 10px; }
.demo-transcript summary::after, .pc-more[open] .demo-transcript summary::after { content: " +"; }
.pc-more[open] .demo-transcript[open] summary::after { content: " −"; }
.pc-more .demo-transcript p { font: 400 12.5px/1.5 var(--mono); color: var(--muted); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack span { font: 600 11px var(--mono); border: 1.5px solid var(--ink); padding: 3px 7px; background: var(--bg); }
.pc .stack span:nth-child(n+5) { display: none; }
/* chips (and links under them) sit on the card's bottom edge, so cards in a row end level */
.pc .stack { margin-top: auto; }
.pc-links { margin-top: 0; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.more { font-weight: 600; color: var(--blue); text-decoration: none; }
.more:hover { text-decoration: underline; }

/* hover: mouse/trackpad only */
@media (hover: hover) and (pointer: fine) {
  .pc:hover { transform: translateY(-4px); box-shadow: 10px 10px 0 var(--ink); }
  .pc:hover .pc-stage { background-color: var(--yellow); }
  .pc-shot.tall:hover img { object-position: 50% 100%; }
  .pc-shot.tall:hover + .pc-hint { opacity: 0; }
  .pc-shot.fit:hover img, .pc-shot.wide:hover img { transform: scale(1.05); }
}

/* touch screens can't hover, so the scroll hint would be misleading there */
@media not all and (hover: hover) { .pc-hint { display: none; } }

/* fade up once on scroll (class added by main.js) */
.pgrid.will-fade .pc { opacity: 0; transform: translateY(16px); transition: opacity .45s ease, transform .45s ease, box-shadow .2s ease; }
.pgrid.will-fade .pc.in { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .pgrid.will-fade .pc.in:hover { transform: translateY(-4px); transition: transform .2s ease, box-shadow .2s ease; }
}

/* lightbox */
.lightbox { position: fixed; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 0; background: var(--card); max-width: min(94vw, 1400px); max-height: 92vh; overflow: hidden; }
.lightbox::backdrop { background: rgba(17, 17, 17, .78); cursor: zoom-out; }
.lightbox img { max-width: min(94vw, 1400px); max-height: calc(92vh - 32px); width: auto; height: auto; margin: 0 auto; cursor: zoom-out; object-fit: contain; }
.lightbox.lb-compact { max-width: 90vw; max-height: 85vh; }
.lightbox.lb-compact img { max-width: 90vw; max-height: calc(85vh - 32px); }
.lb-close { position: absolute; top: 0; right: 0; z-index: 2; width: 40px; height: 40px; border: 0; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--yellow); color: var(--ink); font: 700 24px/1 var(--sans); cursor: pointer; }
.lb-hint { display: block; text-align: center; padding: 6px; font-size: 11px; color: var(--muted); border-top: 1.5px solid var(--ink); }

/* ---------- Clients ---------- */
.ach { position: relative; display: inline-block; margin: 0 0 32px 6px; font-family: var(--display); font-style: italic; font-weight: 900; text-transform: uppercase; font-size: 40px; letter-spacing: -1px; line-height: 1; }
.ach .sticker { display: inline-block; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: .08em .3em .06em .2em; transform: rotate(-2.5deg); }
.ach .spark { color: var(--red); font-style: normal; font-size: .6em; vertical-align: .35em; }
.ach .s2 { position: absolute; right: -34px; top: 4px; color: var(--blue); font-size: .5em; transform: rotate(18deg); }
.ach.sm { font-size: 32px; margin: 56px 0 28px 6px; }
.ach.sm .sticker { background: var(--card); transform: rotate(1.5deg); }
.ach.sm .spark { color: var(--blue); }

.quote { background: var(--yellow-soft); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 32px 36px; }
.rv-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.rv-title { font-weight: 700; font-size: 21px; letter-spacing: -.3px; }
.rv-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.stars { color: #F26B1D; font-size: 18px; letter-spacing: 2px; }
.rv-meta .bar { width: 1.5px; height: 20px; background: var(--ink); opacity: .4; }
.rv-price { text-align: right; }
.rv-price b { display: block; font-size: 21px; }
.rv-price .mono { color: var(--muted); }
.quote blockquote { margin: 0; font-style: italic; font-size: clamp(17px, 1.7vw, 20px); line-height: 1.5; }
.quote .who { margin-top: 20px; display: flex; align-items: center; gap: 12px; }
.quote .who b { font-size: 17px; }

.built-for { margin-top: 24px; }
.feedback-block { margin-top: 32px; }
.bf-label { display: block; color: var(--muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.feedback-caption { margin: -8px 0 12px; font-size: 14px; color: var(--muted); }

/* ---------- Auto-scrolling slider (teams) ---------- */
/* Full-bleed: break out of .wrap to the full viewport width; headings stay in the content column */
.slider { --fade: min(140px, 10vw); position: relative; width: 100vw; margin-left: calc(50% - 50vw); -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent); }
.slider-viewport { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none; padding: 4px 0 10px; margin: -4px 0 -10px; }
.slider-viewport::-webkit-scrollbar { display: none; }
.slider-track { display: flex; width: max-content; animation: slider-slide var(--slider-duration, 30s) linear infinite; }
.slider.reverse .slider-track { animation-direction: reverse; }
/* padding-right = gap, so the seam between the two copies matches the gap between cards */
.slider-group { --gap: 20px; display: flex; gap: var(--gap); padding-right: var(--gap); flex-shrink: 0; }
.built-for .slider-group { --gap: 16px; }
.slider:hover .slider-track, .slider:focus-within .slider-track, .slider.touching .slider-track { animation-play-state: paused; }

@keyframes slider-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.bf { width: 240px; flex: 0 0 240px; background: var(--card); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 14px 16px; }
.bf b { display: block; font-size: 16px; letter-spacing: -.2px; }
.bf span { display: block; font: 600 11px var(--mono); color: var(--blue); margin-top: 4px; }
.bf p { margin-top: 8px; font-size: 14px; color: #333; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Feedback panel: post preview · reaction tiles · quote ---------- */
.fbp { --g: 32px; position: relative; max-width: 1200px; display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 30fr) minmax(0, 36fr); column-gap: var(--g); align-items: start; padding: 24px; background: #F7F5EF; border: 2px solid var(--yellow); box-shadow: 6px 6px 0 var(--ink); }
.fbp-col { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
/* desktop: columns share the panel height and the preview grows into it (screenshot stays object-fit: contain) */
@media (min-width: 900px) {
  .fbp { align-items: stretch; }
  .fbp .fbp-frame { flex: 1 1 auto; }
}
.fbp-step { font: 600 11px/17px var(--mono); text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
/* connector between columns: short line with a yellow dot, level with the step labels */
.fbp-col + .fbp-col::before { content: ""; position: absolute; top: 8px; left: calc(var(--g) * -1 + 6px); width: calc(var(--g) - 12px); border-top: 1.5px solid var(--ink); }
.fbp-col + .fbp-col::after { content: ""; position: absolute; top: 3px; left: calc(var(--g) / -2 - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); border: 1.5px solid var(--ink); }

/* 01: big preview, every screenshot stacked on top of each other so switching is a crossfade */
.fbp-frame { all: unset; box-sizing: border-box; position: relative; display: block; aspect-ratio: 1200 / 750; background: #fff; border: 2px solid var(--yellow); cursor: zoom-in; overflow: hidden; }
.fbp-frame:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.fbp-frame img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; padding: 10px; opacity: 0; transition: opacity .25s ease; }
.fbp-frame img.on { opacity: 1; }
.fbp-pos { position: absolute; right: 8px; bottom: 8px; font: 600 10.5px var(--mono); color: var(--bg); background: var(--ink); padding: 3px 7px; letter-spacing: .3px; }
.fbp-bar { height: 3px; margin-top: -6px; background: rgba(17, 17, 17, .12); overflow: hidden; }
.fbp-bar i { display: block; height: 100%; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); }
.fbp-bar i.go { animation: fbp-fill 4s linear forwards; animation-play-state: paused; }
.fbp.running .fbp-bar i.go { animation-play-state: running; }
.fbp.still .fbp-bar { visibility: hidden; }
@keyframes fbp-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 02: 3 x 4 tile grid */
.fbp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
.fbp-tile { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; transition: transform .2s ease; }
.fbp-tile:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* every tile 4:3 on white; the whole screenshot is shown, scaled down evenly (no crop, no dimming) */
.fbp-thumb { display: block; aspect-ratio: 4 / 3; background: #fff; border: 1px solid #e5e2da; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.fbp-thumb img { width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: 50% 50%; padding: 5px; }
.fbp-tile:hover { transform: translateY(-2px); }
.fbp-tile:hover .fbp-thumb { border-color: var(--ink); }
/* active: 3px black border (1px border + 2px inset ring, so nothing shifts) and a yellow offset shadow */
.fbp-tile.on .fbp-thumb { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), 3px 3px 0 var(--yellow); }
.fbp-cap { font: 500 9px/1.3 var(--mono); letter-spacing: -.2px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 03: quote; all items share one cell so the panel height never jumps */
.fbp-stack { display: grid; }
.fbp-item { grid-area: 1 / 1; margin: 0; visibility: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.fbp-item.on { visibility: visible; animation: fbp-up .25s ease both; }
@keyframes fbp-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fbp-who { display: grid; gap: 2px; width: 100%; min-width: 0; }
.fbp-who b { font: 700 18px/1.25 var(--grotesk); }
.fbp-who span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbp-plat { justify-self: start; margin-top: 6px; font: normal 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .5px; padding: 2px 8px; border: 1.5px solid var(--ink); }
.fbp-plat.li { background: #fff; color: var(--blue); }
.fbp-plat.x { background: var(--ink); color: var(--bg); }
.fbp-item blockquote { margin: 0; font: 500 20px/1.45 var(--grotesk); }
.fbp-item mark { background: var(--yellow); color: var(--ink); padding: 4px 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.fbp-foot { font: 600 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.fbp-hl { font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .5px; background: var(--yellow); color: var(--ink); padding: 2px 8px; border: 1px solid var(--ink); }

/* under 900px: preview, then quote, then tiles as a scroll row */
@media (max-width: 899px) {
  .fbp { grid-template-columns: minmax(0, 1fr); row-gap: 24px; padding: 16px; }
  .fbp-col + .fbp-col::before, .fbp-col + .fbp-col::after { display: none; }
  .fbp-says { order: 2; }
  .fbp-reacts { order: 3; }
  .fbp-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 116px; overflow-x: auto; padding: 3px 6px 8px 3px; margin: -3px -6px -8px -3px; scroll-snap-type: x proximity; }
  .fbp-tile { scroll-snap-align: start; }
}

/* compact: 6 in a row on wide screens, 3 on tablet, 2 on mobile; equal height per row,
   content from the top, source line pinned to the bottom edge so no blank strip is left */
.badges { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.badge { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 5px; padding: 14px 10px 12px; background: var(--card); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s; }
button.badge { font: inherit; cursor: zoom-in; -webkit-appearance: none; appearance: none; }
button.badge:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
a.badge:hover, button.badge:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 7px 7px 0 var(--ink); }
.badge img { height: 80px; max-height: 96px; width: auto; max-width: 100%; object-fit: contain; margin-bottom: 4px; }
.badge b { font-size: 15px; line-height: 1.25; }
.badge p { font-size: 13px; color: #444; line-height: 1.35; }
.tier { font: 700 11px var(--mono); padding: 3px 10px; border-radius: 999px; letter-spacing: .5px; text-transform: uppercase; }
.tier.bronze { background: #F8E7C6; color: #9A5B1E; }
.tier.hr { background: #DDF3E3; color: #1E7A3C; }
.tier.cert { background: #E6E0FF; color: #5B3FD6; }
.badge .src { color: var(--muted); font-size: 10.5px; line-height: 1.4; margin-top: auto; padding-top: 2px; }
.badge .src-date { display: block; }

/* ---------- Instagram: fanned reel cards (content in main.js, REELS) ---------- */
.ig { margin-top: 64px; }
.ig .sec-head { margin-bottom: 8px; }
.ig-handle { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.ig-handle:hover { color: var(--blue); }

/* card width: ~300px, smaller on narrower screens so the whole fan (4 cards ≈ 3.9 card widths incl. overlap and tilt) fits */
.ig-fan {
  --w: min(300px, calc((100vw - 64px) / 3.9));
  list-style: none; margin: 0; padding: 36px 0 64px; display: flex; justify-content: center;
}
.ig-card {
  --r: 0deg; --y: 0px;
  position: relative; z-index: 1; flex: 0 0 var(--w); width: var(--w); margin-left: calc(var(--w) * -.14);
  transform: translateY(var(--y)) rotate(var(--r)); transform-origin: 50% 100%;
  transition: transform .3s ease; container-type: inline-size;
}
.ig-card:first-child { margin-left: 0; }
/* the arc (--r tilt, --y drop per card) is set by main.js for however many cards are shown */

.ig-card > a {
  position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 14px;
  background: #1a1a1a; color: #fff; text-decoration: none;
  box-shadow: 0 22px 40px -18px rgba(17, 17, 17, .45), 0 4px 12px rgba(17, 17, 17, .12);
}
.ig-card > a:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.ig-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* card colour only on the bottom 40%, so the face and burned-in captions stay clear */
.ig-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(180deg, rgb(var(--tint) / 0) 0%, rgb(var(--tint) / .85) 100%); }
/* light film grain, on the coloured band only */
.ig-card > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.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 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ig-top, .ig-bottom { position: absolute; z-index: 1; left: 7cqw; right: 7cqw; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.ig-top { top: 7cqw; display: flex; flex-direction: column; gap: 2px; }
/* the next card overlaps this one's right edge, so keep the text clear of that strip (not on the last card or on phones) */
.ig-card:not(:last-child) :is(.ig-top, .ig-bottom) { right: 24cqw; }
.ig-top b { font: 700 max(11px, 4.4cqw)/1.2 var(--sans); letter-spacing: .02em; }
.ig-top span { font: 400 max(10.5px, 4cqw)/1.2 var(--sans); opacity: .85; }
.ig-bottom { bottom: 7cqw; display: flex; flex-direction: column; gap: 4px; }
.ig-title { font: 700 clamp(15px, 7.3cqw, 22px)/1.15 var(--sans); letter-spacing: -.01em; }
.ig-line { font: 400 max(11px, 4.6cqw)/1.35 var(--sans); opacity: .85; }
.ig-row { display: flex; align-items: center; gap: 3.5cqw; margin-top: 4cqw; }
.ig-play { position: relative; flex: none; width: max(30px, 12cqw); aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: background-color .3s ease; }
.ig-play::before { content: ""; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%); border-left: 10px solid var(--ink); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.ig-wave { display: flex; align-items: center; gap: 2px; height: 18px; min-width: 0; overflow: hidden; }
.ig-wave i { flex: none; width: 2.5px; border-radius: 2px; background: rgba(255, 255, 255, .85); }
.ig-views { margin-left: auto; flex: none; font-size: max(10px, 3.7cqw); font-weight: 600; opacity: .9; white-space: nowrap; }

/* hover / keyboard focus: straighten, lift, come to the front, play button turns yellow */
@media (hover: hover) and (pointer: fine) {
  .ig-card:hover { transform: translateY(-16px) rotate(0deg); z-index: 10; }
  .ig-card:hover .ig-play { background: var(--yellow); }
}
.ig-card:focus-within { transform: translateY(-16px) rotate(0deg); z-index: 10; }
.ig-card:focus-within .ig-play { background: var(--yellow); }

/* phones: no fan, a horizontal snap row */
@media (max-width: 767px) {
  .ig { margin-top: 48px; }
  .ig-fan {
    --w: min(260px, 70vw);
    justify-content: flex-start; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 16px 24px 20px; margin: 0 -24px; scroll-padding: 0 24px;
  }
  .ig-fan::-webkit-scrollbar { display: none; }
  .ig-card, .ig-card:focus-within { margin-left: 0; transform: none; scroll-snap-align: start; }
  .ig-card:not(:last-child) :is(.ig-top, .ig-bottom) { right: 7cqw; }
}

/* reduced motion: cards keep their place on hover; only the stacking and the play button change */
@media (prefers-reduced-motion: reduce) {
  .ig-card:hover, .ig-card:focus-within { transform: translateY(var(--y)) rotate(var(--r)); }
}
@media (prefers-reduced-motion: reduce) and (max-width: 767px) {
  .ig-card:hover, .ig-card:focus-within { transform: none; }
}

/* full reel player */
.reel-lb { border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 0; background: #111; overflow: hidden; }
.reel-lb::backdrop { background: rgba(17, 17, 17, .82); }
.reel-lb video { display: block; height: min(80vh, 1280px); max-width: 92vw; aspect-ratio: 9 / 16; background: #111; }
.reel-lb-ig { display: block; padding: 9px 12px; text-align: center; font-size: 12px; color: var(--bg); background: var(--ink); text-decoration: none; border-top: 1.5px solid #333; }
.reel-lb-ig:hover { color: var(--yellow); }

/* ---------- Experience + Stack ---------- */
.two { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
/* Track record: one line per role on desktop (role · description · dates) */
.tr-list { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; }
.tr-row { display: contents; }
.tr-row > * { padding: 12px 0; border-top: 1px dashed var(--dash); white-space: nowrap; }
.tr-row:first-child > * { border-top: 0; padding-top: 2px; }
.tr-role { font-size: 15px; padding-right: 20px !important; }
.tr-desc { padding-right: 20px !important; }
.tr-tag { font: 600 11px var(--mono); color: var(--muted); margin-left: 6px; }
.tr-desc { font-size: 14px; color: #333; overflow: hidden; text-overflow: ellipsis; }
.tr-date { color: var(--muted); font-size: 12px; text-align: right; padding-top: 14px; }
.tr-row:first-child > .tr-date { padding-top: 4px; }
.tr-voice { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--ink); font-size: 11.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.card { background: var(--card); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.list { padding: 26px 28px; }
.list h3 { font-size: 20px; margin-bottom: 14px; }
.row { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px 0; border-top: 1px dashed var(--dash); }
.list h3 + .row { border-top: 0; padding-top: 0; }
.row .mono { color: var(--muted); padding-top: 3px; font-size: 12px; }
.row p { margin-top: 4px; font-size: 15px; color: #333; }
.tools { display: flex; flex-wrap: wrap; gap: 7px; }
.tools span { font: 600 12px var(--mono); border: 1.5px solid var(--ink); padding: 4px 8px; background: var(--bg); }
#stack { scroll-margin-top: 16px; }

/* ---------- Footer: contact band, links, wordmark ---------- */
.sf { padding: 72px 0 40px; border-top: 2px solid var(--ink); }
.sf-card { max-width: 1200px; margin: 0 auto; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); background: transparent; overflow: hidden; container-type: inline-size; }
.sf-label { display: block; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 10px; }
.sf-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 40px; flex-wrap: wrap; padding: 32px 32px 28px; background: var(--card); }
.sf-email { position: relative; display: inline-block; font: 600 40px/1.15 var(--grotesk); letter-spacing: -1px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
/* yellow underline slides in from the left */
.sf-email::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 5px; background: var(--yellow); transform: scaleX(0); transform-origin: 0 50%; transition: transform .2s ease; }
.sf-email:hover::after, .sf-email:focus-visible::after { transform: scaleX(1); }
.sf-book { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.sf-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; font: 700 16px var(--sans); background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.sf-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.sf-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.sf-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.sf-btn[disabled] { opacity: .65; cursor: progress; transform: none; box-shadow: 4px 4px 0 var(--ink); }
.sf-note { font-size: 13px; color: var(--muted); }
.sf-mid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; padding: 28px 32px 32px; border-top: 1px solid var(--ink); background: var(--card); }
.sf-who { display: flex; flex-direction: column; gap: 4px; }
.sf-who b { font-size: 18px; }
.sf-who span { color: #333; font-size: 15px; }
.sf-who .mono { color: var(--muted); font-size: 12px; margin-top: 4px; }
.sf-nav ul { display: grid; gap: 6px; justify-items: start; }
.sf-nav a { color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1.5px solid transparent; transition: border-color .15s; }
.sf-nav a:hover { border-bottom-color: var(--ink); }
.sf-icons { display: flex; flex-wrap: wrap; gap: 12px; }
.sf-icons a { display: grid; place-items: center; width: 40px; height: 40px; background: #fff; color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: background-color .15s, transform .12s, box-shadow .12s; }
.sf-icons a:hover { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.sf-icons a:focus-visible, .sf-nav a:focus-visible, .sf-email:focus-visible, .sf-bottom a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.sf-icons svg { width: 18px; height: 18px; }
/* huge wordmark over the contour background, cropped at the bottom edge */
.sf-mark { border-top: 2px solid var(--ink); height: 13.4cqw; overflow: hidden; display: flex; justify-content: center; }
.sf-mark span { display: block; font: italic 900 17.4cqw/1 var(--display); text-transform: uppercase; letter-spacing: -.04em; color: var(--ink); white-space: nowrap; margin-top: -.6cqw; padding-right: .04em; }
.sf-bottom { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 2px solid var(--ink); background: var(--card); font-size: 12px; }
.sf-bottom a { color: var(--ink); }
#track-record, #badges, #clients, #work, #contact { scroll-margin-top: 16px; }

/* ---------- Booking modal ---------- */
.book { width: min(520px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 0; background: transparent; overflow: visible; color: var(--ink); }
.book::backdrop { background: rgba(17, 17, 17, .7); }
.book-card { position: relative; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; background: #F7F5EF; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 28px 28px 26px; margin-right: 6px; }
html.book-open { overflow: hidden; }
.book-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 2px solid var(--ink); background: #fff; font: 700 22px/1 var(--sans); color: var(--ink); cursor: pointer; }
.book-x:hover { background: var(--yellow); }
.book-x:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.book h2 { font: 700 28px/1.15 var(--grotesk); letter-spacing: -.5px; padding-right: 40px; }
.book-sub { margin: 6px 0 18px; color: #444; font-size: 15px; }
#book-form { display: grid; gap: 14px; }
.bf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bf-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bf-field label { font-weight: 600; font-size: 14px; }
.bf-opt { font-weight: 400; color: var(--muted); }
.bf-field input, .bf-field select, .bf-field textarea { font: 400 16px var(--sans); color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 0; padding: 10px 12px; min-height: 46px; width: 100%; }
.bf-field textarea { resize: vertical; min-height: 96px; }
.bf-field input:focus, .bf-field select:focus, .bf-field textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--yellow); }
.bf-field [aria-invalid="true"] { border-color: var(--red); }
.bf-hint { font-size: 12.5px; color: var(--muted); }
.bf-err { font-size: 13px; color: var(--red); font-weight: 600; }
.bf-err:empty { display: none; }
.bf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bf-alert { border: 2px solid var(--red); background: #FDECEA; padding: 10px 12px; font-size: 14px; }
.bf-alert a { color: var(--ink); font-weight: 600; }
.book-submit { justify-self: start; margin-top: 4px; }
.book-done { text-align: center; padding: 12px 0 4px; }
.book-done .book-check { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 14px; font: 700 40px/1 var(--sans); background: var(--yellow); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 50%; }
.book-done h2 { padding: 0; outline: none; }
.book-done p { margin: 10px 0 22px; color: #333; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1100px) {
  /* track record: role + dates on one line, description under it */
  .tr-list { display: block; }
  .tr-row { display: grid; grid-template-columns: minmax(0, 1fr) max-content; column-gap: 16px; padding: 12px 0; border-top: 1px dashed var(--dash); }
  .tr-row:first-child { border-top: 0; padding-top: 2px; }
  .tr-row > *, .tr-row:first-child > * { padding: 0 !important; border: 0; white-space: normal; }
  .tr-desc { grid-column: 1 / -1; grid-row: 2; margin-top: 4px; }
  .tr-date { grid-column: 2; grid-row: 1; padding-top: 3px; }
  .badges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .pc { grid-column: span 1; }
  .pc-lg { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
  /* featured row stacks: media on top, text below */
  .pc-lg { flex-direction: column; }
  .pc-lg .pc-stage { flex: none; padding: 16px 16px 0; border-left: 0; border-right: 0; border-bottom: 2px solid var(--ink); }
  .pc-lg .pc-body { padding: 18px 20px 20px; gap: 10px; }
  .pc-lg h3 { font-size: 22px; }
}

@media (max-width: 767px) {
  .links a:not(.btn-cv) { display: none; }
  .hero { padding: 20px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "photo" "text" "stats"; row-gap: 22px; }
  .portrait { width: 260px; margin: 40px 0 0 8px; justify-self: start; }
  .tag { font-size: 11px; padding: 4px 8px; }
  .wm { font-size: 44px; padding-left: .28em; }
  .wm-corner { width: .4em; height: .4em; margin: -.2em 0 0 -.2em; }
  .wm-corner::before, .wm-corner::after { width: 7px; margin-left: -3.5px; }
  .tag-role { top: 46%; left: -8%; }
  .reach { gap: 10px; }
  .reach a { flex: 1 1 calc(50% - 10px); justify-content: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 2px solid var(--ink); }
  .stat b { font-size: 28px; }

  .section { padding: 48px 0; }
  .pgrid { grid-template-columns: 1fr; gap: 22px; }
  .pc-stage { padding: 12px 12px 0; }
  h2 { font-size: 32px; }
  .ach { font-size: 32px; }
  .ach.sm { font-size: clamp(17px, 5.6vw, 24px); margin-top: 44px; white-space: nowrap; }
  .ach .s2 { right: -18px; }
  .quote { padding: 24px 20px; }
  .rv-price { text-align: left; }
  .rv-meta .bar { display: none; }
  .list { padding: 22px 18px; }
  .row { grid-template-columns: 1fr; gap: 2px; }
  .sf { padding: 48px 0 28px; }
  .badge img { height: 64px; }
  .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

  .bf { width: 210px; flex: 0 0 210px; }
}

/* ---------- Reduced motion: final state, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .hero:not(.go) .wm-grid, .js .hero:not(.go) .wm-layer, .js .hero:not(.go) .wm-row .im,
  .js .hero:not(.go) .wm-word, .js .hero:not(.go) .hero-up { opacity: 1; }
  .js .wm .name, .js .wm.boxed .name, .js .wm.done .name { background-color: var(--yellow); border-color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
  .wm-fill, .wm-hover { display: none; }
  .pc:hover, .pgrid .pc.in:hover { transform: none; box-shadow: 6px 6px 0 var(--ink); }
  .pc-shot.tall:hover img { object-position: 50% 0; }
  .pc-shot.fit:hover img, .pc-shot.wide:hover img { transform: none; }
  .pc-shot.tall:hover + .pc-hint { opacity: 1; }

  .slider { mask-image: none; -webkit-mask-image: none; }
  .slider-viewport { scroll-snap-type: x mandatory; }
  .slider-track { width: auto; }
  .slider-group[aria-hidden="true"] { display: none; }
  .bf { scroll-snap-align: start; }
}

/* ---------- Mobile: track record dates under the role, footer and booking modal stack ---------- */
@media (max-width: 767px) {
  .tr-row { grid-template-columns: 1fr; }
  .tr-date, .tr-row:first-child > .tr-date { grid-column: 1; grid-row: 2; text-align: left; padding-top: 2px; }
  .tr-desc { grid-row: 3; }
  .sf-top { padding: 24px 20px; }
  .sf-email { font-size: 24px; letter-spacing: -.3px; }
  .sf-mid { grid-template-columns: 1fr; gap: 24px; padding: 24px 20px; }
  .book-card { padding: 22px 18px 20px; }
  .bf-row { grid-template-columns: 1fr; }
  .book h2 { font-size: 24px; }
}
