/* Mila Haffar — six projects from her notebook, in velvet.
   Direction from Mila's portfolio survey (Ember, Oct 2026) and her notes on the
   first version: golden hour after dark, velvet, film grain and ceramic; her M
   coming together on the first page; every project in one place on the Work
   page; each project quietly its own world, never named as one. */

/* — worlds —
   The page's light is set by data-world on <html>. Case pages set it once;
   the Work page lends it to whichever project is pointed at. Registered so
   the light can fade from one project to the next. */
@property --ground { syntax: '<color>'; inherits: true; initial-value: #241916; }
@property --deep { syntax: '<color>'; inherits: true; initial-value: #150e0c; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #c9a978; }
@property --glow { syntax: '<color>'; inherits: true; initial-value: rgb(226 180 118 / 0.22); }
@property --tint { syntax: '<color>'; inherits: true; initial-value: #5e2a30; }
@property --ink { syntax: '<color>'; inherits: true; initial-value: #f0e8dd; }
@property --muted { syntax: '<color>'; inherits: true; initial-value: #b9ab9b; }

:root {
  /* Golden hour, from the survey: cream, sand, taupe, oxblood, espresso */
  --cream: #f0e8dd;
  --sand: #e6dccd;
  --taupe: #b6a68b;
  --oxblood: #5e2a30;
  --espresso: #4a3830;
  --paper: #efe6d8;
  --paper-ink: #3a2b25;

  --ink: var(--cream);
  --muted: #b9ab9b;
  --hair: rgb(240 232 221 / 0.14);
  --hair-strong: rgb(240 232 221 / 0.26);

  --font-voice: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-label: var(--font-voice);
  --title: var(--font-voice);
  --title-weight: 400;
  --title-tracking: -0.01em;
  --title-size: clamp(56px, 7vw, 112px);
  --title-features: normal;

  --gutter: clamp(20px, 4vw, 56px);
  --col-gap: clamp(16px, 2.4vw, 36px);
  --r: 14px;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-lid: cubic-bezier(0.65, 0, 0.25, 1);
  --ease-light: cubic-bezier(0.4, 0, 0.2, 1);

  transition: --ground 1.6s var(--ease-light), --deep 1.6s var(--ease-light), --accent 1.2s var(--ease-light),
    --glow 1.6s var(--ease-light), --tint 1.6s var(--ease-light), --ink 1.6s var(--ease-light), --muted 1.6s var(--ease-light);
}
:root.is-switching { transition-duration: 0.8s; }

:root, [data-world="home"] {
  --ground: #241916; --deep: #150e0c; --accent: #c9a978; --glow: rgb(226 180 118 / 0.22); --tint: #5e2a30;
}
/* MOF: Aegean stone, a family's textiles */
[data-world="mof"] {
  --ground: #1d2730; --deep: #10171d; --accent: #d9c7a7; --glow: rgb(217 199 167 / 0.18); --tint: #5b6f86;
  --title: 'Bodoni Moda', 'Didot', serif; --title-weight: 400; --title-tracking: 0.04em;
}
/* ReSET Studio: slate, walnut, water */
[data-world="reset"] {
  --ground: #232a2d; --deep: #15191b; --accent: #a9b7a8; --glow: rgb(220 213 200 / 0.14); --tint: #7e8fa3;
  --title: 'Marcellus', 'Trajan Pro', serif; --title-weight: 400; --title-tracking: 0.02em;
  --title-size: clamp(48px, 5.6vw, 92px);
}
/* YOCA: strawberry, matcha, chocolate, peach */
[data-world="yoca"] {
  --ground: #2d1c17; --deep: #1c110d; --accent: #f0a85e; --glow: rgb(230 163 169 / 0.18); --tint: #9fb57f;
  --title: 'Fraunces', 'Cooper', serif; --title-weight: 700; --title-tracking: -0.01em;
  --title-features: 'SOFT' 100, 'WONK' 1;
}
/* IthaCard: Commons brick, TCAT teal, amber */
[data-world="ithacard"] {
  --ground: #252220; --deep: #171513; --accent: #e3a53c; --glow: rgb(47 138 133 / 0.22); --tint: #2f8a85;
  --title: 'DM Sans', 'Helvetica Neue', sans-serif; --title-weight: 600; --title-tracking: -0.045em;
}
/* Cornell Botanic Gardens: moss, leaf, late sun */
[data-world="botanic"] {
  --ground: #1d251b; --deep: #11170f; --accent: #c99a58; --glow: rgb(127 154 106 / 0.2); --tint: #7f9a6a;
  --title: 'Cormorant Garamond', 'Garamond', serif; --title-weight: 500; --title-tracking: -0.01em;
  --title-size: clamp(48px, 5.8vw, 96px);
}
/* Studio Kintsu: fired clay, gold in the cracks */
[data-world="kintsu"] {
  --ground: #25201e; --deep: #171312; --accent: #d9ae48; --glow: rgb(212 168 60 / 0.17); --tint: #b07a5a;
  --title: 'Shippori Mincho', 'Hiragino Mincho ProN', serif; --title-weight: 500; --title-tracking: 0.01em;
  --title-size: clamp(48px, 5.8vw, 96px);
}

/* — base — */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-voice);
  font-optical-sizing: auto;
  font-size: 19px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.1; text-wrap: balance; }
p { margin: 0 0 0.9em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; margin: 0; padding: 0; }
em { font-style: italic; }
strong { font-weight: 600; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 38%, transparent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 100;
  background: var(--cream); color: var(--paper-ink); padding: 10px 16px; border-radius: 999px;
  font-size: 15px; text-decoration: none;
}
.skip:focus { top: 14px; }

.label, .brand, .work-line, .letter h2, .case-meta dt, .step-num { font-family: var(--font-label); }
.label {
  font-size: 12px; line-height: 1.4; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 500; color: var(--muted); margin: 0;
}
.title {
  font-family: var(--title); font-weight: var(--title-weight); letter-spacing: var(--title-tracking);
  font-variation-settings: var(--title-features); font-optical-sizing: auto;
}

/* — the light: ground, golden window light, velvet edges, film grain — */
.atmosphere {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--ground);
}
.atmosphere::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 6% -12%, var(--glow), transparent 70%),
    radial-gradient(55% 45% at 104% 112%, color-mix(in srgb, var(--tint) 34%, transparent), transparent 70%),
    radial-gradient(140% 100% at 50% 40%, transparent 52%, var(--deep) 100%);
}
.atmosphere::after {
  /* a soft shaft of window light, like the shadows on her covers */
  content: ""; position: absolute; top: -40%; left: -25%; width: 85%; height: 180%;
  background: linear-gradient(100deg, transparent 36%, color-mix(in srgb, var(--glow) 75%, transparent) 49%, transparent 61%);
  transform: rotate(-10deg); filter: blur(28px); opacity: 0.5;
  animation: breathe 16s ease-in-out infinite alternate;
}
@keyframes breathe { from { opacity: 0.32; translate: -2% 0; } to { opacity: 0.62; translate: 3% 0; } }

