/* ───────── Tokens ───────── */
:root {
  --paper: #FDFBF8; --surface: #F3F1EC; --rule: #E2DFD8; --ink: #0E0E0C; --ink-muted: #6B6A64; --ink-faint: #8A877F;
  --pill: #1C1A14; --on-pill: #F4F1EA; --yellow: #FECF10; --on-yellow: #0E0E0C;
  --display: 'Bricolage Grotesque', 'Arial Narrow', Impact, sans-serif;
  --sans: Inter, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.3, 1.6, .6, 1);
  color-scheme: light;
}
:root[data-theme="night"] {
  --paper: #121110; --surface: #1C1B19; --rule: #2E2C28; --ink: #F4F1EA; --ink-muted: #A39F96; --ink-faint: #8A867E;
  --pill: #2A2824; color-scheme: dark;
}

/* ───────── Preloader (day → night intro) ───────── */
.preloader {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: var(--paper);
}
.intro-done .preloader { display: none; }           /* already shown this session */
.loading { overflow: hidden; }
.loading body { overflow: hidden; }
.preloader__orb { position: relative; width: 112px; height: 112px; color: var(--ink); }
.preloader__cel { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.preloader__cel path { stroke-dasharray: 640; stroke-dashoffset: 640; }
.preloader__moon { opacity: 0; }

/* The sun draws itself, then turns into the moon; the orb breathes. Kept short (~1s) on purpose. */
.loading .preloader__orb { animation: pl-float 2200ms var(--ease-out) infinite; }
.loading .preloader__sun path { animation: pl-draw 430ms var(--ease-out) forwards; }
.loading .preloader__sun path:nth-child(2) { animation-delay: 130ms; }
.loading .preloader__sun { animation: pl-sun 1050ms var(--ease) forwards; }
.loading .preloader__moon path { animation: pl-draw 400ms var(--ease-out) 470ms forwards; }
.loading .preloader__moon { animation: pl-moon 1050ms var(--ease) forwards; }
.loading .preloader { animation: pl-failsafe 700ms ease 6s forwards; }  /* never trap the page if JS stalls */

@keyframes pl-draw { to { stroke-dashoffset: 0; } }
@keyframes pl-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes pl-sun { 0%, 44% { opacity: 1; transform: scale(1) rotate(0); } 62%, 100% { opacity: 0; transform: scale(.35) rotate(70deg); } }
@keyframes pl-moon { 0%, 46% { opacity: 0; transform: scale(.5) rotate(-45deg); } 68%, 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes pl-failsafe { to { opacity: 0; visibility: hidden; } }

/* Overlay lifts away to reveal the page. */
.preloader--done {
  animation: none !important;
  opacity: 0; visibility: hidden; transform: translateY(-4%) scale(1.03); pointer-events: none;
  transition: opacity 600ms var(--ease), transform 820ms var(--ease-out), visibility 600ms;
}

@media (prefers-reduced-motion: reduce) {
  /* Reduced motion: no drawing/spinning/floating, but still a calm sun → moon crossfade. */
  .preloader__cel path { stroke-dashoffset: 0; }
  .loading .preloader, .loading .preloader__orb,
  .loading .preloader__sun path, .loading .preloader__moon path { animation: none; }
  .loading .preloader__sun { animation: pl-fade-sun 820ms var(--ease) forwards; }
  .loading .preloader__moon { animation: pl-fade-moon 820ms var(--ease) forwards; }
  .preloader--done { transition: opacity 400ms var(--ease), visibility 400ms; transform: none; }
}
@keyframes pl-fade-sun { 0%, 42% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes pl-fade-moon { 0%, 42% { opacity: 0; } 64%, 100% { opacity: 1; } }

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color 400ms var(--ease), color 400ms var(--ease);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.eyebrow { display: block; font: italic 500 11px/16px var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.display { font-family: var(--display); font-weight: 800; font-stretch: 75%; letter-spacing: -0.02em; }
.headline { margin: 0; font-size: 48px; line-height: 1.05; font-weight: 400; letter-spacing: -0.03em; }
.muted { color: var(--ink-muted); }
.ruled { border-top: 1px solid var(--rule); padding-top: 24px; }
.hl { color: var(--yellow); text-decoration: none; display: inline-block; transition: transform 160ms var(--spring); }
.hl:hover { transform: rotate(-2deg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────── Header / nav ───────── */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; }
.logo { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: 32px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; display: inline-block; transition: transform 200ms var(--spring); }
.logo:hover { transform: rotate(-4deg); }
.nav { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--pill); color: var(--on-pill); font: 500 14px/20px var(--sans); }
.nav a, .nav button { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--on-pill); font: inherit; text-decoration: none; cursor: pointer; transition: color 150ms ease; }
.nav a:hover, .nav button:hover { color: var(--yellow); }
.nav .nav-cta { background: var(--yellow); color: var(--on-yellow); padding: 0 12px; }
.nav .nav-cta:hover { color: var(--on-yellow); }

/* Hamburger toggle — hidden on desktop, shown on mobile */
.nav-toggle { display: none; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 300ms var(--ease-out), opacity 150ms ease; }
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }
.nav-open .nav-toggle__bar { background: transparent; }
.nav-open .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }
/* Hide the menu button while the My Stack drawer is open so its close button is clear */
.stack-open .nav-toggle { opacity: 0; visibility: hidden; pointer-events: none; }

/* Text roll: label slides up and a copy slides in from below (mouse in), reverses on mouse out */
.roll { display: inline-flex; overflow: hidden; position: relative; line-height: 1.25; }
.roll > span { display: block; transition: transform 420ms var(--ease-out); }
.roll > span + span { position: absolute; left: 0; top: 0; transform: translateY(105%); }
a:hover > .roll > span:first-child, button:hover > .roll > span:first-child { transform: translateY(-105%); }
a:hover > .roll > span + span, button:hover > .roll > span + span { transform: translateY(0); }

/* ───────── Buttons ───────── */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--pill); color: var(--on-pill); border: 1px solid var(--pill);
  font: 500 14px/20px var(--sans); text-decoration: none; cursor: pointer;
  transition: color 300ms var(--ease), border-color 300ms var(--ease), transform 200ms var(--spring);
}
.btn--sm { height: 40px; padding: 0 16px; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--yellow { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); font-size: 16px; }
/* Fill sweeps in from the bottom on hover and drains out the top on leave */
.btn::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: var(--yellow);
  transform: translateY(101%); transition: transform 450ms var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn.is-leaving-hover::before { transform: translateY(-101%); }
