:root {
  --ink: #1b1e23;
  --body: #343a42;
  --muted: #5f6670;
  --line: rgba(27, 30, 35, .09);
  --gold: #c5a059;
  --gold-ink: #7d5f24;
  --soft: #f7f6f3;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Geist", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(1200px, 100% - 64px); margin-inline: auto; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar-in { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.mark {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 800 23px/1 var(--f-display); letter-spacing: -.02em; color: var(--ink);
}
.mark i { width: 2px; height: 22px; margin: 0 4px; background: var(--gold); border-radius: 2px; }
.nav { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav > a { color: var(--body); transition: color .2s; }
.nav > a:hover { color: var(--ink); }
.nav .nav-cv {
  padding: 7px 15px; border: 1px solid rgba(197, 160, 89, .55); border-radius: 999px;
  color: var(--gold-ink); font-weight: 500; transition: background .2s, border-color .2s;
}
.nav .nav-cv:hover { background: #fbf6ea; border-color: var(--gold); color: var(--gold-ink); }
.nav-icons { display: flex; gap: 2px; margin-left: -8px; }
.nav-icons a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--muted); transition: color .2s, background .2s; }
.nav-icons a:hover { color: var(--ink); background: var(--soft); }
.nav-icons svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-icons svg.gh { width: 18px; height: 18px; fill: currentColor; stroke: none; } /* the official GitHub mark is a filled shape */
.menu-btn { display: none; }

/* ---------- hero: the split portrait ---------- */
.hero {
  --w: min(760px, 58vw);
  --p: 0; /* -1 photo side grows ... 0 middle ... 1 ink side grows; set by script.js */
  --x: calc(50% + var(--p) * var(--w) * .24);
  position: relative;
}
.stage {
  position: relative;
  height: calc(var(--w) * 660 / 904);
  margin-top: 26px;
  overflow: hidden;
}
.half { position: absolute; inset: 0; }
.half-design { clip-path: inset(0 calc(100% - var(--x)) 0 0); z-index: 1; }
.half-ai { clip-path: inset(0 0 0 var(--x)); }
.fig {
  position: absolute; left: 50%; top: calc(var(--w) * -60 / 904);
  width: var(--w); aspect-ratio: 904 / 920;
  transform: translateX(-44.47%); /* the nose (x 402 of 904) sits on the page centre */
  container-type: inline-size;
}
.fig picture, .fig img { position: relative; width: 100%; height: auto; }
.seam {
  position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--x);
  width: 1px; margin-left: -.5px;
  background: linear-gradient(rgba(197, 160, 89, 0), rgba(197, 160, 89, .75) 9%, rgba(197, 160, 89, .55) 85%, rgba(197, 160, 89, 0));
  pointer-events: none;
}
.seam i {
  position: absolute; left: 50%; top: calc(var(--w) * .035);
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  background: #fff; border: 1.5px solid var(--gold); transform: rotate(45deg);
}

