/* Editorial portfolio — shared styles for landing, about and case studies.
   Mirrors the Figma file "Portfolio-Nov-2026" (Homepage 07, About 07, Letterboxd Tonight 07). */

:root {
  --hover: .35s cubic-bezier(.25, .8, .25, 1);
  --page: #ffffff;
  --band: #f4f4f4;
  --surface: #f0f0f0;
  --rule: #dedede;
  --ink: #202020;
  --body: #3a3a3a;
  --muted: #626262;
  --greeting: #666666;
  --faded: #737373;
  --footer-bg: #111111;
  --footer-link: #bdbdbd;
  --footer-mark: #4a4a4a;

  --orange: #e86f00; --orange-bg: #fff1e4;
  --blue: #1f86c7;   --blue-bg: #e7f4fc;
  --green: #14a44d;  --green-bg: #e6f7ec;

  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 56px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 15px/1.4 var(--sans); letter-spacing: -.02em;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, video, svg, iframe { 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, figure, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
.serif { font-family: var(--serif); letter-spacing: -.03em; font-weight: 400; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Motion: page entrance, view switch, presses ---------- */
body { animation: page-in .5s var(--ease) both; }
@keyframes page-in { from { opacity: 0; } }
.view[hidden] { display: none !important; }
html[data-start="about"] .view[data-view="work"] { display: none; }
.view { transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s var(--ease); }
/* leaving: lift and soften; entering: rise in from a light blur */
.view.is-leaving { opacity: 0; transform: translateY(-8px); filter: blur(6px); transition-duration: .22s; transition-timing-function: ease-in; }
.view.is-entering { opacity: 0; transform: translateY(14px); filter: blur(8px); transition: none; }
/* hovers: slower, eased, never snappy */
.pill, .chip, .card-media, .chain-step, .menu-links a, .footer-links a, .ab-contact a, .ab-index a, .cs-rail a, .menu-foot a {
  transition: background-color var(--hover), color var(--hover), border-color var(--hover), opacity var(--hover), transform var(--hover); }
.pill:active, .card.is-pressed .card-media { transform: scale(.97); }
.card.is-pressed .card-media { transform: scale(.985); }
a, button { -webkit-tap-highlight-color: transparent; }

/* no transitions while the page sets itself up (avoids the Work→About pill flash) */
.no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; }

/* appear on scroll: fade + rise, once, children staggered by --d */
.appear { opacity: 0; transform: translateY(12px);
  transition: opacity .55s var(--ease) var(--d, 0ms), transform .55s var(--ease) var(--d, 0ms); }
.appear.is-in { opacity: 1; transform: none; }

/* fixed footer reveal: the page lifts away to uncover the footer underneath */
/* :where() keeps this at zero specificity so blocks with their own background (the blue banner) keep it */
body > :where(:not(.footer, .menu, .case-dialog, .case-cursor)) { position: relative; z-index: 1; background: var(--page); }
.footer { position: sticky; bottom: 0; z-index: 0; }
.footer .footer-mark { transform: translateY(22%); transition: transform 1.1s var(--ease); }
.footer.is-in .footer-mark { transform: none; }

/* ---------- Pills (nav, tags, toolbar) ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 999px;
  font: 500 10.5px/1 var(--sans); letter-spacing: -.02em; text-transform: uppercase;
  white-space: nowrap;
}
.pill:hover { background: var(--band); }
.pill.is-filled, .pill[aria-current="page"] { background: var(--ink); color: #fff; }
.pill svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill--icon { padding: 0 13px; }

/* ---------- Nav ---------- */
.nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 16px var(--gutter); border-bottom: 1px solid var(--ink);
}
.nav-links { grid-column: 2; display: flex; gap: 8px; }
.nav-right { grid-column: 3; justify-self: end; }
.nav-menu-btn, .nav-current { display: none; }

/* mobile menu sheet */
.menu {
  position: fixed; inset: 0; z-index: 50; background: var(--page);
  display: flex; flex-direction: column; opacity: 0; visibility: hidden;
  transition: opacity .2s var(--ease), visibility .2s;
}
.menu.is-open { opacity: 1; visibility: visible; }
/* calm entrance: links and contact rise a few px, one after another */
.menu-links a, .menu-foot { opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s var(--ease); }
.menu.is-open .menu-links a, .menu.is-open .menu-foot { opacity: 1; transform: none; }
.menu.is-open .menu-links a:nth-child(2) { transition-delay: 30ms; } .menu.is-open .menu-links a:nth-child(3) { transition-delay: 60ms; }
.menu.is-open .menu-links a:nth-child(4) { transition-delay: 90ms; } .menu.is-open .menu-foot { transition-delay: 120ms; }
.menu .nav { border-bottom: 1px solid var(--ink); }
.menu-links { padding: 24px 16px 0; }
.menu-links a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--rule);
  font: 400 36px/1.12 var(--serif); letter-spacing: -.03em;
}
.menu-links small { font: 400 12px var(--sans); color: var(--faded); }
.menu-foot { margin-top: auto; padding: 0 16px 56px; display: grid; gap: 14px; font-size: 15px; }
.menu-foot a.mail { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.footer { background: var(--footer-bg); color: var(--footer-link); overflow: hidden; padding-top: 96px; }
.footer-links {
  display: flex; justify-content: space-between; padding: 0 var(--gutter) 16px;
  border-bottom: 1px solid #2a2a2a; margin: 0 var(--gutter); padding-inline: 0;
}
.footer-links a:hover { color: #fff; }
/* Edge-to-edge wordmark: ~1.8% wider than the viewport, centred, cropped by the parent. */
.footer-mark {
  margin: 120px -10vw 0; text-align: center; color: var(--footer-mark); white-space: nowrap;
  font: 400 27.45vw/.78 var(--serif); letter-spacing: -.03em; user-select: none;
}
.menu { overflow: hidden; }
.menu .nav { justify-content: flex-end; }
.menu-foot { padding-bottom: 56px; }
.menu-mark { margin-top: 0; color: #e3e3e3; }

/* ---------- Landing: hero ---------- */
.hero { padding: 56px var(--gutter) 80px; border-bottom: 1px solid var(--rule); }
.hero-hello { display: flex; align-items: center; gap: 14px; color: var(--greeting); font-size: 18px; }
.hero-hello img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.hero h1 { margin-top: 28px; font: 400 34px/1.12 var(--serif); letter-spacing: -.03em; max-width: 24em; }
.hero h1 .fade { color: var(--faded); }
.hero-study { margin-top: 14px; color: var(--body); font-size: 18px; }
.hero-study b { font-weight: 400; color: var(--ink); }

/* ---------- Landing: project grid ---------- */
.work { padding: 72px var(--gutter) 144px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 72px; row-gap: 96px; }
.card { display: block; }
.card-media {
  position: relative; aspect-ratio: 628 / 419; overflow: hidden;
  border: 1px solid var(--rule); background: var(--band);
}
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.card-open {
  position: absolute; left: 20px; bottom: 20px; display: inline-flex; gap: 8px; align-items: center;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff;
  font: 500 13px/1 var(--sans); opacity: 0; transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.card:hover .card-media, .card:focus-visible .card-media { border-color: var(--ink); }
.card:hover .card-media img, .card:hover .card-media video { transform: scale(1.015); }
.card:hover .card-open, .card:focus-visible .card-open { opacity: 1; transform: none; }
/* Mouse users: the pointer itself becomes the "Open case study" pill (see editorial.js).
   Touch and keyboard users keep the pill inside the image. */
.case-cursor {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  display: inline-flex; gap: 8px; align-items: center; padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font: 500 13px/1 var(--sans); letter-spacing: -.02em; white-space: nowrap;
  transform: translate3d(-200px, -200px, 0);
  opacity: 0; scale: .8; transition: opacity .3s cubic-bezier(.25, .8, .25, 1), scale .3s cubic-bezier(.25, .8, .25, 1);
}
.case-cursor.is-on { opacity: 1; scale: 1; }
@media (hover: hover) and (pointer: fine) {
  .has-case-cursor .card { cursor: none; }
  .has-case-cursor .card:hover .card-open { opacity: 0; }
}
.card h3 { margin-top: 22px; font: 400 30px/1.14 var(--serif); letter-spacing: -.03em; }
.card h3 span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s cubic-bezier(.25, .8, .25, 1); padding-bottom: 2px; }
.card:hover h3 span, .card:focus-visible h3 span { background-size: 100% 1px; }
.card p { margin-top: 12px; font-size: 13.5px; line-height: 1.55; color: var(--body); }
.tags { display: flex; gap: 6px; margin-top: 18px; flex-wrap: nowrap; }
.tags span { pointer-events: none; }
.tags .pill:hover { background: none; }

/* ---------- Case study dialog (windowed / full screen) ---------- */
.case-dialog {
  position: fixed; inset: 0; margin: auto; padding: 0; border: 0;
  width: min(1214px, calc(100% - 48px)); height: calc(100dvh - 48px); max-width: none; max-height: none;
  background: var(--page); color: var(--ink); overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .2);
  display: none; flex-direction: column;
  transition: width .45s var(--ease), height .45s var(--ease);
}
.case-dialog[open] { display: flex; animation: dlg-in .45s var(--ease); }
.case-dialog.is-expanded { width: 100%; height: 100dvh; box-shadow: none; }
.case-dialog:focus, .case-dialog:focus-visible { outline: none; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(24px) scale(.985); } }
/* liquid-glass backdrop: frosted, slightly brightened page behind the window */
.case-dialog::backdrop {
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, .35), transparent 60%),
    rgba(240, 240, 240, .28);
  -webkit-backdrop-filter: blur(16px) saturate(160%) brightness(1.04);
  backdrop-filter: blur(16px) saturate(160%) brightness(1.04);
  animation: glass-in .45s var(--ease);
}
@keyframes glass-in { from { -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); background: transparent; } }
/* closing: window and glass fade out together before the dialog is removed */
.case-dialog.is-closing { animation: dlg-out .26s ease-in forwards; }
.case-dialog.is-closing::backdrop { animation: glass-out .26s ease-in forwards; }
@keyframes dlg-out { to { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes glass-out { to { -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); background: transparent; } }
.case-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 16px 24px;
  border-bottom: 1px solid var(--rule); background: var(--page); flex: none;
}
.case-dialog.is-expanded .case-toolbar { padding-inline: var(--gutter); }
.case-toolbar .spacer { flex: 1; }
.case-frame { flex: 1; width: 100%; border: 0; background: var(--page); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 72px; padding: 88px var(--gutter) 160px; }
.ab-side { position: sticky; top: 32px; align-self: start; display: grid; gap: 56px; }
.ab-id { display: flex; gap: 14px; align-items: center; }
.ab-id img { width: 48px; height: 48px; border-radius: 50%; }
.ab-id b { display: block; font: 400 22px/1.15 var(--serif); letter-spacing: -.03em; }
.ab-id span { font-size: 12px; color: var(--muted); }
.ab-index { position: relative; }
.ab-index a {
  display: grid; grid-template-columns: 32px 1fr; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--rule);
}
.ab-index a:last-child { border-bottom: 1px solid var(--rule); }
.ab-index small { font-size: 11.5px; color: var(--faded); }
.ab-index a.is-current span { font: italic 400 17px/1.2 var(--serif); letter-spacing: -.02em; }
.ab-contact { display: grid; gap: 6px; }
.ab-contact small { font-size: 11.5px; color: var(--faded); margin-bottom: 4px; text-transform: uppercase; }
.ab-main { display: grid; gap: 120px; min-width: 0; }
.ab-sec { scroll-margin-top: 32px; }
.ab-eyebrow { color: var(--muted); }
.ab-lede { margin-top: 18px; font: 400 60px/1.14 var(--serif); letter-spacing: -.03em; max-width: 880px; }
.ab-bio { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--ink); color: var(--body); }
.ab-head { display: flex; justify-content: space-between; align-items: baseline; padding-top: 18px; border-top: 1px solid var(--ink); margin-bottom: 40px; }
.ab-head h2 { font: 400 40px/1.14 var(--serif); letter-spacing: -.03em; }
.ab-head span { color: var(--muted); font-size: 12px; }
.degree { display: grid; grid-template-columns: 440px 1fr; gap: 48px; align-items: start; }
.degree h3 { font: 400 30px/1.14 var(--serif); letter-spacing: -.03em; }
.degree p { color: var(--muted); }
.degree p:first-child { color: var(--ink); }
.tools-intro { color: var(--muted); margin: -12px 0 28px; }
.tools-strip { position: relative; height: 76px; background: var(--band); border: 1px solid var(--rule); overflow: hidden; }
/* Each logo swaps on its own, left to right: the old one lifts and blurs out,
   then after a short pause the new one rises in, staggered by --i. */
