/* style.css  |  works of shilpa
 * Every radius, gap, nav size and colour is a custom property in :root.
 * Change a token once and it changes everywhere.
 */

/* ========================================================== 1. tokens */
:root {
  /* shape */
  --r-sm: 8px;      /* chips, small tiles */
  --r-md: 14px;     /* cards, inputs */
  --r-lg: 20px;     /* panels, sheets */
  --r-pill: 100px;  /* buttons, nav */

  /* navigation */
  --nav-h: 52px;
  --nav-pad-x: .9rem;
  --nav-pad-y: .5rem;
  --nav-gap: 1.1rem;        /* between nav links */
  --nav-width: 760px;       /* max width of the pill */
  --nav-top: .85rem;        /* distance from top of screen */
  --nav-radius: var(--r-pill);
  --toggle-size: 44px;

  /* rhythm */
  --gutter: clamp(1.15rem, 4vw, 4rem);
  --maxw: 1500px;
  --sp-section: clamp(3rem, 8vw, 7rem);
  --sp-block: clamp(1rem, 2.5vw, 2rem);
  --grid-gap: clamp(1rem, 2.5vw, 2rem);
  --tile-h: clamp(108px, 15vw, 200px);
  --tile-gap: clamp(.5rem, 1.2vw, .9rem);
  --tear: 20px;
  --measure: 64ch;

  /* motion */
  --ease: cubic-bezier(.22,1,.36,1);
  --t-fast: .3s;
  --t-med: .55s;
  --t-slow: .9s;

  /* glass */
  --glass-blur: 20px;
  --glass-bg: color-mix(in srgb, var(--bg) 76%, transparent); /* 76% keeps nav text above 4.5:1 over any photo */
  --glass-border: color-mix(in srgb, var(--ink) 10%, transparent);
  --glass-edge: color-mix(in srgb, #fff 55%, transparent);

  /* type */
  --f-brand: "Melodrama", "Bodoni Moda", Georgia, serif; /* the "works of shilpa" wordmark */
  --f-display: "Bricolage Grotesque", "Cabinet Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Cabinet Grotesk", "Avenir Next", "Segoe UI", Roboto, system-ui, sans-serif;
  --fs-small: .9rem;
  --fs-body: clamp(1rem, .96rem + .22vw, 1.125rem);
  --fs-lead: clamp(1.15rem, 1rem + .6vw, 1.45rem);
  --fs-h3: clamp(1.3rem, 1.1rem + .8vw, 1.75rem);
  --fs-h2: clamp(1.9rem, 1.3rem + 2.4vw, 3.25rem);
  --fs-hero: clamp(3.2rem, 1.2rem + 8vw, 7rem);
  --lh-display: 1.02;
  --track-display: -.02em;

  /* layers */
  --z-nav: 60;
  --z-sheet: 70;
  --z-toggle: 75;
  --z-grain: 95;
  --z-toast: 96;
  --z-gate: 100;

  /* light theme: gallery white, near-black ink, marigold for buttons,
     and six colours sampled from the paintings (--a1 to --a6) for folders,
     pills, steps and tape. main.js refreshes them from SITE_ACCENTS. */
  --bg: #f7f6f2;
  --bg-2: #eeebe3;
  --surface: #fdfcf9;
  --ink: #1a1714;
  --ink-2: #57514a;
  --line: #8b847b;
  --accent: #d99a00;     /* marigold: fills and marks only, never text on white */
  --on-accent: #1a1714;  /* text on marigold */
  --chip: #ebe6da;       /* pills */
  --folder: #e8dcc2;     /* manila */
  --accent-ink: #7d5400; /* marigold dark enough for text on the page */
  --a1: #f3c6bf; --a2: #e4d0ad; --a3: #cad8bd; --a4: #bbdbd4; --a5: #b3d9f1; --a6: #f0c5d4;
  --shade: 10%;
  --grain-o: .06;
  --grain-blend: multiply;
  --shadow: 0 10px 30px -14px rgb(26 23 20 / .28);

/* texture, generated shapes */
  --torn-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 22' preserveAspectRatio='none'%3E%3Cpath d='M0 22 L0.0 7.4 L7.4 8.2 L15.4 1.2 L25.1 5.6 L36.0 9.9 L42.8 5.1 L50.9 7.7 L59.8 4.4 L68.9 6.1 L72.2 7.3 L80.9 9.0 L91.3 9.6 L97.8 10.2 L101.6 5.5 L112.3 8.4 L117.7 6.7 L123.6 8.1 L133.8 10.5 L143.6 8.7 L147.9 10.8 L158.2 9.0 L162.9 8.0 L168.1 13.8 L179.1 13.0 L185.4 6.1 L194.5 4.3 L202.4 11.8 L208.1 10.9 L215.1 6.2 L218.7 4.2 L223.3 8.3 L227.6 14.0 L233.1 10.3 L239.1 7.6 L247.2 7.9 L255.2 7.5 L261.6 5.7 L267.1 7.6 L274.4 7.2 L282.1 10.2 L290.1 10.4 L296.9 6.5 L305.5 4.2 L309.0 10.7 L314.0 8.1 L319.6 6.2 L325.5 6.1 L331.6 4.2 L339.1 6.2 L343.9 5.7 L348.4 8.9 L352.2 6.3 L361.9 10.0 L366.2 8.6 L376.3 5.6 L380.3 5.3 L389.7 5.3 L395.0 8.5 L404.4 4.9 L409.7 5.9 L415.5 6.9 L421.8 5.1 L424.8 10.2 L435.7 10.7 L446.1 9.2 L455.8 7.6 L461.1 5.6 L464.7 6.0 L474.2 14.6 L482.7 10.3 L492.9 4.1 L501.9 6.1 L510.2 6.9 L520.7 6.4 L525.7 7.3 L535.0 5.4 L542.2 5.2 L551.6 9.6 L561.2 10.4 L571.1 5.1 L576.2 7.0 L583.0 4.0 L586.4 4.9 L590.0 10.0 L593.7 6.2 L599.2 8.5 L606.9 5.3 L612.5 7.9 L621.2 4.6 L625.7 8.2 L634.9 9.6 L640.0 7.4 L640 22 Z'/%3E%3C/svg%3E");
  --torn-bot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 22' preserveAspectRatio='none'%3E%3Cpath transform='translate(0 22) scale(1 -1)' d='M0 22 L0.0 8.7 L7.5 7.3 L14.5 5.3 L21.6 9.6 L25.4 4.6 L34.9 4.3 L45.7 8.6 L53.6 4.1 L60.9 3.9 L65.8 8.0 L72.3 7.6 L80.5 8.6 L87.1 11.0 L98.1 9.0 L103.6 6.0 L107.2 6.8 L116.9 10.7 L126.7 4.1 L137.0 10.9 L143.2 10.4 L152.4 4.6 L158.1 9.3 L162.0 4.7 L165.5 5.2 L173.0 5.3 L181.8 8.5 L185.8 5.5 L190.9 9.6 L196.3 5.5 L202.5 8.5 L206.3 5.5 L211.4 6.3 L216.7 2.4 L224.4 8.2 L230.4 10.7 L237.2 10.1 L241.7 10.4 L251.2 5.3 L260.2 5.4 L270.8 8.2 L277.1 1.6 L287.8 8.9 L292.9 8.2 L298.2 9.0 L301.8 7.9 L311.6 6.0 L321.9 4.1 L327.1 4.4 L331.5 8.0 L335.6 10.2 L346.4 8.8 L354.1 4.2 L357.2 8.9 L367.9 10.5 L374.8 6.2 L385.8 9.2 L394.7 9.2 L403.3 10.4 L409.1 10.3 L419.1 9.5 L429.0 8.4 L435.1 8.3 L438.7 11.0 L448.7 6.7 L457.6 7.1 L467.3 12.3 L470.6 7.4 L475.4 7.5 L483.3 5.8 L486.4 8.7 L491.0 10.3 L499.3 10.2 L504.9 5.4 L511.4 10.4 L521.4 8.1 L526.9 7.5 L536.6 9.0 L547.2 5.2 L553.9 5.5 L560.2 7.5 L565.7 10.9 L572.3 1.5 L582.3 11.6 L589.9 9.5 L593.0 7.2 L596.2 5.7 L600.3 10.4 L606.9 8.6 L616.4 8.8 L621.0 5.3 L624.0 9.0 L628.5 6.4 L637.1 8.3 L640.0 8.7 L640 22 Z'/%3E%3C/svg%3E");
  --wobble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12' preserveAspectRatio='none'%3E%3Cpath d='M2.0 6.5 Q15.7 5.5 24.9 7.3 Q40.3 7.5 50.2 7.1 Q63.8 5.6 75.3 3.9 Q87.7 4.9 94.9 8.0 Q108.6 9.9 116.7 7.8 Q123.1 7.1 132.0 5.9 Q138.5 4.1 149.0 6.2 Q156.8 5.2 169.9 3.9 Q178.8 1.4 186.5 5.0 Q200.0 4.2 211.5 7.2 Q218.3 8.8 227.4 7.3 Q235.1 6.4 243.0 6.5 Q250.7 7.5 258.6 3.8 Q268.1 6.2 283.0 4.7 Q287.6 6.0 298.0 7.4' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #141210;
  --bg-2: #1d1a17;
  --surface: #1c1916;
  --ink: #f0ede6;
  --ink-2: #b9b2a8;
  --line: #776f65;
  --accent: #f2b33d;
  --on-accent: #141210;
  --chip: #2a2621;
  --folder: #332d25;
  --accent-ink: #f2b33d;
  --a1: #ef8e81; --a2: #d3a44a; --a3: #9bb87e; --a4: #6bbeb0; --a5: #64b7e7; --a6: #e78caf;
  --shade: 24%;
  --grain-o: .05;
  --grain-blend: screen;
  --glass-edge: color-mix(in srgb, #fff 12%, transparent);
  --shadow: 0 14px 36px -16px rgb(0 0 0 / .7);

  color-scheme: dark;
}

/* ========================================================== 2. base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.is-locked, html.is-locked body { overflow: hidden; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
/* headings that only receive focus from script, so screen readers start there */
[tabindex="-1"]:focus { outline: none; }
main:focus { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 200;
  padding: .7rem 1rem; border-radius: var(--r-pill);
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 700;
}
.skip:focus { top: calc(env(safe-area-inset-top) + 1rem); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.section { padding-block: var(--sp-section); }
#case-studies { padding-top: clamp(2rem, 5vw, 3.5rem); }
#work { scroll-margin-top: max(0px, calc(env(safe-area-inset-top) + var(--nav-top) + var(--nav-h) + 1.25rem - var(--sp-section))); }
.page { padding-top: calc(env(safe-area-inset-top) + var(--nav-top) + var(--nav-h) + clamp(2.5rem, 7vw, 5.5rem)); padding-bottom: var(--sp-section); }

/* paper grain over the site (the gate sits above it, untouched) */
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  background-image: var(--grain);
  background-size: 220px 220px;
  opacity: var(--grain-o);
  mix-blend-mode: var(--grain-blend);
}

/* ========================================================== 3. type */
.h2 {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
}
/* hand-drawn ink stroke under section titles */
.h2::after, .ink-line::after {
  content: "";
  display: block;
  height: .16em;
  min-height: 8px;
  margin-top: .12em;
  background: var(--ink);
  -webkit-mask: var(--wobble) center / 100% 100% no-repeat;
          mask: var(--wobble) center / 100% 100% no-repeat;
  opacity: .9;
}
.h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.15;
}
.lead { font-size: var(--fs-lead); line-height: 1.45; max-width: 44ch; }
.muted { color: var(--ink-2); }
.section__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1rem 2rem; margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section__head p { max-width: 38ch; color: var(--ink-2); }

/* ========================================================== 4. glass */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
          backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow);
}

