/* ───────── Font (self-hosted Archivo, variable width 62–125%) ───────── */
@font-face {
  font-family: "Archivo";
  font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2C60-2C7F, U+A720-A7FF;
}

/* ───────── Tokens ───────── */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #15171b;
  --muted: #5c626c;
  --line: #dcdfe4;
  --accent: #2f45ff;
  --accent-ink: #ffffff;
  --tile: #e6e8ec;
  --shade: rgba(21, 23, 27, .06);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #131518;
  --surface: #1b1e22;
  --ink: #eceef1;
  --muted: #9aa1ac;
  --line: #2a2e34;
  --accent: #8c97ff;
  --accent-ink: #0d0f2e;
  --tile: #20242a;
  --shade: rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ───────── Top bar ───────── */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.bar.scrolled { border-bottom-color: var(--line); }
.brand { display: block; width: 34px; height: 34px; flex: none; }
.logo { width: 34px; height: 34px; }
.logo-dark, [data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.bar nav { display: flex; gap: clamp(16px, 2.6vw, 34px); margin-left: auto; }
.bar nav a {
  text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--muted);
  padding: 6px 0; transition: color .2s;
}
.bar nav a:hover, .bar nav a.active { color: var(--ink); }
.theme {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  background: none; border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  transition: border-color .2s;
}
.theme:hover { border-color: var(--ink); }
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme .moon { fill: currentColor; stroke: none; }
.theme .sun, [data-theme="dark"] .theme .moon { display: none; }
[data-theme="dark"] .theme .sun { display: inline; }

/* ───────── Hero ───────── */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 9vh, 120px) var(--gutter) clamp(48px, 8vh, 96px);
}
.name {
  font-size: clamp(3.3rem, 13.2vw, 13.5rem);
  line-height: .86;
  font-weight: 800;
  letter-spacing: -.035em;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  margin-left: -.04em;
}
.name span { display: block; }
.name span + span { color: var(--muted); }
/* The one orchestrated moment: the name stretches open on load. */
@media (prefers-reduced-motion: no-preference) {
  .js .name span { animation: stretch 1.15s var(--ease) both; }
  .js .name span + span { animation-delay: .09s; }
  .js .hero-foot { animation: rise .8s .45s var(--ease) both; }
}
@keyframes stretch {
  from { font-variation-settings: "wdth" 62; letter-spacing: -.06em; opacity: 0; }
  30% { opacity: 1; }
  to { font-variation-settings: "wdth" 125; letter-spacing: -.035em; opacity: 1; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.hero-foot {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 28px 48px; margin-top: clamp(28px, 5vh, 56px);
}
.intro { max-width: 36ch; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.45; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ───────── Buttons ───────── */
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-size: .98rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.icon { width: 46px; padding: 0; }
.btn.icon svg { width: 18px; height: 18px; fill: currentColor; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ───────── Work grid ───────── */
.work { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(72px, 10vw, 140px); }
.work-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 16px 32px; padding-top: 28px; border-top: 1px solid var(--line); margin-bottom: 32px;
}
h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.1; font-weight: 700;
  letter-spacing: -.02em; font-variation-settings: "wdth" 112;
}
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 7px 15px; font-size: .9rem; font-weight: 500; cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.filters button:hover { color: var(--ink); border-color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filters .n { opacity: .55; margin-left: 4px; font-variant-numeric: tabular-nums; }

.grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px);
  grid-auto-flow: dense;
}
.tile { min-width: 0; }
.tile[hidden] { display: none; }
.tile.tall { grid-row: span 2; }
.tile a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.thumb {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius);
  background: var(--tile);
}
.tile.tall .thumb { aspect-ratio: auto; flex: 1; min-height: 0; }
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease), opacity .5s;
}
.thumb img.loading { opacity: 0; }
.tile a:hover .thumb img { transform: scale(1.025); }
.thumb.top img { object-position: center 18%; }
.tile-meta { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; }
.tile-title { font-size: 1.12rem; font-weight: 650; line-height: 1.25; }
.tile a:hover .tile-title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.tile-disc { color: var(--muted); font-size: .92rem; text-align: right; flex: none; max-width: 50%; }
.tile-sum { color: var(--muted); font-size: .95rem; margin-top: 4px; max-width: 46ch; }

