/* ==========================================================================
   Portfolio — clean, bright, minimal
   Change colours and type in :root.
   ========================================================================== */

@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #ffffff;
  --soft: #f6f4ef;
  --ink: #141414;
  --ink-2: #6f6d68;
  --line: #e9e6df;

  --pink: #ffb8d8;
  --pink-deep: #ff7db7;
  --green: #5a9a2c;
  --green-soft: #e2efd2;
  --tone-heidi-dictate: #a9cc84;
  --tone-scribe-layout: #d3e7c1;
  --tone-patient-app: #ffb8d8;
  --orange: #ff6b2c;
  --lime: #e4fa62;
  --deep: #1f3b23;
  --accent: #5a9a2c;   /* jumper green: drawings, highlights, hovers */
  --accent-soft: #e2efd2;
  --draw: var(--accent);

  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;

  --margin: clamp(18px, 3.2vw, 48px);
  --gap: clamp(16px, 2vw, 28px);
  --radius: clamp(12px, 1.2vw, 20px);
  --max: 1440px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  opacity: 0; transition: opacity .5s var(--ease);
}
html.is-ready body { opacity: 1; }
html.is-leaving body { opacity: 0; transition-duration: .3s; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--margin); }
.serif { font-family: var(--serif); font-weight: 400; }
.muted { color: var(--ink-2); }

/* ---------- Buttons / pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink);
  font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease), transform .4s var(--spring), border-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn .arr { transition: transform .4s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: transform .5s var(--ease);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.logo__avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #f3dcc8; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); transition: transform .6s var(--spring); }
.logo:hover .logo__avatar { transform: scale(1.1) rotate(-6deg); }
.nav { display: flex; gap: 8px; }
.nav a {
  height: 34px; display: inline-flex; align-items: center; padding: 0 16px;
  border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Intro
   ========================================================================== */
.intro { min-height: 92svh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 130px var(--margin) 80px; }
.intro__line {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 5.6vw, 96px); line-height: 1.06; letter-spacing: -0.015em;
  max-width: 15.5em;
}
.intro__line em { font-style: italic; }
.tok { display: inline-block; opacity: 0; transform: translateY(0.35em); transition: opacity .8s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms); }
.intro.is-in .tok { opacity: 1; transform: none; }

/* inline media in the sentence */
.pill {
  display: inline-block; position: relative; vertical-align: -0.1em;
  height: 0.8em; width: var(--w, 2em); border-radius: 999px; overflow: hidden;
  margin-inline: 0.06em; background: var(--soft);
  transition: width .7s var(--spring), transform .7s var(--spring);
}
.pill img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pill:hover { width: calc(var(--w, 2em) + 0.5em); }
.intro .pill.tok { width: 0; }
.intro.is-in .pill.tok { width: var(--w, 2em); transition: opacity .6s var(--ease), transform 1s var(--ease), width 1.1s var(--spring); transition-delay: calc(var(--i) * 55ms + 200ms); }
.intro.is-in .pill.tok:hover { width: calc(var(--w, 2em) + 0.5em); transition-delay: 0s; }

.pill--split { background: linear-gradient(90deg, var(--pink) 0 58%, var(--orange) 58% 100%); }
.pill--split::after { content: ""; position: absolute; left: 50%; top: -20%; width: 40%; height: 140%; background: var(--orange); border-radius: 50%; transform: rotate(18deg); }
.pill--duo { background: var(--lime); }
.pill--duo::after { content: ""; position: absolute; right: -10%; top: -10%; width: 55%; height: 120%; border-radius: 999px; background: var(--green); }

.pill-cycle img { transform: translateY(100%); transition: transform .9s var(--ease); }
.pill-cycle img.is-active { transform: none; }
.pill-cycle img.is-out { transform: translateY(-100%); }

.flower { display: inline-block; width: 0.78em; height: 0.78em; vertical-align: -0.08em; margin-inline: 0.04em; }
.flower svg { width: 100%; height: 100%; animation: spin 18s linear infinite; transition: transform .8s var(--spring); }
.flower:hover svg { animation-play-state: paused; transform: scale(1.18); }
.intro .flower.tok { transform: scale(0) rotate(-120deg); }
.intro.is-in .flower.tok { transform: none; transition: opacity .6s var(--ease), transform 1.2s var(--spring); transition-delay: calc(var(--i) * 55ms + 150ms); }
@keyframes spin { to { rotate: 360deg; } }