/* ========================================================== 5. buttons, pills, chips, tape */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 46px;
  padding: .7rem 1.35rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), border-color var(--t-fast);
}
@media (hover: hover) { .btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); } }
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (hover: hover) { .btn--solid:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); } }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.pills { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; }
.pill {
  padding: .3rem .85rem;
  border-radius: var(--r-pill);
  background: var(--pc, var(--chip));
  color: var(--ink);
}
.pill[style*="--pc"] { color: var(--on-accent);
  font-size: .88rem;
  font-weight: 500;
}
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .35rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: .95rem;
}

/* tape strip, used on folders, the portrait and playground pins.
   The element it sits on must be positioned. */
.taped::before {
  content: "";
  position: absolute;
  left: var(--tape-x, 50%); top: var(--tape-y, -12px);
  z-index: 3;
  width: clamp(64px, 38%, 96px);
  height: 24px;
  transform: translateX(-50%) rotate(var(--tape-rot, -3deg));
  background: color-mix(in srgb, var(--tape, var(--accent)) 70%, transparent);
  clip-path: polygon(2% 6%, 98% 0, 100% 28%, 97% 52%, 100% 76%, 98% 100%, 3% 96%, 0 72%, 3% 48%, 0 24%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
:root[data-theme="dark"] .taped::before { mix-blend-mode: normal; background: color-mix(in srgb, var(--tape, var(--accent)) 55%, transparent); }

/* ========================================================== 6. navigation */
.nav {
  position: fixed;
  z-index: var(--z-nav);
  top: calc(env(safe-area-inset-top) + var(--nav-top));
  left: 0; right: 0;
  display: flex; justify-content: center;
  pointer-events: none;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.nav.is-hidden { transform: translateY(calc(-100% - var(--nav-top) - 16px)); opacity: 0; }
.nav__pill {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(var(--nav-width), calc(100vw - 2 * (var(--toggle-size) + var(--nav-top) + 12px)));
  height: var(--nav-h);
  padding: var(--nav-pad-y) var(--nav-pad-x);
  border-radius: var(--nav-radius);
}
.nav__side { display: flex; align-items: center; gap: var(--nav-gap); }
.nav__side--l { justify-self: start; }
.nav__side--r { justify-self: end; }
.nav__link {
  padding: .3rem .55rem;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: .96rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--t-fast);
}
@media (hover: hover) { .nav__link:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); } }
.nav__link[aria-current="page"] { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.nav__mark {
  font-family: var(--f-brand);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  padding-inline: 1rem;
}
.nav__mark em, .wordmark em { font-style: italic; font-weight: 600; }

/* invisible strip that brings the nav back when hovered */
.nav-strip {
  position: fixed; top: 0; left: 0; right: 0;
  height: 76px;
  z-index: calc(var(--z-nav) - 1);
  pointer-events: none;
}
.nav-strip.is-armed { pointer-events: auto; }

@media (max-width: 720px) {
  .nav__mark { display: none; }
  .nav__pill {
    display: flex;
    width: max-content;
    gap: calc(var(--nav-gap) * .3);
    padding-inline: calc(var(--nav-pad-x) * .4);
  }
  .nav__side { gap: calc(var(--nav-gap) * .3); }
  .nav__link { font-size: .92rem; padding: .3rem .5rem; }
  /* keep the pill clear of the theme toggle, centred in the space left of it */
  .nav { padding-right: calc(var(--toggle-size) + var(--nav-top) + 4px); padding-left: 6px; }
}

/* theme toggle: top right of the page, outside the nav. It scrolls away with
   the page, and main.js moves it into a sheet while one is open. */
.theme-toggle {
  position: absolute;
  z-index: var(--z-toggle);
  top: calc(env(safe-area-inset-top) + var(--nav-top) + (var(--nav-h) - var(--toggle-size)) / 2);
  right: calc(env(safe-area-inset-right) + var(--nav-top));
  width: var(--toggle-size); height: var(--toggle-size);
  display: grid; place-items: center;
  border-radius: 50%;
  padding: 0;
  color: var(--ink);
}
.sheet > .theme-toggle { z-index: 4; }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; transition: transform var(--t-med) var(--ease), opacity var(--t-fast); }
.theme-toggle .i-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
:root[data-theme="dark"] .theme-toggle .i-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-theme="dark"] .theme-toggle .i-moon { opacity: 1; transform: none; }

