/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  /* the wall the slides hang on */
  --wall: #e6eef3;
  --wall-2: #d3e2ea;
  --ink: #1b365d;
  --ink-muted: #5a6f86;
  --ink-line: rgba(27, 54, 93, .14);

  /* the slides */
  --slide-1: #02569b;
  --slide-2: #1b365d;
  --slide-3: #102340;
  --cream: #eaf7fb;
  --cream-muted: rgba(234, 247, 251, .64);
  --cream-line: rgba(234, 247, 251, .16);
  --accent: #5fc1e4;
  --accent-ink: #1b365d;

  --display: "Antonio", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --gutter: clamp(16px, 3.4vw, 48px);
  --gap: clamp(14px, 1.8vw, 26px);
  --radius: 6px;

  --shadow:
    0 1px 1px rgba(0, 0, 0, .08),
    0 14px 24px -10px rgba(0, 0, 0, .28),
    0 40px 70px -28px rgba(0, 0, 0, .38);
  --shadow-lift:
    0 1px 1px rgba(0, 0, 0, .08),
    0 26px 40px -14px rgba(0, 0, 0, .34),
    0 70px 110px -40px rgba(0, 0, 0, .5);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --wall: #0b1628;
  --wall-2: #12213a;
  --ink: #eaf7fb;
  --ink-muted: #8ea6bd;
  --ink-line: rgba(234, 247, 251, .14);
  --shadow:
    0 1px 1px rgba(0, 0, 0, .3),
    0 14px 24px -10px rgba(0, 0, 0, .6),
    0 40px 70px -28px rgba(0, 0, 0, .7);
  --shadow-lift:
    0 1px 1px rgba(0, 0, 0, .3),
    0 26px 40px -14px rgba(0, 0, 0, .7),
    0 70px 110px -40px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.is-locked { overflow: hidden; }
html.is-locked body { padding-right: var(--sbw, 0); }

body {
  background: var(--wall);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
[hidden] { display: none !important; }

/* Window light falling across the wall */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(80% 60% at 85% 0%, rgba(255, 255, 255, .35), transparent 70%),
    linear-gradient(112deg, transparent 0 22%, rgba(0, 0, 0, .045) 30%, transparent 38%, transparent 52%, rgba(0, 0, 0, .035) 62%, transparent 72%);
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(80% 60% at 85% 0%, rgba(255, 255, 255, .05), transparent 70%),
    linear-gradient(112deg, transparent 0 22%, rgba(0, 0, 0, .25) 30%, transparent 38%, transparent 52%, rgba(0, 0, 0, .2) 62%, transparent 72%);
}
/* Plaster grain */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: .09; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::after { mix-blend-mode: overlay; opacity: .12; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
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: 4px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 300;
  padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  transition: top .3s var(--ease);
}
.skip:focus { top: 16px; }

.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(95, 193, 228, .6); }
  70%, 100% { box-shadow: 0 0 0 10px transparent; }
}

.roll { display: inline-block; overflow: hidden; line-height: 1.3; vertical-align: top; }
.roll > span { display: inline-block; position: relative; transition: transform .55s var(--ease); }
.roll > span::after { content: attr(data-text); position: absolute; left: 0; top: 100%; }
.roll:hover > span, .roll:focus-visible > span { transform: translateY(-100%); }

/* ==========================================================================
   Reveal system
   ========================================================================== */
.js [data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), box-shadow .6s var(--ease);
  transition-delay: var(--d, 0ms), var(--d, 0ms), 0ms;
}
.is-loaded [data-reveal].is-in { opacity: 1; transform: none; }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.w__i {
  display: inline-block; transform: translateY(110%);
  transition: transform 1.2s var(--ease);
  transition-delay: calc(var(--i) * 60ms + 150ms);
}
.is-loaded [data-split].is-in .w__i { transform: none; }

/* ==========================================================================
   Loader
   ========================================================================== */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: var(--gutter);
  background: radial-gradient(120% 100% at 75% 0%, var(--slide-1), var(--slide-2) 45%, var(--slide-3));
  color: var(--cream);
  transition: transform 1s var(--ease-io);
}
.is-loaded .loader { transform: translateY(-100%); }
.loader__label { font-family: var(--display); font-size: 14px; letter-spacing: .3em; text-transform: uppercase; opacity: .7; }
.loader__count {
  font-family: var(--display); font-weight: 200;
  font-size: clamp(90px, 20vw, 300px); line-height: .8; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.loader__bar {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 3px;
  background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0));
}

/* ==========================================================================
   Cursor
   ========================================================================== */
.cursor { display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cursor { position: fixed; inset: 0; z-index: 150; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cursor.is-visible { opacity: 1; }
.cursor__dot {
  position: fixed; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: #fff; mix-blend-mode: difference; transition: opacity .25s;
}
.cursor__ring { position: fixed; left: 0; top: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.cursor__circle {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid #fff; mix-blend-mode: difference; opacity: .6;
  transition: transform .55s var(--ease), background-color .3s, border-color .3s, opacity .3s;
}
.cursor__label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink); opacity: 0; transform: scale(.6);
  transition: opacity .3s, transform .5s var(--ease);
}
.cursor.is-hover .cursor__circle { transform: scale(1.6); opacity: .9; }
.cursor.is-label .cursor__circle { transform: scale(2.3); background: var(--accent); border-color: transparent; mix-blend-mode: normal; opacity: 1; }
.cursor.is-label .cursor__label { opacity: 1; transform: none; }
.cursor.is-label .cursor__dot { opacity: 0; }
.cursor.is-down .cursor__circle { transform: scale(.8); }
.cursor.is-label.is-down .cursor__circle { transform: scale(2); }

/* ==========================================================================
   Progress + Nav
   ========================================================================== */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70;
  background: var(--accent); transform-origin: left; transform: scaleX(0);
}
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  transition: transform .7s var(--ease), background-color .4s, backdrop-filter .4s;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--wall) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
.nav.is-hidden { transform: translateY(-101%); }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
}
.brand__mark {
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--slide-1), var(--slide-3));
  transition: border-radius .5s var(--ease), transform .7s var(--ease);
}
.brand:hover .brand__mark { border-radius: 2px; transform: rotate(135deg); }
.brand { min-width: 0; }
.brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand__mark { flex: none; }
@media (max-width: 560px) { .brand { font-size: 14px; letter-spacing: .12em; gap: 8px; } }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); flex: none; }
.nav__link { font-family: var(--display); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
@media (max-width: 560px) { .nav__link--hide-sm { display: none; } }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--ink-line);
  transition: background-color .3s, color .3s, border-color .3s;
}
.theme-toggle:hover { background: var(--ink); color: var(--wall); border-color: var(--ink); }
.theme-toggle svg { transition: transform .8s var(--ease); }
[data-theme="dark"] .theme-toggle svg { transform: rotate(180deg); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ==========================================================================
   Wall + slides
   ========================================================================== */
.wall { position: relative; z-index: 1; padding: 92px var(--gutter) 0; max-width: 1640px; margin-inline: auto; }

.deck { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }

.slide {
  position: relative; isolation: isolate; overflow: hidden;
  container-type: inline-size;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  color: var(--cream);
  background:
    radial-gradient(130% 110% at 78% 0%, var(--slide-1) 0%, var(--slide-2) 42%, var(--slide-3) 100%);
  box-shadow: var(--shadow);
}
/* soft vignette + sheen */
.slide::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(90% 70% at 20% 110%, rgba(0, 0, 0, .35), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, .07), transparent 40%);
}
/* spotlight that switches on when hovered */
.slide__lamp {
  position: absolute; left: 50%; top: -20%; z-index: -1; pointer-events: none;
  width: 90%; height: 110%; transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 20%, rgba(162, 224, 239, .22), transparent 70%);
  opacity: 0; transition: opacity .8s var(--ease);
}
.slide:hover .slide__lamp { opacity: 1; }