.intro__sub { margin-top: clamp(28px, 3.5vw, 48px); font-size: clamp(16px, 1.25vw, 19px); color: var(--ink-2); max-width: 34em; }
.intro__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.intro__sub, .intro__actions { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease) 1.1s, transform 1s var(--ease) 1.1s; }
.intro.is-in .intro__sub, .intro.is-in .intro__actions { opacity: 1; transform: none; }
.intro.is-in .intro__actions { transition-delay: 1.25s; }
.loc-pin { display: inline-block; width: 1.05em; height: 1.05em; margin-right: 6px; vertical-align: -0.17em; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }

/* ==========================================================================
   Work
   ========================================================================== */
.work { padding-top: clamp(64px, 9vw, 160px); padding-bottom: clamp(160px, 18vw, 300px); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(48px, 6vw, 96px); }
.section-head h2 { font-size: clamp(28px, 2.8vw, 42px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.section-head h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.section-head p { max-width: 30em; color: var(--ink-2); font-size: 15px; text-align: right; }

.work__grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 7vw, 128px); row-gap: clamp(96px, 11vw, 190px); align-items: start; }
.card { display: block; position: relative; opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .95s var(--ease); }
.card.is-in { opacity: 1; transform: none; }
.card:nth-child(even) { margin-top: clamp(80px, 12vw, 200px); margin-bottom: calc(-1 * clamp(80px, 12vw, 200px)); }


.card__label {
  position: absolute; left: 0; top: 0; z-index: 10; pointer-events: none;
  opacity: 0; transform: scale(.6); transform-origin: 0 0; transition: opacity .25s var(--ease), transform .45s var(--spring);
}
.card__label .cursor { display: block; width: 40px; height: 40px; margin: -5px 0 0 -5px; fill: var(--accent); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.cursor__tag {
  position: absolute; left: 25px; top: 27px; padding: 3px 8px; white-space: nowrap;
  font-size: 12.5px; font-weight: 500; letter-spacing: -0.01em; color: #fff;
  background: var(--accent); border-radius: 3px; box-shadow: 0 4px 14px -4px rgba(0,0,0,.25);
}
.card__media.has-pointer .card__label { opacity: 1; transform: none; }
.card__media.has-pointer { cursor: none; }
@media (hover: none) { .card__label { display: none; } }

.card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 16px; }
.card__title { font-size: clamp(18px, 1.5vw, 22px); font-weight: 600; letter-spacing: -0.02em; }
.card__tags { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.card__desc { margin-top: 6px; color: var(--ink-2); font-size: 15px; max-width: 42ch; }
.card__title .arr { display: inline-block; opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .4s var(--ease); }
.card:hover .card__title .arr { opacity: 1; transform: none; }

/* ==========================================================================
   About
   ========================================================================== */
.about { padding-bottom: clamp(100px, 12vw, 200px); }
.fan { display: flex; justify-content: center; padding-block: 20px clamp(80px, 9vw, 140px); }
.fan__card {
  width: clamp(200px, 22vw, 320px); aspect-ratio: 3 / 4; border-radius: calc(var(--radius) + 6px);
  padding: 22px 18px 18px; display: flex; flex-direction: column; gap: 16px;
  margin-inline: -0.3vw; position: relative;
  transform: translate(var(--sx, 0), 40px) rotate(0deg); opacity: 0;
  transition: transform 1.2s var(--spring), opacity .6s var(--ease);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 18px 40px -24px rgba(20, 20, 20, .35);
}
.fan__card:nth-child(1) { background: var(--pink); --sx: 105%; --r: -8deg; --y: 22px; z-index: 1; }
.fan__card:nth-child(2) { background: var(--ink); color: var(--bg); --sx: 0%; --r: 2deg; --y: 0px; z-index: 2; transition-delay: .08s; }
.fan__card:nth-child(3) { background: var(--green); color: #fff; --sx: -105%; --r: 9deg; --y: 30px; z-index: 1; transition-delay: .16s; }
.fan.is-in .fan__card { transform: translate(0, var(--y)) rotate(var(--r)); opacity: 1; }
.fan.is-in .fan__card:hover { transform: translate(0, calc(var(--y) - 14px)) rotate(0deg) scale(1.03); z-index: 3; transition-delay: 0s; }
.fan__card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.4vw, 38px); line-height: 1; letter-spacing: -0.01em; }
.fan__card h3 em { font-style: italic; }
.fan__card .ph { flex: 1; border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.35); }
.fan__card .ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