/* ========================================================== 7. landing gate */
.gate {
  position: fixed; inset: 0;
  z-index: var(--z-gate);
  height: 100dvh;
  background: #0d0a0c;
  color: #f4ece4;
  overflow: hidden;
  display: grid; place-items: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  --x: 50vw; --y: 50dvh;
  --torch: clamp(130px, 21vmax, 270px);
  /* failsafe: if main.js never runs, the gate removes itself after 6s */
  animation: gate-fade .6s linear 6s forwards, gate-hide .01s steps(1, start) 6.6s forwards;
}
.gate[data-ready] { animation: none; }
@keyframes gate-fade { to { opacity: 0; } }
@keyframes gate-hide { to { visibility: hidden; pointer-events: none; } }

.gate__rows {
  position: absolute; inset: -6% -4%;
  display: grid; grid-template-rows: repeat(4, 1fr); gap: 1.4vh;
  filter: grayscale(1) contrast(1.08);
  transform: rotate(-4deg);
}
.gate__row { overflow: hidden; min-height: 0; }
.gate__track { display: flex; height: 100%; width: max-content; animation: slide var(--dur, 80s) linear infinite; }
.gate__row:nth-child(even) .gate__track { animation-direction: reverse; }
.gate__track img { height: 100%; width: auto; margin-right: 1.4vh; border-radius: var(--r-sm); object-fit: cover; }