.slide__title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(22px, 9cqi, 64px); line-height: .92; letter-spacing: .02em;
}
.slide__title--center { text-align: center; }

.corner {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: clamp(10px, 1.15cqi, 14px); letter-spacing: .24em; text-transform: uppercase;
  color: var(--cream-muted);
}
.corner--tl { left: 3.2cqi; top: 3cqi; }
.corner--tr { right: 3.2cqi; top: 3cqi; }
.corner--bl { left: 3.2cqi; bottom: 3cqi; }
.corner--br { right: 3.2cqi; bottom: 3cqi; }
.scroll-cue { color: var(--cream); transition: color .3s; }
.scroll-cue span { display: inline-block; animation: bob 2s var(--ease) infinite; }
.scroll-cue:hover { color: var(--accent); }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ---------- Cover slide ---------- */
.deck--intro { grid-template-rows: auto auto; }
.slide--hero { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; min-height: 420px; }
.hero__canvas {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none;
  opacity: 0; transition: opacity 1.6s var(--ease);
}
.hero__canvas.is-ready { opacity: 1; }
.hero__word {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 2cqi;
}
.hw { display: flex; flex-direction: column; align-items: flex-start; }
.hw--r { align-items: flex-end; }
.hw__big {
  font-family: var(--display); font-weight: 300; text-transform: uppercase; white-space: nowrap;
  font-size: calc(19cqi * var(--fit, 1)); line-height: .8; letter-spacing: .01em; color: var(--cream);
} /* --fit (≤ 1) is set by main.js so long cover words stay on one line */
.hw__gap { width: 21cqi; flex: none; }
.hw__sub {
  margin-top: 1.6cqi;
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: max(10px, 1.7cqi); letter-spacing: .32em; color: var(--cream);
}
.hw--r .hw__sub { letter-spacing: .32em; margin-right: -.32em; }

/* ---------- Avatar on the cover ---------- */
.has-avatar .hw__gap { width: 30cqi; }
.avatar2d {
  position: absolute; left: 50%; bottom: 0; z-index: 2; pointer-events: none;
  height: calc(var(--ah, .92) * 100%);
  perspective: 900px;
  opacity: 0; transform: translateX(-50%) translateY(35%);
  transition: opacity 1s var(--ease), transform 1.5s var(--ease);
}
.avatar2d.is-ready { opacity: 1; transform: translateX(-50%); }
.avatar2d__tilt { height: 100%; transform-style: preserve-3d; will-change: transform; }
.avatar2d__float { height: 100%; animation: avatar-breathe 4.8s ease-in-out infinite; transform-origin: 50% 100%; }
.avatar2d img {
  height: 100%; width: auto; max-width: none;
  filter: drop-shadow(0 24px 24px rgba(0, 0, 0, .4)) drop-shadow(-6px 0 14px rgba(95, 193, 228, .18));
}
.avatar2d.is-hop .avatar2d__float { animation: avatar-hop .65s var(--ease), avatar-breathe 4.8s ease-in-out .65s infinite; }
.avatar2d__shadow {
  position: absolute; left: 50%; bottom: -2%; width: 70%; height: 8%;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .45), transparent);
}
@keyframes avatar-breathe { 50% { transform: translateY(-1.2%) scaleY(1.008); } }
@keyframes avatar-hop { 40% { transform: translateY(-9%) scaleY(1.03); } 70% { transform: translateY(0) scaleY(.97); } }
@media (max-width: 640px) {
  .has-avatar .hero__word { z-index: 3; }
  .has-avatar .hw__gap { width: 4cqi; }
}

/* ---------- Contents slide ---------- */
.slide--contents { display: flex; flex-direction: column; justify-content: center; padding: 6%; }
.slide--contents .toc { margin-top: 7cqi; }
.toc { display: flex; justify-content: center; gap: 4.5cqi; }
.toc a { display: flex; flex-direction: column; align-items: center; gap: 1.6cqi; transition: transform .5s var(--ease); }
.toc__n { font-family: var(--display); font-weight: 300; font-size: clamp(22px, 9.5cqi, 58px); line-height: .9; transition: color .3s; }
.toc__l { font-family: var(--display); font-size: max(9px, 2.1cqi); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-muted); white-space: nowrap; }
.toc a:hover { transform: translateY(-4px); }
.toc a:hover .toc__n { color: var(--accent); }