.grain {
  position: fixed; inset: -120px; z-index: 80; pointer-events: none;
  opacity: 0.075; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.8s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-41px, 23px); }
  50% { transform: translate(19px, -37px); }
  75% { transform: translate(-13px, 31px); }
  100% { transform: translate(29px, 9px); }
}

/* — top bar — */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter) 34px;
}
.topbar::before {
  content: ""; position: absolute; inset: 0 0 -10px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--deep) 94%, transparent) 0%, color-mix(in srgb, var(--deep) 80%, transparent) 55%, transparent 100%);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.brand { transition: opacity 0.4s; }
.brand {
  font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
.topnav { display: flex; gap: clamp(16px, 2.4vw, 32px); }
.topnav a {
  font-size: 16px; font-style: italic; color: var(--muted); text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: color 0.3s, background-size 0.5s var(--ease-out);
}
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--ink); background-size: 100% 1px; }
.topnav a { white-space: nowrap; }
.nav-short { display: none; }

/* — prologue — */
/* The homepage is this one screen: everything is sized to fit the window's height. */
.prologue {
  position: relative; min-height: 100svh;
  padding: 88px var(--gutter) 24px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap);
  align-content: center;
}
.prologue-label { grid-column: 1 / -1; text-align: center; }
.mila { position: relative; width: 100%; overflow: hidden; }
.mila-stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
.mila-stage svg { position: absolute; inset: 0; overflow: visible; }
.mila--hero { grid-column: 1 / -1; width: min(100%, 940px, calc((100svh - 470px) * 2.17)); min-width: min(100%, 420px); margin: 0 auto 4px; aspect-ratio: 1680 / 775; }
.prologue-title {
  grid-column: 1 / 8; align-self: end;
  font-size: clamp(40px, min(5.8vw, 9.5svh), 92px); font-weight: 300; line-height: 0.98; letter-spacing: -0.028em;
}
.prologue-title em { color: var(--accent); font-weight: 300; }
.prologue-note { grid-column: 9 / 13; align-self: end; font-size: 17px; line-height: 1.55; color: var(--muted); }
.prologue-note .salutation { font-style: italic; color: var(--ink); font-size: 21px; margin-bottom: 0.5em; }
.prologue-go { grid-column: 1 / -1; justify-self: center; margin-top: clamp(16px, 4svh, 48px); font-size: 19px; }