/* the torch: a dark veil with a hole that follows the pointer */
.gate__veil {
  position: absolute; inset: 0; z-index: 2;
  background: rgb(10 7 9 / .95);
  -webkit-mask-image: radial-gradient(circle var(--torch) at var(--x) var(--y), transparent 0, transparent 38%, rgb(0 0 0 / .55) 68%, #000 100%);
          mask-image: radial-gradient(circle var(--torch) at var(--x) var(--y), transparent 0, transparent 38%, rgb(0 0 0 / .55) 68%, #000 100%);
}
.gate__halo {
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle calc(var(--torch) * 1.3) at var(--x) var(--y), rgb(255 196 140 / .2), rgb(255 150 90 / .07) 50%, transparent 72%);
  mix-blend-mode: screen;
}
/* nothing else sits above the veil: no vignette, no grain */
.gate__content {
  position: relative; z-index: 4;
  display: grid; justify-items: center; gap: clamp(1.4rem, 3vh, 2.2rem);
  padding: 1.5rem;
  text-align: center;
  pointer-events: none;
}
.gate__mark {
  font-family: var(--f-brand);
  font-weight: 700;
  font-size: clamp(3.2rem, 12vw, 8.5rem);
  line-height: .9;
  text-shadow: 0 2px 30px rgb(0 0 0 / .7);
}
.gate__mark em { font-style: italic; font-weight: 600; }
/* Inside the torch the images are bright, so a copy of the text in dark ink
   shows there, masked to the same circle. Outside it, the cream text stays. */
.gate__lit {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle var(--torch) at var(--x) var(--y), #000 0, #000 30%, transparent 50%);
          mask-image: radial-gradient(circle var(--torch) at var(--x) var(--y), #000 0, #000 30%, transparent 50%);
}
/* Enter and the hint get the same treatment: dark ink on a light pill.
   The copy is only a picture, so clicks still reach the real button. */
.gate__content--lit .gate__enter {
  pointer-events: none;
  color: #16120f;
  border-color: rgb(22 18 15 / .65);
  background: rgb(250 244 236 / .94);
}
.gate__content--lit .gate__enter::after { border-color: rgb(22 18 15 / .55); }
.gate__content--lit .gate__hint { color: #16120f; background: rgb(250 244 236 / .94); }
.gate__content--lit .gate__mark {
  color: #16120f;
  text-shadow: 0 0 22px rgb(255 250 242 / .8), 0 0 4px rgb(255 250 242 / .7);
}
.gate__enter {
  pointer-events: auto;
  position: relative;
  min-height: 48px;
  padding: .8rem 2.2rem;
  border-radius: var(--r-pill);
  border: 1px solid rgb(244 236 228 / .55);
  background: rgb(244 236 228 / .08);
  color: #f4ece4;
  font-weight: 700;
  letter-spacing: .02em;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.gate__enter::after {
  content: ""; position: absolute; inset: -1px;
  border-radius: inherit;
  border: 1px solid rgb(255 214 170 / .8);
  animation: ring 2.4s var(--ease) infinite;
  pointer-events: none;
}
.gate__enter:focus-visible { outline-color: #f4ece4; }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.35, 1.8); opacity: 0; } }
.gate__hint { font-size: .92rem; color: rgb(244 236 228 / .86); max-width: 36ch; padding: .35rem .9rem; border-radius: var(--r-pill); background: rgb(10 7 9 / .74); }
.gate.is-leaving {
  opacity: 0; transform: scale(1.08); filter: blur(18px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease), filter var(--t-slow) var(--ease);
  pointer-events: none;
}

@keyframes slide { to { transform: translateX(-50%); } }

/* ========================================================== 8. hero */
.hero {
  display: grid; align-content: start;
  max-width: var(--maxw); margin-inline: auto;
  padding: calc(env(safe-area-inset-top) + var(--nav-top) + var(--nav-h) + clamp(3rem, 9vh, 6.5rem)) var(--gutter) clamp(1rem, 3vw, 2rem);
}
/* Desktop: name on the left, roles, tagline and buttons on the right,
   so the case studies start higher up the screen. */
@media (min-width: 900px) {
  .hero { grid-template-columns: auto minmax(0, 30rem); justify-content: space-between; align-items: end; column-gap: clamp(3rem, 8vw, 9rem); }
  .hero__loc { grid-column: 1 / -1; }
  .hero__side { padding-bottom: .5rem; }
  .hero__side .roles { margin-top: 0; }
}
.hero__loc { font-size: var(--fs-small); font-weight: 500; color: var(--ink-2); margin-bottom: 1.2rem; }
.hero__name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--fs-hero);
  line-height: .98;
  letter-spacing: -.03em;
}
.hero__name .line { display: block; overflow: hidden; padding: 0 .12em .06em 0; }
.hero__name .line > span { display: inline-block; }
.hero__name .line--last { font-weight: 300; padding-left: .45em; }
.roles {
  position: relative;
  height: 1.45em;
  margin-top: clamp(1rem, 2.5vw, 1.8rem);
  overflow: hidden;
  font-size: var(--fs-lead);
  font-weight: 500;
}
.role {
  position: absolute; left: 0; top: 0;
  white-space: nowrap;
  transform: translateY(110%);
  opacity: 0;
}
.role.is-in, .role.is-out { transition: transform .7s var(--ease), opacity .5s var(--ease); }
.role.is-in { transform: none; opacity: 1; }
.role.is-out { transform: translateY(-110%); opacity: 0; }
.hero__tag { max-width: 40ch; color: var(--ink-2); margin: .6rem 0 1.8rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; }

/* entrance: runs when the gate lifts */
.rise { transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.hero__name .line > span { transition: transform 1.1s var(--ease) var(--d, 0s), clip-path 1.1s var(--ease) var(--d, 0s); clip-path: inset(0 0 -10% 0); }
.gate-on .rise { opacity: 0; transform: translateY(18px); }
.gate-on .hero__name .line > span { transform: translateY(102%); clip-path: inset(0 0 100% 0); }

/* ========================================================== 9. marquee band */
.band {
  position: relative;
  display: grid; gap: var(--tile-gap);
  padding-block: calc(var(--tear) + clamp(.9rem, 2.4vw, 1.6rem));
  background: var(--bg-2);
  -webkit-mask:
    var(--torn-top) top left / 640px var(--tear) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--tear) + 2px) no-repeat,
    var(--torn-bot) bottom left / 640px var(--tear) repeat-x;
          mask:
    var(--torn-top) top left / 640px var(--tear) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--tear) + 2px) no-repeat,
    var(--torn-bot) bottom left / 640px var(--tear) repeat-x;
}
.band__row { overflow: hidden; }
.band__track { display: flex; width: max-content; animation: slide var(--dur, 100s) linear infinite; }
.band__row:nth-child(even) .band__track { animation-direction: reverse; }
.band.is-held .band__track { animation-play-state: paused; }
@media (hover: hover) { .band:hover .band__track { animation-play-state: paused; } }
.tile {
  flex: none;
  display: block;
  height: var(--tile-h);
  margin-right: var(--tile-gap);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg);
  transition: transform var(--t-fast) var(--ease);
}
.tile img { height: 100%; width: auto; }
@media (hover: hover) { .tile:hover { transform: translateY(-3px); } }