/* ---------- Stats slide ---------- */
.slide--stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: minmax(0, 1fr); column-gap: 5%; padding: 6%; }
.stats__text { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; }
.stats { display: flex; gap: 5cqi; }
.stats dt { font-family: var(--display); font-size: max(9px, 2cqi); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-muted); }
.stat__num { font-family: var(--display); font-weight: 300; font-size: clamp(22px, 8.5cqi, 54px); line-height: 1; font-variant-numeric: tabular-nums; }
.stats { padding-top: 2.4cqi; border-top: 1px solid rgba(234, 247, 251, .14); }
/* two tilted columns of project covers drifting up / down, bleeding off the slide edges */
.mosaic {
  position: absolute; top: -12%; bottom: -12%; right: -3%; width: 56%;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2cqi;
  transform: rotate(-9deg); transform-origin: 50% 50%;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.mosaic__col { position: relative; overflow: hidden; min-width: 0; }
.mosaic__track { display: flex; flex-direction: column; gap: 2.2cqi; animation: mosaic-up var(--dur, 36s) linear infinite; }
.mosaic__col--1 .mosaic__track { animation-name: mosaic-down; }
.slide--stats:hover .mosaic__track { animation-play-state: paused; }
@keyframes mosaic-up { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 1.1cqi)); } }
@keyframes mosaic-down { from { transform: translateY(calc(-50% - 1.1cqi)); } to { transform: translateY(0); } }
.mosaic a {
  flex: none; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 1.2cqi;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 14px 24px -12px rgba(0, 0, 0, .6);
  filter: brightness(.82) saturate(.92);
  transition: transform .5s var(--ease), box-shadow .5s, filter .5s;
}
.mosaic a:hover { filter: none; transform: scale(1.05); box-shadow: 0 0 0 1px rgba(162, 224, 239, .5), 0 18px 30px -12px rgba(0, 0, 0, .7); }
.mosaic svg, .mosaic img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .mosaic__track { animation: none; } }

@media (max-width: 1000px) {
  .deck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide--hero { grid-row: auto; aspect-ratio: 16 / 10; }
}
@media (max-width: 640px) {
  .deck { grid-template-columns: minmax(0, 1fr); }
  .slide--hero { grid-column: auto; aspect-ratio: 4 / 5; min-height: 0; }
  .slide--hero .hw__big { font-size: calc(22cqi * var(--fit, 1)); }
  .slide--hero .hw__gap { width: 4cqi; }
  .slide--hero .hero__word { align-items: flex-end; padding-bottom: 16cqi; }
  .slide--hero .hw__sub { font-size: 2.6cqi; letter-spacing: .22em; }
  .slide--hero .corner { font-size: 2.6cqi; }
  .slide--hero .corner--bl { display: none; }
}

/* ==========================================================================
   Work section
   ========================================================================== */
.work { padding-top: clamp(64px, 9vw, 130px); scroll-margin-top: 30px; }
.wall-head {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px;
  margin-bottom: clamp(20px, 2.6vw, 36px); padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-line);
}
.wall-head__title {
  font-family: var(--display); font-weight: 300; text-transform: uppercase;
  font-size: clamp(36px, 5.6vw, 88px); line-height: .9; letter-spacing: .01em;
  display: flex; align-items: flex-start; gap: 14px;
}
.wall-head__title span { font-size: .22em; font-weight: 400; letter-spacing: .2em; color: var(--ink-muted); padding-top: .4em; }

.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.pills { position: relative; display: inline-flex; padding: 4px; border: 1px solid var(--ink-line); border-radius: 999px; }
.pills__ind {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: var(--ink);
  transition: transform .6s var(--ease), width .6s var(--ease);
}
.pill {
  position: relative; z-index: 1; padding: 8px 16px; border-radius: 999px;
  font-family: var(--display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  color: var(--ink-muted); transition: color .4s var(--ease);
}
.pill:hover { color: var(--ink); }
.pill[aria-pressed="true"] { color: var(--wall); }
.pill sup { font-size: 10px; letter-spacing: 0; opacity: .7; }
@media (max-width: 420px) { .pill { padding: 7px 11px; font-size: 13px; } }

.work-body { transition: opacity .3s var(--ease), transform .45s var(--ease); }
.work-body.is-swapping { opacity: 0; transform: translateY(14px); }

/* ---------- Project slide ---------- */
.slide--project {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); grid-template-rows: minmax(0, 1fr); column-gap: 3%;
  padding: 5.5%;
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
.slide--project:hover { box-shadow: var(--shadow-lift); }
.slide--flip { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }
.slide--flip .sp__text { order: 2; text-align: right; align-items: flex-end; }

.sp__text { display: flex; flex-direction: column; justify-content: space-between; gap: 2cqi; min-width: 0; }
.sp__kicker { font-family: var(--display); font-size: max(9px, 2.2cqi); letter-spacing: .2em; text-transform: uppercase; color: var(--cream-muted); }
.sp__title {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: 8.6cqi; line-height: .95; letter-spacing: .01em; margin-top: 1.4cqi;
  overflow-wrap: anywhere;
}
.sp__desc { font-size: max(10px, 2.35cqi); line-height: 1.45; color: var(--cream-muted); }
.sp__foot { display: flex; align-items: center; gap: 2cqi; font-family: var(--display); font-size: max(9px, 2cqi); letter-spacing: .16em; text-transform: uppercase; }
.slide--flip .sp__foot { flex-direction: row-reverse; }
.sp__num { color: var(--accent); }
.sp__open { display: inline-flex; align-items: center; gap: 6px; transition: gap .4s var(--ease), color .3s; }
.slide--project:hover .sp__open { gap: 12px; color: var(--accent); }
@container (max-width: 360px) { .sp__desc { display: none; } }

/* ---------- 3D mockups inside slides ---------- */
.sp__mock { position: relative; perspective: 900px; min-width: 0; }
.mk { position: absolute; inset: 0; transform-style: preserve-3d; }
.mk__screen, .mk__phone, .mk__print {
  position: absolute; overflow: hidden;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .2), 0 18px 30px -10px rgba(0, 0, 0, .55);
  transition: transform 1s var(--ease);
}
.mk svg, .mk img { width: 100%; height: 100%; object-fit: cover; }

.mk__screen {
  left: 2%; top: 14%; width: 88%; aspect-ratio: 4 / 3; border-radius: 1cqi;
  transform: rotateY(-20deg) rotateX(8deg) rotateZ(1deg);
}
.mk__phone {
  right: 2%; bottom: 6%; width: 25%; aspect-ratio: 9 / 19; border-radius: 3cqi;
  background: #0a0a0b; padding: .7cqi;
  transform: rotateY(-20deg) rotateX(8deg) translateZ(120px);
}
.mk__phone > div { width: 100%; height: 100%; border-radius: 2.4cqi; overflow: hidden; }
/* non-website work (apps): no phone, the screen takes the space */
.mk--solo .mk__screen { left: 4%; top: 12%; width: 92%; }
.slide--flip .mk--solo .mk__screen { right: 4%; }