.about__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 24px; }
.about__row h2 { grid-column: 1 / span 4; font-size: clamp(28px, 2.8vw, 42px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.about__text { grid-column: 6 / span 7; }
.scrub-text { font-size: clamp(24px, 2.5vw, 40px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; }
.scrub-text .w { color: #cfccc5; transition: color .3s linear; }
.scrub-text .w.on { color: var(--ink); }
.scrub-text em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.scrub-text .hl.on { color: var(--accent); }

.about__lists { margin-top: clamp(70px, 8vw, 130px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 48px; }
.about__lists > div:nth-child(1) { grid-column: 1 / -1; }
.about__lists > div:nth-child(2) { grid-column: 1 / span 6; }
.about__lists > div:nth-child(3) { grid-column: 7 / span 6; }
.about__lists h3 { font-size: 14px; font-weight: 500; color: var(--ink-2); padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.xp li { display: grid; grid-template-columns: 8.5em 1fr auto; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--line); font-size: 15px; align-items: baseline; }
.xp .yrs, .xp .where { color: var(--ink-2); }
.plain li { padding-block: 14px; border-bottom: 1px solid var(--line); font-size: 15px; }

/* ==========================================================================
   Contact + footer
   ========================================================================== */
.contact { text-align: center; padding-block: clamp(80px, 10vw, 160px); background: var(--accent); color: #fff; --draw: #fff; border-radius: calc(var(--radius) * 2); margin-inline: var(--margin); padding-inline: clamp(24px, 6vw, 120px); }
.contact h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7vw, 116px); line-height: 1; letter-spacing: -0.02em; }
.contact h2 em { font-style: italic; }
.contact .flower { width: .7em; height: .7em; }
.contact p { margin-top: 20px; color: rgba(255,255,255,.75); }
.contact .btn { margin-top: 30px; height: 56px; padding: 0 28px; font-size: 17px; }.contact .btn--solid { background: #fff; border-color: #fff; color: var(--ink); }
.contact .btn--solid:hover { background: var(--ink); border-color: var(--ink); color: #fff; }


.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 28px 32px; font-size: 14px; color: var(--ink-2); }
.site-footer ul { display: flex; gap: 20px; }
.site-footer a:hover { color: var(--ink); }

/* ==========================================================================
   Case study
   ========================================================================== */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); transform-origin: left; transform: scaleX(0); z-index: 60; }

.cs-hero { padding-top: 120px; }
.back { display: inline-flex; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color .3s; }
.back:hover { color: var(--ink); }
.cs-hero__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 24px; align-items: end; padding-top: clamp(28px, 4vw, 56px); }
.cs-title { grid-column: 1 / span 7; font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 10vw, 168px); line-height: .92; letter-spacing: -0.025em; }
.cs-summary { grid-column: 8 / span 5; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; padding-bottom: .6em; }
.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(40px, 5vw, 72px); padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; }
.cs-meta dt { color: var(--ink-2); margin-bottom: 6px; font-size: 14px; }