/* designer marks: pen tool, selection, swatches */
.marks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.marks .draw, .marks .handle { fill: none; stroke: var(--gold); stroke-width: 1.3px; vector-effect: non-scaling-stroke; }
.marks .handle { stroke-width: 1px; opacity: .8; }
.marks .sel rect, .marks .anchor { fill: #fff; stroke: var(--gold); stroke-width: 1.3px; vector-effect: non-scaling-stroke; }
.marks circle { fill: var(--gold); }

/* AI builder side: agent log */
.log { position: absolute; inset: 0; pointer-events: none; }
.log p {
  position: absolute; white-space: nowrap;
  font: 400 1.9cqw/1 var(--f-mono); letter-spacing: -.01em;
  color: rgba(52, 58, 66, .3);
}
.log b { font-weight: 500; color: rgba(125, 95, 36, .45); }
.log p:nth-child(1) { left: 70%; top: 53%; font-size: 2.1cqw; }
.log p:nth-child(2) { left: 77%; top: 57.6%; font-size: 1.75cqw; }
.log p:nth-child(3) { left: 82.5%; top: 62.2%; font-size: 1.95cqw; }
.log p:nth-child(4) { left: 85.5%; top: 66.8%; font-size: 1.65cqw; }
.log p:nth-child(5) { left: 88%; top: 71.2%; font-size: 1.85cqw; }
.log p:nth-child(6) { left: 89.5%; top: 75.4%; font-size: 1.85cqw; }
.caret { display: inline-block; width: .55em; height: 1em; vertical-align: -.15em; background: rgba(125, 95, 36, .4); }

/* the two words */
.words {
  position: absolute; z-index: 3; left: 0; right: 0;
  top: calc(26px + var(--w) * .2);
  display: flex; justify-content: space-between;
  pointer-events: none;
}
.word { width: calc(50% - var(--w) * .2); max-width: 400px; }
.big {
  font: 700 clamp(44px, 5.5vw, 84px)/.95 var(--f-display);
  font-variation-settings: "opsz" 96;
  letter-spacing: -.045em; color: var(--ink);
  white-space: nowrap;
}
.big .br { font-weight: 400; color: var(--gold); letter-spacing: 0; }
.line { margin-top: 18px; max-width: 30ch; text-wrap: balance; font-size: 17px; line-height: 1.55; color: var(--muted); }

/* ---------- work ---------- */
.work { background: var(--soft); border-top: 1px solid var(--line); padding: 84px 0 96px; }
.work-title {
  display: flex; align-items: center; gap: 28px; margin-bottom: 40px;
  font: 600 22px/1.2 var(--f-display); letter-spacing: -.015em; color: var(--ink); text-align: center;
}
.work-title::before, .work-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  display: block; padding: 10px 10px 24px; background: #fff;
  border: 1px solid rgba(27, 30, 35, .07); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(27, 30, 35, .04), 0 14px 34px -24px rgba(27, 30, 35, .28);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(27, 30, 35, .05), 0 26px 48px -26px rgba(27, 30, 35, .36);
}
.card h3 { margin: 20px 14px 2px; font: 500 18px/1.35 var(--f-body); color: var(--ink); }
.card p { margin: 0 14px; font-size: 15px; color: var(--muted); }
.media { position: relative; aspect-ratio: 16 / 10.5; overflow: hidden; border-radius: 13px; background: #f1efe9; }
.phone {
  position: absolute; left: 50%; top: 11%; width: 33%; aspect-ratio: 540 / 1112;
  transform: translateX(-50%);
  border: 4px solid var(--ink); border-radius: 20px; overflow: hidden; background: var(--ink);
  box-shadow: 0 18px 34px -16px rgba(27, 30, 35, .45);
  transition: transform .6s var(--ease);
}
.win {
  position: absolute; left: 9%; top: 12%; width: 100%; aspect-ratio: 16 / 10;
  border-radius: 9px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px rgba(27, 30, 35, .06), 0 18px 34px -16px rgba(27, 30, 35, .4);
  transition: transform .6s var(--ease);
}
.card:hover .phone { transform: translate(-50%, -4%); }
.card:hover .win { transform: translate(-2%, -3%); }
.phone video, .win video, .win img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.cycle img { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.cycle img.is-on { opacity: 1; }
.more { margin-top: 44px; text-align: center; }
.more a, .link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 500; color: var(--gold-ink);
  text-decoration: underline; text-decoration-color: rgba(125, 95, 36, .3); text-underline-offset: 5px;
  transition: text-decoration-color .2s;
}
.more a:hover, .link:hover { text-decoration-color: var(--gold-ink); }
.more svg, .link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.more a:hover svg, .link:hover svg { transform: translateX(3px); }

/* ---------- footer ---------- */
.foot { position: relative; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: 30px 0; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; transition: color .2s; }
.foot a:hover { color: var(--ink); }
.foot-nav, .foot-reach { display: flex; flex-wrap: wrap; gap: 0 26px; }

/* ---------- motion (skipped under reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .marks .draw { stroke-dasharray: 1; animation: draw 1.4s var(--ease) .5s both; }
  .marks .handle, .marks circle, .marks rect { animation: fade .6s ease 1.3s both; }
  .marks .swatches rect:nth-child(2) { animation-delay: 1.4s; }
  .marks .swatches rect:nth-child(3) { animation-delay: 1.5s; }
  .log p { animation: type .8s steps(18, end) both; animation-delay: calc(1.1s + var(--l) * .38s); }
  .caret { animation: blink 1.1s steps(1) 3.4s infinite; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- tablet and phone ---------- */
@media (max-width: 900px) {
  .menu-btn {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; border-radius: 10px; color: var(--ink); cursor: pointer;
  }
  .menu-btn i, .menu-btn i::before { display: block; width: 20px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
  .menu-btn i { position: relative; transform: translateY(-3.5px); }
  .menu-btn i::before { content: ""; position: absolute; top: 7px; }
  .menu-btn[aria-expanded="true"] i { transform: translateY(0) rotate(45deg); }
  .menu-btn[aria-expanded="true"] i::before { transform: translateY(-7px) rotate(-90deg); }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 20px; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -30px rgba(27, 30, 35, .3);
    display: none;
  }
  .nav.open { display: flex; }
  .nav > a { display: flex; align-items: center; min-height: 48px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav .nav-cv { align-self: flex-start; margin-top: 16px; min-height: 44px; padding: 0 18px; border-bottom: 1px solid rgba(197, 160, 89, .55); }
  .nav-icons { margin: 10px 0 0 -10px; }
  .nav-icons a { width: 44px; height: 44px; }
  .cards { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .bar-in { height: 60px; }
  .hero { --w: min(94vw, 390px); }
  .stage { margin-top: 10px; }
  .words { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 22px 0 34px; pointer-events: auto; }
  .word { width: auto; }
  .big {
    position: absolute; top: calc(10px + var(--w) * .18);
    font-size: clamp(19px, 5.9vw, 26px); letter-spacing: -.04em;
  }
  .word-design .big { left: max(16px, 50% - var(--w) * .5); }
  .word-ai .big { right: max(16px, 50% - var(--w) * .5); }
  .line { margin-top: 0; font-size: 14.5px; line-height: 1.5; }
  .marks .swatches { display: none; }
  .work { padding: 56px 0 64px; }
  .work-title { gap: 16px; margin-bottom: 28px; font-size: 20px; }
  .foot-in { flex-direction: column; align-items: flex-start; gap: 4px; padding: 24px 0 32px; }
  .copy { order: 3; margin-top: 8px; }
}

/* =====================================================================
   Inner pages: about, portfolio, contact
   ===================================================================== */
.nav > a[aria-current="page"] { position: relative; color: var(--ink); font-weight: 500; }
.nav > a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 1.5px;
  background: var(--gold); border-radius: 2px;
}

.h2 { font: 600 clamp(26px, 2.6vw, 34px)/1.15 var(--f-display); letter-spacing: -.025em; color: var(--ink); }
.band { background: var(--soft); border-block: 1px solid var(--line); }
.band + .foot, .band + .feature { border-top: 0; }

/* hero: huge title + gold guide line, split portrait or widget on the right */
.page-hero { border-bottom: 1px solid var(--line); overflow-x: clip; }
.page-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.intro { align-self: center; max-width: 480px; padding: 76px 0 84px; }
.title {
  margin-left: -.05em;
  font: 700 clamp(66px, 8.6vw, 124px)/.9 var(--f-display);
  font-variation-settings: "opsz" 96; letter-spacing: -.055em; color: var(--ink);
}
.title span { color: var(--gold); }
/* the same guide line + diamond as the portrait seam, laid down flat */
.guide { display: block; position: relative; width: 136px; height: 1px; margin: 28px 0 30px; background: var(--gold); }
.guide::after {
  content: ""; position: absolute; right: -5px; top: -4.5px; width: 9px; height: 9px;
  background: #fff; border: 1.5px solid var(--gold); transform: rotate(45deg);
}
.lede { font-size: clamp(20px, 1.9vw, 24px); line-height: 1.42; color: var(--muted); text-wrap: balance; }
.intro-p { margin-top: 20px; max-width: 46ch; font-size: 16.5px; line-height: 1.65; }

/* smaller split portrait (same images, same seam), cropped by the hero line */
.split {
  --w: min(540px, 40vw);
  --p: 0;
  --x: calc(50% + var(--p) * var(--w) * .24);
  position: relative; align-self: end;
  margin-left: -200px; /* nose sits a little left of the column centre so the agent log ends inside the page */
}
.split .stage { margin-top: 40px; overflow: visible; clip-path: inset(-30% -60% 0 -60%); }
.split .half-ai { clip-path: inset(0 -60% 0 var(--x)); }
.split .half-design { clip-path: inset(0 calc(100% - var(--x)) 0 -60%); }

/* back to top: a round tab sitting on the footer line */
.foot .top-tab {
  position: absolute; left: 50%; top: 0; z-index: 1;
  display: grid; place-items: center; width: 48px; height: 48px; margin: -24px 0 0 -24px;
  background: #fff; border: 1px solid var(--line); border-radius: 50%; color: var(--muted);
  box-shadow: 0 10px 22px -16px rgba(27, 30, 35, .4);
  transition: color .2s, transform .4s var(--ease);
}
.foot .top-tab:hover { color: var(--gold-ink); transform: translateY(-3px); }
.top-tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- about ---------- */
.parts { padding: 96px 0; }
.parts-in { display: grid; grid-template-columns: 1fr minmax(0, 340px) 1fr; align-items: center; gap: 40px; }
.part h2 { font: 500 26px/1.2 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
.part ul { margin: 18px 0 0; padding: 0; list-style: none; }
.part li { padding: 5px 0; font-size: 16px; }
.part-a { justify-self: end; min-width: 230px; }
.part-a li { font-family: var(--f-mono); font-size: 14.5px; }
.part-a li b { font-weight: 400; color: var(--gold-ink); }
.parts-chart { margin: 0; }
.parts-chart svg { width: 100%; height: auto; overflow: visible; }
.parts-chart .arc { fill: none; stroke-width: 26; stroke-dasharray: 1; }
.parts-chart .arc-d { stroke: var(--ink); }
.parts-chart .arc-a { stroke: var(--gold); }
.parts-chart .seam-v { stroke: var(--gold); stroke-width: 1; }
.parts-chart .knot { fill: #fff; stroke: var(--gold); stroke-width: 1.5; }
.parts-chart text { font: 700 23px var(--f-display); letter-spacing: -.03em; fill: var(--ink); }
.parts-chart .t-a { font: 400 13.5px var(--f-mono); letter-spacing: 0; fill: var(--ink); }
.parts-chart .t-a tspan { fill: var(--gold-ink); }

.facts { padding: 110px 0; }
.facts-in, .skills-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; }
.fact-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.fact-list li {
  display: grid; grid-template-columns: 44px 1fr; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  font-size: 19px; line-height: 1.45; color: var(--ink);
}
.fact-list .n { font: 400 13px var(--f-mono); color: var(--gold-ink); }

.skills { padding: 100px 0; }
.skills-in { grid-template-columns: 1fr; gap: 40px; }
.skill-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 32px; } /* six CV groups: 3 x 2 */
.skill-groups h3 { padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid rgba(197, 160, 89, .55); font: 600 17px/1.3 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.skill-groups ul { margin: 0; padding: 0; list-style: none; }
.skill-groups li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 15px; line-height: 1.4; }
.skill-groups li img { flex: none; width: 18px; height: 18px; margin-top: 1px; object-fit: contain; }
.skill-groups li.nl::before { content: ""; flex: none; width: 5px; height: 5px; margin: 7px 6.5px 0; background: var(--gold); transform: rotate(45deg); }

.feature { padding: 112px 0; border-top: 1px solid var(--line); }
.feature-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 80px; align-items: center; }
.feature.flip .feature-in { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.feature.flip .feature-text { order: 2; }
.feature-text p { margin: 16px 0 10px; max-width: 44ch; font-size: 16.5px; line-height: 1.7; }
.f-media { position: relative; aspect-ratio: 16 / 11; border-radius: 20px; overflow: hidden; background: #f1efe9; }
.f-media > img { width: 100%; height: 100%; object-fit: cover; }
.f-media .poster {
  position: absolute; width: 36%; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 40px -22px rgba(27, 30, 35, .55);
}
.f-media .poster img { width: 100%; height: 100%; object-fit: cover; }
.f-media .poster:first-child { left: 16%; top: 14%; }
.f-media .poster:last-child { left: 46%; top: 24%; }
.f-media .win { left: 8%; top: 11%; width: 104%; aspect-ratio: 16 / 10; }

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 172px 1fr; gap: 0 24px; padding: 0 0 22px 26px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 10px; bottom: -10px; width: 1px; background: rgba(197, 160, 89, .5); }
.timeline li:last-child::before { display: none; }
.timeline li::after {
  content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px;
  background: #fff; border: 1.5px solid var(--gold); transform: rotate(45deg);
}
.timeline li.now::after { background: var(--gold); }
.timeline .when { font: 400 13px/1.9 var(--f-mono); color: var(--muted); }
.timeline b { display: block; font-weight: 500; color: var(--ink); }
.timeline .where { grid-column: 2; font-size: 14.5px; color: var(--muted); }
.timeline-label { margin: 10px 0 18px 26px; font: 500 13px var(--f-mono); letter-spacing: .04em; color: var(--gold-ink); }

/* ---------- portfolio ---------- */
.page-hero-pf .page-hero-in { align-items: center; }
.agent { justify-self: end; width: min(100%, 470px); padding: 56px 0; }
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 500; color: var(--ink); cursor: pointer; }
.switch input {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; margin: 0;
  width: 46px; height: 28px; border-radius: 999px; background: #8f8a81; cursor: pointer;
}
.switch input::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(27, 30, 35, .3);
}
.switch input:checked { background: var(--gold-ink); }
.switch input:checked::before { transform: translateX(18px); }
.switch input:focus-visible { outline-offset: 4px; border-radius: 999px; }
.agent-stage { position: relative; aspect-ratio: 470 / 350; margin-top: 22px; }
.mini {
  position: absolute; right: 3%; top: 8%; width: 63%; padding: 7px 7px 14px;
  background: #fff; border: 1px solid rgba(27, 30, 35, .07); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(27, 30, 35, .04), 0 18px 36px -24px rgba(27, 30, 35, .32);
}
.mini-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: #f1efe9; }
.mini-media svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini-media svg line { stroke: rgba(197, 160, 89, .7); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mini-media img { position: absolute; left: 7%; top: 10%; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: 6px; box-shadow: 0 0 0 1px rgba(27, 30, 35, .06), 0 12px 22px -12px rgba(27, 30, 35, .4); opacity: 0; transform: translateY(8%); }
.mini-text { position: relative; height: 44px; margin: 12px 8px 0; }
.mini-text i { position: absolute; left: 0; height: 9px; border-radius: 5px; background: #e9e6df; }
.mini-text i:first-child { top: 4px; width: 62%; }
.mini-text i:nth-child(2) { top: 24px; width: 38%; }
.mini-text b, .mini-text span { position: absolute; left: 0; white-space: nowrap; opacity: 0; }
.mini-text b { top: 0; font: 500 15px/1.3 var(--f-body); color: var(--ink); }
.mini-text span { top: 21px; font-size: 13px; color: var(--muted); }
.mini-sel { position: absolute; inset: -8px; border: 1px solid var(--gold); border-radius: 3px; pointer-events: none; }
.mini-sel i { position: absolute; width: 8px; height: 8px; background: #fff; border: 1px solid var(--gold); }
.mini-sel i:nth-child(1) { left: -4.5px; top: -4.5px; }
.mini-sel i:nth-child(2) { right: -4.5px; top: -4.5px; }
.mini-sel i:nth-child(3) { left: -4.5px; bottom: -4.5px; }
.mini-sel i:nth-child(4) { right: -4.5px; bottom: -4.5px; }
.mini-sel em { position: absolute; left: -1px; bottom: calc(100% + 9px); font: 400 11.5px/1 var(--f-mono); font-style: normal; color: var(--gold-ink); white-space: nowrap; }
.mini-log {
  position: absolute; left: 0; bottom: 0; width: 57%; min-height: calc(26px + 5.85em); padding: 13px 15px;
  background: rgba(255, 255, 255, .94); border: 1px solid rgba(27, 30, 35, .08); border-radius: 13px;
  box-shadow: 0 16px 32px -22px rgba(27, 30, 35, .35);
  font: 400 12px/1.95 var(--f-mono); color: var(--muted);
}
.mini-log p { white-space: nowrap; }
.mini-log b { font-weight: 500; color: var(--gold-ink); }
.mini-log .run { position: absolute; left: 15px; clip-path: inset(0 100% 0 0); }
.mini-log .run:nth-child(2) { top: 13px; }
.mini-log .run:nth-child(3) { top: calc(13px + 1.95em); }
.mini-log .run:nth-child(4) { top: calc(13px + 3.9em); }
.mini-log .run i { font-style: normal; color: var(--ink); }
/* on: the agent writes the log, then the wireframe becomes the real card */
.agent:has(input:checked) .mini-log .idle { opacity: 0; }
.agent:has(input:checked) .mini-log .run { clip-path: inset(0 0 0 0); }
.agent:has(input:checked) .mini-media img { opacity: 1; transform: none; }
.agent:has(input:checked) .mini-media svg, .agent:has(input:checked) .mini-text i, .agent:has(input:checked) .mini-sel { opacity: 0; }
.agent:has(input:checked) .mini-text b, .agent:has(input:checked) .mini-text span { opacity: 1; }

.pf-grid { padding: 88px 0 104px; }
.media-full img, .media-full video, .tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.media-full > video, .media-full > img { position: absolute; inset: 0; }
.tile {
  position: absolute; left: 50%; top: 11%; width: 34%; aspect-ratio: 9 / 16;
  transform: translateX(-50%); overflow: hidden; border-radius: 12px; background: var(--ink);
  box-shadow: 0 18px 34px -16px rgba(27, 30, 35, .45);
  transition: transform .6s var(--ease);
}
.tile.t-45 { width: 46%; aspect-ratio: 4 / 5; top: 12%; }
.tile.t-43 { width: 64%; aspect-ratio: 4 / 3; top: 12%; background: #fff; box-shadow: 0 0 0 1px rgba(27, 30, 35, .06), 0 18px 34px -16px rgba(27, 30, 35, .35); }
.card:hover .tile { transform: translate(-50%, -4%); }
.tile.t-top img { object-position: top; }
/* a phone peeking in front of a browser window (online store card) */
.phone.phone-peek { left: auto; right: 9%; top: 30%; width: 22%; aspect-ratio: 780 / 1688; transform: none; border-width: 3px; border-radius: 14px; }
.phone-peek img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card:hover .phone.phone-peek { transform: translateY(-5%); }
.media-type { display: flex; flex-direction: column; justify-content: flex-end; padding: 26px 28px; }
.media-type .guide { position: absolute; left: 28px; top: 34px; width: 64px; margin: 0; }
.media-type strong { font: 700 clamp(26px, 2.5vw, 34px)/1 var(--f-display); letter-spacing: -.04em; color: var(--ink); }
.media-type small { margin-top: 12px; font: 400 13px var(--f-mono); color: var(--gold-ink); }

/* case view: a native modal <dialog>; :target fallback without JS */
html:has(dialog.case[open]) { overflow: hidden; }
.case {
  width: min(1100px, 100% - 48px); max-width: none; max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: 24px; background: #fff; color: var(--body);
  box-shadow: 0 40px 80px -30px rgba(27, 30, 35, .45);
}
.case::backdrop { background: rgba(27, 30, 35, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html:not(.js) .case:target { display: block; position: fixed; inset: 0; z-index: 40; margin: auto; height: fit-content; overflow: auto; }
.case-in { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); min-height: 100%; }
.case-media { display: grid; place-items: center; padding: 36px; background: #f1efe9; }
.case-media video, .case-media > img { width: 100%; height: auto; border-radius: 12px; background: var(--ink); box-shadow: 0 24px 44px -26px rgba(27, 30, 35, .5); }
.case-media .tall { width: auto; max-width: 100%; max-height: min(72dvh, 640px); }
.case-media .light { background: #fff; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.case-grid.g3 { grid-template-columns: repeat(3, 1fr); }
.case-grid img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: 9px; box-shadow: 0 0 0 1px rgba(27, 30, 35, .06), 0 14px 24px -18px rgba(27, 30, 35, .45); }
.case-grid.g3 img { aspect-ratio: 4 / 5; object-position: center; }
.case-type { text-align: left; width: 100%; padding: 20px; }
.case-type strong { display: block; font: 700 clamp(34px, 4vw, 54px)/1 var(--f-display); letter-spacing: -.045em; color: var(--ink); }
.case-type small { display: block; margin-top: 16px; font: 400 14px var(--f-mono); color: var(--gold-ink); }
.case-text { position: relative; padding: 64px 44px 44px; }
.case-cat { font: 400 13px var(--f-mono); color: var(--gold-ink); }
.case-text h2 { margin: 10px 0 14px; font: 700 clamp(30px, 3vw, 40px)/1.05 var(--f-display); letter-spacing: -.035em; color: var(--ink); }
.case-text > p:not(.case-cat) { font-size: 16.5px; line-height: 1.65; }
.case-facts { margin: 22px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.case-facts li { position: relative; padding: 11px 0 11px 20px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.case-facts li::before { content: ""; position: absolute; left: 1px; top: 19px; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.case-facts li span { color: var(--muted); }
.case-text .link { margin-top: 14px; }
.case-close {
  position: absolute; right: 16px; top: 16px; z-index: 2;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
  transition: background .2s, border-color .2s;
}
.case-close:hover { background: var(--soft); border-color: rgba(27, 30, 35, .18); }
html:not(.js) .case-close { display: none; } /* it needs script.js; without it, Back closes the case */
.case-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

/* case view stepper. The track is a native scroll-snap row, so swipe, trackpad and arrow keys work
   with no script (captions then show under each slide). script.js adds the step bar under it. */
.steps { width: 100%; }
.steps-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  margin: 0 -10px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.js .steps-track { scrollbar-width: none; }
.js .steps-track::-webkit-scrollbar { display: none; }
.steps-track:focus-visible { outline-offset: -2px; }
.steps-track figure { position: relative; margin: 0; padding: 4px 10px 24px; scroll-snap-align: start; } /* keeps the hidden captions inside the track, so the case view never scrolls sideways */
.steps figcaption { margin-top: 14px; text-align: center; font-size: 14px; font-weight: 500; color: var(--muted); }
.js .steps figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shot {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: #fff;
  box-shadow: 0 0 0 1px rgba(27, 30, 35, .06), 0 18px 30px -22px rgba(27, 30, 35, .5);
}
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.shot.shot-phone { overflow: visible; background: none; box-shadow: none; }
.shot-phone img {
  left: 50%; right: auto; width: auto; aspect-ratio: 780 / 1688; transform: translateX(-50%);
  border: 4px solid var(--ink); border-radius: 18px; object-position: top;
  box-shadow: 0 18px 30px -18px rgba(27, 30, 35, .5);
}
.steps-tall figure { display: grid; justify-items: center; padding-bottom: 36px; }
.steps-tall img {
  width: auto; max-width: 100%; height: min(62dvh, 560px, 100vw); object-fit: contain;
  border-radius: 12px; box-shadow: 0 0 0 1px rgba(27, 30, 35, .05), 0 22px 36px -24px rgba(27, 30, 35, .55);
}
.steps-bar { display: flex; align-items: center; justify-content: center; gap: 8px; }
.steps-arrow {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); cursor: pointer;
  transition: border-color .2s, opacity .2s;
}
.steps-arrow:hover:not(:disabled) { border-color: rgba(27, 30, 35, .28); }
.steps-arrow:disabled { opacity: .4; cursor: default; }
.steps-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.steps-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.steps-nav button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  background: none; border: 0; border-radius: 999px; font: 500 14px var(--f-body); color: var(--muted); cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s;
}
.steps-nav button i { font: 400 11.5px var(--f-mono); font-style: normal; color: var(--gold-ink); }
.steps-nav button:hover { color: var(--ink); }
.steps-nav button[aria-current="true"] { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 6px 14px -10px rgba(27, 30, 35, .4); }
.steps-count { min-width: 84px; text-align: center; font: 400 13px var(--f-mono); color: var(--muted); }
.steps-count b { font-weight: 500; color: var(--ink); }

/* Swimeroo case: the web app stepper, then the launch slides, each with a small label */
.case-media.case-stack { place-items: start stretch; align-content: start; }
.steps-label { margin-bottom: 14px; font: 400 13px var(--f-mono); color: var(--gold-ink); }
.steps + .steps-label { margin-top: 30px; }
.case-stack .steps-tall img { height: min(52dvh, 480px, 100vw); }
/* the owner walkthrough: the desktop recording in a browser window, the phone recording in a phone (3:1 keeps their heights level) */
.walk { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 22px; align-items: end; }
.walk + .steps-label { margin-top: 34px; }
.walk figure { margin: 0; }
.walk figcaption { margin-top: 14px; text-align: center; font-size: 14px; font-weight: 500; color: var(--muted); }
.browser {
  display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 11px;
  background: #fff; border-radius: 10px 10px 0 0; box-shadow: 0 0 0 1px rgba(27, 30, 35, .06);
}
.browser i { width: 7px; height: 7px; border-radius: 50%; background: #e3dfd6; }
.case-media .walk video { width: 100%; height: auto; }
.case-media .walk-desk video { border-radius: 0 0 10px 10px; background: #fff; box-shadow: 0 0 0 1px rgba(27, 30, 35, .06), 0 24px 40px -26px rgba(27, 30, 35, .5); }
.case-media .walk-phone video { border: 5px solid var(--ink); border-radius: 22px; box-shadow: 0 22px 36px -22px rgba(27, 30, 35, .55); }
.case-text > p.case-more { margin-top: 12px; }

/* Company Hub case: the screens stay in view while the tool list scrolls */
.case-hub .case-in { background: linear-gradient(90deg, #f1efe9 60%, #fff 60%); }
.case-hub .case-media { position: sticky; top: 0; align-self: start; background: none; }
.tools-h { display: flex; align-items: center; gap: 12px; margin: 30px 0 2px; font-size: inherit; }
.tools-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tag { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font: 500 12px/1.3 var(--f-mono); letter-spacing: .02em; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.tag-live { background: #fbf6ea; color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgba(197, 160, 89, .5); }
.tag-live::before { background: var(--gold-ink); }
.tag-planned { color: var(--muted); box-shadow: inset 0 0 0 1px rgba(27, 30, 35, .2); }
.tag-planned::before { border: 1px solid currentColor; }
.tools { margin: 0; padding: 0; list-style: none; }
.tools li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.55; }
.tools li:last-child { border-bottom: 0; }
.tools b { display: block; margin-bottom: 3px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.tools .stat { display: block; margin-top: 8px; font: 400 12.5px/1.5 var(--f-mono); color: var(--gold-ink); }
.planned { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.planned li { padding: 7px 14px; border: 1px dashed rgba(27, 30, 35, .3); border-radius: 999px; font-size: 14px; }
.case-text > p.tools-note { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

/* ---------- contact ---------- */
.reach { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 34px 0 0; padding: 0; list-style: none; }
.reach li { display: flex; align-items: center; gap: 8px; }
.reach a { display: inline-flex; align-items: center; gap: 14px; min-height: 48px; font-weight: 500; color: var(--ink); }
.reach a:hover { color: var(--gold-ink); }
.ring { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fbf6ea; border: 1px solid rgba(197, 160, 89, .45); color: var(--gold-ink); transition: transform .4s var(--ease); }
.reach a:hover .ring { transform: translateY(-2px); }
.ring svg, .copy-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ring svg.gh { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  background: none; border: 0; border-radius: 10px; font: 500 14px var(--f-body); color: var(--muted); cursor: pointer;
}
.copy-btn[hidden] { display: none; }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn:hover { color: var(--ink); background: var(--soft); }

.mail { padding: 92px 0 100px; }
.mail form { margin-top: 30px; }
.mail-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "name msg" "email msg"; gap: 22px 40px; }
.field { display: flex; flex-direction: column; }
.field-name { grid-area: name; }
.field-email { grid-area: email; }
.field-msg { grid-area: msg; }
.field label { margin-bottom: 8px; font-size: 15px; font-weight: 500; color: var(--ink); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 16px;
  background: #fff; border: 1px solid #868c94; border-radius: 12px;
  font: 400 16px/1.5 var(--f-body); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { flex: 1; min-height: 168px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold-ink); box-shadow: 0 0 0 3px rgba(197, 160, 89, .3); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.err { min-height: 0; margin-top: 6px; font-size: 14px; color: #b3261e; }
.err:empty { display: none; }
.mail-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 28px; }
.mail-note { font-size: 14.5px; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 28px;
  background: var(--ink); border: 0; border-radius: 999px;
  font: 500 16px var(--f-body); color: #fff; cursor: pointer;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -16px rgba(27, 30, 35, .6); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- inner page motion (all of it skipped under reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .page-hero .title { animation: rise .9s var(--ease) .05s backwards; }
  .page-hero .guide { animation: lay 1s var(--ease) .35s backwards; }
  .page-hero .lede, .page-hero .intro-p, .page-hero .reach { animation: rise .9s var(--ease) .5s backwards; }
  .page-hero .intro-p, .page-hero .reach { animation-delay: .62s; }
  .agent { animation: rise 1s var(--ease) .45s backwards; }
  .js .reveal:not(.in) { opacity: 0; }
  .js .reveal.in { animation: rise .9s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 90ms); }
  .js .parts-chart:not(.in) .arc { stroke-dashoffset: 1; }
  .parts-chart.in .arc { animation: draw 1.5s var(--ease) .15s backwards; }
  .parts-chart.in .arc-a { animation-delay: .55s; }
  .js .parts-chart:not(.in) text, .js .parts-chart:not(.in) .knot { opacity: 0; }
  .parts-chart.in text, .parts-chart.in .knot { animation: fade .6s ease 1.2s backwards; }
  .case[open] { animation: rise .55s var(--ease); }
  .case[open]::backdrop { animation: fade .4s ease; }

  .switch input { transition: background .3s; }
  .switch input::before { transition: transform .4s var(--ease); }
  .mini-media img { transition: opacity .3s, transform .3s var(--ease); }
  .mini-media svg, .mini-text i, .mini-sel { transition: opacity .3s; }
  .mini-text b, .mini-text span { transition: opacity .2s; }
  .mini-log .idle { transition: opacity .15s; }
  .mini-log .run { transition: clip-path .15s; }
  /* switching on: type three lines, then build the card */
  .agent:has(input:checked) .mini-log .run { transition: clip-path .55s steps(18, end); }
  .agent:has(input:checked) .mini-log .run:nth-child(3) { transition-delay: .5s; }
  .agent:has(input:checked) .mini-log .run:nth-child(4) { transition-delay: 1s; }
  .agent:has(input:checked) .mini-sel, .agent:has(input:checked) .mini-media svg, .agent:has(input:checked) .mini-text i { transition: opacity .4s 1.3s; }
  .agent:has(input:checked) .mini-media img { transition: opacity .6s 1.45s, transform .9s var(--ease) 1.45s; }
  .agent:has(input:checked) .mini-text b, .agent:has(input:checked) .mini-text span { transition: opacity .5s 1.6s; }
  .agent:has(input:checked) .mini-text span { transition-delay: 1.72s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes lay { from { clip-path: inset(-6px calc(100% + 6px) -6px -6px); } to { clip-path: inset(-6px -6px -6px -6px); } }

@media (max-width: 900px) {
  .nav > a[aria-current="page"]::after { display: none; }
  .nav > a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); padding-left: 14px; }
  .page-hero-in { grid-template-columns: 1fr; gap: 0; }
  .intro { max-width: 560px; padding: 56px 0 8px; }
  .split { --w: min(88vw, 470px); margin-left: 0; }
  .agent { justify-self: start; padding: 32px 0 56px; }
  .parts-in { grid-template-columns: 1fr 1fr; }
  .parts-chart { grid-column: 1 / -1; grid-row: 1; justify-self: center; width: min(300px, 80%); }
  .part-a { justify-self: start; min-width: 0; }
  .facts-in { grid-template-columns: 1fr; gap: 28px; }
  .feature-in, .feature.flip .feature-in { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .feature-text { order: 0; }
  .case-in { grid-template-columns: 1fr; }
  .case-text { padding: 32px 26px 34px; }
  .case-hub .case-in { background: none; }
  .case-hub .case-media { position: static; background: #f1efe9; }
}

@media (max-width: 760px) {
  .title { font-size: clamp(60px, 18vw, 88px); }
  .guide { margin: 22px 0 22px; }
  .lede { font-size: 19px; }
  .intro-p { font-size: 16px; }
  .split .stage { margin-top: 30px; }
  .parts, .skills { padding: 64px 0; }
  .parts-in { grid-template-columns: 1fr; gap: 40px; }
  .parts-chart { width: min(260px, 74%); }
  .part h2 { font-size: 22px; }
  .part li { font-size: 15px; }
  .part-a li { font-size: 13.5px; }
  .facts { padding: 68px 0; }
  .fact-list li { grid-template-columns: 36px 1fr; padding: 15px 0; font-size: 17px; }
  .feature { padding: 68px 0; }
  .timeline li { grid-template-columns: 1fr; padding-bottom: 20px; }
  .timeline .where { grid-column: 1; }
  .pf-grid { padding: 56px 0 72px; }
  .skill-groups { grid-template-columns: 1fr 1fr; gap: 30px 18px; }
  .skill-groups li { font-size: 14px; gap: 8px; }
  .skill-groups li.nl::before { margin-inline: 6.5px 4.5px; }
  .mini-log { width: 66%; padding: 11px 12px; font-size: 11px; }
  .mini-log .run { left: 12px; }
  .mini-log .run:nth-child(2) { top: 11px; }
  .mini-log .run:nth-child(3) { top: calc(11px + 1.95em); }
  .mini-log .run:nth-child(4) { top: calc(11px + 3.9em); }
  .case { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 20px; }
  .case-media { padding: 68px 22px 22px; }
  .case-media .tall { max-height: 58dvh; }
  .case-grid.g3 { grid-template-columns: 1fr 1fr; }
  .case-close { right: 12px; top: 12px; }
  .walk { grid-template-columns: 1fr; gap: 26px; }
  .walk-phone { justify-self: center; width: min(62%, 230px); }
  /* touch swipes the track, so the labelled step bar drops its arrows and numbers to fit one row */
  .steps-bar:has(.steps-nav) .steps-arrow { display: none; }
  .steps-nav button { padding: 0 11px; font-size: 13.5px; }
  .steps-nav button i { display: none; }
  .reach { flex-direction: column; gap: 6px; }
  .mail { padding: 60px 0 72px; }
  .mail-grid { grid-template-columns: 1fr; grid-template-areas: "name" "email" "msg"; gap: 20px; }
  .mail-foot { flex-direction: column-reverse; align-items: stretch; }
  .btn { justify-content: center; }
}

/* =====================================================================
   Portfolio categories (update 2): filter row, fanned sets, ad walls, lightbox
   ===================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 0 32px; margin: -14px 0 44px; border-bottom: 1px solid var(--line); }
.filters[hidden], .card[hidden] { display: none; }
.filters button {
  position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 48px; padding: 0;
  background: none; border: 0; font: 500 15.5px var(--f-body); color: var(--muted); cursor: pointer;
}
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--ink); }
.filters button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px;
  background: var(--gold); border-radius: 2px; transform: scaleX(0); transform-origin: left;
}
.filters button[aria-pressed="true"]::after { transform: none; }
.filters button:focus-visible { outline-offset: 2px; }
.filters .n { font: 400 12px var(--f-mono); color: var(--muted); }

/* a set of designs: three fanned out, the front one on top (crossfades on 500 Designs) */
.fan > * {
  position: absolute; left: 32%; top: 13%; width: 36%; aspect-ratio: 4 / 5;
  overflow: hidden; border-radius: 10px; background: #fff;
  box-shadow: 0 0 0 1px rgba(27, 30, 35, .06), 0 18px 34px -16px rgba(27, 30, 35, .45);
  transform-origin: 50% 130%;
  transition: transform .6s var(--ease);
}
.fan > :nth-child(1) { transform: rotate(-9deg) translateX(-26%); }
.fan > :nth-child(2) { transform: rotate(9deg) translateX(26%); }
.fan > :nth-child(3) { z-index: 1; }
.card:hover .fan > :nth-child(1) { transform: rotate(-12deg) translateX(-36%); }
.card:hover .fan > :nth-child(2) { transform: rotate(12deg) translateX(36%); }
.card:hover .fan > :nth-child(3) { transform: translateY(-4%); }
.fan img { width: 100%; height: 100%; object-fit: cover; }
.fan-top img { object-position: top; }
.fan.f-916 > * { left: 36%; top: 10%; width: 28%; aspect-ratio: 9 / 16; }
.cycle[data-ms] img { transition-duration: 1.2s; }
.media-type small, .case-type small { color: var(--muted); }
.media-type small b, .case-type small b { font-weight: 500; color: var(--gold-ink); }

/* single browser screenshot in a case view */
.shot-solo { width: 100%; }
/* list of live sites (VA websites case) */
.sites { margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.sites li { border-bottom: 1px solid var(--line); }
.sites .link { width: 100%; justify-content: space-between; min-height: 48px; font: 400 14px var(--f-mono); }
.case-links { display: flex; flex-direction: column; align-items: flex-start; margin-top: 14px; }
.case-text .case-links .link { margin-top: 0; }

/* Static Ads case: intro on top, masonry wall below */
.case-wall .case-in { grid-template-columns: 1fr; }
.case-wall .case-text { padding: 60px 96px 34px 48px; }
.case-wall .case-text > p:not(.case-cat) { max-width: 60ch; }
.case-wall .case-media { display: block; padding: 34px 40px 40px; }
.wall-label { margin-bottom: 18px; font: 400 13px var(--f-mono); color: var(--gold-ink); }
.wall { columns: 3; column-gap: 14px; }
.wall-4 { columns: 4; }
.wall a {
  display: block; margin-bottom: 14px; break-inside: avoid;
  overflow: hidden; border-radius: 10px; background: #fff; cursor: zoom-in;
  box-shadow: 0 0 0 1px rgba(27, 30, 35, .06), 0 14px 26px -20px rgba(27, 30, 35, .5);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.wall a:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(27, 30, 35, .08), 0 22px 34px -22px rgba(27, 30, 35, .55); }
.wall img { width: 100%; height: auto; }

/* lightbox: a light, full-screen modal over the case view */
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; overflow: hidden;
}
.lightbox::backdrop { background: rgba(247, 246, 243, .97); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox figure { display: grid; place-items: center; align-content: center; gap: 16px; height: 100%; margin: 0; padding: 72px 104px 36px; }
.lightbox img {
  width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 160px);
  border-radius: 12px; box-shadow: 0 0 0 1px rgba(27, 30, 35, .06), 0 30px 60px -30px rgba(27, 30, 35, .55);
}
.lightbox figcaption { display: flex; gap: 14px; align-items: baseline; font-size: 14.5px; color: var(--muted); text-align: center; }
.lightbox figcaption b { font: 500 12.5px var(--f-mono); color: var(--gold-ink); }
.lb-btn {
  position: absolute; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); cursor: pointer;
  box-shadow: 0 10px 22px -16px rgba(27, 30, 35, .45); transition: border-color .2s;
}
.lb-btn:hover { border-color: rgba(27, 30, 35, .28); }
.lb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lb-prev, .lb-next { top: 50%; margin-top: -24px; }
.lb-prev { left: 32px; }
.lb-next { right: 32px; }
.lb-close { right: 20px; top: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .filters button { transition: color .2s; }
  .filters button::after { transition: transform .45s var(--ease); }
  .js .reveal.settled { animation: none; } /* filtering animates the cards itself */
  .lightbox[open] { animation: fade .3s ease; }
  .lightbox[open]::backdrop { animation: fade .3s ease; }
}

@media (max-width: 900px) {
  .case-wall .case-text { padding: 32px 26px 22px; }
  .case-wall .case-media { padding: 26px 22px 30px; }
  .wall-4 { columns: 3; }
}

@media (max-width: 760px) {
  .filters { gap: 0 22px; margin: -6px 0 30px; }
  .filters button { min-height: 44px; font-size: 15px; }
  .case-wall .case-text { padding: 66px 22px 20px; }
  .case-wall .case-media { padding: 22px 14px 24px; }
  .wall, .wall-4 { columns: 2; column-gap: 10px; }
  .wall a { margin-bottom: 10px; border-radius: 8px; }
  .lightbox figure { padding: 64px 16px 92px; }
  .lightbox img { max-height: calc(100dvh - 190px); }
  .lb-prev, .lb-next { top: auto; bottom: 24px; margin-top: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .lb-close { right: 12px; top: 12px; }
}