.btn.no-anim::before { transition: none; }
.btn:hover { color: var(--on-yellow); border-color: var(--yellow); }
.btn--yellow::before { background: var(--ink); }
.btn--yellow:hover { color: var(--paper); border-color: var(--ink); }
.btn:active { transform: scale(.97); }

/* ───────── Hero ───────── */
.hero { position: relative; padding: 72px 0 128px; display: flex; flex-direction: column; gap: 56px; }
.hero-intro { margin: 0; width: 75%; font-size: clamp(28px, 4.2vw, 64px); line-height: 1.12; letter-spacing: -0.02em; color: var(--ink-muted); }
.hero-name { margin: 0 0 0 calc(50% - 50vw + 24px); width: calc(100vw - 48px); overflow: hidden; padding-bottom: 4px; }
.hero-name svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-name text { fill: var(--ink); font-family: var(--display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; }
.theme-switch { position: absolute; right: 2%; top: 40px; width: 16vw; min-width: 96px; max-width: 220px; aspect-ratio: 1; padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.theme-switch svg { width: 100%; height: 100%; transition: transform 300ms var(--spring); }
.theme-switch:hover svg { transform: rotate(-12deg) scale(1.06); }
.doodle { display: block; fill: none; stroke: currentColor; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.doodle path { stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 1100ms cubic-bezier(.6, .1, .3, 1) 500ms forwards; }
.doodle path:nth-child(2) { animation-delay: 660ms; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.doodle--wiggle { animation: wiggle 2.4s ease-in-out infinite; transform-origin: 50% 60%; color: var(--ink); }
.doodle--wiggle path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
@keyframes wiggle { 0%, 100% { transform: scaleX(-1) rotate(-3deg); } 50% { transform: scaleX(-1) rotate(3deg); } }

/* ───────── Sections ───────── */
.section { padding-bottom: 128px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tab {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink); font: 500 14px/20px var(--sans); cursor: pointer;
  transition: color 300ms var(--ease), border-color 300ms var(--ease), transform 160ms var(--spring);
}
.tab::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pill); transform: scaleX(0); transform-origin: right; transition: transform 400ms var(--ease-out); }
.tab:hover { border-color: var(--ink); transform: rotate(-2deg); }
.tab[aria-selected="true"] { color: var(--on-pill); border-color: var(--pill); }
.tab[aria-selected="true"]::before { transform: scaleX(1); transform-origin: left; }
.tab .count { font-size: 12px; opacity: .6; }

/* Project cards */
.grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 64px; margin-top: 40px; }
.grid > :nth-child(even) { margin-top: 128px; }
.card { display: block; color: var(--ink); text-decoration: none; cursor: none; }
.card-media { position: relative; aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.card-media img, .card-media .placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.card:hover .card-media img, .card:hover .card-media .placeholder { transform: scale(1.05); }
.card-tag { position: absolute; right: 12px; bottom: 12px; z-index: 1; display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 2px; background: var(--pill); color: var(--on-pill); font: 400 12px/16px var(--sans); }
.card-title { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; }
.card-title h3 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 400; letter-spacing: -0.02em; }
.card-title span { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.card p { margin: 8px 0 0; font-size: 14px; line-height: 20px; font-style: italic; color: var(--ink-muted); }
.placeholder { display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(48px, 8vw, 120px); color: var(--rule); text-transform: uppercase; }
.empty { margin-top: 40px; padding: 64px 24px; border: 1px dashed var(--rule); text-align: center; color: var(--ink-muted); }

/* Cursor bubble shown over cards */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none;
  width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--yellow); color: var(--on-yellow); font: 500 14px/1 var(--sans);
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0) scale(0); transition: transform 350ms var(--ease-out);
}
.cursor.is-on { transform: translate3d(var(--x), var(--y), 0) scale(1); }
@media (hover: none) { .cursor { display: none; } .card { cursor: pointer; } }