.tools-set { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; pointer-events: none; }
.tools-set li {
  display: flex; justify-content: center; align-items: center; gap: 10px; white-space: nowrap;
  opacity: 0; transform: translateY(10px); filter: blur(6px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s var(--ease);
  transition-delay: calc(var(--i) * 110ms);
}
.tools-set.is-on li { opacity: 1; transform: none; filter: none; transition-delay: calc(320ms + var(--i) * 110ms); }
.tools-set.is-leaving li { opacity: 0; transform: translateY(-10px); filter: blur(6px); transition-duration: .4s; transition-timing-function: ease-in; }
.tools-set li:nth-child(1) { --i: 0; } .tools-set li:nth-child(2) { --i: 1; } .tools-set li:nth-child(3) { --i: 2; }
.tools-set li:nth-child(4) { --i: 3; } .tools-set li:nth-child(5) { --i: 4; }
.tools-set img { width: 20px; height: 20px; }
.awards li { display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--rule); }
.awards li:last-child { border-bottom: 1px solid var(--rule); }
.awards .yr, .awards .res { font-size: 12px; color: var(--muted); }
.awards .res { color: var(--ink); }
.awards b { font: 400 27px/1.18 var(--serif); letter-spacing: -.03em; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 24px; }
.photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photos figcaption { display: flex; gap: 16px; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.photos figcaption small { font-size: 11.5px; color: var(--faded); }

/* ---------- Case study page ---------- */
.cs { --pad: clamp(24px, 8.3vw, 120px); }
.cs-toolbar { display: flex; padding: 16px var(--gutter); border-bottom: 1px solid var(--rule); }
.is-embedded .cs-toolbar { display: none; }
/* windowed case study: no rail, the content lines up with the hero and info row */
.is-windowed .cs-rail { display: none; }
.is-windowed .footer { display: none; }   /* the footer only appears in full screen */
.is-windowed .cs-body { grid-template-columns: minmax(0, 1fr); }
.cs-hero { padding: 64px var(--pad) 48px; display: grid; gap: 28px; }
.cs-logo { width: 144px; }
/* one line: 1107px wide at 54px, so size = available width / 20.6, capped at 54px */
.cs-hero h1 { font: 400 min(54px, calc((100vw - 2 * var(--pad)) / 20.6))/1.3 var(--serif); letter-spacing: -.03em; white-space: nowrap; }
.cs-grad {
  background: linear-gradient(90deg, #009e54, #2187d9); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; font-style: italic;
  padding: .08em .08em .18em; margin: -.08em -.08em -.18em; -webkit-box-decoration-break: clone; box-decoration-break: clone;  /* room for italic descenders */
}
/* Figma crop: image at 58.87% of the box width, centred, top-aligned, box 1200 × 425 */
/* side space is a page-coloured border (not margin) so the footer behind the page never shows through */
.cs-banner { margin: 0; box-sizing: content-box; border-inline: var(--pad) solid var(--page); aspect-ratio: 1200 / 425; background: #92c2ee; overflow: hidden; }
.cs-banner img { width: 58.87%; height: auto; margin: 0 auto; }
.cs-info { display: flex; gap: 72px; padding: 48px var(--pad) 72px; }
.cs-bio { flex: 0 0 420px; color: var(--body); font-size: 17px; line-height: 1.55; }
.cs-facts { flex: 1; display: grid; grid-template-columns: auto auto auto 1fr; gap: 48px; align-content: start; }
.cs-facts dt { color: var(--faded); margin-bottom: 6px; }
.cs-facts dd { color: var(--ink); }

.cs-body { display: grid; grid-template-columns: 200px 1fr; gap: 56px; padding: 24px var(--pad) 160px; }
.cs-rail { position: sticky; top: 24px; align-self: start; }
.cs-rail a {
  display: block; padding: 8px 0 8px 12px;
  font: 400 19px/1.2 var(--serif); letter-spacing: -.02em; color: var(--faded); transition: color .35s var(--ease);
}
.cs-rail a:hover, .cs-rail a.is-current { color: var(--ink); }
.cs-rail a { border-left: 1px solid var(--rule); }
.cs-rail a.is-current { border-left: 2px solid var(--ink); padding-left: 11px; }
.cs-main { display: grid; gap: 112px; min-width: 0; }
.cs-video video { width: 100%; aspect-ratio: 1296 / 716; object-fit: cover; border: 1px solid var(--rule); background: #111; }
.cs-sec { display: grid; gap: 24px; padding-top: 24px; border-top: 1px solid var(--rule); scroll-margin-top: 24px; }
.cs-sec > * { min-width: 0; }
.cs-head { display: grid; gap: 12px; }
.cs-kicker { font: 400 20px/1.2 var(--serif); letter-spacing: -.02em; color: var(--faded); }
.cs-head h2 { font: 400 40px/1.18 var(--serif); letter-spacing: -.03em; max-width: 900px; }
.cs-p { font-size: 17px; line-height: 1.55; color: var(--body); max-width: 760px; }
.cs-p b { font-weight: 500; color: var(--ink); }
.cs-quote { display: grid; gap: 10px; padding: 8px 0; }
.cs-quote small { font: 400 20px/1.2 var(--serif); letter-spacing: -.02em; color: var(--faded); }
.cs-p--small { font-size: 15px; }
.cs-quote p { font: 400 34px/1.24 var(--serif); letter-spacing: -.03em; max-width: 760px; }
.cs-quote--italic p { font-style: italic; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 999px;
  font: 500 10.5px/1 var(--sans); letter-spacing: -.02em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.chip svg, .icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip svg { width: 14px; height: 14px; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kpi { --c: var(--orange); --bg: var(--orange-bg); display: grid; gap: 20px; align-content: start; padding: 24px; background: var(--bg); }
.kpi.is-blue { --c: var(--blue); --bg: var(--blue-bg); }
.kpi.is-green { --c: var(--green); --bg: var(--green-bg); }
.kpi-top { display: flex; align-items: center; gap: 8px; color: var(--c); font: 500 12px var(--sans); }
.kpi-top .icon { width: 20px; height: 20px; }
.kpi-num { font: 400 52px/1 var(--serif); letter-spacing: -.03em; color: var(--c); }
.kpi-dots { display: flex; gap: 3px; margin-top: 12px; }
.kpi-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.kpi-dots i.off { opacity: .22; }
.kpi-cap { display: grid; gap: 4px; min-height: 68px; }
.kpi-cap p { font-size: 16px; line-height: 1.5; color: var(--body); }
.kpi-cap small { font-size: 12px; color: var(--muted); }

.chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 16px; align-items: center; }
.chain-step { display: flex; gap: 14px; align-items: flex-start; padding: 20px 24px; border: 1px solid var(--rule); height: 100%; }
.tile { --c: var(--orange); --bg: var(--orange-bg); flex: none; display: grid; place-items: center; width: 32px; height: 32px; background: var(--bg); color: var(--c); }
.tile.is-blue { --c: var(--blue); --bg: var(--blue-bg); }
.tile.is-green { --c: var(--green); --bg: var(--green-bg); }
.chain-step b { display: block; font-weight: 500; font-size: 18px; line-height: 1.3; }
.chain-step span { font-size: 15px; color: #6b6b6b; }
.chain-arrow { color: var(--faded); }

.journey { aspect-ratio: 2160 / 1215; border: 1px solid var(--rule); overflow: hidden; }
.journey iframe { width: 100%; height: 100%; border: 0; }

.ia { border: 1px solid var(--rule); background: #fafafa; padding: 20px 24px 18px; }
.ia svg { width: 100%; height: auto; }
.ia .ia-node { fill: #fff; stroke: #c9ccd0; stroke-width: 1.4; }
.ia .ia-node.proposed { stroke: #2f80ed; }
.ia .ia-node.final { fill: #e7f1fd; stroke: #2f80ed; stroke-width: 1.8; }
.ia .ia-entry { fill: #fff4e8; stroke: #d96800; stroke-width: 1.6; stroke-dasharray: 5 4; }
.ia .ia-boundary { fill: rgba(47, 128, 237, .04); stroke: #2f80ed; stroke-width: 1.5; }
.ia .ia-path { fill: none; stroke: #8b8f94; stroke-width: 1.6; marker-end: url(#ia-arrow); }
.ia .ia-path.proposed { stroke: #2f80ed; marker-end: url(#ia-arrow-blue); }
.ia .ia-path.entry { stroke: #d96800; stroke-dasharray: 5 4; marker-end: url(#ia-arrow-orange); }
.ia .ia-label { font: 500 13.5px var(--sans); letter-spacing: -.02em; fill: var(--ink); text-anchor: middle; }
.ia .ia-section-label { font: 500 10.5px var(--sans); letter-spacing: .12em; fill: var(--faded); }
.ia .ia-section-label.blue { fill: #2f80ed; }
.ia .ia-gap-label { font: 600 10px var(--sans); letter-spacing: .1em; fill: #d96800; text-anchor: middle; }
.ia-note { display: flex; justify-content: space-between; gap: 24px; margin-top: 8px; font-size: 15px; color: var(--muted); }
.ia-note span:last-child { color: var(--faded); white-space: nowrap; }
.ia-note b { font-weight: 500; color: var(--ink); }

.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 8px; align-items: stretch; }
.flow-arrow { align-self: center; color: var(--faded); }
.stage { display: grid; gap: 14px; align-content: start; padding: 20px 20px 22px; background: #fafafa; border: 1px solid var(--rule); }
.stage.is-final { background: var(--page); border: 1.5px solid #14a44d; }
.stage > small { font: 500 12px var(--sans); color: var(--faded); }
.posters { height: 104px; display: grid; place-content: center start; }
.posters span { display: flex; flex-wrap: wrap; gap: 3px; }
.posters i { display: block; }
.stage b { font: 400 34px/1.1 var(--serif); letter-spacing: -.03em; }
.stage strong { font-weight: 500; }
.stage p { font-size: 12px; color: var(--muted); }

.showcase img { width: 100%; height: auto; border: 1px solid var(--rule); }
.states { display: grid; gap: 56px; }
.state { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.state img { width: 100%; height: auto; border: 1px solid var(--rule); }
.state.is-flipped img { order: 2; }
.state-label { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font: 400 21px/1.2 var(--serif); letter-spacing: -.02em; color: var(--c, var(--orange)); }
.state h3 { font: 400 28px/1.16 var(--serif); letter-spacing: -.03em; }
.state p { margin-top: 10px; font-size: 16px; line-height: 1.55; color: #6b6b6b; max-width: 420px; }

.lessons li { display: grid; grid-template-columns: 380px 1fr; gap: 40px; padding: 22px 0; border-top: 1px solid var(--rule); }
.lessons h3 { font: 400 24px/1.2 var(--serif); letter-spacing: -.03em; }
.lessons p { font-size: 17px; line-height: 1.55; color: var(--body); }

/* ---------- Full-project links (shared by every case study) ----------
   <div class="cs-links"><a class="cs-link" href="…"><small>Project document</small><b>Executive Summary</b><i>↗</i></a> … </div>
   Override --link-accent on .cs-links to tint the arrow and hover border per project. */
.cs-links { --link-accent: var(--ink); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.cs-link { position: relative; display: grid; gap: 10px; padding: 20px 22px 24px; border: 1px solid var(--rule); background: var(--page);
  transition: border-color var(--hover), transform var(--hover); }
.cs-link small { font: 500 12px/1.3 var(--sans); letter-spacing: -.02em; color: var(--faded); }
.cs-link b { font: 400 24px/1.15 var(--serif); letter-spacing: -.03em; font-weight: 400; color: var(--ink); padding-right: 28px; }
.cs-link i { position: absolute; right: 20px; top: 18px; font-style: normal; font-size: 16px; color: var(--link-accent); transition: transform var(--hover); }
.cs-link:hover { border-color: var(--link-accent); transform: translateY(-2px); }
.cs-link:hover i { transform: translate(2px, -2px); }

/* narrower case column (windowed dialog ≈ 1214px) */
@media (max-width: 1240px) {
  .cs-body { grid-template-columns: 180px 1fr; gap: 40px; }
  .cs-bio { flex-basis: 340px; }
  .cs-facts { gap: 28px; }
  .cs-info { gap: 48px; }
  .lessons li { grid-template-columns: 320px 1fr; }
}

/* ---------- Tablet / mobile ---------- */
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .grid { grid-template-columns: 1fr; row-gap: 64px; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .ab-side { position: static; }
  .ab-index { display: none; }
  .ab-lede { font-size: 40px; }
  .ab-bio, .degree { grid-template-columns: 1fr; gap: 16px; }
  .cs-info { flex-direction: column; gap: 32px; }
  .cs-hero h1 { white-space: normal; font-size: 40px; }
  .chip { white-space: normal; height: auto; padding: 8px 14px; line-height: 1.3; }
  .cs-bio { flex-basis: auto; }
  .cs-facts { grid-template-columns: 1fr 1fr; gap: 24px; }
  .cs-body { grid-template-columns: 1fr; }
  .cs-rail { display: none; }
  .kpis, .chain, .flow { grid-template-columns: 1fr; }
  .chain-arrow, .flow-arrow { display: none; }
  .state, .lessons li { grid-template-columns: 1fr; gap: 16px; }
  .state.is-flipped img { order: 0; }
  .case-dialog { width: 100%; height: 100dvh; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .appear { transform: translateY(8px); transition-duration: .45s; }
  .view.is-entering { transform: translateY(8px); filter: none; }
  .view.is-leaving { transform: none; filter: none; }
  .nav { display: flex; justify-content: space-between; }
  .nav-links, .nav-right { display: none; }
  .nav-current, .nav-menu-btn { display: inline-flex; }
  .hero { padding: 40px 16px 56px; }
  .hero h1 { font-size: 30px; }
  .hero-hello, .hero-study { font-size: 15px; }
  .work { padding: 24px 16px 96px; }
  .card h3 { font-size: 24px; }
  .tags { gap: 4px; }
  .tags .pill { padding: 0 8px; font-size: 9px; }
  .footer-links { flex-wrap: wrap; gap: 10px 20px; justify-content: flex-start; }
  .about { padding: 40px 16px 96px; }
  .ab-lede { font-size: 36px; }
  .awards li { grid-template-columns: 1fr auto; }
  .awards b { grid-column: 1 / -1; grid-row: 2; }
  .photos { grid-template-columns: 1fr; }
  .tools-set { grid-template-columns: repeat(5, 1fr); }
  .tools-set li span { display: none; }
  .cs-hero h1 { font-size: 36px; white-space: normal; }
  .cs { --pad: 16px; }
  .ia { padding: 14px; }
  .ia-note { flex-direction: column; gap: 6px; font-size: 13px; }
  .cs-banner { aspect-ratio: 1914 / 1251; }   /* phones: show the whole banner, not a thin strip */
  .cs-banner img { width: 100%; }
  .cs-head h2 { font-size: 30px; }
  .cs-quote p { font-size: 26px; }
  .chips { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