/* — the work: all six projects in one place, with enough of each to choose — */
.work-page { padding: 128px var(--gutter) clamp(72px, 10vw, 128px); }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(56px, 6vw, 88px) var(--col-gap); }
.work-card { display: flex; flex-direction: column; gap: 8px; height: 100%; text-decoration: none; color: var(--ink); }
.work-card .box { margin-bottom: 18px; }
.work-card:focus-visible { outline-offset: 10px; }
.work-line { display: flex; gap: 12px; align-items: baseline; font-size: 11px; line-height: 1.5; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.work-num { flex: none; min-width: 2.4em; color: var(--accent); }
.work-title {
  font-size: clamp(32px, 3vw, 48px); line-height: 1.05; color: var(--ink);
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.5); text-wrap: balance;
}
.work-card .pills { margin: 8px 0 22px; }
.work-card .enter { align-self: flex-start; margin-top: auto; }
.work-card:hover .enter span, .work-card:focus-visible .enter span { translate: 6px 0; }

/* Each project's own texture behind its case page's opening, faint and fading at the edges */
.case-hero { position: relative; isolation: isolate; }
.case-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.9;
  -webkit-mask-image: radial-gradient(75% 60% at 70% 45%, #000, transparent 75%);
  mask-image: radial-gradient(75% 60% at 70% 45%, #000, transparent 75%);
}
/* threads, woven */
[data-world="mof"] .case-hero::before {
  background:
    repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 7%, transparent) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 7%, transparent) 0 1px, transparent 1px 16px);
}
/* slate and still water */
[data-world="reset"] .case-hero::before {
  background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--accent) 8%, transparent) 0 1px, transparent 1px 26px);
}
/* strawberry and matcha, soft */
[data-world="yoca"] .case-hero::before {
  background:
    radial-gradient(28% 24% at 84% 22%, rgb(230 163 169 / 0.16), transparent 70%),
    radial-gradient(24% 22% at 12% 78%, rgb(159 181 127 / 0.13), transparent 70%),
    radial-gradient(18% 16% at 60% 92%, rgb(240 168 94 / 0.12), transparent 70%);
  -webkit-mask-image: none; mask-image: none;
}
/* a street grid */
[data-world="ithacard"] .case-hero::before {
  background:
    linear-gradient(rgb(47 138 133 / 0.09) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgb(47 138 133 / 0.09) 1px, transparent 1px) 0 0 / 56px 56px;
}
/* light through leaves */
[data-world="botanic"] .case-hero::before {
  background:
    radial-gradient(9% 7% at 22% 30%, rgb(201 154 88 / 0.13), transparent 70%),
    radial-gradient(7% 6% at 34% 58%, rgb(127 154 106 / 0.16), transparent 70%),
    radial-gradient(11% 8% at 12% 70%, rgb(201 154 88 / 0.1), transparent 70%),
    radial-gradient(6% 5% at 40% 18%, rgb(127 154 106 / 0.14), transparent 70%),
    radial-gradient(8% 7% at 26% 88%, rgb(127 154 106 / 0.12), transparent 70%);
}
/* gold in the cracks */
[data-world="kintsu"] .case-hero::before {
  background: url("../assets/kintsu-cracks.svg") 100% 30% / 1100px auto no-repeat;
  opacity: 0.16;
}

/* The cover is a print, and a wash of the project's ink lies over it.
   Hover, focus, or (on touch screens) reaching the upper part of the screen
   lets the ink bleed across from wherever the pointer came in (--x, --y, set
   in site.js), with a soft wet edge, while the photo sinks back and blurs
   under it. The wash carries the project's title, so the title only shows
   while the cover is open. */