/* Rows: experience + all-projects list. Fill sweeps in from the edge the mouse entered */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.row { position: relative; isolation: isolate; border-bottom: 1px solid var(--rule); }
.row::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--surface);
  transform: scaleY(0); transform-origin: var(--origin, bottom); transition: transform 450ms var(--ease-out);
}
.row.is-hovered::before { transform: scaleY(1); }
.row--plain::before { display: none; }
.exp-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding: 20px 0; transition: padding 450ms var(--ease-out); }
.row.is-hovered .exp-row { padding-left: 16px; padding-right: 16px; }
.exp-row .period { font-size: 17px; line-height: 24px; color: var(--ink-muted); }
.exp-row .company { font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; text-align: right; }
.exp-row .company small { display: block; font-size: 14px; color: var(--ink-muted); letter-spacing: 0; }

.proj-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) auto auto 48px; align-items: center; gap: 24px; padding: 24px 0; color: var(--ink); text-decoration: none; transition: padding 450ms var(--ease-out); }
.row.is-hovered .proj-row { padding-left: 16px; padding-right: 16px; }
.proj-row h3 { margin: 0; font-size: clamp(24px, 3vw, 40px); line-height: 1.05; font-weight: 400; letter-spacing: -0.02em; }
.proj-row p { margin: 0; font-size: 15px; line-height: 22px; font-style: italic; color: var(--ink-muted); }
.proj-row .year { font-size: 14px; color: var(--ink-muted); }
.proj-row .go { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--rule); display: inline-flex; align-items: center; justify-content: center; transition: background 300ms var(--ease), color 300ms var(--ease), transform 400ms var(--ease-out), border-color 300ms; }
.row.is-hovered .go { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); transform: rotate(-45deg); }
.proj-row .thumb { display: none; }