/* ========================================================== 10. case studies */
.cases { list-style: none; display: grid; gap: clamp(3rem, 7vw, 5.5rem); }
.case { position: relative; display: grid; gap: var(--sp-block); align-items: center; }
@media (min-width: 860px) {
  .case { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); }
  .case:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .case:nth-child(even) .case__media { order: 2; }
}
.case__media { position: relative; overflow: hidden; max-height: 78vh; border-radius: var(--r-lg); background: var(--bg-2); }
.case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
@media (hover: hover) {
  .case:hover .case__media img { transform: scale(1.02); }
  .case:hover .case__cta { background: color-mix(in srgb, var(--ink) 7%, transparent); }
}
.case__area { display: inline-flex; align-items: center; gap: .55rem; font-size: var(--fs-small); font-weight: 700; color: var(--ink-2); }
.case__area::before { content: ""; width: 1.6rem; height: .45rem; border-radius: 2px; background: var(--cc, var(--accent)); transform: rotate(-4deg); }
.case__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 1.15rem + 1.5vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: .55rem 0 .8rem;
  text-wrap: balance;
}
.case__title a { text-decoration: none; }
.case__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.case__title a:focus-visible { outline: none; }
.case:has(.case__title a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 8px; border-radius: var(--r-lg); }
.case__hook {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.12rem, 1rem + .5vw, 1.35rem);
  line-height: 1.25;
  max-width: 34ch;
  margin-bottom: .7rem;
  text-wrap: balance;
}
.case__sum { max-width: 46ch; color: var(--ink-2); }
.case__facts {
  display: grid; gap: .45rem;
  margin: 1.2rem 0 1.5rem;
  padding-block: .9rem;
  border-block: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.case__facts div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; font-size: .96rem; }
.case__facts dt { color: var(--ink-2); }
.case__facts dd { margin: 0; font-weight: 500; }
.cases--sheet { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.more__title { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-h3); margin-bottom: 1rem; }
.soon__title { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-h3); margin: clamp(3rem, 7vw, 5rem) 0 1rem; }
.soon { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--grid-gap); }
.soon__item { display: grid; gap: .3rem; padding: 1.2rem 1.3rem; border: 1px dashed var(--line); border-top: .4rem solid var(--cc, var(--line)); border-radius: var(--r-md); }
.soon__area { font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; line-height: 1.15; }
.soon__note { font-size: var(--fs-small); color: var(--ink-2); }