@property --bleed { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.box {
  --x: 50%; --y: 100%;
  position: relative; display: block; aspect-ratio: 4 / 3; isolation: isolate;
  text-decoration: none; color: var(--ink); border-radius: var(--r); overflow: hidden;
  box-shadow: 0 50px 90px -50px rgb(0 0 0 / 0.85), 0 0 0 1px rgb(255 255 255 / 0.05);
}
.kit {
  position: absolute; inset: 0; z-index: 1; border-radius: var(--r); overflow: hidden;
  display: grid; place-items: center; padding: 24px; text-align: center;
  background:
    radial-gradient(110% 80% at 20% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%),
    color-mix(in srgb, color-mix(in srgb, var(--deep) 80%, #000) 55%, transparent);
  box-shadow: inset 0 0 0 1px var(--hair), inset 0 40px 60px -40px rgb(0 0 0 / 0.8);
  --bleed: 0%;
  -webkit-mask-image: radial-gradient(circle at var(--x) var(--y), #000 calc(var(--bleed) - 24%), transparent var(--bleed));
  mask-image: radial-gradient(circle at var(--x) var(--y), #000 calc(var(--bleed) - 24%), transparent var(--bleed));
  transition: --bleed 0.8s var(--ease-lid);
}
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills li, .pills span { border: 1px solid var(--hair-strong); border-radius: 999px; padding: 3px 12px; font-size: 13px; color: var(--muted); }

.lid {
  position: absolute; inset: 0; border-radius: var(--r); overflow: hidden;
  background: var(--deep);
  transition: scale 0.9s var(--ease-out), filter 0.9s var(--ease-out);
}
.lid img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.lid::after {
  /* ceramic glaze: a soft highlight across the top */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(165deg, rgb(255 255 255 / 0.13), transparent 38%), linear-gradient(to top, rgb(0 0 0 / 0.18), transparent 40%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12);
}
/* open: the ink spreads and the print sinks back */
:is(.work-card:hover, .work-card:focus-visible, .box.is-open) .kit { --bleed: 135%; transition-duration: 1.3s; }
:is(.work-card:hover, .work-card:focus-visible, .box.is-open) .lid { scale: 1.06; filter: blur(5px) saturate(0.7); transition-duration: 1.4s; }

/* Studio Kintsu's cover: fired clay with gold in the cracks, until a photo arrives */
.lid-art {
  position: relative; width: 100%; height: 100%;
  display: grid; place-content: center; text-align: center; gap: 10px; padding: 24px;
  background:
    radial-gradient(34% 26% at 50% 50%, rgb(28 23 21 / 0.82), transparent 100%),
    url("../assets/kintsu-cracks.svg") center / cover no-repeat,
    radial-gradient(90% 80% at 40% 30%, #4a403b, #231d1b 75%);
}
.lid-art .label { color: #d9ae48; }
.lid-art-title {
  font-family: 'Shippori Mincho', serif; font-weight: 500; color: #f4efe6;
  font-size: clamp(28px, 3.6vw, 56px); line-height: 1.05; letter-spacing: 0.01em;
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.5);
}

.enter {
  display: inline-flex; align-items: baseline; gap: 12px;
  font-size: 17px; text-decoration: none; color: var(--ink);
  padding-bottom: 6px; border-bottom: 1px solid var(--accent);
}
.enter span { transition: translate 0.5s var(--ease-out); color: var(--accent); }
.enter:hover span { translate: 6px 0; }

.ps-email {
  display: inline-block; margin: 22px 0 18px;
  font-size: clamp(28px, 3.6vw, 52px); font-style: italic; font-weight: 300; letter-spacing: -0.015em; line-height: 1.1;
  color: var(--ink); text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; padding-bottom: 6px;
  transition: background-size 0.6s var(--ease-out);
}
.ps-email:hover { background-size: 0 1px; background-position: 100% 100%; }
.ps-links { display: flex; justify-content: center; gap: 28px; font-size: 16px; }
.ps-links a { color: var(--muted); text-decoration: none; font-style: italic; }
.ps-links a:hover { color: var(--ink); }

/* — footer — */
.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px var(--gutter) 32px; border-top: 1px solid var(--hair);
  font-size: 14px; color: var(--muted);
}
.footer a { color: var(--muted); text-decoration: none; font-style: italic; }
.footer a:hover { color: var(--ink); }

/* — about: a letter on the table — */
.letter-wrap { padding: 140px var(--gutter) 96px; display: grid; justify-items: center; gap: 56px; }
.letter {
  width: min(780px, 100%);
  background: var(--paper); color: var(--paper-ink);
  padding: clamp(32px, 7vw, 88px) clamp(26px, 7vw, 92px) clamp(32px, 6vw, 72px);
  border-radius: 4px;
  box-shadow: 0 60px 90px -50px rgb(0 0 0 / 0.85), 0 1px 0 rgb(255 255 255 / 0.5) inset;
}
.letter .label { color: var(--oxblood); }
.letter h1 { font-size: clamp(42px, 6vw, 76px); font-weight: 300; letter-spacing: -0.025em; line-height: 1; margin: 18px 0 32px; color: #2c201b; }
.letter h2 { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; color: var(--oxblood); margin: 36px 0 12px; }
.letter p { font-size: 19px; line-height: 1.75; }
.letter .lede { font-size: clamp(21px, 2.2vw, 25px); line-height: 1.55; font-weight: 300; }
/* her photo: a print set on the letter, held by a strip of tape */
.letter-photo {
  float: right; position: relative; width: clamp(140px, 30%, 230px); margin: -6px -4px 22px 28px;
  padding: 9px; background: #fbf8f2; rotate: 2.2deg;
  box-shadow: 0 18px 30px -18px rgb(60 42 30 / 0.55), 0 0 0 1px rgb(58 43 37 / 0.08);
}
.letter-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.letter-photo::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 24px; translate: -50% 0; rotate: -4deg;
  background: rgb(232 221 196 / 0.85); box-shadow: 0 1px 2px rgb(60 42 30 / 0.15);
}
.letter-sign { width: 190px; margin: 34px 0 0 -12px; }
.letter-sign + .label { margin-top: 2px; }
.letter-after { width: min(780px, 100%); display: grid; gap: 22px; justify-items: start; }
.letter-after .pills li { font-size: 14px; }

/* — contact — */
.contact-page {
  min-height: 100svh; padding: 140px var(--gutter) 96px;
  display: grid; align-content: center; justify-items: center; text-align: center; gap: 8px;
}
.contact-title { font-size: clamp(56px, 9vw, 140px); font-weight: 300; letter-spacing: -0.035em; line-height: 0.95; margin: 18px 0 22px; }
.contact-title em { color: var(--accent); }
.contact-lead { max-width: 40ch; font-size: clamp(18px, 1.8vw, 21px); color: var(--muted); }
.contact-page .mila { width: min(220px, 50vw); margin: 36px auto 0; }

/* — case studies — */
.case-hero {
  padding: 150px var(--gutter) 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 24px;
  align-items: end;
}
.case-hero > .label { grid-column: 1 / -1; color: var(--accent); }
.case-title { grid-column: 1 / 9; font-size: clamp(64px, 11vw, 176px); line-height: 0.9; }
.case-title--long { font-size: clamp(52px, 8vw, 128px); }
.case-cover {
  margin: clamp(48px, 7vw, 96px) var(--gutter) 0; border-radius: var(--r); overflow: hidden; position: relative;
  aspect-ratio: 21 / 9; box-shadow: 0 60px 100px -60px rgb(0 0 0 / 0.9);
}
.case-cover img, .case-cover .lid-art { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.case-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(165deg, rgb(255 255 255 / 0.1), transparent 35%); pointer-events: none; }
.case-meta {
  margin: 40px var(--gutter) 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--hair-strong); border-bottom: 1px solid var(--hair);
}
.case-meta div { padding: 16px 20px 18px 0; }
.case-meta div + div { border-left: 1px solid var(--hair); padding-left: 20px; }
.case-meta dt { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-weight: 500; }
.case-meta dd { margin: 0; font-size: 16px; line-height: 1.45; }

.case-section {
  padding: clamp(56px, 9vw, 110px) var(--gutter) 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: var(--col-gap);
}
.case-section > .label { grid-column: 1 / 4; color: var(--accent); padding-top: 8px; }
.case-body { grid-column: 4 / 11; grid-row: 1 / span 2; max-width: 66ch; }

/* A photo inside a case study's text, with a short caption */
.case-photo { margin: 26px 0 6px; max-width: 420px; }
.case-photo img { width: 100%; height: auto; border-radius: var(--r); box-shadow: 0 40px 70px -40px rgb(0 0 0 / 0.85), 0 0 0 1px rgb(255 255 255 / 0.05); }
.case-photo figcaption { margin-top: 10px; font-size: 14px; font-style: italic; color: var(--muted); }
.case-photo--wide { max-width: none; }
.case-photo a { display: block; cursor: zoom-in; }
.case-photo--wide + .case-photo--wide { margin-top: 34px; }
/* a tall, narrow photo set beside the text it belongs to */
.case-photo--side { float: right; width: 220px; margin: 4px 0 20px 32px; }
.case-body .case-callout { clear: both; }
/* two photos side by side, sharing one caption */
.case-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 0 6px; }
.case-photos img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); box-shadow: 0 40px 70px -40px rgb(0 0 0 / 0.85), 0 0 0 1px rgb(255 255 255 / 0.05); }
.case-photos figcaption { grid-column: 1 / -1; margin-top: 2px; font-size: 14px; font-style: italic; color: var(--muted); }
@media (max-width: 600px) {
  .case-photo--side { float: none; width: min(240px, 70%); margin: 22px 0 6px; }
  .case-photos { gap: 8px; }
}

/* Slides from the project's own deck, set wide so their small text stays
   readable; each opens full size in a new tab. */
.case-slide {
  width: min(1180px, calc(100% - 2 * var(--gutter)));
  margin: clamp(56px, 9vw, 110px) auto 0;
}
.case-slide a { display: block; border-radius: var(--r); overflow: hidden; cursor: zoom-in; box-shadow: 0 60px 100px -60px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(255 255 255 / 0.05); }
.case-slide img { width: 100%; height: auto; }

/* A drawing beside each part of a case study, in the project's own color. It
   stays in view while a long section is read, and draws itself in like her
   handwriting when it reaches the screen (js/site.js measures each line). */
.case-illo {
  grid-column: 1 / 4; grid-row: 2; align-self: start;
  position: sticky; top: 120px;
  width: min(100%, 220px); margin: 32px 0 0; color: var(--accent);
}
.case-illo svg { display: block; width: 100%; height: auto; overflow: visible; }
.case-illo .wash { fill: currentColor; stroke: none; opacity: 0.09; }
.case-illo .soft { fill: currentColor; fill-opacity: 0.14; }
.case-illo .fill { fill: currentColor; stroke: none; }
.case-illo .dots { stroke-dasharray: 1 7; }
.case-illo .ink { transition: stroke-dashoffset 1.8s var(--ease-out), fill-opacity 1s ease 0.9s; }
.case-illo :is(.wash, .fill, .dots) { transition: opacity 1s ease 0.9s; }
.case-illo.is-drawing:not(.is-in) :is(.wash, .fill, .dots) { opacity: 0; }
.case-illo.is-drawing:not(.is-in) .soft { fill-opacity: 0; }
.case-illo.is-in .ink { stroke-dashoffset: 0 !important; }
.case-body p, .case-body li { font-size: 19px; line-height: 1.7; }
.case-lead { font-size: clamp(22px, 2.3vw, 29px) !important; line-height: 1.45 !important; font-weight: 300; margin-bottom: 28px; }
.case-lead strong { font-weight: 500; }
.step { margin: 0 0 40px; padding-top: 28px; border-top: 1px solid var(--hair); }
.step:last-child { margin-bottom: 0; }
.step-num { display: block; font-size: 13px; letter-spacing: 0.18em; color: var(--accent); margin: 0 0 10px; }
.step h3 { font-size: clamp(24px, 2.4vw, 32px); font-style: italic; font-weight: 300; margin: 0 0 14px; }
.case-list { margin: 14px 0 18px; display: flex; flex-direction: column; gap: 10px; }
.case-list li { position: relative; padding-left: 22px; color: color-mix(in srgb, var(--ink) 86%, var(--ground)); }
.case-list .case-list { margin: 8px 0 2px; gap: 6px; }
/* Mila's star: the step she most wants you to see */
.star { display: inline-block; margin-left: 0.3em; font-style: normal; font-size: 0.7em; vertical-align: 0.2em; color: var(--accent); }
.case-list li::before {
  content: ""; position: absolute; left: 0; top: 0.72em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent);
}
.case-callout {
  font-style: italic; font-weight: 300; font-size: clamp(22px, 2.2vw, 28px) !important; line-height: 1.4 !important;
  margin-top: 36px !important; padding: 26px 0 0; border-top: 1px solid var(--accent); color: var(--ink);
}