/* Live website inside a phone (js/live-preview.js) */
.live { position: relative; overflow: hidden; background: #111214; }
.live::before { /* quiet loading pulse until the site paints */
  content: ""; position: absolute; left: 50%; top: 50%; width: 18%; aspect-ratio: 1; margin: -9% 0 0 -9%;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, .18); border-top-color: rgba(255, 255, 255, .7);
  animation: live-spin 1s linear infinite; transition: opacity .3s;
}
.live.is-loaded::before { opacity: 0; animation: none; }
@keyframes live-spin { to { transform: rotate(360deg); } }
.live__frame {
  position: absolute; left: 0; top: 0; border: 0; background: #fff;
  transform-origin: 0 0; opacity: 0; transition: opacity .5s;
}
.live.is-loaded .live__frame { opacity: 1; }
.live:not(.live--interactive) .live__frame { pointer-events: none; }
/* phones: a still screenshot instead of a running site (see live-preview.js) */
.live__poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0;
  opacity: 0; transition: opacity .5s;
}
.live.is-loaded .live__poster { opacity: 1; }
.slide--project:hover .mk__screen { transform: rotateY(-8deg) rotateX(4deg) translateZ(20px); }
.slide--project:hover .mk__phone { transform: rotateY(-6deg) rotateX(2deg) translateZ(170px) translateY(-6%); }
.slide--flip .mk__screen { left: auto; right: 2%; transform: rotateY(20deg) rotateX(8deg) rotateZ(-1deg); }
.slide--flip .mk__phone { right: auto; left: 2%; transform: rotateY(20deg) rotateX(8deg) translateZ(120px); }
.slide--flip:hover .mk__screen { transform: rotateY(8deg) rotateX(4deg) translateZ(20px); }
.slide--flip:hover .mk__phone { transform: rotateY(6deg) rotateX(2deg) translateZ(170px) translateY(-6%); }

.mk__print { top: 10%; left: 30%; width: 44%; aspect-ratio: 3 / 4; border-radius: 2px; }
.mk__print--0 { transform: translateX(14%) rotate(7deg) translateZ(40px); }
.mk__print--1 { transform: translateX(-12%) rotate(-3deg) translateZ(20px); }
.mk__print--2 { transform: translateX(-38%) rotate(-13deg); }
.slide--project:hover .mk__print--0 { transform: translateX(42%) translateY(-4%) rotate(12deg) translateZ(80px); }
.slide--project:hover .mk__print--1 { transform: translateX(-6%) translateY(-8%) rotate(-1deg) translateZ(50px); }
.slide--project:hover .mk__print--2 { transform: translateX(-56%) translateY(-2%) rotate(-17deg) translateZ(20px); }

/* ---------- Design showcases on project cards (js/design-showcase.js) ---------- */
.ds { position: absolute; inset: 0; container-type: size; pointer-events: none; }
.ds img { display: block; width: 100%; height: 100%; }

/* gallery: one tilted frame, crossfading cover + images */
.ds__tilt {
  position: absolute; left: 50%; top: 50%;
  width: min(94cqw, 82cqh * 4 / 3); aspect-ratio: 4 / 3;
  translate: -50% -50%; perspective: 120cqw;
}
.ds__frame {
  position: absolute; inset: 0; overflow: hidden; border-radius: 1.6cqw;
  background: #0d1b30;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 2px 4px rgba(0, 0, 0, .25), 0 30px 50px -18px rgba(0, 0, 0, .7);
  transform: rotateY(-14deg) rotateX(6deg); transition: transform 1s var(--ease);
}
.slide--flip .ds__frame { transform: rotateY(14deg) rotateX(6deg); }
.slide--project:hover .ds__frame { transform: rotateY(0) rotateX(0) translateZ(30px); }
.ds__frame::after { /* soft glass sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 38%);
}
.ds__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.ds__slide.is-on { opacity: 1; }
.ds__bg { position: absolute; inset: 0; object-fit: cover; filter: blur(14px) saturate(1.1) brightness(.7); transform: scale(1.15); }
.ds__img { position: relative; object-fit: contain; transform: scale(1.04); transition: transform calc(var(--step, 2600ms) + 900ms) linear; }
.ds__slide.is-on .ds__img { transform: scale(1); }
.ds__bar {
  position: absolute; left: 4%; right: 4%; bottom: 4%; display: flex; gap: 1.2cqw; z-index: 2;
}
.ds__bar i { flex: 1; height: max(2px, .8cqw); border-radius: 9px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.ds__bar i::before { content: ""; display: block; height: 100%; width: 100%; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }
.ds__bar i.is-done::before { transform: scaleX(1); }
.ds__bar i.is-on::before { animation: ds-fill var(--step, 2600ms) linear forwards; }
@keyframes ds-fill { to { transform: scaleX(1); } }

/* banners: roll-up stands in a staggered row; one steps forward at a time */
.ds__row { position: absolute; inset: 0; perspective: 140cqw; perspective-origin: 50% 30%; }
.ds__ban {
  --h: min(74cqh, 96cqw / (var(--n) * .404 * .86 + .2)); --w: calc(var(--h) * .404);
  position: absolute; bottom: 10cqh; height: var(--h); width: var(--w);
  left: calc(50% + (var(--i) - (var(--n) - 1) / 2) * var(--w) * .86 - var(--w) / 2);
  transform: rotateY(calc((var(--i) - (var(--n) - 1) / 2) * -8deg)) scale(.9);
  transform-origin: 50% 100%;
  transition: transform .8s var(--ease), filter .8s;
  filter: brightness(.62) saturate(.8);
}
.ds__ban.is-on {
  transform: translateY(-3cqh) scale(1.08);
  filter: none; z-index: 5;
}
.ds--still .ds__ban { filter: none; }
.ds__banimg { object-fit: cover; border-radius: .4cqw .4cqw 0 0; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .7); }
.ds__pole { position: absolute; left: 4%; right: 4%; top: -1.2cqh; height: 1.4cqh; border-radius: 9px; background: linear-gradient(#e9edf2, #9aa3ad); }
.ds__base {
  position: absolute; left: -6%; right: -6%; bottom: -3.2cqh; height: 3.6cqh; border-radius: .6cqw;
  background: linear-gradient(#cfd5dc, #7d8691 60%, #59616b);
}
.ds__banshadow {
  position: absolute; left: -20%; right: -20%; bottom: -5.5cqh; height: 4cqh;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); z-index: -1;
}
.slide--project:hover .ds__ban:not(.is-on) { filter: brightness(.95); }

/* card: a business card that flips between front and back, over a small pile */
.ds__desk { position: absolute; inset: 0; perspective: 130cqw; }
.ds__pile, .ds__card {
  position: absolute; left: 50%; top: 47%;
  width: min(80cqw, 62cqh * 1.637); aspect-ratio: 1064 / 650;
  translate: -50% -50%;
}
.ds__pile {
  transform: rotateX(48deg) rotateZ(-16deg) translate3d(-10%, 26%, -40px);
  border-radius: 1.2cqw; overflow: hidden; filter: brightness(.7);
  box-shadow: 0 1px 0 #d8d8d8, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #aaa, 0 20px 30px -8px rgba(0, 0, 0, .6);
}
.ds__card {
  transform-style: preserve-3d; transform: rotateX(12deg) rotateY(-16deg);
  transition: transform 1.1s cubic-bezier(.6, 0, .25, 1);
}
.slide--flip .ds__card { transform: rotateX(12deg) rotateY(16deg); }
.ds__card.is-flipped { transform: rotateX(12deg) rotateY(164deg); }
.slide--flip .ds__card.is-flipped { transform: rotateX(12deg) rotateY(196deg); }
.slide--project:hover .ds__card { transform: rotateX(4deg) rotateY(-6deg) translateZ(24px); }
.slide--project:hover .ds__card.is-flipped { transform: rotateX(4deg) rotateY(174deg) translateZ(24px); }
.ds__face {
  position: absolute; inset: 0; border-radius: 1.2cqw; overflow: hidden; backface-visibility: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 45px -18px rgba(0, 0, 0, .75);
}
.ds__face--back { transform: rotateY(180deg); }
.ds__cardimg { object-fit: cover; }
.ds__cardshadow {
  position: absolute; left: 50%; top: 86%; width: 70cqw; height: 8cqh; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0));
}

