/* samlewis.fyi: one long scroll, soft colour blocks, chunky serif headlines */
:root {
  --sky: #9fe5fb;
  --mint: #c7e6e4;
  --lilac: #e4e7f9;
  --cream: #f7f2ea;
  --ink: #46282a;
  --accent: #46282a;
  --paper: #fffdf9;
  --display: "Fraunces", "Cooper", Georgia, serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --pad: clamp(20px, 4vw, 72px);
  --max: 1680px;
  --header-h: 76px;
  --radius: 999px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) - 1px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; overflow-x: clip; color: var(--ink); background: var(--cream);
  font: 400 clamp(17px, 1.15vw, 20px)/1.5 var(--serif);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.bg-sky { --bg: var(--sky); }
.bg-mint { --bg: var(--mint); }
.bg-lilac { --bg: var(--lilac); }
.bg-cream { --bg: var(--cream); }
.bg-ink { --bg: var(--ink); }
[class*="bg-"] { background: var(--bg); }
.bg-ink { color: var(--cream); }
.bg-ink .btn { background: var(--cream); color: var(--ink); }

.display {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: .95;
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 144; margin: 0; text-wrap: balance;
}
.h2 { font-size: clamp(44px, 6.4vw, 112px); }
.h3 { font-size: clamp(28px, 2.6vw, 44px); line-height: 1.02; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.sec { padding: clamp(64px, 9vw, 150px) 0; position: relative; }
.lede { font-size: clamp(19px, 1.45vw, 25px); line-height: 1.45; max-width: 36em; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--accent); color: var(--cream); text-decoration: none; border: 0; cursor: pointer;
  font: 500 clamp(17px, 1.25vw, 22px)/1 var(--serif); padding: 1.05em 2.1em; border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px -10px rgba(0,0,0,.45); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2em; }
.textlink { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.textlink:hover { text-decoration-thickness: 2px; }

/* ---------- announcement + header ---------- */
.announce { background: var(--ink); color: var(--cream); text-align: center; font-size: 16px; padding: 10px var(--pad); }
.announce a { color: inherit; }
.header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: var(--header-bg, var(--sky)); transition: background .35s ease, box-shadow .35s ease;
}
.header.scrolled { box-shadow: 0 1px 0 rgba(70,40,42,.12); }
.header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { font: 700 clamp(24px, 2vw, 34px)/1 var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; letter-spacing: -.02em; text-decoration: none; }
.nav { display: flex; gap: clamp(16px, 2.2vw, 40px); align-items: center; }
.nav a { text-decoration: none; font-size: clamp(17px, 1.3vw, 23px); padding: 6px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .3s ease; }
.nav a:hover, .nav a.on { background-size: 100% 1.5px; }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 2px; background: currentColor; margin: 6px 0; transition: transform .3s ease, opacity .3s ease; }
.menu-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .burger { display: block; }
  .nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--header-bg, var(--sky)); flex-direction: column; align-items: flex-start; padding: 32px var(--pad);
    gap: 10px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility .25s; }
  .nav a { font: 700 44px/1.1 var(--display); font-variation-settings: "SOFT" 100; }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; }
}