/* typographic covers for projects without screenshots */
.wordmark { display: grid; place-items: center; width: 100%; height: 100%; }
.wm-arts { background: #faf7f2; color: #1b1b1b; }
.wm-arts b { font-size: clamp(2.6rem, 5vw, 4.2rem); font-weight: 800; font-variation-settings: "wdth" 70; letter-spacing: -.02em; }
.wm-arts i { font-style: normal; color: #ef4444; }
.wm-d4n { background: #0d0f12; color: #f2f2f2; }
.wm-d4n b { font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 900; font-variation-settings: "wdth" 125; letter-spacing: -.04em; }
.wm-d4n small { display: block; text-align: center; font-size: .9rem; font-weight: 500; opacity: .6; letter-spacing: .02em; }

/* ───────── Content blocks ───────── */
.block {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 48px;
  padding: clamp(36px, 5vw, 64px) var(--gutter);
  position: relative;
}
.block::before {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  border-top: 1px solid var(--line);
}
.block h2 { position: sticky; top: 84px; align-self: start; }
.prose { max-width: 62ch; font-size: clamp(1.1rem, 1.4vw, 1.3rem); line-height: 1.55; }
.prose p + p { margin-top: 1em; }

.figures {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
}
.figures div { display: flex; flex-direction: column-reverse; gap: 4px; }
.figures dd { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; font-variation-settings: "wdth" 112; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.figures dt { color: var(--muted); font-size: .92rem; }

.rows > li {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 28px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.rows > li:first-child { padding-top: 4px; }
.rows .when { color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.rows h3 { font-size: 1.15rem; font-weight: 650; line-height: 1.3; }
.rows .org { color: var(--muted); }
.rows p { margin-top: 6px; max-width: 64ch; }
.rows a.inline { color: var(--accent); text-underline-offset: 3px; font-weight: 500; display: inline-block; margin-top: 6px; }
.rows.compact > li { padding: 14px 0; }
.rows.compact > li:first-child { padding-top: 2px; }
.awards .for { color: var(--ink); }

.tools div {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 28px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.tools div:first-child { padding-top: 2px; }
.tools dt { color: var(--muted); }

.more { margin-top: 24px; }
.more summary {
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; padding: 8px 0; list-style: none;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before {
  content: ""; width: 8px; height: 8px; border-right: 1.7px solid; border-bottom: 1.7px solid;
  transform: rotate(-45deg); transition: transform .2s;
}
.more[open] summary::before { transform: rotate(45deg); }
.certs { margin-top: 12px; columns: 2 320px; column-gap: 40px; }
.certs li { break-inside: avoid; padding: 10px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.certs li span { display: block; color: var(--muted); font-size: .88rem; }

.clients { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.clients li {
  aspect-ratio: 1; display: grid; place-items: center; padding: 16%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.clients img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.clients li:hover img { filter: none; opacity: 1; }
[data-theme="dark"] .clients li { background: #e9ebee; border-color: transparent; }

/* ───────── Contact ───────── */
.contact {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(56px, 8vw, 120px) var(--gutter);
  position: relative;
}
.contact::before, .foot::before {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  border-top: 1px solid var(--line);
}
.contact h2 { font-size: clamp(2rem, 5vw, 4.2rem); font-variation-settings: "wdth" 118; letter-spacing: -.03em; max-width: 16ch; }
.contact-lead { color: var(--muted); font-size: 1.15rem; margin-top: 16px; max-width: 52ch; }
.mail {
  display: inline-block; margin-top: 28px;
  font-size: clamp(1.3rem, 3.6vw, 2.6rem); font-weight: 600; letter-spacing: -.02em;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px;
  text-decoration-color: var(--accent); overflow-wrap: anywhere;
}
.mail:hover { color: var(--accent); }
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px 48px;
  margin-top: clamp(40px, 6vw, 72px);
}
.channels li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.channels span { display: block; color: var(--muted); font-size: .88rem; }
.channels a { text-decoration: none; font-weight: 500; }
.channels a:hover { color: var(--accent); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field:nth-child(n+3) { grid-column: 1 / -1; }
.field label { font-size: .92rem; font-weight: 600; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; width: 100%; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field [aria-invalid="true"] { border-color: #d43c3c; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }
.form-status { grid-column: 1 / -1; min-height: 1.5em; font-size: .95rem; }
.form-status.error { color: #d43c3c; }
.form-status.ok { color: var(--ink); font-weight: 600; }
.form.sent .field, .form.sent .btn { display: none; }

.foot {
  max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px;
  padding: 28px var(--gutter) 40px; color: var(--muted); font-size: .92rem; position: relative;
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.noscript { padding: 24px var(--gutter); }

/* ───────── Project view ───────── */
.project {
  position: fixed; inset: 0; z-index: 40; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg);
}
.project:not([hidden]) { animation: pIn .45s var(--ease); }
@keyframes pIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.project-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 8px 6px; cursor: pointer; font-weight: 600; border-radius: 6px;
}
.link-btn:hover { color: var(--accent); }
.link-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager-count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; min-width: 4.5ch; text-align: center; }

.project-body { max-width: var(--max); margin: 0 auto; padding: clamp(32px, 6vw, 80px) var(--gutter) 80px; }
.p-head { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px 48px; align-items: end; }
.p-title {
  font-size: clamp(2.6rem, 7vw, 6.5rem); line-height: .92; font-weight: 800;
  letter-spacing: -.035em; font-variation-settings: "wdth" 118;
}
.p-sub { color: var(--muted); font-size: clamp(1.1rem, 1.6vw, 1.35rem); margin-top: 14px; }
.p-cat { color: var(--muted); font-size: .95rem; justify-self: end; text-align: right; }

.p-title:focus { outline: none; }
.p-hero {
  display: block; width: 100%; padding: 0; border: 0; font: inherit;
  margin-top: clamp(28px, 4vw, 48px); border-radius: var(--radius); overflow: hidden;
  background: var(--tile); cursor: zoom-in;
}
.p-hero:not(.wordmark) { display: grid; place-items: center; }
.p-hero img { width: auto; max-width: 100%; height: auto; max-height: 80vh; object-fit: contain; }
.p-hero.wordmark { aspect-ratio: 21 / 9; cursor: default; }

.p-info { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px 64px; margin-top: clamp(36px, 5vw, 64px); }
.p-desc { font-size: clamp(1.1rem, 1.35vw, 1.25rem); line-height: 1.6; max-width: 62ch; }
.p-desc p + p { margin-top: 1em; }
.p-awards { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.p-awards li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-weight: 500; }
.p-links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.p-facts div { display: grid; grid-template-columns: 8rem 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.p-facts div:first-child { border-top: 1px solid var(--line); }
.p-facts dt { color: var(--muted); }

.p-features { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 40px; }
.p-features li { padding: 18px 0; border-top: 1px solid var(--line); }
.p-features h3 { font-size: 1.05rem; font-weight: 650; }
.p-features p { color: var(--muted); margin-top: 4px; font-size: .97rem; }

.p-gallery { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.p-gallery figure { margin: 0; }
.p-gallery.portraits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-gallery .wide { grid-column: 1 / -1; }
.p-gallery button {
  display: block; width: 100%; padding: 0; border: 0; background: var(--tile);
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
}
.p-gallery img { width: 100%; height: auto; transition: opacity .5s; }
.p-gallery img.loading { opacity: 0; }
.p-gallery figcaption { color: var(--muted); font-size: .92rem; padding-top: 8px; }
.p-note { color: var(--muted); font-size: .95rem; margin-top: 24px; max-width: 62ch; }

.p-next {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px;
  margin-top: clamp(64px, 9vw, 120px); padding-top: 28px; border-top: 1px solid var(--line);
  text-decoration: none; cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0;
  width: 100%; text-align: left; padding: 28px 0 0; font: inherit; color: inherit;
}
.p-next span { display: block; color: var(--muted); font-size: .95rem; }
.p-next strong { display: block; font-size: clamp(1.8rem, 4.4vw, 3.6rem); line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variation-settings: "wdth" 118; margin-top: 8px; }
.p-next:hover strong { color: var(--accent); }
.p-next .thumb { aspect-ratio: 16 / 9; }

/* ───────── Image viewer ───────── */
.viewer {
  position: fixed; inset: 0; z-index: 60;
  background: #0a0b0d;
  display: grid; place-items: center; color: #f1f2f4;
  touch-action: pan-y;
}
.viewer:not([hidden]) { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.viewer-stage { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100vw; padding: 56px 64px 16px; }
#viewer-img {
  max-width: min(100%, 2560px); max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px);
  width: auto; height: auto; object-fit: contain; border-radius: 2px;
  transition: opacity .25s, filter .4s;
}
#viewer-img.soft { filter: blur(8px); }
.viewer figcaption { display: flex; gap: 20px; justify-content: space-between; width: 100%; max-width: 900px; padding-top: 14px; font-size: .95rem; color: #b9bec7; }
#viewer-count { font-variant-numeric: tabular-nums; flex: none; }
.v-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px;
  background: rgba(255,255,255,.08); border: 0; border-radius: 50%; color: #fff; cursor: pointer;
  transition: background-color .2s;
}
.v-btn:hover { background: rgba(255,255,255,.18); }
.v-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.v-close { top: 14px; right: 14px; }
.v-prev { left: 14px; top: 50%; translate: 0 -50%; }
.v-next { right: 14px; top: 50%; translate: 0 -50%; }
.viewer.single .v-prev, .viewer.single .v-next, .viewer.single #viewer-count { display: none; }


/* ───────── View switcher ───────── */
.views { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-bottom: clamp(28px, 5vh, 52px); }
.views a {
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: .98rem;
  padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.views a:hover { color: var(--ink); }
.views a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ───────── Two-slide covers for social projects ───────── */
.thumb.has-spread { display: grid; place-items: center; }
.spread { display: grid; grid-template-columns: 1fr 1fr; gap: 4%; width: 86%; }
.thumb .spread img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px;
  box-shadow: 0 6px 20px var(--shade);
}
.tile a:hover .thumb.has-spread img { transform: translateY(-4px); }
.p-next .thumb.has-spread .spread { width: 70%; }

/* ───────── Sets: carousels, grids, reels ───────── */
.set { margin-top: clamp(48px, 6vw, 80px); }
.set + .set { margin-top: clamp(40px, 5vw, 64px); }
.set-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: 18px; }
.set-head h2 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
.set-head p { color: var(--muted); margin-top: 4px; max-width: 60ch; }
.set-nav { display: flex; align-items: center; gap: 2px; flex: none; color: var(--muted); font-size: .92rem; }
.set-nav span { margin-right: 8px; font-variant-numeric: tabular-nums; }

.strip {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0;
  padding-bottom: 10px; scrollbar-width: thin; overscroll-behavior-x: contain;
}
.strip > * { flex: 0 0 auto; scroll-snap-align: start; }
.strip button, .set-grid button {
  display: block; padding: 0; border: 0; background: var(--tile); border-radius: 3px; overflow: hidden; cursor: zoom-in;
}
.strip button { width: clamp(220px, 26vw, 360px); }
.strip img, .set-grid img { width: 100%; height: auto; transition: opacity .5s; }
.strip img.loading, .set-grid img.loading { opacity: 0; }

.set-grid { display: grid; gap: 10px; }
.set-grid.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 760px; }
.set-grid.grid4 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.strip.reels figure { margin: 0; width: clamp(200px, 22vw, 300px); }
.strip.reels video { display: block; width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 3px; object-fit: cover; }
.strip.reels figcaption { color: var(--muted); font-size: .92rem; padding-top: 8px; }

@media (max-width: 900px) { .set-grid.grid4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .views { gap: 2px 16px; }
  .views a { font-size: .92rem; }
  .strip button { width: 72vw; }
  .strip.reels figure { width: 62vw; }
  .set-grid.grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-nav { display: none; }
  .tile.tall .thumb.has-spread { aspect-ratio: 4 / 3; }
}


/* ───────── Brand guides, browser frames, phones ───────── */
/* Brand typefaces: only downloaded when a brand guide is opened */
@font-face { font-family: "B Caveat Brush"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/brand/caveat-brush-400-normal.woff2) format("woff2"); }
@font-face { font-family: "B Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/brand/montserrat-500-normal.woff2) format("woff2"); }
@font-face { font-family: "B Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/brand/montserrat-800-normal.woff2) format("woff2"); }
@font-face { font-family: "B Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/brand/plus-jakarta-sans-400-normal.woff2) format("woff2"); }
@font-face { font-family: "B Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/brand/plus-jakarta-sans-700-normal.woff2) format("woff2"); }
@font-face { font-family: "B Playfair Display"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/brand/playfair-display-400-italic.woff2) format("woff2"); }
@font-face { font-family: "B Playfair Display"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/brand/playfair-display-700-normal.woff2) format("woff2"); }
@font-face { font-family: "B Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/brand/cormorant-garamond-600-normal.woff2) format("woff2"); }
@font-face { font-family: "B Cormorant Garamond"; font-style: italic; font-weight: 600; font-display: swap; src: url(fonts/brand/cormorant-garamond-600-italic.woff2) format("woff2"); }
@font-face { font-family: "B Cinzel"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/brand/cinzel-600-normal.woff2) format("woff2"); }
@font-face { font-family: "B Italiana"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/brand/italiana-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "B Karla"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/brand/karla-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "B Noto Sans Arabic"; font-weight: 400; font-display: swap; src: url(fonts/brand/noto-sans-arabic-arabic-400-normal.woff2) format("woff2"); }
.browsers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.browser { margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 10px 30px var(--shade); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser-bar span { margin-left: 10px; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser button { display: block; width: 100%; padding: 0; border: 0; background: var(--tile); cursor: zoom-in; }
.browser img { width: 100%; height: auto; transition: opacity .5s; }
.browser img.loading { opacity: 0; }

.phones { display: flex; flex-wrap: wrap; gap: clamp(16px, 3vw, 36px); }
.phone { margin: 0; width: clamp(200px, 22vw, 260px); padding: 10px; border-radius: 34px; background: #111; box-shadow: 0 14px 36px var(--shade); }
.phone button { display: block; width: 100%; padding: 0; border: 0; border-radius: 26px; overflow: hidden; background: #000; cursor: zoom-in; }
.phone img { width: 100%; height: auto; }

@media (max-width: 820px) { .browsers { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .phone { width: 62vw; } }

/* ───────── Print pieces ───────── */
.prints { display: grid; gap: clamp(16px, 2.4vw, 32px); padding: clamp(20px, 3.4vw, 48px); background: var(--tile); border-radius: var(--radius); }
.prints.cols-1 { grid-template-columns: minmax(0, 1fr); }
.prints.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prints.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.print { margin: 0; align-self: start; }
.print button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.print img { width: 100%; height: auto; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 12px 28px rgba(0,0,0,.16); transition: opacity .5s; }
.print img.loading { opacity: 0; }
@media (max-width: 900px) { .prints.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .prints.cols-2 { grid-template-columns: minmax(0, 1fr); } }

/* ───────── Responsive ───────── */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clients { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .block, .contact-grid, .p-head, .p-info { grid-template-columns: minmax(0, 1fr); }
  .block h2 { position: static; }
  .p-cat { justify-self: start; text-align: left; }
  .bar nav a[href="#recognition"] { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .bar { gap: 14px; }
  .bar nav { gap: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .tile.tall { grid-row: auto; }
  .tile.tall .thumb { aspect-ratio: 4 / 5; flex: none; }
  .tile-meta { flex-direction: column; gap: 2px; }
  .tile-disc { text-align: left; max-width: none; }
  .rows > li, .tools div { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .clients { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field:nth-child(-n+2) { grid-column: 1 / -1; }
  .p-gallery, .p-gallery.portraits { grid-template-columns: minmax(0, 1fr); }
  .p-facts div { grid-template-columns: 6.5rem 1fr; }
  .p-next { grid-template-columns: minmax(0, 1fr); }
  .viewer-stage { padding: 64px 8px 12px; }
  .v-prev, .v-next { top: auto; bottom: 14px; translate: none; }
  .v-prev { left: calc(50% - 56px); } .v-next { right: calc(50% - 56px); }
  #viewer-img { max-height: calc(100dvh - 190px); }
  .viewer figcaption { padding: 12px 8px 70px; }
  .hero-actions .btn:not(.icon) { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ───────── Platforms: big logo cards ───────── */
.platforms { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(56px, 8vw, 110px); }
.plat-note { color: var(--muted); max-width: 46ch; }
.vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.vcard a {
  position: relative; display: flex; flex-direction: column; aspect-ratio: 16 / 10; min-height: 300px;
  padding: clamp(20px, 2.6vw, 34px); border-radius: 8px; overflow: hidden; text-decoration: none;
  background: var(--vbg); color: var(--vfg); box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .14);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.vcard a:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .14), 0 22px 44px var(--shade); }
.vcard a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.vtop { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: .88rem; font-weight: 500; opacity: .85; }
.vdots { display: flex; gap: 5px; }
.vdots i { width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 0 1px color-mix(in srgb, var(--vfg) 35%, transparent); }
.vlogo { flex: 1; max-width: 100%; overflow: hidden; } .vlogo > span { display: inline-block; } .vlogo { display: grid; place-items: center; padding: 18px 0; font-size: clamp(2.6rem, 5.4vw, 5.2rem); line-height: 1; white-space: nowrap; transition: transform .8s var(--ease); }
.vcard a:hover .vlogo { transform: scale(1.03); }
.vfoot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 28px; flex-wrap: wrap; padding-right: 52px; }
.vtag { max-width: 32ch; font-size: .98rem; line-height: 1.4; opacity: .88; }
.vstats { display: flex; gap: clamp(16px, 2vw, 28px); }
.vstats dt { font-size: clamp(1.25rem, 1.8vw, 1.6rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.vstats dd { font-size: .8rem; opacity: .72; }
.vgo {
  position: absolute; right: clamp(20px, 2.6vw, 34px); bottom: clamp(20px, 2.6vw, 34px);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--vfg) 45%, transparent);
  transition: background-color .3s, color .3s;
}
.vgo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vcard a:hover .vgo { background: var(--vfg); color: var(--vbg); }
@media (max-width: 760px) {
  .vgrid { grid-template-columns: minmax(0, 1fr); }
  .vcard a { aspect-ratio: auto; min-height: 340px; }
  .vlogo { font-size: clamp(2.4rem, 12vw, 3.6rem); }
}

/* project page header for platforms */
.vhero {
  position: relative; display: flex; flex-direction: column; min-height: clamp(320px, 42vw, 560px);
  margin-top: clamp(28px, 4vw, 48px); padding: clamp(22px, 3vw, 40px); border-radius: 8px;
  background: var(--vbg); color: var(--vfg); box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .14);
}
.vhero .vlogo { font-size: clamp(3rem, 9vw, 8.5rem); }
.vhero .vstats dt { font-size: clamp(1.5rem, 2.6vw, 2.3rem); }
.vhero .vstats dd { font-size: .9rem; }
.vhero .vdots { position: absolute; top: clamp(22px, 3vw, 40px); right: clamp(22px, 3vw, 40px); }
.vhero .vdots i { width: 18px; height: 18px; }
@media (max-width: 640px) { .vhero .vlogo { font-size: clamp(2rem, 10.5vw, 4rem); } }

/* ───────── Brand guide ───────── */
.bguide { display: grid; gap: clamp(32px, 4vw, 48px); padding: clamp(20px, 3vw, 40px); border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.bsec h3 {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px; font-variation-settings: "wdth" 100;
}
.blogos { display: grid; gap: 12px; }
.blogos.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blogo {
  position: relative; display: grid; place-items: center; min-height: clamp(200px, 22vw, 300px); margin: 0;
  padding: 44px 24px; border-radius: 6px; overflow: hidden; color: rgba(255, 255, 255, .62);
}
.blogo.light { color: rgba(0, 0, 0, .5); box-shadow: inset 0 0 0 1px var(--line); }
.blogo .wm { display: inline-block; font-size: clamp(1.8rem, 3.6vw, 3.6rem); line-height: 1; white-space: nowrap; }
.blogos:not(.pair) .blogo .wm { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.blogo img { width: 100%; max-width: 620px; height: auto; }
.blogo figcaption { position: absolute; left: 16px; bottom: 12px; font-size: .78rem; font-weight: 500; }

.swatches { display: flex; min-height: 240px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.sw { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 16px 14px; color: #fff; }
.sw.lead { flex-grow: 2; }
.sw.light { color: #15171b; }
.sw strong { font-size: .95rem; font-weight: 650; line-height: 1.2; }
.sw code { font-family: inherit; font-size: .85rem; opacity: .8; font-variant-numeric: tabular-nums; }
.sw small { font-size: .78rem; line-height: 1.35; opacity: .78; margin-top: 6px; }

.faces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.faces li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); }
.aa { font-size: clamp(3.4rem, 5vw, 4.8rem); line-height: 1; min-width: 1.3em; text-align: center; }
.face-name { color: var(--muted); font-size: .88rem; margin-bottom: 6px; }
.face-name strong { display: block; color: var(--ink); font-size: 1rem; font-weight: 650; }
.faces .spec { font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.25; overflow-wrap: anywhere; }

@media (max-width: 820px) {
  .faces { grid-template-columns: minmax(0, 1fr); }
  .swatches { flex-direction: column; }
  .sw, .sw.lead { flex: none; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; gap: 4px 12px; padding: 18px 14px; }
  .sw.lead { padding-top: 48px; }
  .sw small { flex-basis: 100%; margin-top: 0; }
}
@media (max-width: 640px) { .blogos.pair { grid-template-columns: minmax(0, 1fr); } .blogo .wm { font-size: clamp(1.8rem, 9vw, 2.8rem); } }

/* ───────── Related work ───────── */
.rel { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 18px; }
.rel button { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rel .thumb { margin-bottom: 10px; }
.rel strong { font-weight: 650; }
.rel span { color: var(--muted); font-size: .9rem; }
.rel button:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.rel button:hover .thumb img { transform: scale(1.025); }

/* captioned photo set (mixed portrait and landscape) */
.captioned { columns: 3 260px; column-gap: clamp(14px, 2vw, 24px); }
.captioned figure { break-inside: avoid; margin: 0 0 clamp(18px, 2.4vw, 28px); }
.captioned button { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--tile); cursor: zoom-in; }
.captioned img { width: 100%; height: auto; transition: opacity .5s; }
.captioned img.loading { opacity: 0; }
.captioned figcaption { color: var(--muted); font-size: .9rem; line-height: 1.4; margin-top: 8px; }

/* a portrait screenshot shown next to phones, same height, no frame */
.phones { align-items: flex-start; }
.plainshot { margin: 0; display: flex; }
.plainshot button { display: block; height: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #000; cursor: zoom-in; box-shadow: 0 14px 36px var(--shade); }
.plainshot img { height: 100%; width: auto; display: block; }
@media (max-width: 640px) { .plainshot { width: 100%; } .plainshot button { height: auto; width: 100%; } .plainshot img { width: 100%; height: auto; } }

/* YouTube videos (load on click) */
.yt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.yt { margin: 0; }
.yt button, .yt iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .5s; }
.yt img.loading { opacity: 0; }
.yt button:hover img { transform: scale(1.02); }
.yt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 48px; border-radius: 12px; background: rgba(0,0,0,.72); display: grid; place-items: center; transition: background-color .2s; }
.yt button:hover .yt-play { background: #e62117; }
.yt-play svg { width: 26px; height: 26px; fill: #fff; }
.yt figcaption { color: var(--muted); font-size: .92rem; margin-top: 8px; }
@media (max-width: 640px) { .yt-grid { grid-template-columns: minmax(0, 1fr); } }