/* product: transparent cut-outs floating on the card; slides in from the right, out to the left */
.ds__stage { position: absolute; inset: 0; perspective: 140cqw; }
.ds__prod {
  position: absolute; left: 50%; top: 46%; width: min(86cqw, 74cqh * 1.25); height: 74cqh;
  translate: -50% -50%; opacity: 0;
  transform: translateX(18cqw) rotateY(-24deg) scale(.86);
  transition: transform 1s var(--ease), opacity .7s ease;
}
.ds__prod.is-past { transform: translateX(-18cqw) rotateY(24deg) scale(.86); }
.ds__prod.is-on { opacity: 1; transform: none; }
.slide--project:hover .ds__prod.is-on { transform: scale(1.06) translateY(-1.5cqh); }
.ds__float { width: 100%; height: 100%; animation: ds-bob 5s ease-in-out infinite; }
.ds__prodimg { object-fit: contain; filter: drop-shadow(0 2.4cqh 2.2cqh rgba(0, 0, 0, .45)); }
@keyframes ds-bob { 50% { transform: translateY(-2.2cqh) rotate(-.6deg); } }
.ds__prodshadow {
  position: absolute; left: 50%; bottom: 7cqh; width: 52cqw; height: 6cqh; translate: -50% 0; z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
  animation: ds-shadow 5s ease-in-out infinite;
}
@keyframes ds-shadow { 50% { transform: scaleX(.86); opacity: .7; } }
.ds__dots { position: absolute; left: 50%; bottom: 3cqh; translate: -50% 0; display: flex; gap: 1.4cqw; }
.ds__dots i { width: max(5px, 1.4cqw); height: max(5px, 1.4cqw); flex: none; border-radius: 9px; background: rgba(255, 255, 255, .3); transition: background .4s, width .4s; }
.ds__dots i.is-on { background: #fff; width: max(14px, 4cqw); }

.ds--still * { transition: none !important; animation: none !important; }

/* CTA filler slide */
.slide--cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  transition: box-shadow .7s var(--ease);
}
.slide--cta:hover { box-shadow: var(--shadow-lift); }
.slide--cta .slide__title { font-size: 9cqi; }
.slide--cta > * + * { margin-top: 3cqi; }
.slide--cta p { font-family: var(--display); font-size: max(10px, 2.2cqi); letter-spacing: .2em; text-transform: uppercase; color: var(--cream-muted); }
.slide--cta .arrow {
  width: 12cqi; height: 12cqi; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 4cqi;
  transition: transform .6s var(--ease);
}
.slide--cta:hover .arrow { transform: rotate(-45deg) scale(1.08); }

/* ==========================================================================
   Scroll effects (js/scroll-fx.js sets --exit / --sp; .sfx is only added
   when motion is allowed)
   ========================================================================== */
/* The per-frame movement (2D translate / opacity only) is written inline by
   scroll-fx.js; nothing here re-rasterises big layers while scrolling. */
/* services: lists and chips cascade in */
.sfx .slide--caps .cap__list li, .sfx .slide--caps .chip { opacity: 0; translate: 0 16px; }
.sfx .slide--caps.is-in .cap__list li, .sfx .slide--caps.is-in .chip {
  opacity: 1; translate: 0 0;
  transition: opacity .6s var(--ease) calc(var(--ci, 0) * 55ms + 350ms), translate .8s var(--ease) calc(var(--ci, 0) * 55ms + 350ms),
    padding .55s var(--ease), color .3s, background-color .3s, border-color .3s, transform .5s var(--ease);
}

/* marquee band between Work and Services (the clip box keeps the tilted band
   from widening the page) */
.band-clip {
  overflow: hidden; width: 100vw; margin-left: calc(50% - 50vw);
  margin-top: clamp(40px, 7vw, 100px); padding-block: clamp(30px, 4vw, 60px);
}
.band {
  position: relative; overflow: hidden;
  width: 108vw; margin-left: -4vw;
  padding: clamp(10px, 1.4vw, 20px) 0; rotate: -2.5deg;
  border-block: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  background: linear-gradient(90deg, rgba(95, 193, 228, .1), rgba(95, 193, 228, .02) 60%, rgba(95, 193, 228, .1));
}
.band__row { white-space: nowrap; line-height: 1.05; }
.band__track {
  display: inline-flex; align-items: center; gap: clamp(18px, 3vw, 48px); padding-right: clamp(18px, 3vw, 48px);
  font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(28px, 5vw, 80px); color: var(--ink);
}
.band__track i { font-style: normal; font-size: .4em; color: var(--accent); }
.band__row--outline .band__track { color: transparent; -webkit-text-stroke: 1px var(--ink-muted); }
.band__row--outline .band__track i { -webkit-text-stroke: 0; }