/* ---------- hero ---------- */
.t-hero { padding-top: clamp(8px, 1.5vw, 24px); padding-bottom: clamp(40px, 5vw, 80px); }
.fit { white-space: nowrap; font-size: 120px; display: inline-block; }
.hero-title { text-align: center; margin-bottom: clamp(16px, 2.4vw, 40px); }
.hero-media { position: relative; margin: 0; overflow: hidden; border-radius: 2px; aspect-ratio: 16 / 9; max-height: 84vh; width: 100%; background: rgba(0,0,0,.08); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.6s cubic-bezier(.2,.7,.2,1); }
.loaded .hero-media img { transform: scale(1); }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55)); pointer-events: none; }
.hero-caption { position: absolute; left: clamp(20px, 4vw, 72px); bottom: clamp(20px, 4vw, 64px); max-width: 30em; z-index: 1; color: #fff8ef; font-size: clamp(19px, 2vw, 34px); line-height: 1.3; margin: 0; }
@media (max-width: 700px) { .hero-media { aspect-ratio: 4 / 5; } }

/* ---------- split ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 120px); align-items: center; }
.split.right .split-media { order: 2; }
.split-media { margin: 0 auto; aspect-ratio: 4 / 5; overflow: hidden; width: 100%; max-width: 360px; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split .h2 { margin-bottom: .45em; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: clamp(20px, 2.5vw, 40px); }
.cols p { margin: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split.right .split-media { order: 0; } .split-media { max-width: 280px; } }

/* ---------- section heads + cards ---------- */
.shead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 48px; margin-bottom: clamp(32px, 4vw, 64px); }
.shead .lede { margin: 0; max-width: 26em; }
.kicker { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1em; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 56px) clamp(20px, 2.4vw, 44px); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { display: block; text-decoration: none; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; width: 100%; }
.card-media { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: rgba(70,40,42,.08); margin-bottom: 18px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media img { transform: scale(1.045); }
.card-quote { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10%; text-align: center; background: var(--ink); color: var(--cream);
  font: 700 clamp(24px, 2.2vw, 38px)/1.05 var(--display); font-variation-settings: "SOFT" 100; }
.tags { position: absolute; left: 14px; top: 14px; right: 14px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.tags [data-path] { pointer-events: auto; }
.tag { background: var(--cream); color: var(--ink); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; }
.card-title { display: block; font: 700 clamp(22px, 1.8vw, 30px)/1.08 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -.015em; margin-bottom: 6px; }
.card-meta { display: block; font-size: .86em; opacity: .78; }
.card-q { display: block; font-style: italic; margin-top: 8px; }
.card .arrow { display: inline-block; transition: transform .25s ease; }
.card:hover .arrow { transform: translateX(5px); }

/* featured: two big cards, then four */
.feat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 3vw, 56px) clamp(18px, 2vw, 36px); }
.feat .card { grid-column: span 3; }
.feat .card:nth-child(-n+2) { grid-column: span 6; }
.feat .card:nth-child(-n+2) .card-media { aspect-ratio: 3 / 2; }
.feat .card:nth-child(n+3) .card-title { font-size: clamp(20px, 1.5vw, 26px); }
@media (max-width: 1100px) { .feat .card, .feat .card:nth-child(-n+2) { grid-column: span 6; } }
@media (max-width: 600px) { .feat .card, .feat .card:nth-child(-n+2) { grid-column: 1 / -1; } }

/* ---------- text ---------- */
.textsec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 120px); align-items: start; }
.textsec .h2 { position: sticky; top: calc(var(--header-h) + 32px); }
.textsec .prose { font-size: clamp(18px, 1.3vw, 22px); max-width: 38em; }
@media (max-width: 820px) { .textsec { grid-template-columns: 1fr; } .textsec .h2 { position: static; } }

/* ---------- curved marquee ---------- */
.t-curved { padding: clamp(40px, 6vw, 90px) 0 clamp(56px, 7vw, 110px); overflow: hidden; }
.curve-svg { display: block; width: 100%; height: auto; overflow: visible; }
.curve-svg text { font: 700 120px var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; fill: var(--ink); letter-spacing: -1px; }
.socials { display: flex; justify-content: center; gap: 14px; margin-top: clamp(12px, 2vw, 32px); }
.social { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; transition: transform .2s ease; }
.social:hover { transform: translateY(-3px) rotate(-6deg); }
.social svg { width: 26px; height: 26px; fill: currentColor; }

/* ---------- cv ---------- */
.cv-intro { margin-bottom: clamp(32px, 4vw, 64px); }
.jobs { border-top: 1.5px solid var(--ink); }
.job { display: grid; grid-template-columns: minmax(110px, 1.2fr) minmax(0, 3fr) minmax(0, 6fr); gap: 12px clamp(20px, 3vw, 56px); padding: clamp(22px, 2.4vw, 36px) 0; border-bottom: 1.5px solid var(--ink); }
.job-dates { font-variant-numeric: tabular-nums; }
.job-co { font: 700 clamp(22px, 1.8vw, 30px)/1.1 var(--display); font-variation-settings: "SOFT" 100; margin: 0 0 4px; }
.job-role { font-style: italic; margin: 0; }
.job ul { margin: 0; padding-left: 1.1em; }
.job li { margin-bottom: .35em; }
.edu { margin-top: clamp(40px, 5vw, 72px); }
.edu-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) minmax(0, 3fr) minmax(0, 6fr); gap: 4px clamp(20px, 3vw, 56px); padding: 14px 0; border-bottom: 1px solid rgba(70,40,42,.35); }
@media (max-width: 820px) { .job, .edu-row { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 120px); align-items: start; }
.contact .h2 { margin-bottom: .4em; }
.bigmail { font: 700 clamp(24px, 2.4vw, 42px)/1.1 var(--display); font-variation-settings: "SOFT" 100; word-break: break-word; display: inline-block; margin-top: 1em; }
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 6px; font-size: .9em; }
.form input, .form textarea { font: inherit; color: var(--ink); background: rgba(255,255,255,.55); border: 1.5px solid var(--ink); border-radius: 0; padding: 14px 16px; }
.form textarea { min-height: 160px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(70,40,42,.2); }
.form .btn { justify-self: start; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }

/* ---------- gallery / quote / cta blocks ---------- */
.gal { display: flex; flex-wrap: wrap; gap: clamp(12px, 1.6vw, 24px); }
.gal figure { margin: 0; flex: var(--ar, 1) 1 260px; }
.gal img { width: 100%; height: auto; }
figcaption { font-size: .82em; opacity: .75; margin-top: 10px; }
.bigquote { font-size: clamp(40px, 6vw, 104px); text-align: center; max-width: 16em; margin: 0 auto; }
.bigquote-by { text-align: center; margin-top: 1.4em; font-style: italic; }
.cta { text-align: center; }
.cta .lede { margin: 1em auto 0; }
.cta .btns { justify-content: center; }

/* ---------- footer ---------- */
.footer { padding: clamp(48px, 6vw, 88px) 0 36px; }
.footer-top-link { text-decoration: none; font-size: clamp(17px, 1.3vw, 22px); }
.footer-top-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 20px 40px; }
.footer-title, .footer-mail { font: 700 clamp(30px, 3.6vw, 60px)/1 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -.02em; text-decoration: none; margin: 0; }
.footer-mail:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .12em; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: clamp(32px, 4vw, 56px); }
.footer-icons { display: flex; gap: 22px; }
.footer-icons a { display: grid; place-items: center; }
.footer-icons svg { width: 30px; height: 30px; fill: currentColor; }

/* ---------- project page (overlay) ---------- */
.proj:focus { outline: none; }
.proj { position: fixed; inset: 0; z-index: 60; overflow-y: auto; overscroll-behavior: contain; background: var(--bg, var(--cream));
  transform: translateY(24px); opacity: 0; transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1); }