/* ========================================================== 11. folders */
.folders {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: clamp(2.2rem, 4vw, 3rem) var(--grid-gap);
}
.folder {
  --tab: var(--folder);
  position: relative;
  display: block;
  aspect-ratio: 5 / 4.4;
  color: var(--on-accent);
  text-decoration: none;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
/* one colour per folder: main.js sets --h, the hue. Light pastel in light
   mode, a deeper tone in dark mode, dark text on both. The tape takes the
   opposite hue. Older browsers keep the plain manila --folder. */
@supports (color: oklch(0 0 0)) {
  .folder[style*="--h"] { --tab: oklch(.87 .065 var(--h)); --tape: oklch(.78 .1 calc(var(--h) + 180)); }
  :root[data-theme="dark"] .folder[style*="--h"] { --tab: oklch(.75 .11 var(--h)); --tape: oklch(.82 .09 calc(var(--h) + 180)); }
}
.folder__back {
  position: absolute; inset: 16% 0 0;
  background: color-mix(in oklab, var(--tab), #000 var(--shade));
  border-radius: 0 var(--r-md) var(--r-md) var(--r-md);
}
.folder__back::before {
  content: "";
  position: absolute; left: 0; bottom: calc(100% - 1px);
  width: 42%; height: 11%;
  background: inherit;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  clip-path: polygon(0 0, 86% 0, 100% 100%, 0 100%);
}
.folder__stack { position: absolute; left: 14%; right: 14%; top: 5%; bottom: 24%; z-index: 1; }
.card {
  position: absolute; left: 50%; top: 0;
  width: 56%; height: 100%;
  margin-left: -28%;
  padding: 5px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 8px 18px -10px rgb(0 0 0 / .5);
  transform-origin: 50% 110%;
  transform: rotate(var(--r0)) translateX(var(--x0));
  filter: grayscale(.92) contrast(.94) brightness(1.04);
  transition: transform var(--t-med) var(--ease), filter var(--t-med) var(--ease);
}
.card img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.card--blank { display: grid; place-items: center; color: var(--ink-2); background: color-mix(in srgb, var(--tab) 30%, var(--surface)); }
.card--blank svg { width: 30%; height: auto; opacity: .7; }
.card:nth-child(1) { --r0: -7deg; --x0: -16%; --r1: -26deg; --x1: -58%; }
.card:nth-child(2) { --r0: 4deg;  --x0: 9%;   --r1: -9deg;  --x1: -20%; }
.card:nth-child(3) { --r0: -2deg; --x0: -4%;  --r1: 9deg;   --x1: 20%; }
.card:nth-child(4) { --r0: 6deg;  --x0: 13%;  --r1: 26deg;  --x1: 58%; }
@media (hover: hover) { .folder:hover .card { transform: rotate(var(--r1)) translate(var(--x1), -9%); filter: none; } }
.folder:focus-visible .card,
.folder.is-fanned .card { transform: rotate(var(--r1)) translate(var(--x1), -9%); filter: none; }
.folder__front {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  height: 52%;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .15rem;
  padding: 1rem 1.15rem 1.05rem;
  background: var(--tab);
  border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 45%, transparent), 0 -6px 14px -10px rgb(0 0 0 / .35);
  --tape-x: 78%; --tape-y: -10px; --tape-rot: 8deg;
}
.folder__label { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); line-height: 1.05; letter-spacing: -.01em; }
.folder__count { font-size: .92rem; font-weight: 500; }
.folder:focus-visible { outline-offset: 6px; border-radius: var(--r-md); }
@media (max-width: 560px) { .folder { aspect-ratio: 5 / 3.9; } }

/* ========================================================== 12. sheets */
.sheet {
  position: fixed; inset: 0;
  z-index: var(--z-sheet);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  -webkit-backdrop-filter: blur(24px);
          backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(28px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
}
.sheet.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s; }
.sheet--project { z-index: calc(var(--z-sheet) + 1); }
.sheet__bar {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center;
  padding: calc(env(safe-area-inset-top) + var(--nav-top)) calc(var(--toggle-size) + var(--nav-top) * 2) var(--nav-top) max(var(--gutter), env(safe-area-inset-left));
  pointer-events: none;
}
.back {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: var(--toggle-size);
  padding: .55rem 1.2rem .55rem .85rem;
  border-radius: var(--r-pill);
  font-weight: 500;
  color: var(--ink);
}
.back svg { width: 18px; height: 18px; }
.sheet__body { max-width: 1180px; margin-inline: auto; padding: clamp(1rem, 3vw, 2.5rem) var(--gutter) calc(var(--sp-section) + env(safe-area-inset-bottom)); }

/* category view */
.cat__head { display: grid; gap: .6rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.cat__title { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-h2); line-height: var(--lh-display); letter-spacing: var(--track-display); }
.cat__count { font-weight: 500; color: var(--ink-2); }
.cat__blurb { max-width: 52ch; font-size: var(--fs-lead); line-height: 1.45; }