/* Deck entrance */
.js .deck--work > .slide { opacity: 0; translate: 0 50px; transition: opacity 1s var(--ease) var(--d, 0ms), translate 1.2s var(--ease) var(--d, 0ms), transform .7s var(--ease), box-shadow .7s var(--ease); }
.deck--work > .slide.is-in { opacity: 1; translate: 0 0; }

/* ==========================================================================
   3D ring view
   ========================================================================== */
.ring {
  --iw: clamp(250px, 34vw, 500px);
  position: relative; user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.ring__viewport {
  position: relative; height: calc(var(--iw) * .625 + 180px);
  perspective: 1800px; perspective-origin: 50% 35%;
  cursor: grab;
}
.ring.is-dragging .ring__viewport { cursor: grabbing; }
.ring__viewport::after {
  content: ""; position: absolute; left: 15%; right: 15%; bottom: 6%; height: 50px; z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .3), transparent);
  filter: blur(8px);
}
.ring__stage { position: absolute; inset: 0; transform-style: preserve-3d; }
.ring__item {
  position: absolute; left: 50%; top: 50%;
  width: var(--iw); margin: calc(var(--iw) * -.3125) 0 0 calc(var(--iw) / -2);
  transform-style: preserve-3d;
}
.ring__item .slide { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.ring__item .slide::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: #0a1a30; opacity: calc((1 - var(--k, 1)) * .75);
}
.ring__item.is-front .slide { box-shadow: var(--shadow-lift); }
.ring__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--ink-line);
}
.ring__info { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.ring__num { font-family: var(--display); font-size: 14px; letter-spacing: .2em; color: var(--ink-muted); }
.ring__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(26px, 3.4vw, 48px); line-height: 1; }
.ring__meta { font-family: var(--display); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); }
.ring__ctrl { display: flex; align-items: center; gap: 10px; }
.ring__hint { font-family: var(--display); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-muted); margin-right: 8px; }
@media (max-width: 640px) { .ring__meta, .ring__hint { display: none; } }

/* ==========================================================================
   Index list
   ========================================================================== */
.list { border-top: 1px solid var(--ink-line); }
.row {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 44px minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) 56px 28px;
  align-items: center; gap: 16px; padding: clamp(16px, 2vw, 26px) 14px;
  border-bottom: 1px solid var(--ink-line);
  transition: color .45s var(--ease);
}
.row::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(130% 160% at 78% 0%, var(--slide-1), var(--slide-2) 45%, var(--slide-3));
  transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease);
}
.row:hover, .row:focus-visible { color: var(--cream); }
.row:hover::before, .row:focus-visible::before { transform: scaleY(1); transform-origin: top; }
.row__num, .row__muted { font-family: var(--display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); transition: color .45s; }
.row:hover .row__num, .row:hover .row__muted { color: var(--cream-muted); }
.row__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(26px, 3.6vw, 52px); line-height: 1; transition: transform .6s var(--ease); }
.row:hover .row__title { transform: translateX(12px); }
.row__arrow { justify-self: end; transition: transform .6s var(--ease); }
.row:hover .row__arrow { transform: rotate(-45deg); color: var(--accent); }
@media (max-width: 760px) {
  .row { grid-template-columns: 30px minmax(0, 1fr) auto; padding-inline: 4px; }
  .row__type, .row__cat, .row__arrow { display: none; }
}
.preview {
  position: fixed; left: 0; top: 0; z-index: 55; pointer-events: none;
  width: clamp(240px, 22vw, 380px); aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden;
  opacity: 0; scale: .6; transition: opacity .35s var(--ease), scale .6s var(--ease);
  box-shadow: var(--shadow-lift);
}
.preview.is-on { opacity: 1; scale: 1; }
.preview__inner, .preview__inner svg, .preview__inner img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Services + Contact slides
   ========================================================================== */
.slide--wide { aspect-ratio: auto; padding: clamp(28px, 5%, 72px); }
.caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 6cqi, 96px); }
@media (max-width: 700px) { .caps { grid-template-columns: minmax(0, 1fr); } }
.cap__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--cream); }
.cap__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(26px, 3.2cqi, 44px); line-height: 1; }
.cap__num { font-family: var(--display); color: var(--accent); letter-spacing: .2em; }
.cap__list li {
  padding: 14px 0; border-bottom: 1px solid var(--cream-line);
  font-size: clamp(16px, 1.5cqi, 20px); color: var(--cream-muted);
  transition: padding .55s var(--ease), color .3s;
}
.cap__list li:hover { padding-left: 16px; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(28px, 4cqi, 56px); }
.chip {
  padding: 7px 14px; border: 1px solid var(--cream-line); border-radius: 999px;
  font-family: var(--display); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  transition: background-color .3s, color .3s, border-color .3s, transform .5s var(--ease);
}
.chip:hover { background: var(--cream); color: var(--slide-3); border-color: var(--cream); transform: translateY(-3px); }

.slide--contact {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(24px, 4cqi, 48px);
  text-align: center; min-height: clamp(360px, 42cqi, 620px);
}
.contact__title {
  font-family: var(--display); font-weight: 300; text-transform: uppercase;
  font-size: clamp(52px, 11cqi, 190px); line-height: .88; max-width: 10ch;
}
.contact__btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 20px 34px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-size: clamp(15px, 1.5cqi, 19px); letter-spacing: .16em; text-transform: uppercase;
  transition: transform .6s var(--ease), box-shadow .5s var(--ease);
}
.contact__btn:hover { box-shadow: 0 20px 50px -18px var(--accent); }
.contact__btn svg { transition: transform .5s var(--ease); }
.contact__btn:hover svg { transform: rotate(45deg); }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: calc(clamp(24px, 4cqi, 48px) * -.4); }
.contact__link {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--cream-line); color: var(--cream);
  font-family: var(--display); font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  transition: background-color .3s, color .3s, border-color .3s, transform .5s var(--ease);
}
.contact__link span { text-transform: none; letter-spacing: .06em; }
.contact__link:hover { background: var(--cream); color: var(--slide-3); border-color: var(--cream); transform: translateY(-3px); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  max-width: 1640px; margin: clamp(64px, 8vw, 120px) auto 0;
  padding: 26px var(--gutter); border-top: 1px solid var(--ink-line);
  font-family: var(--display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted);
}
.footer__links { display: flex; gap: 20px; }
.footer a:hover, .to-top:hover { color: var(--ink); }