.proj.open { opacity: 1; transform: none; }
.proj-bar { position: sticky; top: 0; z-index: 2; background: var(--bg, var(--cream)); }
.proj-bar .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.proj-back { background: none; border: 0; cursor: pointer; font-size: clamp(17px, 1.3vw, 22px); padding: 8px 0; display: inline-flex; gap: .5em; align-items: center; }
.proj-back:hover span:last-child { text-decoration: underline; }
.proj-x { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ink); background: none; cursor: pointer; font-size: 26px; line-height: 1; display: grid; place-items: center; }
.proj-head { padding-top: clamp(24px, 4vw, 64px); padding-bottom: clamp(28px, 3vw, 48px); }
.proj-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 1.4em; font-size: .92em; }
.pill { border: 1.5px solid var(--ink); border-radius: 99px; padding: 5px 14px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.proj-title { font-size: clamp(44px, 6.2vw, 112px); max-width: 14em; }
.proj-quote { font-size: clamp(30px, 3.6vw, 64px); margin-top: .6em; font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; font-weight: 600; }
.proj-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 96px); align-items: start; padding-bottom: clamp(40px, 5vw, 80px); }
.proj-body.solo { grid-template-columns: minmax(0, 46em); }
.proj-body .prose { font-size: clamp(18px, 1.3vw, 22px); }
.proj-links { display: flex; flex-direction: column; gap: 10px; margin-top: 1.6em; align-items: flex-start; }
.proj-side { display: grid; gap: clamp(16px, 2vw, 28px); }
.proj-side figure { margin: 0; }
.proj-side img { max-height: 80vh; width: auto; height: auto; max-width: 100%; }
.vframe { background: none; }
.vframe video { width: auto; max-width: 100%; height: auto; max-height: 78vh; background: #000; border-radius: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); margin: 0 0 clamp(40px, 5vw, 80px); }
.stat { padding: 24px 24px 24px 0; border-bottom: 1.5px solid var(--ink); }
.stat b { display: block; font: 700 clamp(40px, 4.6vw, 80px)/1 var(--display); font-variation-settings: "SOFT" 100; margin-bottom: 8px; }
.stats-title { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; }
.stats-note { font-size: .85em; opacity: .75; margin: -56px 0 clamp(40px, 5vw, 80px); padding-top: 14px; }
.proj-gal { display: grid; gap: clamp(32px, 4vw, 64px); padding-bottom: clamp(48px, 6vw, 96px); }
.proj-gal .row { display: flex; gap: clamp(16px, 2vw, 32px); align-items: flex-start; }
.proj-gal figure { margin: 0; flex: var(--ar, 1) 1 0; min-width: 0; }
.proj-gal img { width: 100%; height: auto; }
.proj-gal .row:has(> figure:only-child) figure { flex: 0 1 auto; }
.proj-gal .row:has(> figure:only-child) img { width: auto; max-width: 100%; max-height: 86vh; }
@media (max-width: 700px) { .proj-gal .row { flex-direction: column; } .proj-gal figure { flex: none; width: 100%; } }
.img-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.img-head h3 { margin: 0; }
.img-text { max-width: 40em; margin: 0 0 16px; }
.proj-next { border-top: 1.5px solid var(--ink); padding: clamp(32px, 4vw, 64px) 0 clamp(48px, 6vw, 96px); }
.proj-next .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.proj-next button { background: none; border: 0; cursor: pointer; text-align: left; padding: 0; max-width: 46%; }
.proj-next button:last-child { text-align: right; margin-left: auto; }
.proj-next small { display: block; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.proj-next strong { font: 700 clamp(24px, 2.6vw, 44px)/1.05 var(--display); font-variation-settings: "SOFT" 100; }
.proj-next button:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
.zoom { cursor: zoom-in; }
@media (max-width: 820px) { .proj-body { grid-template-columns: 1fr; } .stats-note { margin-top: -32px; } .proj-next button { max-width: 100%; } }
body.locked { overflow: hidden; }

/* ---------- lightbox + popup ---------- */
.lb { position: fixed; inset: 0; z-index: 80; background: rgba(28,16,17,.92); display: grid; place-items: center; padding: 4vw; cursor: zoom-out; }
.lb img { max-width: 100%; max-height: 86vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb p { color: #f7f2ea; text-align: center; margin: 14px 0 0; font-size: 16px; }
.lb button { position: absolute; right: 20px; top: 16px; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; }
.popup-bg { position: fixed; inset: 0; z-index: 70; background: rgba(28,16,17,.5); display: grid; place-items: center; padding: 20px; animation: fade .3s ease; }
.popup { background: var(--paper); color: var(--ink); max-width: 620px; width: 100%; padding: clamp(32px, 5vw, 64px); position: relative; text-align: center; animation: rise .4s cubic-bezier(.2,.7,.2,1); }
.popup .h3 { margin-bottom: .5em; }
.popup-x { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border: 1.5px solid var(--ink); background: none; font-size: 24px; cursor: pointer; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

/* ---------- reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }
.no-anim .rv { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- 404 ---------- */
.nf { min-height: calc(100vh - var(--header-h)); display: grid; align-content: center; }
.nf .h2 { margin-bottom: .3em; }

/* ---------- tabs (all work) ---------- */
.tabbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 clamp(28px, 3vw, 48px); }
.tabbar button { border: 1.5px solid var(--ink); background: transparent; border-radius: 999px; padding: .62em 1.2em; font: 500 clamp(16px, 1.1vw, 19px)/1 var(--serif); cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .25s cubic-bezier(.3,1.6,.5,1); }
.tabbar button:hover { transform: translateY(-2px) rotate(-1.5deg); }
.tabbar button[aria-selected="true"] { background: var(--ink); color: var(--cream); }
.tabbar sup { font-size: .68em; opacity: .7; margin-left: 2px; }
.tab-intro { margin: 0 0 clamp(24px, 3vw, 44px); }
.tabpanel[hidden] { display: none; }
.tabpanel:not([hidden]) .card { animation: pop .5s cubic-bezier(.2,.9,.3,1.2) both; }
.tabpanel .card:nth-child(2) { animation-delay: .04s; } .tabpanel .card:nth-child(3) { animation-delay: .08s; }
.tabpanel .card:nth-child(4) { animation-delay: .12s; } .tabpanel .card:nth-child(5) { animation-delay: .16s; } .tabpanel .card:nth-child(n+6) { animation-delay: .2s; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .tabpanel .card { animation: none !important; } }

/* ---------- client ticker ---------- */
.t-ticker { padding: clamp(28px, 4vw, 56px) 0; overflow: hidden; }
.ticker-label { margin-bottom: 18px; }
.ticker { overflow: hidden; padding: .1em 0 .25em; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-track { display: flex; width: max-content; animation: tick var(--dur, 40s) linear infinite; }
@media (hover: hover) { .ticker:hover .ticker-track { animation-play-state: paused; } }
.ticker-run { display: flex; align-items: center; flex: none; }
.ticker-run span { font: 700 clamp(34px, 4.4vw, 76px)/1.35 var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: -.02em; white-space: nowrap; padding: 0 .35em; }
.tk { display: flex; align-items: center; flex: none; font-weight: inherit; }
.tk:nth-child(2n) span { font-style: italic; font-weight: 500; padding-right: .5em; }
.ticker-run i { font-style: normal; font-size: clamp(22px, 2.4vw, 40px); display: inline-block; animation: spin 6s linear infinite; }
@keyframes tick { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ticker { -webkit-mask-image: none; mask-image: none; padding: 0; }
  .ticker-track { animation: none; display: block; width: auto; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
  .ticker-run { display: block; max-width: 46em; font: 600 clamp(19px, 1.6vw, 26px)/1.6 var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; }
  .ticker-run + .ticker-run { display: none; }
  .tk { display: inline-block; white-space: nowrap; }
  .ticker-run span, .tk:nth-child(2n) span { display: inline; font: inherit; font-style: normal; letter-spacing: 0; padding: 0; white-space: nowrap; }
  .ticker-run i { animation: none; font-size: 0; display: inline-block; }
  .ticker-run i::after { content: "·"; font-size: clamp(19px, 1.6vw, 26px); padding: 0 .45em; opacity: .5; }
  .tk:last-child i { display: none; }
  .ticker-run img { display: inline-block; vertical-align: middle; height: 1.5em; margin: 0 .3em; }
}
}

/* ---------- playful details ---------- */
.card { transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.card:hover { transform: translateY(-6px) rotate(-.6deg); }
.card:nth-child(even):hover { transform: translateY(-6px) rotate(.6deg); }
.card-media { border-radius: 6px; }
.tag { background: var(--sky); }
.bg-sky .tag { background: var(--cream); }
.card:nth-child(3n+2) .tag { background: var(--lilac); }
.card:nth-child(3n) .tag { background: var(--mint); }
.btn { transition: transform .3s cubic-bezier(.3,1.6,.5,1), box-shadow .2s ease; }
.btn:hover { transform: translateY(-3px) rotate(-1.5deg); }
.btns .btn:nth-child(2):hover { transform: translateY(-3px) rotate(1.5deg); }
.split-media { border-radius: 999px 999px 8px 8px; }
.hero-media { border-radius: 6px; }
.stat b { transition: transform .3s cubic-bezier(.3,1.6,.5,1); display: block; width: max-content; }
.stat:hover b { transform: rotate(-3deg) scale(1.04); }
::selection { background: var(--ink); color: var(--sky); }

@media (max-width: 700px) {
  .tabbar { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding: 4px var(--pad) 8px; scrollbar-width: none; }
  .tabbar::-webkit-scrollbar { display: none; }
  .tabbar button { flex: none; }
}
.ticker-run img { height: clamp(34px, 3.6vw, 60px); width: auto; max-width: clamp(120px, 14vw, 240px); object-fit: contain; margin: 0 clamp(14px, 1.6vw, 28px); flex: none; }
.ticker.mono img { filter: brightness(0); opacity: .82; }

/* ---------- free blocks ---------- */
.blocks { display: flex; flex-direction: column; gap: clamp(20px, 2.4vw, 36px); margin-top: clamp(32px, 4vw, 56px); }
.t-custom .blocks { margin-top: 0; }
.blocks:empty { display: none; }
.blk { width: 100%; }
.blk.w-narrow { max-width: 38em; }
.blk.w-wide { max-width: 72em; }
.blk.a-center { margin-left: auto; margin-right: auto; text-align: center; }
.blk.a-right { margin-left: auto; text-align: right; }
.blk.a-center .lede, .blk.a-center .prose { margin-left: auto; margin-right: auto; }
.blk.a-right .lede { margin-left: auto; }
.blk figure { margin: 0; }
.blk.a-center img { margin: 0 auto; }
.blk.a-right img { margin-left: auto; }
.blk .bigquote { margin: 0; max-width: none; }
.blk.a-left .bigquote, .blk.a-left .bigquote-by { text-align: left; }
.blk.a-right .bigquote, .blk.a-right .bigquote-by { text-align: right; }
.blk .lede { max-width: 40em; }
.spacer { height: clamp(24px, 5vw, 80px); }
.blk img { height: auto; }
.split-sub { margin: -.15em 0 .8em; font-weight: 600; font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; }
.t-hero .hero-media:first-child { margin-top: clamp(16px, 2vw, 32px); }

/* ---------- showcase (one piece of work, uncropped, with its line) ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4.5vw, 80px); align-items: center; }
.feature.right .feature-media { order: 2; }
.feature-media { margin: 0; }
.feature-media img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 30px 60px -30px rgba(40,20,22,.55); transform: rotate(-1deg); transition: transform .5s cubic-bezier(.3,1.5,.5,1); }
.feature-media img:hover { transform: rotate(0) scale(1.01); }
.feature.right .feature-media img { transform: rotate(1deg); }
.feature-title { font-size: clamp(34px, 3.4vw, 60px); line-height: 1; margin: 0 0 .3em; }
.feature-line { font-size: clamp(21px, 1.7vw, 30px); line-height: 1.2; margin: 0 0 1em; font-weight: 600; font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; }
.feature-text { font-size: clamp(17px, 1.2vw, 20px); }
.feature-text p { margin: 0 0 .8em; }
.feature .btns { margin-top: 1.4em; }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } .feature.right .feature-media { order: 0; } .feature-media img { transform: none; } }

/* phones: a pair of buttons sits side by side */
@media (max-width: 600px) {
  .btns { gap: 10px; }
  .btns .btn { padding: .95em 1.1em; font-size: 16px; white-space: nowrap; }
  .btns:has(> .btn:nth-child(2):last-child) { flex-wrap: nowrap; }
  .btns:has(> .btn:nth-child(2):last-child) > .btn { flex: 1 1 0; min-width: 0; }
}

/* picture-frame around the split photo: a cream mount with a thin dark edge */
.split-media { box-shadow: 0 0 0 clamp(6px, .7vw, 10px) var(--cream), 0 24px 40px -18px rgba(40,20,22,.45); }
.embed { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* rich text formatting */
.sz-s { font-size: .8em; } .sz-l { font-size: 1.3em; line-height: 1.25; } .sz-xl { font-size: 1.7em; line-height: 1.15; } .sz-xxl { font-size: 2.3em; line-height: 1.05; }
.ff-d { font-family: var(--display); font-weight: 700; font-variation-settings: "SOFT" 100, "opsz" 72; letter-spacing: -.01em; }
.ff-b { font-family: var(--serif); font-weight: 400; }
.hl { background: linear-gradient(transparent 52%, var(--sky) 52%, var(--sky) 92%, transparent 92%); padding: 0 .08em; }
.bg-sky .hl { background: linear-gradient(transparent 52%, var(--cream) 52%, var(--cream) 92%, transparent 92%); }
.prose a, .lede a, [data-path] a { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }

/* classic ampersand inside headline type */
.amp { font-family: var(--serif); font-style: inherit; font-weight: 600; font-variation-settings: normal; letter-spacing: 0; }

/* case-study chapters */
.chap { padding: clamp(64px, 8vw, 130px) 0; overflow: hidden; }
.chap-in { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(36px, 6vw, 96px); align-items: center; }
.chap:nth-of-type(even) .chap-in { grid-template-columns: 7fr 5fr; }
.chap:nth-of-type(even) .chap-txt { order: 2; }
.chap-n { display: block; font: 700 clamp(72px, 9vw, 150px)/.9 var(--display); font-variation-settings: "SOFT" 100; color: transparent; -webkit-text-stroke: 1.5px var(--ink); margin-bottom: .12em; }
.chap-h { font-size: clamp(30px, 3.4vw, 52px); line-height: 1.05; margin: 0 0 .5em; }
.chap-p { font-size: clamp(17px, 1.3vw, 20px); max-width: 30em; margin: 0; }
.chap-fig { margin: 0; position: relative; justify-self: center; width: fit-content; max-width: 100%; transform: rotate(-2deg); transition: transform .45s cubic-bezier(.3,1.6,.5,1); }
.chap:nth-of-type(even) .chap-fig { transform: rotate(2deg); }
.chap-fig:hover { transform: rotate(0) scale(1.02); }
.chap-fig img { display: block; width: auto; max-width: 100%; height: auto; max-height: 76vh; border-radius: 3px; box-shadow: 0 0 0 clamp(6px, .7vw, 10px) var(--cream), 0 28px 44px -20px rgba(40,20,22,.5); }
.chap-fig figcaption { position: absolute; left: clamp(14px, 2vw, 28px); bottom: calc(-1 * clamp(16px, 1.6vw, 22px)); background: var(--cream); border: 1.5px solid var(--ink); border-radius: 99px; padding: 6px 14px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; transform: rotate(3deg); max-width: calc(100% - 28px); }
.chap:nth-of-type(even) .chap-fig figcaption { left: auto; right: clamp(14px, 2vw, 28px); transform: rotate(-3deg); }
.chap-result { padding-top: clamp(56px, 7vw, 110px); }
.chap-result .stats-title { font: 700 clamp(30px, 3.4vw, 52px)/1.05 var(--display); letter-spacing: 0; text-transform: none; margin-bottom: .6em; }
@media (max-width: 820px) {
  .chap-in, .chap:nth-of-type(even) .chap-in { grid-template-columns: 1fr; }
  .chap:nth-of-type(even) .chap-txt { order: 0; }
  .chap-fig img { max-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { .chap-fig, .chap:nth-of-type(even) .chap-fig { transition: none; } }
.chap-result .stat span { display: block; font-size: clamp(16px, 1.2vw, 19px); max-width: 16em; }
.chap-result .stat b { font-size: clamp(52px, 6vw, 104px); }
.chap-result .stat b { width: auto; font-size: clamp(48px, 5vw, 88px); overflow-wrap: anywhere; }
.chap-result .stat { padding-right: clamp(16px, 2vw, 32px); }

/* ---------- playful extras 2 ---------- */
::selection { background: var(--sky); color: var(--ink); }
.bg-sky ::selection, .bg-sky::selection { background: var(--ink); color: var(--sky); }
.card { transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.card:hover { transform: translateY(-8px) rotate(-1.2deg); }
.card:nth-child(even):hover { transform: translateY(-8px) rotate(1.2deg); }
.stat b { font-variant-numeric: tabular-nums; }
/* sticker captions on project pages */
.proj-gal figure, .proj-side figure { position: relative; }
.proj-gal figure figcaption, .proj-side figure figcaption {
  position: relative; z-index: 1; display: inline-block; width: auto; max-width: calc(100% - 28px);
  margin: -15px 0 0 14px; background: var(--cream); border: 1.5px solid var(--ink); border-radius: 16px;
  padding: 5px 13px; font-size: 12.5px; line-height: 1.35; letter-spacing: .07em; text-transform: uppercase; opacity: 1;
  transform: rotate(-2deg); }
.proj-gal figure:nth-child(even) figcaption { transform: rotate(2deg); }
/* copied toast */
#copied { position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translate(-50%, 20px) rotate(-1.5deg); opacity: 0;
  background: var(--sky); color: var(--ink); border: 2px solid var(--ink); padding: 11px 20px; border-radius: 99px; font-size: 16px; box-shadow: 5px 5px 0 var(--lilac);
  transition: opacity .25s ease, transform .4s cubic-bezier(.3,1.6,.5,1); }
#copied.on { opacity: 1; transform: translate(-50%, 0) rotate(-1.5deg); }
#copied a { color: var(--ink); margin-left: .5em; }
@media (prefers-reduced-motion: reduce) { .card:hover, .card:nth-child(even):hover { transform: none; } #copied { transition: opacity .2s; } }
.nf-badge { justify-self: start; display: inline-block; background: var(--sky); border: 2px solid var(--ink); border-radius: 99px; padding: .1em .6em; margin-bottom: .5em;
  font: 700 clamp(44px, 6vw, 90px)/1.1 var(--display); font-variation-settings: "SOFT" 100; transform: rotate(-4deg); box-shadow: 6px 6px 0 var(--lilac); }
/* cards: the original slight tilt */
.card { transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.card:hover { transform: translateY(-6px) rotate(-.6deg); }
.card:nth-child(even):hover { transform: translateY(-6px) rotate(.6deg); }