.rows { list-style: none; display: grid; gap: .35rem; }
.rows > li { animation: row-in .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes row-in { from { opacity: 0; transform: translateX(-28px); } }
.row {
  --thumb-w: 92px;
  display: grid;
  grid-template-columns: var(--thumb-w) minmax(0, 1fr) auto;
  gap: clamp(.9rem, 2.4vw, 1.8rem);
  align-items: center;
  padding: .8rem;
  margin-inline: -.8rem;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease);
}
@media (hover: hover) { .row:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); } .row:hover .row__go { transform: translateX(4px); } }
.row__thumb { display: block; width: var(--thumb-w); aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-2); }
.row--tall .row__thumb { aspect-ratio: 3 / 4; }
.row--wide .row__thumb { aspect-ratio: 4 / 3; }
.row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.row__text { display: grid; gap: .2rem; min-width: 0; }
.row__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.2rem, 1rem + .9vw, 1.65rem); line-height: 1.1; letter-spacing: -.01em; }
.row__meta { font-size: var(--fs-small); font-weight: 500; color: var(--ink-2); }
.row__sum { color: var(--ink-2); max-width: 60ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row__go { width: 22px; height: 22px; transition: transform var(--t-fast) var(--ease); }
@media (min-width: 720px) { .row { --thumb-w: 150px; } }
@media (max-width: 480px) { .row__sum, .row__go { display: none; } .row { grid-template-columns: var(--thumb-w) minmax(0, 1fr); } }
.cat__empty { max-width: 40ch; padding-top: 1.6rem; border-top: 1px solid var(--line); font-size: var(--fs-lead); line-height: 1.45; color: var(--ink-2); }
.videos { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(2.2rem, 4vw, 3rem) var(--grid-gap); align-items: start; }
.video { display: grid; gap: .6rem; min-width: 0; animation: row-in .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
.video .instagram-media { margin: 0 !important; min-width: 0 !important; width: 100% !important; max-width: 100% !important; }
.video__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.15; margin-top: .3rem; }
.video__note { color: var(--ink-2); max-width: 46ch; }
.video__link { justify-self: start; font-size: var(--fs-small); font-weight: 500; color: var(--ink-2); }
.archive { margin-top: clamp(3rem, 7vw, 5rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.archive__title { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-h3); margin-bottom: 1.2rem; }

/* project view */
.project__head { display: grid; gap: 1.1rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.project__hook {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.9rem);
  line-height: 1.2;
  max-width: 30ch;
  padding-left: 1rem;
  border-left: .35rem solid var(--a1);
  text-wrap: balance;
}
.project__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 1.3rem + 3.2vw, 3.8rem); line-height: var(--lh-display); letter-spacing: var(--track-display); }
.project__sum { font-size: var(--fs-lead); line-height: 1.45; max-width: 52ch; }
.project__note { font-size: var(--fs-small); color: var(--ink-2); font-weight: 500; max-width: 60ch; }
.swatches { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; }
.swatch {
  display: grid; justify-items: center; gap: .3rem;
  padding: 0; border: 0; background: none;
  font-size: .78rem; font-weight: 500; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.swatch::before {
  content: "";
  width: 48px; height: 48px;
  border-radius: var(--r-sm);
  background: var(--c);
  border: 1px solid var(--line);
  transition: transform var(--t-fast) var(--ease);
}
@media (hover: hover) { .swatch:hover::before { transform: translateY(-3px) rotate(-3deg); } }
.swatch:active::before { transform: scale(.92); }
.swatch-label { font-size: var(--fs-small); color: var(--ink-2); }
.project__palette { display: grid; gap: .9rem; margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.project__palette .b-h { margin-bottom: .2rem; }

.blocks { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.b figcaption, .b-cap { margin-top: .7rem; font-size: var(--fs-small); color: var(--ink-2); }
.b-clip video { display: block; width: 100%; height: auto; border-radius: var(--r-lg); background: var(--bg-2); }
.b-clip figcaption { margin-top: .6rem; font-size: var(--fs-small); color: var(--ink-2); }
.b-text { display: grid; gap: 1rem; max-width: var(--measure); font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); }
.b-image img, .b-pair img, .b-gallery img, .step__img img { width: 100%; border-radius: var(--r-md); background: var(--bg-2); }
.b-pair { display: grid; gap: var(--grid-gap); align-items: start; }
@media (min-width: 560px) { .b-pair { grid-template-columns: 1fr 1fr; } .b-pair .b-cap { grid-column: 1 / -1; } }
.b-gallery { columns: 2 220px; column-gap: var(--grid-gap); }
.b-gallery figure { break-inside: avoid; margin-bottom: var(--grid-gap); }
.b-text .b-h { margin-bottom: 0; }
.b-h { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-h3); line-height: 1.15; margin-bottom: 1.5rem; }
.b-process ol { list-style: none; display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.step { display: grid; gap: 1.1rem; align-items: start; }
@media (min-width: 760px) { .step:has(.step__img) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); } }
.step__n {
  display: inline-grid; place-items: center;
  width: 2.1rem; height: 2.1rem;
  border-radius: 50%;
  background: var(--sc, var(--accent));
  color: var(--on-accent);
  font-weight: 700;
  margin-bottom: .7rem;
}
.step h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.15; margin-bottom: .45rem; }
.step p { color: var(--ink-2); max-width: 46ch; }
.b-list { max-width: var(--measure); }
.b-list ul { list-style: none; display: grid; gap: .7rem; }
.b-list li { position: relative; padding-left: 1.6rem; }
.b-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: .85rem; height: .55rem;
  background: var(--lc, var(--accent));
  border-radius: 2px;
  transform: rotate(-6deg);
}
.b-quote blockquote { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.2rem); line-height: 1.15; max-width: 28ch; }
.b-quote figcaption { font-size: var(--fs-body); color: var(--ink-2); margin-top: 1rem; }
.b-reel { max-width: 540px; }
.next {
  display: grid; gap: .3rem;
  margin-top: clamp(3rem, 8vw, 6rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.next__label { font-weight: 500; color: var(--ink-2); }
.next__title { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-h3); line-height: 1.1; }
.next:hover .next__title { text-decoration: underline; text-decoration-thickness: 2px; }

/* youtube facade */
.yt {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0; border: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity var(--t-fast); }
@media (hover: hover) { .yt:hover img { opacity: 1; } }
.yt__play {
  position: absolute; left: 50%; top: 50%;
  width: 72px; height: 72px;
  margin: -36px 0 0 -36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgb(244 236 228 / .92);
  color: #2e231f;
}
.yt__play svg { width: 28px; height: 28px; margin-left: 4px; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-md); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1.5rem);
  z-index: var(--z-toast);
  padding: .7rem 1.2rem;
  border-radius: var(--r-pill);
  font-weight: 500;
  color: var(--ink);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ========================================================== 13. about */