/* ==========================================================================
   Project detail
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column;
  color: var(--cream);
  background: radial-gradient(120% 90% at 80% 0%, var(--slide-1), var(--slide-2) 40%, var(--slide-3));
  clip-path: inset(100% 0 0 0);
  transition: clip-path .9s var(--ease-io);
}
.modal.is-open { clip-path: inset(0 0 0 0); }
.modal__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px var(--gutter); border-bottom: 1px solid var(--cream-line);
}
.modal__crumb { font-family: var(--display); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--cream-muted); }
.modal__actions { display: flex; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 25%, transparent);
  transition: background-color .3s, color .3s, border-color .3s, transform .5s var(--ease);
}
.icon-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.icon-btn--close:hover { transform: rotate(90deg); }
.modal__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

.pd { max-width: 1440px; margin-inline: auto; padding: clamp(36px, 6vw, 90px) var(--gutter) 0; transition: opacity .35s var(--ease), transform .5s var(--ease); }
.pd.is-swapping { opacity: 0; transform: translateY(24px); }
.rise { animation: rise 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms + 260ms); }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }

.pd__kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--cream-muted); }
.pd__title { font-family: var(--display); font-weight: 300; text-transform: uppercase; font-size: clamp(60px, 11vw, 190px); line-height: .86; margin-top: 16px; }
.pd__summary { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.4; max-width: 40ch; color: var(--cream-muted); margin-top: 22px; }
.pd__hero { margin-top: clamp(36px, 5vw, 70px); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow-lift); }
.pd__hero svg, .pd__hero img, .pd__fig svg, .pd__fig img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .pd__hero { aspect-ratio: 4 / 3; } }
.pd__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--cream-line); }
.pd__meta dt { font-family: var(--display); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--cream-muted); margin-bottom: 6px; }
.pd__meta dd { font-size: 16px; }
@media (max-width: 760px) { .pd__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Interactive mobile preview on website project pages */
.pd__mobile {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(28px, 5vw, 80px);
  padding-block: clamp(44px, 6vw, 90px); border-bottom: 1px solid var(--cream-line);
}
.pd__mobile-lead { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.45; max-width: 30ch; margin-top: 16px; }
.pd__mobile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pd__mobile-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--cream-line); font-family: var(--display); font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .3s, color .3s, border-color .3s;
}
.pd__mobile-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.phone {
  position: relative; width: min(360px, 78vw); aspect-ratio: 9 / 19.5;
  display: flex; flex-direction: column;
  padding: 12px; border-radius: 52px; background: #0b0c0e;
  box-shadow: inset 0 0 0 2px #2a2d33, 0 0 0 1px rgba(255, 255, 255, .06), var(--shadow-lift);
}
/* status bar: the site starts below it, as in a mobile browser */
.phone__status {
  position: relative; flex: none; height: 40px; border-radius: 40px 40px 0 0; background: #000;
  display: flex; align-items: center; justify-content: space-between; padding: 4px 26px 0;
  font: 600 13px/1 "Inter Tight", system-ui, sans-serif; color: #fff; letter-spacing: 0;
}
.phone__status svg { display: block; }
.phone__island {
  position: absolute; left: 50%; top: 9px; width: 30%; height: 24px; transform: translateX(-50%);
  border-radius: 999px; background: #1a1b1e; box-shadow: inset 0 0 0 1px #000;
}
.phone .live { flex: 1; min-height: 0; border-radius: 0 0 40px 40px; }
@media (max-width: 760px) {
  .pd__mobile { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .pd__mobile-lead { margin-inline: auto; }
  .pd__mobile-actions { justify-content: center; }
}
.pd__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; padding-block: clamp(44px, 6vw, 90px); }
@media (max-width: 760px) { .pd__body { grid-template-columns: minmax(0, 1fr); } }
.pd__label { font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.pd__text p { font-size: clamp(17px, 1.5vw, 22px); line-height: 1.55; max-width: 58ch; }
.pd__text p + p { margin-top: 1em; }
.pd__deliv { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.pd__live {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 34px;
  padding: 14px 24px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); letter-spacing: .16em; text-transform: uppercase;
}
.pd__gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); }
.pd__fig { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.pd__fig--wide { grid-column: span 2; aspect-ratio: 16 / 9; }
@media (max-width: 640px) { .pd__gallery { grid-template-columns: minmax(0, 1fr); } .pd__fig--wide { grid-column: auto; aspect-ratio: 4 / 3; } }
.pd__next {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  margin-top: clamp(60px, 9vw, 130px); padding-block: clamp(60px, 10vw, 150px);
  border-top: 1px solid var(--cream-line);
}
.pd__next-label { font-family: var(--display); font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--cream-muted); }
.pd__next-title { font-family: var(--display); font-weight: 300; text-transform: uppercase; font-size: clamp(48px, 9vw, 150px); line-height: .9; transition: transform .7s var(--ease), color .4s; }
.pd__next:hover .pd__next-title { transform: scale(1.04); color: var(--accent); }

/* ==========================================================================
   Desk calendar showcase (js/desk-calendar.js)
   A tent calendar: pages hang from a spiral binding, leaning back by --lean,
   and flip up and over the top to the back of the stand.
   ========================================================================== */
.dc { margin-top: clamp(36px, 5vw, 70px); }
.dc__stage {
  container-type: inline-size;
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow-lift);
  background:
    radial-gradient(70% 60% at 50% 45%, #fbfbfc 0%, #eceef1 55%, #d6dadf 100%);
  perspective: 150cqi; perspective-origin: 50% 40%;
  cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.dc__stage::after { /* soft desk horizon */
  content: ""; position: absolute; inset: 62% 0 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .05));
}
.dc__rig {
  /* top leaves room for a page standing upright mid-flip */
  --w: 40cqi; --h: calc(var(--w) / 1.446); --lean: 16deg;
  position: absolute; left: 50%; top: 27.5cqi; width: var(--w); height: var(--h); margin-left: calc(var(--w) / -2);
  transform-style: preserve-3d; transform-origin: 50% 55%;
  transform: rotateX(calc(-9deg + var(--ty, 0deg))) rotateY(calc(-24deg + var(--tx, 0deg)));
  transition: transform .9s var(--ease);
  z-index: 1;
}
.dc__rig > * { position: absolute; }