/* ───────── Contact / footer ───────── */
.contact-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 40px; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.contact-cta { display: flex; align-items: center; gap: 12px; }
.doodle--point { width: 112px; height: 56px; color: var(--ink); animation: point 1.6s ease-in-out infinite; }
.doodle--point path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
@keyframes point { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-10px); } }
.contact-h { margin: 0; font-size: clamp(56px, 7vw, 88px); line-height: .9; }
.contact-h mark { background: var(--yellow); color: var(--on-yellow); padding: 0 .15em; border-radius: 4px; }
.email-link { font-size: 14px; line-height: 20px; color: var(--ink); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 400ms var(--ease-out); }
.email-link:hover { background-size: 100% 1px; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.social { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); font: 500 14px/20px var(--sans); text-decoration: none; transition: border-color 200ms var(--ease), color 200ms var(--ease), transform 160ms var(--spring); }
.social:hover { border-color: var(--ink); transform: rotate(-2deg); }
.social-arrow { display: inline-block; transition: transform 200ms var(--spring); }
.social:hover .social-arrow { transform: translate(2px, -2px); }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 24px 0 40px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.site-footer a { color: var(--ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.links { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ───────── Stack drawer ───────── */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(14, 14, 12, .45); opacity: 0; visibility: hidden; transition: opacity 320ms var(--ease), visibility 320ms; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: 420px; max-width: 100%; padding: 24px; overflow-y: auto; background: var(--paper); color: var(--ink); border-left: 1px solid var(--rule); transform: translateX(100%); visibility: hidden; transition: transform 420ms var(--ease-out), visibility 420ms; }
.stack-open .scrim { opacity: 1; visibility: visible; }
.stack-open .drawer { transform: none; visibility: visible; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; transition: transform 300ms var(--spring); }
.icon-btn:hover { transform: rotate(90deg); }
.drawer h2 { margin: 32px 0 0; font-size: 64px; line-height: .9; text-transform: uppercase; }
.drawer ul { list-style: none; margin: 0; padding: 0; font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
.drawer li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.drawer h3 { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); }
.drawer li, .drawer h3 { opacity: 0; transform: translateX(24px); transition: opacity 400ms var(--ease), transform 500ms var(--ease-out); }
.stack-open .drawer li, .stack-open .drawer h3 { opacity: 1; transform: none; transition-delay: calc(120ms + var(--i, 0) * 40ms); }

/* ───────── Project page ───────── */
.back { display: inline-flex; align-items: center; gap: 8px; font: 500 14px/20px var(--sans); color: var(--ink); text-decoration: none; }
.back .arrow { display: inline-block; transition: transform 300ms var(--spring); }
.back:hover .arrow { transform: translateX(-6px); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 2px; background: var(--pill); color: var(--on-pill); font: 400 12px/16px var(--sans); }
.project-title { margin: 16px 0 0; font-size: clamp(80px, 15vw, 240px); line-height: .82; letter-spacing: -0.03em; text-transform: uppercase; overflow-wrap: anywhere; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin-top: 56px; }
.meta dt { font: italic 500 11px/16px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.meta dd { margin: 6px 0 0; font-size: 17px; line-height: 24px; }
.split { display: flex; flex-wrap: wrap; gap: 24px 48px; }
.split > h2 { flex: 1 1 200px; margin: 0; }
.split > .body { flex: 3 1 560px; min-width: 0; max-width: 880px; display: flex; flex-direction: column; gap: 20px; }
.lead { margin: 0; font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; }
.para { margin: 0; font-size: 17px; line-height: 27px; color: var(--ink-muted); white-space: pre-line; }
.para a { color: var(--ink); }
.block { padding-top: 128px; }
.block:first-child { padding-top: 0; }
.figure { margin: 0; }
.figure .media { background: var(--surface); overflow: hidden; }
.figure img, .figure video, .figure iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.figure figcaption { margin-top: 12px; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-4x5 { aspect-ratio: 4 / 5; }
.contained { max-width: 880px; margin-left: auto; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gallery .full { grid-column: 1 / -1; }
.gallery .media img { transition: transform 900ms var(--ease-out); }
.gallery .media:hover img, .figure .media:hover img { transform: scale(1.03); }
.quote { margin: 0; max-width: 1100px; }
.quote p { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(36px, 5vw, 72px); line-height: .95; letter-spacing: -0.02em; }
.quote p::before { content: "“"; color: var(--yellow); }
.quote footer { margin-top: 20px; font-size: 15px; color: var(--ink-muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat { padding: 24px; background: var(--surface); }
.stat strong { display: block; font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(48px, 6vw, 88px); line-height: .9; letter-spacing: -0.02em; }
.stat span { display: block; margin-top: 12px; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.next { display: block; padding-top: 24px; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.next-name { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-top: 24px; font-size: clamp(48px, 7vw, 88px); line-height: .9; text-transform: uppercase; }
.next .arrow { display: inline-block; transition: transform 400ms var(--spring); }
.next:hover .arrow { transform: translateX(12px); }
.next-name .label { background: linear-gradient(var(--yellow), var(--yellow)) 0 88% / 0 .18em no-repeat; transition: background-size 600ms var(--ease-out); }
.next:hover .next-name .label { background-size: 100% .18em; }

/* ───────── Responsive ───────── */
@media (max-width: 860px) {
  .theme-switch { top: 16px; }
  .hero-intro { width: 100%; padding-right: 100px; }
  .proj-row { grid-template-columns: 72px minmax(0, 1fr) 40px; gap: 16px; }
  .proj-row .thumb { display: block; position: relative; width: 72px; aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
  .proj-row .thumb img, .proj-row .thumb .placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; font-size: 24px; }
  .proj-row p, .proj-row .tag { display: none; }
  .proj-row .year { display: none; }
  .proj-row .go { width: 40px; height: 40px; }
}
@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero-name { margin-left: calc(50% - 50vw + 16px); width: calc(100vw - 32px); }
  .grid { grid-template-columns: 1fr; }
  .grid > :nth-child(even) { margin-top: 0; }
  .headline { font-size: 34px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery > * { grid-column: auto !important; }
  .block { padding-top: 88px; }

  /* Collapse the nav into a menu button */
  .site-header { position: relative; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 0; border-radius: 999px;
    background: var(--pill); color: var(--on-pill); cursor: pointer; z-index: 56;
    transition: transform 160ms var(--spring);
  }
  .nav-toggle:active { transform: scale(.92); }
  .nav {
    position: absolute; top: calc(100% + 8px); right: 0; left: auto; width: min(280px, calc(100vw - 32px));
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px;
    border-radius: 20px; z-index: 55; box-shadow: 0 20px 48px rgba(14, 14, 12, .28);
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.98); transform-origin: top right;
    transition: opacity 240ms var(--ease), transform 300ms var(--ease-out), visibility 240ms;
  }
  .nav a, .nav button { height: 44px; justify-content: flex-start; padding: 0 14px; font-size: 15px; }
  .nav .nav-cta { justify-content: center; margin-top: 4px; }
  .nav .roll { line-height: 1.4; }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
}