.about-intro { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
@media (min-width: 860px) { .about-intro { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.polaroid {
  position: relative;
  justify-self: center;
  width: min(100%, 420px);
  padding: 10px 10px 40px;
  background: var(--surface);
  border-radius: 4px;
  box-shadow: var(--shadow);
  transform: rotate(-2.5deg);
}
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.about-title { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-h2); line-height: var(--lh-display); letter-spacing: var(--track-display); margin-bottom: 1.6rem; }
.bio { display: grid; gap: 1.1rem; max-width: var(--measure); }
.caps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: clamp(1.6rem, 4vw, 2.5rem) var(--grid-gap); }
.cap h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); line-height: 1.15; margin-bottom: .5rem; }
.cap p { color: var(--ink-2); }
.cap__bar { display: block; width: 2.4rem; height: .45rem; border-radius: 2px; background: var(--cc); margin-bottom: .9rem; transform: rotate(-4deg); }
.clients { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.clients li { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.2rem, 1rem + .9vw, 1.7rem); line-height: 1.2; }
.clients small { font-family: var(--f-body); font-weight: 500; font-size: .85rem; color: var(--ink-2); margin-left: .4rem; }
.insta { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; max-width: 720px; margin-bottom: 1.5rem; }
.insta a { display: block; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; }
.insta img { width: 100%; height: 100%; object-fit: cover; }
.pins {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: clamp(2.2rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
  padding-top: 1.2rem;
}
.pin {
  position: relative;
  padding: 10px 10px 0;
  background: var(--surface);
  border-radius: 3px;
  box-shadow: var(--shadow);
  transform: rotate(var(--rot, -2deg));
  transition: transform var(--t-med) var(--ease);
}
@media (hover: hover) { .pin:hover { transform: rotate(0deg) scale(1.02); } }
.pin img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.pin-link { display: block; color: inherit; text-decoration: none; border-radius: 4px; }
.pin-link:focus-visible { outline-offset: 8px; }
.pin-link:focus-visible .pin { transform: rotate(0deg); }
.pin figcaption { font-family: var(--f-body); font-weight: 500; font-size: 1rem; padding: .55rem .2rem .75rem; }

/* ========================================================== 14. resume */
.resume { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 960px) {
  .resume { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .resume__side { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 2rem); }
}
.resume__name { font-family: var(--f-display); font-weight: 700; font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.4rem); line-height: 1; letter-spacing: var(--track-display); margin-bottom: 1rem; }
.resume__roles { font-size: var(--fs-lead); line-height: 1.4; margin-bottom: 1.4rem; }
.resume__contact { list-style: none; display: grid; gap: .35rem; color: var(--ink-2); }
.resume__contact a { color: var(--ink); }
.resume__pdf { margin-top: 1.4rem; }
.r-sec { padding-block: clamp(1.6rem, 3vw, 2.4rem); border-top: 1px solid var(--line); }
.r-sec:first-child { border-top: 0; padding-top: 0; }
.r-sec h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.35rem, 1.15rem + .8vw, 1.8rem); line-height: 1.1; margin-bottom: 1.3rem; }
.r-sec > p { max-width: var(--measure); }
.job + .job { margin-top: 2rem; }
.job__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1.5rem; align-items: baseline; margin-bottom: .6rem; }
.r-group + .r-group { margin-top: 1.1rem; }
.r-group__title { font-weight: 700; font-size: var(--fs-small); color: var(--ink-2); margin-bottom: .5rem; }
.job__role { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.2; }
.job__org { font-weight: 500; }
.job__period { font-size: var(--fs-small); font-weight: 500; color: var(--ink-2); }
.job ul, .r-list { list-style: none; display: grid; gap: .5rem; max-width: var(--measure); }
.job li, .r-list li { position: relative; padding-left: 1.3rem; }
.job li::before, .r-list li::before { content: ""; position: absolute; left: 0; top: .78em; width: .55rem; height: 2px; background: var(--ink-2); }

/* ========================================================== 15. contact */
.contact__title { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-h2); line-height: var(--lh-display); letter-spacing: var(--track-display); margin-bottom: 1.1rem; }
.mega {
  display: inline-block;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(1.5rem, 4vw, 2.2rem);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.35rem, .45rem + 4.4vw, 4rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.mega::after { transform-origin: left; transition: transform var(--t-med) var(--ease); }
.mega:hover::after { transform: scaleX(1.02) translateY(2px); }
.contact__buttons { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: clamp(3rem, 8vw, 5.5rem); }
.form { position: relative; display: grid; gap: 1.1rem; max-width: 640px; }
.form h2 { margin-bottom: .6rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 500; }
.field input, .field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 18%, transparent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { min-height: 1.6em; font-weight: 500; }
.form__row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

/* ========================================================== 16. footer */
.foot {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) calc(2rem + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1rem 2rem;
  color: var(--ink-2);
  font-size: .95rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}
.foot__mail { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.2rem, 1rem + .7vw, 1.6rem); line-height: 1; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.foot__mail:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.foot__links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; list-style: none; }
.foot__links a { text-decoration: none; }
.foot__links a:hover { text-decoration: underline; }

/* ========================================================== 17. reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .gate__track, .band__track { animation: none !important; }
  .band__row { overflow-x: auto; scrollbar-width: thin; }
  .tile[aria-hidden="true"] { display: none; }
  .gate-on .rise, .gate-on .hero__name .line > span { opacity: 1; transform: none; clip-path: none; }
  .rows > li, .video { animation: none; }
}
