/* =========================================================
   Angelica Yang — site styles
   Colours, fonts and spacing are set once here in :root.
   ========================================================= */

@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* Palette */
  --white: #ffffff;
  --stone: #e6e3dc;
  --taupe: #c7c1b5;
  --ink:   #272726;
  --muted: #6f6b64;
  --line:  #dcd8d0;

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --serif-weight: 450;
  --serif-track: 0.04em;
  --serif-body-weight: 400;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --pad: clamp(20px, 4vw, 56px);
  --max: 1520px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  /* Phone notch / status bar / home-indicator areas (iPhone + Android) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}
/* Simulated device chrome inside preview.html */
[data-sim="phone"]  { --safe-top: 54px; --safe-bottom: 34px; }
[data-sim="tablet"] { --safe-top: 24px; --safe-bottom: 20px; }
html.chrome-dark, html.chrome-dark body { background: var(--ink); }


/* Home intro: one line by default; ?v=studio shows the tagline + subline instead */
.v-studio { display: none; }
[data-variant="studio"] .v-current { display: none; }
[data-variant="studio"] .v-studio { display: inline; }
.lead__sub { display: block; margin-top: .6em; font-family: var(--sans); font-size: 13px; line-height: 1.5; letter-spacing: .02em; color: var(--muted); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--taupe); color: var(--ink); }
/* Focus: no blue box for mouse/touch; a quiet ink outline for keyboard users only */
:focus { outline: none; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
.using-mouse :focus-visible { outline: none; }
[tabindex="-1"]:focus { outline: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: max(var(--pad), var(--safe-left)); padding-right: max(var(--pad), var(--safe-right)); }

/* ---------- Type helpers ---------- */
.serif { font-family: var(--serif); font-weight: var(--serif-weight); font-optical-sizing: auto; }
.label {
  font-family: var(--sans); font-size: 10.5px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted); line-height: 1.4;
}
.display {
  font-family: var(--serif); font-weight: var(--serif-weight); text-transform: uppercase;
  letter-spacing: var(--serif-track); line-height: 1.02; margin: 0; font-optical-sizing: auto;
}
.lead { font-family: var(--serif); font-weight: var(--serif-body-weight); font-size: clamp(20px, 1.9vw, 27px); line-height: 1.32; letter-spacing: -0.005em; margin: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: .7em; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.link-arrow svg { transition: transform .5s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Logo / wordmark ---------- */
.wordmark {
  font-family: var(--serif); font-weight: var(--serif-weight); text-transform: uppercase;
  letter-spacing: .14em; line-height: 1; white-space: nowrap; font-optical-sizing: auto;
}
.wordmark .w { display: inline-block; }
/* Stacked lockup: YANG centred under ANGELICA */
.wordmark--stack { display: inline-flex; flex-direction: column; align-items: center; gap: .42em; }
.wordmark--stack .w1, .wordmark--stack .w2 { margin-right: -.14em; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: calc(var(--header-h) + var(--safe-top)); padding-top: var(--safe-top);
  background: rgba(255,255,255,.92); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .4s, background .4s;
}
.site-header.is-scrolled { border-color: var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.site-header .wordmark { font-size: 18px; }
.logo { display: inline-flex; }
.nav { display: flex; gap: clamp(24px, 3vw, 44px); }
.nav a { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.menu-btn { display: none; font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; padding: 10px 0 10px 16px; }

/* Mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 60; background: var(--ink); color: var(--white);
  display: flex; flex-direction: column; padding: var(--safe-top) max(var(--pad), var(--safe-right)) calc(28px + var(--safe-bottom)) max(var(--pad), var(--safe-left)); overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity .5s var(--ease); }
.menu__top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.menu__top .wordmark { font-size: 14px; }
.menu__links { margin-top: auto; padding-top: 32px; display: flex; flex-direction: column; gap: 6px; }
.menu__links > a { font-family: var(--serif); font-weight: var(--serif-weight); text-transform: uppercase; letter-spacing: var(--serif-track); font-size: clamp(28px, 8vw, 40px); line-height: 1.1; overflow: hidden; }
.menu__links > a span { display: block; transform: translateY(105%); transition: transform .8s var(--ease); }
.menu.is-open .menu__links > a span { transform: none; }
.menu.is-open .menu__links > a:nth-of-type(2) span { transition-delay: .05s; }
.menu.is-open .menu__links > a:nth-of-type(3) span { transition-delay: .1s; }
.menu.is-open .menu__links > a:nth-of-type(4) span { transition-delay: .15s; }
.menu__subs { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 14px 2px; opacity: 0; transition: opacity .8s var(--ease) .2s; }
.menu.is-open .menu__subs { opacity: 1; }
.menu__links .menu__sub { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.65); padding: 6px 0; }
.menu__foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.2); display: flex; justify-content: space-between; }
.menu__foot .label { color: rgba(255,255,255,.6); }

main { padding-top: calc(var(--header-h) + var(--safe-top)); }

/* ---------- Home: hero ---------- */
.hero { padding-top: clamp(40px, 6vw, 96px); }
.hero__intro { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; padding-bottom: clamp(24px, 3vw, 40px); }
.hero__intro .lead { max-width: 30ch; }
.hero__intro .label { justify-self: end; text-align: right; }
.hero__row {
  display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 24px; align-items: end;
  margin-top: clamp(24px, 3vw, 44px); padding: 18px 0; border-top: 1px solid var(--line);
}
.hero__row p { margin: 0; }
.hero__row .role { color: var(--ink); }
.arrow-sw { width: 34px; height: 34px; stroke: var(--ink); stroke-width: 1.25; fill: none; }
.hero__media { position: relative; aspect-ratio: 16 / 8; overflow: hidden; background: var(--stone); }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1.8s var(--ease), transform 7s linear; }
.hero__media img.is-active { opacity: 1; transform: scale(1); }
.hero__caption { display: flex; justify-content: space-between; padding: 14px 0 0; }
.hero__dots { display: flex; gap: 8px; align-items: center; }
.hero__dots button { width: 28px; height: 13px; position: relative; }
.hero__dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--taupe); transition: background .4s; }
.hero__dots button.is-active::before { background: var(--ink); }

/* ---------- Sections ---------- */
.section { padding-top: clamp(80px, 11vw, 170px); padding-bottom: clamp(80px, 11vw, 170px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: clamp(8px, 2vw, 24px); }

/* Development rows (home) */
.dev-row {
  display: grid; grid-template-columns: 64px 1fr 1.25fr; gap: clamp(20px, 3vw, 48px);
  padding: clamp(24px, 3vw, 40px) 0; border-bottom: 1px solid var(--line); align-items: start;
}
.dev-row__num { padding-top: .5em; }
.dev-row__title { font-size: clamp(22px, 2.2vw, 32px); }
.dev-row__meta { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.dev-row__list { list-style: none; padding: 0; margin: 26px 0 0; columns: 2; column-gap: 24px; }
.dev-row__list li { font-size: 13.5px; padding: 3px 0; color: var(--muted); break-inside: avoid; }
.dev-row__cta { margin-top: 34px; font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.dev-row__img { overflow: hidden; aspect-ratio: 3 / 2; background: var(--stone); }
.dev-row__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.dev-row__img:hover img { transform: scale(1.035); }
.dev-row__title a:hover { color: var(--muted); }
.dev-row__list a { transition: color .3s; } .dev-row__list a:hover { color: var(--ink); }

/* Intro band */
.band { background: var(--stone); }
.intro { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 4vw, 80px); }
.intro__body .link-arrow { margin-top: 40px; font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(48px, 6vw, 90px); padding-top: 22px; border-top: 1px solid var(--taupe); }
.stats strong { display: block; font-family: var(--serif); font-weight: var(--serif-weight); font-size: clamp(28px, 2.8vw, 40px); line-height: 1; margin-bottom: 10px; letter-spacing: .01em; }

/* ---------- Page heads ---------- */
.page-head { padding-top: clamp(40px, 6vw, 96px); padding-bottom: clamp(24px, 3vw, 44px); }
.page-head__title { font-size: clamp(28px, 3vw, 44px); }
.page-head__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: clamp(24px, 3vw, 44px); padding-top: 18px; border-top: 1px solid var(--line); align-items: end; }
.page-head__row p { margin: 0; max-width: 46ch; }

/* ---------- Work index ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; }
.filters button { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.filters sup { font-size: 9px; margin-left: 3px; letter-spacing: 0; }

.dev { padding-top: clamp(40px, 6vw, 96px); scroll-margin-top: calc(var(--header-h) + 12px); }
.dev.is-empty { display: none; }
.dev__bar { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.dev__bar .label:last-child { text-align: right; }
.dev__title { font-size: clamp(22px, 2.2vw, 32px); margin: clamp(22px, 3vw, 40px) 0 clamp(24px, 3vw, 44px); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 48px) clamp(16px, 2vw, 32px); }
.card { display: block; transition: opacity .5s var(--ease); }
.card[hidden] { display: none; }
.card__img { overflow: hidden; aspect-ratio: 3 / 2; background: var(--stone); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card__img img { transform: scale(1.04); }
.card__meta { display: flex; justify-content: space-between; margin-top: 16px; }
.card__title { font-size: clamp(17px, 1.3vw, 20px); margin-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card__title svg { flex: none; width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.25; opacity: 0; transform: translateX(-6px); transition: opacity .4s, transform .5s var(--ease); }
.card:hover .card__title svg { opacity: 1; transform: none; }

/* ---------- Project page ---------- */
.p-bar { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-top: clamp(24px, 3vw, 40px); }
.p-bar > div { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; gap: 16px; }
.p-bar > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.p-bar > div:first-child { padding-right: 24px; }
.p-bar a.label:hover { color: var(--ink); }
.circle-arrow { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.1; transition: transform .5s var(--ease); }
a:hover > .circle-arrow { transform: rotate(-45deg); }

.project { display: grid; grid-template-columns: minmax(280px, 1fr) 2.1fr; gap: clamp(28px, 4vw, 72px); padding-top: clamp(32px, 4vw, 64px); padding-bottom: clamp(60px, 8vw, 120px); align-items: start; }
.project__text { position: sticky; top: calc(var(--header-h) + 32px); }
.project__title { font-size: clamp(26px, 2.4vw, 38px); }
.project__arrow { margin: clamp(28px, 4vw, 56px) 0 clamp(24px, 3vw, 40px); }
.project__arrow .arrow-sw { width: 30px; height: 30px; }
.facts { display: grid; gap: 28px; }
.facts h3 { margin: 0 0 10px; }
.facts p { margin: 0; max-width: 38ch; }
.facts ul { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts li:first-child { border-top: 1px solid var(--line); }
.credit { color: var(--muted); font-size: 13.5px; }

.project__media { display: grid; gap: clamp(16px, 2vw, 28px); }
.zoomable { position: relative; display: block; width: 100%; cursor: zoom-in; overflow: hidden; background: var(--stone); }
.zoomable img { width: 100%; transition: transform 1.4s var(--ease); }
.zoomable:hover img { transform: scale(1.015); }
.zoomable__hint {
  position: absolute; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.92); padding: 9px 14px; font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .5s var(--ease);
}
.zoomable__hint svg { width: 14px; height: 14px; stroke: var(--ink); fill: none; stroke-width: 1.4; }
.zoomable:hover .zoomable__hint, .zoomable:focus-visible .zoomable__hint { opacity: 1; transform: none; }
@media (hover: none) { .zoomable__hint { opacity: 1; transform: none; } }
.fig-cap { display: flex; justify-content: space-between; margin-top: 12px; }

.more { padding-top: clamp(40px, 5vw, 72px); }
.more .section-head { border-top: 1px solid var(--line) !important; padding-top: 18px !important; }
.more .grid { margin-top: 28px; }

.next { display: block; background: var(--stone); margin-top: clamp(60px, 8vw, 120px); }
.next .wrap { padding-top: clamp(40px, 5vw, 80px); padding-bottom: clamp(40px, 5vw, 80px); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
.next__title { font-size: clamp(24px, 2.6vw, 40px); margin-top: 18px; transition: transform .8s var(--ease); }
.next:hover .next__title { transform: translateX(10px); }
.next .circle-arrow { width: 44px; height: 44px; stroke-width: .9; }
.next:hover .circle-arrow { transform: rotate(-45deg); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(28px, 5vw, 96px); align-items: start; }
.portrait { position: sticky; top: calc(var(--header-h) + 32px); aspect-ratio: 4 / 5; background: var(--stone); display: grid; place-items: center; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait__ph { text-align: center; }
.portrait__ph .serif { font-size: 40px; letter-spacing: .14em; color: var(--taupe); text-transform: uppercase; display: block; margin-bottom: 12px; }
.about__body > * + * { margin-top: clamp(48px, 6vw, 88px); }
.about__body p { max-width: 60ch; }
.xp { border-top: 1px solid var(--ink); }
.xp__item { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.xp__item h3 { font-family: var(--serif); font-weight: var(--serif-weight); font-size: 19px; line-height: 1.2; margin: 0 0 6px; letter-spacing: .01em; }
.xp__item ul { margin: 0; padding: 0 0 0 1.1em; }
.xp__item li { margin-bottom: 8px; }
.xp__item li::marker { color: var(--taupe); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cols ul { list-style: none; margin: 14px 0 0; padding: 0; }
.cols li { padding: 7px 0; border-bottom: 1px solid var(--line); }

/* ---------- Contact ---------- */
.contact { min-height: calc(100svh - var(--header-h) - var(--safe-top)); display: flex; flex-direction: column; justify-content: center; padding-top: 60px; padding-bottom: 60px; }
.contact__email { align-self: flex-start; font-family: var(--serif); font-weight: var(--serif-body-weight); font-size: clamp(24px, 3.4vw, 48px); line-height: 1.1; letter-spacing: .01em; display: inline-block; margin-top: 28px; position: relative; word-break: break-word; }
.contact__email::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: 1px; background: var(--ink); transform-origin: left; transition: transform .8s var(--ease); }
.contact__email:hover::after { transform: scaleX(0); transform-origin: right; }
.contact .page-head__row { margin-top: clamp(48px, 8vw, 110px); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--white); padding: clamp(64px, 8vw, 120px) 0 calc(28px + var(--safe-bottom)); }
.site-footer .label { color: rgba(255,255,255,.55); }
.footer__top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.footer__mark { font-size: 20px; line-height: 1; }
.footer__email { font-family: var(--serif); font-weight: var(--serif-body-weight); font-size: clamp(20px, 2vw, 28px); border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 4px; transition: border-color .4s; }
.footer__email:hover { border-color: var(--white); }
.footer__nav { display: flex; gap: 28px; margin-top: 28px; }
.footer__nav a { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.75); transition: color .3s; }
.footer__nav a:hover { color: var(--white); }
.footer__bottom { display: flex; justify-content: space-between; margin-top: clamp(64px, 8vw, 120px); padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); }

/* ---------- Lightbox ---------- */
.lb__top { padding-top: calc(16px + var(--safe-top)) !important; } .lb__bottom { padding-bottom: calc(16px + var(--safe-bottom)) !important; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(28,28,27,.97); color: var(--white); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s .45s; touch-action: none; }
.lb.is-open { opacity: 1; visibility: visible; transition: opacity .45s var(--ease); }
.lb__top, .lb__bottom { display: flex; justify-content: space-between; align-items: center; padding: 16px max(var(--pad), var(--safe-right)) 16px max(var(--pad), var(--safe-left)); gap: 16px; position: relative; z-index: 2; }
.lb .label { color: rgba(255,255,255,.65); }
.lb__close { display: flex; align-items: center; gap: 12px; font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; padding: 8px 12px; margin-right: -12px; }
.lb__close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.3; }
.lb__stage { position: relative; overflow: hidden; display: grid; place-items: center; cursor: zoom-in; }
.lb__stage.is-zoomed { cursor: grab; }
.lb__stage.is-dragging { cursor: grabbing; }
.lb__img { max-width: calc(100vw - 2 * var(--pad)); max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; transform-origin: 0 0; transition: opacity .35s var(--ease), transform .45s var(--ease); will-change: transform; }
.lb__img.is-loading { opacity: 0; }
.lb__stage.is-dragging .lb__img { transition: none; }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(28,28,27,.35); transition: border-color .3s, background .3s; }
.lb__nav:hover { border-color: var(--white); background: rgba(28,28,27,.6); }
.lb__nav svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.3; }
.lb__prev { left: var(--pad); } .lb__next { right: var(--pad); }
.lb.is-single .lb__nav, .lb.is-single .lb__count { display: none; }
.lb__hint { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.45); }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease); }
.js .reveal-img img { transform: scale(1.12); transition: transform 1.8s var(--ease); }
.js .reveal-img.is-in { clip-path: inset(0 0 0 0); }
.js .reveal-img.is-in img { transform: scale(1); }
.js .dev-row__img.reveal-img.is-in:hover img, .js .card:hover .reveal-img.is-in img { transform: scale(1.04); transition-duration: 1.2s; }