.case-foot {
  margin-top: clamp(80px, 12vw, 160px);
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hair-strong);
}
.case-foot a {
  display: grid; gap: 10px; align-content: start; padding: 40px 0 56px; text-decoration: none;
}
.case-foot a + a { border-left: 1px solid var(--hair); padding-left: var(--col-gap); text-align: right; justify-items: end; }
.case-foot .label { color: var(--muted); }
.case-foot-chapter { font-style: italic; font-weight: 300; font-size: clamp(20px, 2vw, 26px); color: var(--muted); }
.case-foot-title { font-size: clamp(40px, 5vw, 76px); line-height: 0.95; color: var(--ink); transition: color 0.3s; }
.case-foot a:hover .case-foot-title { color: var(--accent); }

/* — entrances — */
.js [data-reveal] {
  opacity: 0; translate: 0 26px;
  transition: opacity 1.1s var(--ease-out) var(--d, 0ms), translate 1.3s var(--ease-out) var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }

/* — smaller screens — */
@media (max-width: 960px) {
  .prologue-title { grid-column: 1 / -1; }
  .prologue-note { grid-column: 1 / -1; max-width: 46ch; margin-top: 28px; }
  .case-hero, .case-section { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .case-hero > *, .case-section > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-cover { aspect-ratio: 4 / 3; }
  .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-meta div:nth-child(3) { border-left: 0; padding-left: 0; }
  .case-meta div:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .case-section > .label { margin-bottom: 16px; }
  .case-illo { position: static; width: 150px; margin: 0 0 24px; }
}
@media (max-width: 600px) {
  body { font-size: 18px; }
  .topbar { padding-top: 16px; }
  .brand { font-size: 11px; letter-spacing: 0.22em; }
  .topnav { gap: 14px; }
  .topnav a { font-size: 15px; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
  .prologue { padding-top: 92px; }
  .mila--hero { margin: 24px -8px 20px; width: calc(100% + 16px); }
  .work-page { padding-top: 112px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); row-gap: 64px; }
  .case-meta { grid-template-columns: minmax(0, 1fr); }
  .case-meta div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--hair); }
  .case-foot { grid-template-columns: minmax(0, 1fr); }
  .case-foot a + a { border-left: 0; padding-left: 0; border-top: 1px solid var(--hair); text-align: left; justify-items: start; }
  .footer { font-size: 13px; }
  .letter-photo { width: 118px; margin: -4px -6px 14px 16px; padding: 6px; }
  .letter-photo::before { width: 64px; height: 18px; top: -9px; }
}