.cs-section { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 16px; padding-top: clamp(80px, 9vw, 150px); }
.cs-section > h2 { grid-column: 1 / span 4; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; align-self: start; padding-top: .55em; }
.cs-section > h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.cs-body { grid-column: 5 / span 8; }
.cs-body > * + * { margin-top: 1.1em; }
.cs-body h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4vw, 64px); line-height: 1; letter-spacing: -0.015em; }
.cs-body h3 em { font-style: italic; }
.cs-body .lede { font-size: clamp(22px, 2vw, 30px); line-height: 1.3; letter-spacing: -0.015em; }
.cs-body p { max-width: 62ch; color: #3b3a37; font-size: 17px; line-height: 1.6; }
.cs-body .lede { color: var(--ink); }
.cs-body .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.cs-body .two-col p + p { margin-top: 0; }
.cs-body ol { margin: 0; padding: 0; list-style: none; counter-reset: li; }
.cs-body ol li { counter-increment: li; display: grid; grid-template-columns: 2.4em 1fr; padding-block: 14px; border-bottom: 1px solid var(--line); font-size: 17px; }
.cs-body ol li::before { content: counter(li); width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 13px; font-weight: 600; }

.figs { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--gap); margin-top: clamp(48px, 6vw, 96px); align-items: start; }
.fig .media { border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.fig img, .fig video { display: block; width: 100%; height: auto; transform: scale(1.06); transition: transform 1.4s var(--ease); }
.fig.is-in img, .fig.is-in video { transform: none; }
.fig figcaption { padding-top: 12px; font-size: 14px; color: var(--ink-2); }

.bento { display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr; gap: var(--gap); margin-top: clamp(48px, 6vw, 96px); }
.bento .media { border-radius: var(--radius); overflow: hidden; background: var(--soft); height: 100%; }
.bento .media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.bento .media:first-child { grid-row: 1 / -1; }
@media (max-width: 860px) { .bento { grid-template-columns: 1fr; grid-template-rows: none; } .bento .media:first-child { grid-row: auto; } }
.fig--full { grid-column: 1 / -1; }
.fig--wide { grid-column: 3 / -1; }
.fig--half { grid-column: span 6; }
.fig--half.r { grid-column: 7 / -1; }
.fig--half.offset { margin-top: clamp(60px, 8vw, 140px); }
.fig--third { grid-column: span 4; }

.pull { text-align: center; padding-top: clamp(100px, 11vw, 180px); }
.pull blockquote { font-family: var(--serif); font-size: clamp(36px, 4.8vw, 80px); line-height: 1.05; letter-spacing: -0.015em; max-width: 16em; margin-inline: auto; }
.pull blockquote em { font-style: italic; }
.pull .q { color: var(--accent); }
.pull cite { display: block; margin-top: 24px; font-style: normal; font-size: 15px; color: var(--ink-2); }


.next {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--gap);
  margin-top: clamp(100px, 12vw, 200px); padding: clamp(20px, 2.4vw, 32px); border-radius: calc(var(--radius) * 2); background: var(--soft);
  transition: background .5s var(--ease);
}
.next:hover { background: var(--accent-soft); }
.next__text { padding-left: clamp(4px, 1.5vw, 24px); }
.next__text > span:first-child { font-size: 15px; color: var(--ink-2); }
.next__title { display: block; font-family: var(--serif); font-size: clamp(48px, 7vw, 120px); line-height: 1; letter-spacing: -0.02em; margin-top: 10px; }
.next__title .arr { display: inline-block; font-family: var(--sans); font-size: .5em; vertical-align: .25em; transition: transform .5s var(--spring); }
.next:hover .next__title .arr { transform: translateX(10px); }
.cs-end { padding-bottom: clamp(40px, 6vw, 80px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .nav a { padding: 0 12px; }
  .section-head { flex-direction: column; align-items: start; }
  .section-head p { text-align: left; }
  .work__grid { grid-template-columns: 1fr; }
  .card:nth-child(even) { margin: 0; }
  .fan__card { width: 31vw; padding: 14px 12px 12px; gap: 10px; margin-inline: -1vw; }
  .fan__card h3 { font-size: 22px; }
  .about__row h2, .about__text, .about__lists > div:nth-child(n) { grid-column: 1 / -1; }
  .cs-title, .cs-summary { grid-column: 1 / -1; }
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-section > h2, .cs-body { grid-column: 1 / -1; }
  .cs-body .two-col { grid-template-columns: 1fr; }
  .fig[class*="fig--"] { grid-column: 1 / -1; margin-top: 0; }
  .next { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .logo span { display: none; }
  .intro__line { font-size: clamp(30px, 8.6vw, 38px); max-width: 100%; text-wrap: balance; line-height: 1.1; }
  .intro .icon--drawn { width: .88em; height: .88em; vertical-align: -0.16em; }
  .intro .icon--me { width: 1em; height: 1em; vertical-align: -0.22em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .tok, [data-reveal], .card, .fan__card, .intro__sub, .intro__actions { opacity: 1 !important; transform: none !important; }
  .intro .avatar.tok, .intro .icon.tok { transform: none !important; }
  .scrub-text .w { color: var(--ink) !important; }
}

/* fan card contents */
.fan__card .big { font-size: clamp(48px, 5vw, 80px); line-height: 1; letter-spacing: -0.02em; margin-top: auto; font-variant-numeric: tabular-nums; }
.fan__card .small { font-size: 13px; opacity: .7; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.chips li { background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; }

.card__media, .cs-cover, .fig .media, .next__media { -webkit-mask-image: -webkit-radial-gradient(white, black); }
@media (max-width: 860px) {
  .fan__card .big { font-size: 24px; }
  .chips li { padding: 4px 9px; font-size: 12px; }
}

/* ==========================================================================
   Stage: blurred landscape background + UI frame on top
   (project cards, case study cover, next project)
   ========================================================================== */
.stage { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--soft); aspect-ratio: 4 / 3; isolation: isolate; perspective: 1400px; }
.stage__bg { position: absolute; inset: 0; background: var(--tone, var(--soft)); transition: background-color .8s var(--ease); }
.stage__frame {
  position: absolute; left: 50%; top: 50%; width: var(--fw, 72%); aspect-ratio: var(--fa, 16 / 10);
  translate: -50% -46%; overflow: hidden; background: #fff;
  border-radius: clamp(8px, 0.9vw, 14px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 40px 80px -30px rgba(20, 20, 20, .45);
  transition: translate 1.1s var(--ease), scale 1s var(--ease), transform .5s var(--ease), opacity .8s var(--ease);
  will-change: transform;
}
.stage__frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* reveal */
.card .stage__frame { opacity: 0; translate: -50% -20%; }
.card.is-in .stage__frame { opacity: 1; translate: -50% -46%; transition-delay: .15s; }

/* hover — shared */
.card:hover .stage__frame { transition-delay: 0s; }


/* case study cover + next project */
.cs-cover { margin-top: clamp(32px, 4vw, 56px); border-radius: calc(var(--radius) + 4px); aspect-ratio: 16 / 9; --fw: 74%; }
.cs-cover .stage__frame { translate: -50% calc(-48% + var(--py, 0px)); }
.next__media { --fw: 84%; }
.next__media .stage__frame { transition: scale 1s var(--ease), translate 1s var(--ease); }
.next:hover .next__media .stage__frame { scale: 1.12; translate: -50% -52%; }

@media (hover: none) {
  .card.is-in .stage__frame { animation: float 6s var(--ease) infinite alternate; }
  @keyframes float { to { translate: -50% -50%; } }
}
@media (max-width: 860px) { .stage { --fw: 86%; } .cs-cover { --fw: 86%; aspect-ratio: 4 / 3; } }
@media (prefers-reduced-motion: reduce) { .card .stage__frame { opacity: 1 !important; translate: -50% -46% !important; } }

/* intro: avatar + hand-drawn icons */
.avatar { display: inline-block; width: 0.84em; height: 0.84em; border-radius: 50%; overflow: hidden; vertical-align: -0.12em; margin-inline: 0.04em; box-shadow: 0 0 0 0.045em var(--bg), 0 0 0 0.09em var(--accent); transition: transform .6s var(--spring); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar:hover { transform: scale(1.12) rotate(-6deg); }
.icon { color: var(--draw); display: inline-block; width: 1em; height: 1em; vertical-align: -0.18em; margin-inline: 0.02em; }
.icon svg { width: 100%; height: 100%; overflow: visible; transition: transform .7s var(--spring); }
.intro .avatar.tok, .intro .icon.tok { transform: scale(0) rotate(-25deg); }
.intro.is-in .avatar.tok, .intro.is-in .icon.tok { transform: none; transition: opacity .6s var(--ease), transform 1.1s var(--spring); transition-delay: calc(var(--i) * 55ms + 150ms); }
.intro.is-in .avatar.tok:hover { transform: scale(1.12) rotate(-6deg); transition-delay: 0s; }
.icon--drawn { position: relative; width: 1.06em; height: 1.06em; vertical-align: -0.2em; margin-inline: 0.06em; }
.icon--drawn .drawn { position: absolute; inset: 0; opacity: 0; transform: scale(.3) rotate(-30deg); transition: opacity .3s var(--ease), transform .8s var(--spring); }
.icon--drawn .drawn.is-on { opacity: 1; transform: none; }
.icon--drawn:hover .drawn.is-on { transform: rotate(-8deg) scale(1.1); }
.icon--me { width: 1.2em; height: 1.2em; vertical-align: -0.28em; }
/* Sticker drawings scattered down the homepage */
.intro--stickers, .work, .about, .contact { position: relative; }
.doodles { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.intro--stickers .intro__line { max-width: 13.5em; }
.doodle { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); color: var(--draw); pointer-events: auto; cursor: grab; touch-action: none; user-select: none;
  translate: calc(-50% + var(--dx, 0px)) calc(-50% + var(--dy, 0px)); rotate: var(--r); scale: 0;
  transition: scale .9s var(--spring), rotate .5s var(--spring); transition-delay: calc(var(--i) * 70ms + 500ms); }
.doodles:not([data-in="intro"]) .doodle { transition-delay: calc(var(--i) * 160ms + 100ms); }
:is(.intro.is-in, .doodles.is-in) .doodle { scale: 1; }
:is(.intro.is-in, .doodles.is-in) .doodle:hover { scale: 1.08; rotate: calc(var(--r) - 8deg); transition-delay: 0s; }
:is(.intro.is-in, .doodles.is-in) .doodle.is-drag { scale: 1.14; cursor: grabbing; transition-delay: 0s; z-index: 1; }
.doodle svg { display: block; width: 100%; height: 100%; overflow: visible; animation: doodle-bob 6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.7s); }
@keyframes doodle-bob { 50% { transform: translateY(-6px) rotate(3deg); } }
@media (max-width: 860px) {
  .doodle { left: var(--mx); top: var(--my); width: var(--ms); height: var(--ms); }
  .doodle--wide { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .doodle { scale: 1; transition: none; }
  .doodle svg { animation: none; }
}
@keyframes wobble { 20% { transform: rotate(-10deg) scale(1.08); } 45% { transform: rotate(8deg) scale(1.1); } 70% { transform: rotate(-4deg) scale(1.05); } 100% { transform: none; } }


.about__more { display: grid; gap: 1.1em; max-width: 40em; margin-top: clamp(28px, 4vw, 56px); }
.about__more p { margin: 0; font-size: clamp(16px, 1.15vw, 19px); line-height: 1.6; color: var(--ink-2, #6f6d68); }
.skills li { line-height: 1.45; }
.skills b { display: block; font-weight: 500; margin-bottom: 2px; }
.skills li { color: var(--ink-2, #6f6d68); }
.skills b { color: var(--ink); }

/* case study: subheads, principles, reframe, continuation */
.cs-body h4 { font-size: clamp(19px, 1.5vw, 22px); font-weight: 500; letter-spacing: -0.01em; padding-top: .9em; }
.cs-body h3 + h4 { padding-top: .4em; }
.cs-body .reframe { font-size: clamp(30px, 3.2vw, 50px); line-height: 1.08; padding-top: .5em; }
.cs-body code { font-size: .9em; padding: .1em .35em; border-radius: 6px; background: var(--soft); }
.cs-body ol.principles li { grid-template-columns: 3em 1fr; padding-block: 22px; align-items: start; }
.cs-body ol.principles li::before { background: var(--accent-soft); color: var(--accent); }
.cs-body ol.principles b { display: block; font-size: 19px; font-weight: 500; margin-bottom: 6px; }
.cs-body ol.principles p { margin: 0; }
.cs-section--cont { padding-top: clamp(40px, 5vw, 72px); }

/* ==========================================================================
   Work section: alternating split layout
   ========================================================================== */



/* split: alternating image / text rows */
.work__grid[data-layout="split"] { grid-template-columns: 1fr; row-gap: clamp(80px, 10vw, 150px); }
[data-layout="split"] .card { margin: 0 !important; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 1fr auto auto 1fr; column-gap: var(--gap); }
[data-layout="split"] .card__media { grid-column: 1 / span 7; grid-row: 1 / -1; aspect-ratio: 4 / 3; background: transparent; border-radius: var(--radius); }
[data-layout="split"] .stage__bg { display: none; }
[data-layout="split"] .stage__frame { left: 0; top: 0; width: 100%; height: 100%; aspect-ratio: auto; translate: none !important; opacity: 1 !important; scale: 1 !important; border-radius: inherit; box-shadow: none; }
[data-layout="split"] .card__meta { grid-column: 9 / -1; grid-row: 2; display: block; padding: 0; }
[data-layout="split"] .card__title { font-size: clamp(24px, 2.2vw, 34px); font-weight: 500; letter-spacing: -0.02em; }
[data-layout="split"] .card__tags { display: block; margin-top: 8px; font-size: 14px; color: var(--ink-2); white-space: normal; }
[data-layout="split"] .card__desc { grid-column: 9 / -1; grid-row: 3; margin: 14px 0 0; font-size: 16px; max-width: 38ch; }
[data-layout="split"] .card:nth-child(even) .card__media { grid-column: 6 / -1; }
[data-layout="split"] .card:nth-child(even) .card__meta, [data-layout="split"] .card:nth-child(even) .card__desc { grid-column: 1 / span 4; }
@media (max-width: 860px) {
  [data-layout="split"] .card { display: block; }
  [data-layout="split"] .card__media { margin-bottom: 24px; }
  [data-layout="split"] .card__desc { max-width: 42ch; margin-top: 8px; }
}



/* case study covers + next-project cards: full-bleed image, no tone panel */
:is(.cs-cover, .next__media) .stage__bg { display: none; }
:is(.cs-cover, .next__media) .stage__frame { left: 0; top: 0; width: 100%; height: 100%; translate: none !important; border-radius: inherit; box-shadow: none; }
:is(.cs-cover, .next__media) { background: transparent; }

/* case study: "how might we" question and metric row */
.cs-body .hmw { margin: .9em 0 1.2em; padding-left: clamp(16px, 1.6vw, 24px); border-left: 3px solid var(--accent); font-family: var(--serif); font-size: clamp(24px, 2.3vw, 36px); line-height: 1.15; letter-spacing: -0.01em; }
.cs-body .hmw em { font-style: italic; color: var(--accent); }
.cs-body .metrics { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); border-top: 1px solid var(--line); }
.cs-body .metrics li { padding-top: 16px; font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.cs-body .metrics .num { display: block; font-family: var(--serif); font-size: clamp(44px, 4.4vw, 72px); line-height: 1; letter-spacing: -0.02em; color: var(--accent); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .cs-body .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; } }


/* contact: little dog after the heading, wags its head on hover */
.contact .icon--dog { display: block; position: relative; width: .95em; height: .95em; margin: 0 auto .08em; }
.contact .icon--dog::after {
  content: "WOOF WOOF"; position: absolute; left: 50%; bottom: 100%; white-space: nowrap;
  transform: translate(-50%, 4px) rotate(-5deg); transform-origin: 50% 100%;
  font: 600 11px/1 var(--sans); letter-spacing: .2em; color: #fff;
  opacity: 0; transition: opacity .25s, transform .4s var(--spring);
}
.contact .icon--dog:hover::after { opacity: 1; transform: translate(-50%, -8px) rotate(-5deg); }

/* bird dragged next to the strawberry */
.doodle::after {
  content: "YUM YUM"; position: absolute; left: 50%; bottom: 100%; white-space: nowrap;
  transform: translate(-50%, 4px) rotate(-5deg); transform-origin: 50% 100%;
  font: 600 11px/1 var(--sans); letter-spacing: .2em;
  opacity: 0; transition: opacity .25s, transform .4s var(--spring); pointer-events: none;
}
.doodle.is-yum::after { opacity: 1; transform: translate(-50%, -8px) rotate(-5deg); }

.icon--dog svg { transform-origin: 50% 70%; }
.icon--dog:hover svg { animation: wag .9s var(--ease); }
@keyframes wag { 20% { transform: rotate(-10deg); } 45% { transform: rotate(8deg); } 70% { transform: rotate(-5deg); } 100% { transform: none; } }
.nobr { white-space: nowrap; }

.where a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: currentColor; transition: color .3s var(--ease); }
.where a:hover { color: var(--accent); }

/* metric rows aligned to the figure column */
.metrics-wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(48px, 6vw, 80px); }
.metrics-wrap .metrics { grid-column: 3 / -1; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--gap); border-top: 1px solid var(--line); }
.metrics-wrap .metrics li { padding-top: 16px; font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.metrics-wrap .metrics .num { display: block; font-family: var(--serif); font-size: clamp(44px, 4.4vw, 72px); line-height: 1; letter-spacing: -0.02em; color: var(--accent); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .metrics-wrap { grid-template-columns: 1fr; } .metrics-wrap .metrics { grid-column: 1 / -1; } }