.split .ch { display: inline-block; transform: translateY(110%); opacity: 0; }
.split .w { white-space: nowrap; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.is-loaded .split .ch { transform: none; opacity: 1; transition: transform 1.1s var(--ease), opacity .8s var(--ease); transition-delay: calc(var(--i) * 38ms + 120ms); }

body { transition: opacity .45s var(--ease); }
body.is-leaving { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .js .reveal, .js .reveal-img, .split .ch { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .js .reveal-img img { transform: none !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .hero__row { grid-template-columns: 1fr 1fr auto; }
  .hero__row .hide-t { display: none; }
  .dev-row { grid-template-columns: 1fr 1.1fr; }
  .dev-row__num { display: none; }
  .dev-row__list { columns: 1; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .project { grid-template-columns: 1fr; }
  .project__text { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
  .project__text .project__title, .project__text .project__arrow { grid-column: 1 / -1; }
  .project__arrow { margin: 28px 0 32px; }
  .project__media { order: -1; }
  .intro { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr 1.3fr; }
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  :root { --header-h: 60px; }
  body { font-size: 15px; }
  .nav { display: none; }
  .menu-btn { display: block; }
  .hero__intro { grid-template-columns: 1fr; }
  .hero__intro .label { justify-self: start; text-align: left; }
  .hero__row { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .hero__row .hide-m { display: none; }
  .hero__media { aspect-ratio: 4 / 5; }
  .dev-row { grid-template-columns: 1fr; gap: 20px; }
  .dev-row__img { order: -1; aspect-ratio: 4 / 3; }
  .stats { grid-template-columns: 1fr; gap: 28px; }
  .page-head__row { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; }
  .grid { grid-template-columns: 1fr; }
  .dev__bar { grid-template-columns: 1fr; gap: 4px; }
  .dev__bar .label:last-child { text-align: left; }
  .p-bar { grid-template-columns: 1fr; }
  .p-bar > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .p-bar > div:first-child { padding-right: 0; }
  .project__text { display: block; }
  .facts { gap: 32px; }
  .about { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 420px; }
  .xp__item { grid-template-columns: 1fr; gap: 12px; }
  .cols { grid-template-columns: 1fr; gap: 40px; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 8px; }
  .next .wrap { grid-template-columns: 1fr; }
  .lb__nav { width: 44px; height: 44px; top: auto; bottom: 8px; transform: none; }
  .lb__hint { display: none; }
}

/* ---------- Downloads ---------- */
.dl-group { display: flex; flex-wrap: wrap; gap: 12px; }
.dl {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-width: 200px;
  padding: 14px 18px; border: 1px solid var(--ink); transition: background .4s var(--ease), color .4s var(--ease);
}
.dl > span { display: flex; flex-direction: column; gap: 2px; }
.dl__k { font-family: var(--serif); font-weight: var(--serif-weight); font-size: 16px; line-height: 1.2; letter-spacing: .02em; }
.dl__s { font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; opacity: .6; }
.dl:hover { background: var(--ink); color: var(--white); }
.dl-group--dark .dl { border-color: rgba(255,255,255,.35); }
.dl-group--dark .dl:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.site-footer .dl-group { margin-top: 28px; }
.menu .dl-group { margin-top: 40px; }
.menu .dl { flex: 1; min-width: 0; }
@media (max-width: 700px) { .dl { flex: 1 1 100%; } .menu .dl-group { flex-wrap: nowrap; } .menu .dl { flex: 1 1 0; padding: 12px 14px; gap: 10px; } }


/* ---------- Header: Work dropdown + document buttons ---------- */
.nav { align-items: center; }
.nav__item { position: relative; }
.nav .chev { width: 8px; height: 5px; margin-left: 5px; vertical-align: 2px; stroke: currentColor; fill: none; stroke-width: 1.3; transition: transform .4s var(--ease); }
.has-dd:hover .chev, .has-dd:focus-within .chev { transform: rotate(180deg); }
.dd { position: absolute; top: 100%; left: -24px; padding-top: 22px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .35s var(--ease), transform .45s var(--ease), visibility 0s .35s; }
.has-dd:hover .dd, .has-dd:focus-within .dd { opacity: 1; visibility: visible; transform: none; transition: opacity .35s var(--ease), transform .45s var(--ease); }
.dd__in { width: 340px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 24px 48px -28px rgba(39,39,38,.35); padding: 8px 0; }
.nav .dd a { display: grid; grid-template-columns: 30px 1fr; padding: 13px 24px; letter-spacing: 0; text-transform: none; font-size: 14px; font-weight: 400; transition: background .3s; }
.nav .dd a::after { display: none; }
.nav .dd a:hover { background: var(--stone); }
.dd__n { grid-row: span 2; font-size: 10px; letter-spacing: .2em; color: var(--muted); padding-top: 4px; font-weight: 500; }
.dd__t { font-family: var(--serif); font-weight: var(--serif-weight); text-transform: uppercase; letter-spacing: var(--serif-track); font-size: 15px; line-height: 1.3; }
.dd__m { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-top: 3px; }
.nav .dd .dd__all { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.nav__docs { display: inline-flex; gap: 8px; margin-left: clamp(0px, 1vw, 12px); }
.nav .nav__doc { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--ink); transition: background .4s, color .4s; }
.nav .nav__doc::after { display: none; }
.nav .nav__doc:hover { background: var(--ink); color: var(--white); }
.nav__doc svg, .dl svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.2; flex: none; }
.nav__doc svg.ico-deck, .dl svg.ico-deck { width: 17px; height: 13px; }

/* ---------- Work: sticky community bar ---------- */
.citynav { position: sticky; top: calc(var(--header-h) + var(--safe-top) - 1px); z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.citynav__in { display: flex; gap: clamp(20px, 3vw, 44px); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.citynav__in::-webkit-scrollbar { display: none; }
.citynav a { flex: none; display: flex; align-items: center; gap: 10px; padding: 16px 0 15px; font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid transparent; margin-bottom: -1px; transition: color .3s, border-color .3s; white-space: nowrap; }
.citynav a:hover { color: var(--ink); }
.citynav a.is-active { color: var(--ink); border-color: var(--ink); }
.citynav__n { font-size: 9.5px; opacity: .7; }
.dev { scroll-margin-top: calc(var(--header-h) + var(--safe-top) + 50px); }

/* Card: "View project" hint */
.card__img { position: relative; }
.card__view { position: absolute; left: 14px; bottom: 14px; background: rgba(255,255,255,.94); padding: 8px 12px; font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .5s var(--ease); }
.card:hover .card__view, .card:focus-visible .card__view { opacity: 1; transform: none; }

/* ---------- Project viewer ---------- */
.pv { position: fixed; inset: 0; z-index: 80; background: var(--white); display: grid; grid-template-columns: 1fr minmax(320px, 420px); grid-template-rows: auto 1fr auto; opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s .45s; }
.pv.is-open { opacity: 1; visibility: visible; transition: opacity .45s var(--ease); }
.pv__top, .pv__bottom { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 max(var(--pad), var(--safe-right)) 0 max(var(--pad), var(--safe-left)); background: var(--white); }
.pv__top { padding-top: var(--safe-top); height: calc(var(--header-h) + var(--safe-top)); border-bottom: 1px solid var(--line); }
.pv__crumb { display: flex; gap: 10px; align-items: center; min-width: 0; }
.pv__crumb .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv__crumb a.label:hover { color: var(--ink); }
.pv__close { display: flex; align-items: center; gap: 12px; font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; padding: 10px 12px; margin-right: -12px; flex: none; }
.pv__close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.3; }
.pv__media { background: var(--stone); position: relative; overflow: hidden; display: grid; place-items: center; padding: clamp(20px, 3vw, 48px); min-height: 0; }
.pv__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; cursor: zoom-in; box-shadow: 0 30px 60px -40px rgba(39,39,38,.5); transition: opacity .4s var(--ease), transform .6s var(--ease); }
.pv.is-switching .pv__img, .pv.is-switching .pv__body > * { opacity: 0; transform: translateY(8px); }
.pv__full { position: absolute; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.94); padding: 9px 14px; font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.pv__full svg { width: 13px; height: 13px; stroke: var(--ink); fill: none; stroke-width: 1.4; }
.pv__body { overflow-y: auto; padding: clamp(28px, 3vw, 48px) clamp(24px, 3vw, 44px); border-left: 1px solid var(--line); }
.pv__body > * { transition: opacity .4s var(--ease), transform .6s var(--ease); }
.pv__title { font-size: clamp(26px, 2.4vw, 36px); margin: 14px 0 0; }
.pv__body .arrow-sw { width: 26px; height: 26px; margin: 28px 0 30px; }
.pv__body .facts { gap: 26px; }
.pv__bottom { border-top: 1px solid var(--line); padding-bottom: var(--safe-bottom); height: calc(64px + var(--safe-bottom)); }
.pv__step { display: flex; align-items: center; gap: 12px; font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; min-width: 0; padding: 10px 0; }
.pv__step span.t { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.pv__step:hover span.t { color: var(--ink); }
.pv__step svg { width: 16px; height: 10px; flex: none; }
.pv__prev svg { transform: scaleX(-1); }
.pv__count { flex: none; }

/* ---------- PDF viewer ---------- */
.pdfm { position: fixed; inset: 0; z-index: 90; background: rgba(28,28,27,.97); color: var(--white); display: grid; grid-template-rows: auto 1fr; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s .4s; }
.pdfm.is-open { opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
.pdfm__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: calc(14px + var(--safe-top)) var(--pad) 14px; }
.pdfm__title { font-family: var(--serif); font-weight: var(--serif-weight); text-transform: uppercase; letter-spacing: var(--serif-track); font-size: 17px; }
.pdfm__actions { display: flex; align-items: center; gap: 10px; }
.pdfm__actions a, .pdfm__actions button { display: inline-flex; align-items: center; gap: 9px; font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; padding: 9px 14px; border: 1px solid rgba(255,255,255,.35); transition: background .3s, color .3s, border-color .3s; }
.pdfm__actions a:hover, .pdfm__actions button:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.pdfm__actions .pdfm__dl { background: var(--white); color: var(--ink); border-color: var(--white); }
.pdfm__actions .pdfm__dl:hover { background: var(--stone); }
.pdfm__actions svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.3; }
.pdfm__frame { padding: 0 var(--pad) calc(var(--pad) + var(--safe-bottom)); min-height: 0; }
.pdfm iframe { width: 100%; height: 100%; border: 0; background: #525659; }

/* ---------- Simulated status bar (preview only) ---------- */
.sim-bar, .sim-home { position: fixed; left: 0; right: 0; z-index: 1000; pointer-events: none; color: var(--ink); transition: color .4s; }
.chrome-dark .sim-bar, .chrome-dark .sim-home { color: var(--white); }
.sim-bar { top: 0; height: var(--safe-top); display: flex; align-items: center; justify-content: space-between; padding: 4px 34px 0 42px; font: 600 16px/1 -apple-system, "SF Pro Text", Inter, sans-serif; letter-spacing: -.01em; }
.sim-bar__island { position: absolute; left: 50%; top: 11px; width: 124px; height: 36px; margin-left: -62px; background: #000; border-radius: 20px; }
.sim-bar__icons { display: flex; gap: 6px; align-items: center; }
.sim-bar__icons svg { height: 12px; fill: currentColor; }
[data-sim="tablet"] .sim-bar { font-size: 12px; padding: 0 22px; }
[data-sim="tablet"] .sim-bar__island { display: none; }
.sim-home { bottom: 0; height: var(--safe-bottom); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }
.sim-home::before { content: ""; width: 134px; height: 5px; border-radius: 3px; background: currentColor; }
[data-sim="tablet"] .sim-home::before { width: 300px; height: 5px; }

@media (max-width: 1100px) {
  .nav { gap: 22px; }
}
@media (max-width: 900px) {
  .pv { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .pv__scroll { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
  .pv__media { padding: 16px; }
  .pv__img { max-height: 62vh; }
  .pv__body { border-left: 0; overflow: visible; padding: 28px max(var(--pad), var(--safe-right)) 40px max(var(--pad), var(--safe-left)); }
  .pv__step span.t { display: none; }
  .pdfm__actions .pdfm__newtab { display: none; }
}
@media (min-width: 901px) { .pv__scroll { display: contents; } }
@media (max-width: 700px) {
  .site-header .wordmark { font-size: 14px; }
  .site-header .wordmark, .menu__top .wordmark { display: inline-flex; flex-direction: column; align-items: center; gap: .42em; }
  .site-header .wordmark .w, .menu__top .wordmark .w { margin-right: -.14em; }
  .menu__top .wordmark { font-size: 13px; }
  .citynav a { padding: 14px 0 13px; font-size: 10px; }
  .pv__full { right: 26px; bottom: 26px; }
  .pdfm__title { font-size: 14px; }
}

/* Drawings / presentation boards: show the whole image on stone, never cropped */
img.is-whole { object-fit: contain !important; padding: 5%; background: var(--stone); }