/* the narrowest phones: the menu still fits on one line */
@media (max-width: 359px) {
  .topbar { gap: 10px; }
  .brand { font-size: 10px; letter-spacing: 0.14em; }
  .topnav { gap: 10px; }
  .topnav a { font-size: 14px; }
}

/* short phones: the opening still fits one screen */
@media (max-width: 600px) and (max-height: 760px) {
  .prologue { padding-top: 76px; padding-bottom: 16px; }
  .prologue-label { font-size: 10px; }
  .mila--hero { width: 76%; min-width: 0; margin: 10px auto 12px; }
  .prologue-title { font-size: 36px; }
  .prologue-note { margin-top: 16px; font-size: 16px; line-height: 1.5; }
  .prologue-note .salutation { font-size: 18px; margin-bottom: 0.3em; }
  .prologue-go { margin-top: 14px; font-size: 17px; }
}

/* — less motion — */
@media (prefers-reduced-motion: reduce) {
  :root { transition: none; }
  .grain, .atmosphere::after { animation: none; }
  .js [data-reveal] { opacity: 1; translate: none; transition: none; }
  /* the ink fades in instead of spreading, and the print stays still */
  .kit { -webkit-mask-image: none; mask-image: none; opacity: 0; transition: opacity 0.3s ease; }
  :is(.work-card:hover, .work-card:focus-visible, .box.is-open) .kit { opacity: 1; transition-duration: 0.3s; }
  .lid, :is(.work-card:hover, .work-card:focus-visible, .box.is-open) .lid { scale: none; filter: none; transition: none; }
  .enter span { transition: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