/* every flat piece hangs from the hinge line (top edge of the rig) */
.dc__page, .dc__board { inset: 0; transform-origin: 50% 0; transform-style: preserve-3d; }
.dc__page {
  /* pages sit a few px apart; planes closer than that confuse Chrome's 3D depth sorting */
  transform: rotateX(var(--lean)) translateZ(calc(var(--z) * .6px + 3px));
  transition: transform 1.15s cubic-bezier(.55, .02, .22, 1);
}
.dc__page.is-flipped { transform: rotateX(calc(360deg - var(--lean))) translateZ(calc((var(--z) - 30) * .6px - 3px)); }
.dc__face, .dc__back {
  position: absolute; inset: 0; overflow: hidden; border-radius: 2px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.dc__face { background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12); }
.dc__face img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.dc__face::after { /* paper sheen + a touch of shade from the binding */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .16), rgba(0, 0, 0, 0) 7%),
    linear-gradient(115deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 40%);
}
.dc__back {
  transform: rotateX(180deg);
  background: linear-gradient(to bottom, #e9e9e6, #f7f7f4 30%, #ecebe7);
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1);
}

/* grey chipboard stand: front and back panels plus the base strip */
.dc__board { inset: -.6cqi -.8cqi -1.2cqi; background: linear-gradient(#cfd2d6, #b9bdc2); border-radius: 2px; }
.dc__board--front { transform: rotateX(var(--lean)) translateZ(-3px); }
.dc__board--back { transform: rotateX(calc(-1 * var(--lean))); background: linear-gradient(#c3c7cc, #a9aeb4); }
.dc__floor {
  left: -.8cqi; right: -.8cqi;
  top: calc((var(--h) + 1.2cqi) * cos(var(--lean)));
  height: calc((var(--h) + 1.2cqi) * sin(var(--lean)) * 2);
  transform-origin: 50% 0;
  transform: translateZ(calc((var(--h) + 1.2cqi) * sin(var(--lean)))) rotateX(-90deg);
  background: #b4b8bd;
}
.dc__shadow {
  left: -18%; right: -18%;
  top: calc((var(--h) + 1.2cqi) * cos(var(--lean)));
  height: calc(var(--h) * 1.1);
  transform-origin: 50% 0;
  transform: translateZ(calc(var(--h) * .55)) rotateX(-90deg) translateZ(-1px);
  background: radial-gradient(closest-side, rgba(20, 30, 50, .42), rgba(20, 30, 50, .16) 55%, rgba(20, 30, 50, 0));
  filter: blur(4px);
}

/* spiral binding */
.dc__rings {
  left: 3.5%; right: 3.5%; top: -1.5cqi; height: 3cqi;
  display: flex; justify-content: space-between; align-items: stretch;
  transform-origin: 50% 50%;
  transform: rotateX(calc(var(--lean) * .5)) translateZ(14px);
  pointer-events: none;
}
.dc__rings i {
  position: relative; width: .62cqi; border-radius: .5cqi;
  background: linear-gradient(90deg, #5c6168, #f3f5f7 42%, #c9ced3 60%, #6b7078);
  box-shadow: 0 .15cqi .25cqi rgba(0, 0, 0, .35);
}
.dc__rings i::before { /* punched hole under each loop */
  content: ""; position: absolute; left: 50%; bottom: -.2cqi; width: 1.05cqi; height: .75cqi;
  transform: translateX(-50%); border-radius: 50%; background: #1d2433; z-index: -1;
}

/* controls */
.dc__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin-top: 18px;
}
.dc__now { display: flex; align-items: baseline; gap: 14px; min-width: 11em; }
.dc__num { font-family: var(--display); font-size: 13px; letter-spacing: .2em; color: var(--cream-muted); font-variant-numeric: tabular-nums; }
.dc__label { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(22px, 2.4vw, 32px); line-height: 1; }
.dc__dots { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; justify-content: center; }
.dc__dot {
  font-family: var(--display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; color: var(--cream-muted);
  border: 1px solid var(--cream-line); transition: background-color .3s, color .3s, border-color .3s;
}
.dc__dot:hover { color: var(--cream); border-color: currentColor; }
.dc__dot[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dc__ctrl { display: flex; gap: 8px; }
.dc__ctrl .icon-btn:disabled { opacity: .35; pointer-events: none; }
.dc__i-play, .dc.is-paused .dc__i-pause { display: none; }
.dc.is-paused .dc__i-play { display: block; }
.dc--still .dc__page, .dc--still .dc__rig { transition: none; }

/* Card version: fills the card's mockup area; no backdrop, no controls */
.dc--mini { position: absolute; inset: 0; margin: 0; pointer-events: none; }
.dc--mini .dc__stage {
  container-type: size; width: 100%; height: 100%; aspect-ratio: auto;
  background: none; box-shadow: none; border-radius: 0; overflow: visible; cursor: inherit;
  perspective: 160cqw; perspective-origin: 50% 35%;
}
.dc--mini .dc__stage::after { display: none; }
.dc--mini .dc__rig {
  --w: min(98cqw, 84cqh);
  top: calc(54cqh - var(--h) * .5);
  transform: rotateX(-9deg) rotateY(-22deg);
}
.slide--flip .dc--mini .dc__rig { transform: rotateX(-9deg) rotateY(22deg); }
.slide--project:hover .dc--mini .dc__rig { transform: rotateX(-6deg) rotateY(-10deg) translateZ(30px); }
.slide--flip:hover .dc--mini .dc__rig { transform: rotateX(-6deg) rotateY(10deg) translateZ(30px); }
.dc--mini .dc__rings { left: 4%; right: 4%; top: -.9cqw; height: 2cqw; }
.dc--mini .dc__rings i { width: .5cqw; }
.dc--mini .dc__rings i::before { width: .85cqw; height: .6cqw; }
.dc--mini .dc__shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, .5), rgba(0, 0, 0, .2) 55%, rgba(0, 0, 0, 0)); }

@media (max-width: 640px) {
  .dc__stage { aspect-ratio: 1 / 1; }
  .dc__rig { --w: 60cqi; top: 43cqi; }
  .dc__dots { order: 3; flex-basis: 100%; justify-content: flex-start; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0ms !important;
  }
}
