@font-face {
  font-family: "PP Editorial Old";
  src: url("../fonts/ppeditorialold-regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Editorial Old";
  src: url("../fonts/ppeditorialold-italic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --serif: "PP Editorial Old", "Times New Roman", Georgia, serif;
  /* Brand palette */
  --navy: #142150;
  --mint: #39dfbd;
  --mint-hover: #2bc8a7;

  --bg: #e8e7e7;
  --ink: var(--navy);
  --ink-soft: #4b5475;
  --surface: #ffffff;
  --panel: #fafafa;
  --muted: #6b7190;
  --rule: rgba(20, 33, 80, .14);
  --danger: #b3334c;
  --reel-bg: #0a1236;
  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 2.5vw, 40px);
}

html, body { background: var(--bg); }
body {
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: var(--gutter); pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand { display: block; font-size: clamp(18px, 1.5vw, 24px); line-height: 1; transition: color .3s ease; }
/* Wordmark (includes/logo.php): lowercase, so set ~1.2x the old text size to keep its presence */
.brand .logo { display: block; height: 1.6em; margin-top: .35em; width: auto; overflow: visible; fill: currentColor; }
.brand .logo-accent { transition: fill .3s ease; }
.site-header.on-dark .brand { color: #fff; }
.site-header.on-dark .brand .logo-accent { fill: var(--mint); }   /* the italic f turns mint only on dark grounds */

/* Arrow slides into the Contact button once you scroll (or on hover) */
.btn-arrow {
  display: grid; place-items: center; width: 0; height: 20px; margin-left: 0;
  border-radius: 50%; background: #fff; color: var(--ink); font-size: 12px;
  overflow: hidden; opacity: 0;
  transition: width .4s cubic-bezier(.16, 1, .3, 1), margin .4s cubic-bezier(.16, 1, .3, 1), opacity .3s ease;
}
.site-header.is-scrolled .btn-arrow,
.btn-contact:hover .btn-arrow { width: 20px; margin-left: 10px; opacity: 1; }

.btn-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--mint); color: var(--ink); font-size: 16px;
  transition: background-color .2s ease, transform .2s ease;
}
.btn-pill:hover { background: var(--mint-hover); color: var(--ink); }
.btn-pill:active { transform: scale(.97); }

/* ---------- Hero ---------- */
.hero {
  --fs: min(10.5vw, 14.5svh);        /* headline size drives the whole layout */
  --hero-min: 620px;
  /* Stays in place while the next section slides up over it
     (on screens shorter than --hero-min it sticks with its bottom edge visible) */
  position: sticky; top: min(0px, calc(100svh - var(--hero-min)));
  height: 100svh; min-height: var(--hero-min); overflow: hidden;
}
.hero-copy {
  position: absolute; z-index: 3; top: max(10svh, 80px);
  left: 50%; translate: -50% 0; width: max-content;   /* headline block centred */
  pointer-events: none;
}
/* PP Editorial Old Regular, with *italic* letters mixed in */
.hero-title {
  margin: 0; font-family: var(--serif); font-size: var(--fs); font-weight: 400;
  line-height: .89; letter-spacing: -0.05em;
}
.hero-title em { font-style: italic; }
.hero-title .line { display: block; white-space: nowrap; }
.hero-title .line-2 { padding-left: calc(var(--fs) * 1); }
.hero-title .line-3 { padding-left: calc(var(--fs) * .36); }
/* Tagline sits under the headline, right-aligned to the end of "Designer." */
.hero-tagline {
  position: absolute; right: 0; top: calc(100% + var(--fs) * .35);
  margin: 0; max-width: 13em; text-align: right; text-wrap: balance;   /* 2 even lines, clear of the face */
  font-size: clamp(16px, 1.4vw, 24px); letter-spacing: -0.02em;
}

/* Character image, centred — tweak --figure-height to fit your photo */
.hero-figure {
  --figure-height: 62%;
  position: absolute; z-index: 2; bottom: 0; left: 50%; translate: -50% 0;
  height: var(--figure-height);
}
.hero-figure img {
  display: block; height: 100%; width: auto; max-width: 90vw;
  object-fit: contain; object-position: bottom center;
  filter: grayscale(1);               /* remove to keep the photo in colour */
}
.hero-placeholder {
  height: 100%; aspect-ratio: .82;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 24px 30%; text-align: center; font-size: 14px; color: var(--ink-soft);
  border: 2px dashed rgba(20, 33, 80, .25); border-bottom: 0;
  border-radius: 50% 50% 0 0 / 35% 35% 0 0;
}
.hero-placeholder code { color: var(--ink); font-size: 13px; }

.hero-bottom {
  position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter); bottom: 40px;
  display: flex; justify-content: space-between; align-items: center;
}
.scroll-down { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.scroll-down i { font-size: 20px; color: var(--ink-soft); transition: transform .3s ease; }
.scroll-down:hover i { transform: translateY(3px); }

.socials { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }
.socials a { display: block; font-size: 20px; line-height: 1; transition: opacity .2s ease; }
.socials a:hover { opacity: .55; }

/* ---------- Intro: statement + play reel ---------- */
.intro {
  --statement: clamp(28px, 2.5vw, 54px);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative; z-index: 1;    /* covers the sticky hero */
  min-height: 100svh; padding: clamp(80px, 10vh, 110px) var(--gutter) 160px;
  background: var(--navy); color: #fff;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .12);
}
.intro-label { margin: 0 0 42px; font-size: 16px; letter-spacing: -0.02em; }
.intro-label mark { padding: 1px 2px; background: var(--mint); color: var(--ink); }

.intro-statement {
  margin: 0 0 80px; font-size: var(--statement); font-weight: 400;
  line-height: 1; letter-spacing: -0.05em; color: var(--ink);
}
/* One mint box per line; earlier lines sit on top so descenders aren't clipped */
.intro-statement .hl {
  position: relative; display: block; width: fit-content; margin-inline: auto;
  padding: .02em .03em .06em; background: var(--mint);
}
.intro-statement .hl:first-child { z-index: 1; }

.reel {
  position: relative; isolation: isolate; container-type: inline-size;
  display: grid; place-items: center;
  width: clamp(300px, 42vw, 960px); aspect-ratio: 2.57; margin: 0 0 85px; padding: 0;
  border: 0; border-radius: 999px; overflow: hidden;
  background: var(--reel-bg); color: #fff;
}
.reel-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transition: scale .8s cubic-bezier(.16, 1, .3, 1); }
video.reel-bg { filter: brightness(.6) blur(3px); } /* the reel has its own titles: dim and soften them under the label */
.reel-fallback {
  background:
    radial-gradient(35% 55% at 72% 58%, rgba(70, 110, 255, .8), transparent 62%),
    radial-gradient(26% 42% at 26% 72%, rgba(57, 223, 189, .45), transparent 70%),   /* mint */
    radial-gradient(60% 70% at 50% 110%, rgba(40, 70, 200, .5), transparent 70%),
    var(--reel-bg);
  background-size: 180% 180%;
  animation: reel-drift 12s ease-in-out infinite alternate;
}
@keyframes reel-drift { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }
.reel-label {
  font-size: 19cqw; line-height: 1; letter-spacing: -0.06em; white-space: nowrap;
  transition: letter-spacing .6s cubic-bezier(.16, 1, .3, 1);
}
button.reel:hover .reel-label { letter-spacing: -0.03em; }
button.reel:hover .reel-bg { scale: 1.06; }
.reel-hint { position: absolute; bottom: 12%; font-size: 12px; letter-spacing: 0; opacity: .6; }

.intro-outro { margin: 0; font-size: var(--statement); line-height: .97; letter-spacing: -0.05em; }
.intro-outro .line { display: block; }
.intro-outro em { font-style: normal; color: var(--mint); }

/* ---------- Recent works ---------- */
.works { position: relative; z-index: 1; background: var(--bg); }   /* covers the sticky hero */
/* Stage stays on screen (sticky) while the section's extra height is scrolled;
   app.js sets that height and slides .works-track from right to left */
.works-stage {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  height: 100svh; padding-bottom: 90px;   /* optical centre for the title, clear of the dock */
}
.js .works-stage { position: sticky; top: 0; }
.works-title { position: relative; z-index: 0; }

.works-track {
  position: absolute; inset: 0 auto 0 0; z-index: 1;
  display: flex; align-items: center; gap: 30px; width: max-content;
  will-change: transform;
}
html:not(.js) .works-track { position: static; overflow-x: auto; width: 100%; }   /* no JS: swipeable row */

/* Staggered collage rhythm: heights and small vertical offsets repeat every 4 cards */
.work-card {
  flex: none; height: 36svh; margin: 0;
  border-radius: 8px; overflow: hidden; background: #dddcdc;
}
.work-card:nth-child(4n+2) { height: 27svh; translate: 0 -4.5svh; }
.work-card:nth-child(4n+3) { height: 42svh; translate: 0 3svh; }
.work-card:nth-child(4n+4) { height: 30svh; translate: 0 -2svh; }
.work-card img {
  display: block; height: 100%; width: auto; max-width: 70vw; object-fit: cover;
  transition: scale .9s cubic-bezier(.16, 1, .3, 1);
}
.work-card:hover img { scale: 1.04; }
.work-card.is-empty {
  display: grid; place-items: center; padding: 16px; text-align: center;
  border: 2px dashed rgba(20, 33, 80, .22); background: transparent;
  font-size: 13px; color: var(--ink-soft);
}
.work-card.is-empty code { color: var(--ink); }
.works-title {
  margin: 0; font-size: clamp(40px, 3.85vw, 80px); font-weight: 400;
  line-height: 1; letter-spacing: -0.055em; color: var(--ink);
}

/* ---------- /works: Selected works ---------- */
/* The title is pinned (sticky) for the whole page; the card list is pulled up over it
   and scrolls normally, so cards rise from the bottom and pass over the title. */
.sw { position: relative; }
.sw-stage {
  position: sticky; top: 0; z-index: 0;
  display: grid; place-items: center;
  height: 100svh; padding-bottom: 19.5svh;   /* title sits a little above centre */
  pointer-events: none;
}
.sw-title {
  --sw-fs: clamp(56px, 7.5vw, 160px);
  position: relative; margin: 0; white-space: nowrap;
  font-size: var(--sw-fs); font-weight: 400; line-height: 1; letter-spacing: -0.055em;
  color: var(--navy);                      /* navy on arrival… */
}
.sw.is-scrolled .sw-title { color: #a8acba; }   /* …soft grey once you scroll and the cards rise (app.js) */
.js .sw .sw-title {   /* keeps the reveal transitions and adds the colour fade */
  transition: color .7s ease, opacity .9s ease, transform 1.1s cubic-bezier(.16, 1, .3, 1), filter .9s ease;
}
.sw-count {
  position: absolute; left: calc(100% + var(--sw-fs) * .1); bottom: calc(var(--sw-fs) * .12);
  font-size: max(12px, calc(var(--sw-fs) * .1)); line-height: 1; letter-spacing: 0;
}

.sw-list {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  margin-top: -100svh;                      /* start on top of the pinned title… */
  padding: 100svh var(--gutter) 35svh;      /* …with the first card waiting just below the screen */
}
/* Every card is the same size (--sw-card-w, 16:9 frame); positions zig-zag, repeating every 4 cards */
.sw-list { --sw-card-w: 29vw; }
.sw-card { display: block; width: var(--sw-card-w); margin-left: 5vw; scroll-margin-top: 12vh; }
.sw-card + .sw-card { margin-top: 15vh; }
.sw-card:nth-child(4n+2) { margin-left: auto; margin-right: 5vw; }
.sw-card:nth-child(4n+3) { margin-left: 20vw; }
.sw-card:nth-child(4n+4) { margin-left: auto; margin-right: 14vw; }
.js .sw-card[data-reveal] { filter: none; }   /* skip the blur on big images */

.sw-media { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #dddcdc; }
.sw-media img {
  display: block; width: 100%; height: 100%; object-fit: cover;   /* cover fills the frame, cropped evenly */
  transition: scale .9s cubic-bezier(.16, 1, .3, 1);
}
.sw-card:hover .sw-media img { scale: 1.03; }
.sw-caption {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-top: 16px; font-size: clamp(15px, .95vw, 18px); letter-spacing: -0.02em;
}
.sw-name { margin: 0; font-size: inherit; font-weight: 400; line-height: 1.3; }
.sw-card.is-empty .sw-media {
  display: grid; place-items: center; padding: 16px; text-align: center;
  border: 2px dashed rgba(20, 33, 80, .22); background: transparent;
  font-size: 13px; color: var(--ink-soft);
}
.sw-card.is-empty code { color: var(--ink); }

/* ---------- Project modal (/works, /works/<project>) ---------- */
/* Bottom sheet: info pinned on the left, images scroll up on the right.
   app.js sets --p (0→1) on each image as it rises into view inside the sheet. */
.pm { --pm-top: 102px; overflow: hidden; }
.pm .pm-dialog { max-width: none; width: 100%; height: calc(100% - var(--pm-top)); margin: var(--pm-top) 0 0; }
.pm.fade .pm-dialog { transform: translateY(100%); transition: transform .75s cubic-bezier(.16, 1, .3, 1); }
.pm.show .pm-dialog { transform: none; }
.pm-sheet {
  height: 100%; border: 0; border-radius: 20px 20px 0 0; background: var(--panel);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--mint) transparent;
}
.pm-close {
  position: fixed; top: calc(var(--pm-top) - 60px); left: 50%; translate: -50% 0; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: var(--mint); color: var(--navy); font-size: 16px;
  opacity: 0; transition: opacity .3s ease, background-color .2s ease;
}
.pm.show .pm-close { opacity: 1; transition-delay: .25s, 0s; }
.pm-close:hover { background: var(--mint-hover); }
.pm-close i { transition: transform .35s ease; }
.pm-close:hover i { transform: rotate(90deg); }

.pm-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px;
  max-width: calc(1400px + var(--gutter) * 2); margin: 0 auto; padding: 20px var(--gutter) 80px;
}
.pm-info { position: sticky; top: 46px; align-self: start; padding-top: 0; }
.pm-title { margin: 0 0 48px; font-size: clamp(24px, 1.6vw, 32px); font-weight: 400; line-height: 1.1; letter-spacing: -0.04em; }
.pm-block + .pm-block { margin-top: 48px; }
.pm-label {
  margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--rule);
  font-size: 12.5px; font-weight: 400; text-transform: uppercase; letter-spacing: -0.01em; color: var(--ink-soft);
}
.pm-value { margin: 0; padding-top: 14px; font-size: 16px; line-height: 1.4; letter-spacing: -0.02em; text-wrap: pretty; }
.pm-value a { text-underline-offset: 4px; }
.pm-value a:hover { text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2px; }

/* align-content/start: don't stretch cards to the (taller) info column */
.pm-gallery { display: grid; gap: 20px; align-content: start; align-self: start; }
/* Card = the image's own size: fits the column, never stretched or enlarged */
.pm-shot {
  --p: 1;
  justify-self: start; width: fit-content; max-width: 100%;
  position: relative; margin: 0; overflow: hidden; border-radius: 8px; background: #eef0f5;
  box-shadow: 0 1px 2px rgba(20, 33, 80, .06), 0 8px 24px -6px rgba(20, 33, 80, .12);   /* low, soft lift */
  transform-origin: 50% 0; will-change: transform;
  transform: translateY(calc((1 - var(--p)) * 14vh)) scale(calc(.9 + var(--p) * .1));
}
.pm-shot img {
  position: relative; display: block; max-width: 100%; height: auto;   /* width comes from the width attribute, so the card is sized before the image loads */
  opacity: 0; transform: scale(calc(1.15 - var(--p) * .15));
  transition: opacity .6s ease;
}
.pm-shot.is-loaded img { opacity: 1; }
/* Videos: full column width, 16:9 until the file reports its real shape; very tall videos are letterboxed */
.pm-shot.is-video { width: 100%; }
.pm-shot video {
  position: relative; display: block; width: 100%; height: auto; max-height: 80svh;
  aspect-ratio: auto 16 / 9; object-fit: contain; background: #0b1236;
  opacity: 0; transform: scale(calc(1.15 - var(--p) * .15)); transition: opacity .6s ease;
}
.pm-shot.is-loaded video { opacity: 1; }
.pm-sound {
  position: absolute; right: 14px; bottom: 14px; z-index: 1;
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 50%; font-size: 18px; color: #fff;
  background: rgba(20, 33, 80, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .2s ease, color .2s ease;
}
.pm-sound:hover, .pm-sound.is-on { background: var(--mint); color: var(--navy); }
/* Loading placeholder: soft pulsing circle until the image arrives */
.pm-shot::before {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: clamp(48px, 14.5%, 140px); aspect-ratio: 1; border-radius: 50%; background: #c3cbdc;
  animation: pm-pulse 1.4s ease-in-out infinite;
}
.pm-shot.is-loaded::before { display: none; }
@keyframes pm-pulse { 50% { transform: scale(.85); opacity: .55; } }

/* Carousel under the two columns: one row of pictures looping right → left.
   app.js repeats the set until it's wider than the sheet, duplicates it and sets the speed. */
.pm-grid:has(+ .pm-marquee) { padding-bottom: 40px; }
.pm-marquee {
  --slide-h: clamp(180px, 22vw, 360px);
  overflow: hidden; padding: 20px 0 80px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.pm-marquee-track { display: flex; width: max-content; animation: pm-marquee var(--marquee-duration, 40s) linear infinite; }
.pm-marquee:hover .pm-marquee-track { animation-play-state: paused; }
.pm-marquee-set { display: flex; gap: 20px; padding-right: 20px; }   /* padding = gap, so -50% loops seamlessly */
.pm-slide {
  flex: none; height: var(--slide-h); margin: 0; overflow: hidden; border-radius: 8px; background: #eef0f5;
  box-shadow: 0 1px 2px rgba(20, 33, 80, .06), 0 8px 24px -6px rgba(20, 33, 80, .12);
}
.pm-slide img { display: block; width: auto; height: 100%; }   /* width from the image's own ratio */
.pm-slide video { display: block; width: auto; height: 100%; aspect-ratio: auto 16 / 9; object-fit: cover; }
@keyframes pm-marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .pm-shot, .pm-shot img, .pm-shot video { transform: none; }
  .pm-shot::before { animation: none; }
  .pm-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .pm-marquee-track { animation: none; }
}

/* ---------- /about ---------- */
.ab-hero { padding: clamp(130px, 20vh, 200px) var(--gutter) clamp(90px, 14vh, 160px); }
.ab-label { margin-bottom: 28px; }
.ab-title {
  margin: 0 0 clamp(56px, 10vh, 120px);
  font-family: var(--serif); font-size: clamp(52px, 8.2vw, 170px); font-weight: 400;
  line-height: .9; letter-spacing: -0.04em;
}
.ab-title .line { display: block; }
.ab-title .line + .line { padding-left: 1.1em; }   /* stepped, like the home headline */
.ab-title em { font-style: italic; }

.ab-intro {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 120px); align-items: start;
}
.ab-photo { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--mint); }
.ab-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; filter: grayscale(1); }

.ab-lead { margin: 0 0 48px; font-size: clamp(22px, 2.1vw, 40px); line-height: 1.18; letter-spacing: -0.035em; text-wrap: pretty; }
.ab-meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px;
  margin: 0 0 56px; padding: 0; list-style: none; font-size: 16px; line-height: 1.45;
}
.ab-meta span, .ab-label-sm {
  display: block; margin: 0 0 6px; font-size: 13px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0; color: var(--ink-soft);
}
.ab-meta a, .ab-entries a { text-underline-offset: 4px; }
.ab-meta a:hover { text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2px; }

.ab-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding-top: 32px; border-top: 1px solid var(--rule); }
.ab-stats dt { font-family: var(--serif); font-size: clamp(48px, 5vw, 96px); font-weight: 400; line-height: 1; letter-spacing: -0.04em; }
.ab-stats dd { margin: 10px 0 0; max-width: 20ch; font-size: 15px; line-height: 1.4; color: var(--ink-soft); }

/* Two-column blocks: sticky heading left, content right */
.ab-block {
  position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 96px); padding: clamp(90px, 14vh, 160px) var(--gutter);
}
.ab-block:not(.is-dark) + .ab-block:not(.is-dark) { border-top: 1px solid var(--rule); }
.ab-block.is-dark { --line: rgba(255, 255, 255, .16); background: var(--navy); color: #fff; }
.ab-heading {
  position: sticky; top: 120px; margin: 0;
  font-size: clamp(36px, 3.6vw, 72px); font-weight: 400; line-height: 1; letter-spacing: -0.05em;
}
.ab-count { margin-left: .35em; font-size: 14px; letter-spacing: 0; opacity: .6; }

.ab-jobs { margin: 0; padding: 0; list-style: none; }
.ab-job { padding: 32px 0 36px; border-top: 1px solid var(--line); }
.ab-job:first-child { padding-top: 0; border-top: 0; }
.ab-job-top { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.ab-job-role { margin: 0; font-size: clamp(24px, 2vw, 36px); font-weight: 400; line-height: 1.1; letter-spacing: -0.04em; }
.ab-when { flex: none; font-size: 15px; letter-spacing: 0; color: var(--mint); font-variant-numeric: tabular-nums; }
.ab-job-org { margin: 8px 0 18px; font-size: 16px; color: rgba(255, 255, 255, .72); }
.ab-points { display: grid; gap: 8px; max-width: 62ch; margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, .86); }
.ab-points li { position: relative; padding-left: 20px; }
.ab-points li::before { content: ""; position: absolute; left: 0; top: .75em; width: 8px; height: 1px; background: var(--mint); }

.ab-work { margin: 0; padding: 0; list-style: none; }
.ab-work li { border-top: 1px solid var(--rule); }
.ab-work li:first-child { border-top: 0; }
.ab-work li:first-child .ab-work-row { padding-top: 0; }
.ab-work-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px; padding: 28px 0; }
.ab-work-name {
  font-size: clamp(30px, 3.4vw, 64px); line-height: 1; letter-spacing: -0.05em;
  transition: translate .5s cubic-bezier(.16, 1, .3, 1);
}
.ab-work-name i {
  display: inline-grid; place-items: center; width: 1.1em; height: 1.1em; margin-left: .2em; vertical-align: .15em;
  border-radius: 50%; font-size: .38em; transition: background-color .3s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
}
.ab-work-url { align-self: center; font-size: 14px; color: var(--ink-soft); }
.ab-work-text { grid-column: 1 / -1; max-width: 58ch; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.ab-work-row:hover .ab-work-name { translate: 12px 0; }
.ab-work-row:hover .ab-work-name i { background: var(--mint); transform: rotate(45deg); }

.ab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 48px; }
.ab-label-sm { margin-bottom: 18px; }
.ab-entries { display: grid; gap: 18px; margin: 0; }
.ab-entries dt { display: flex; justify-content: space-between; gap: 16px; font-weight: 500; font-size: 16px; line-height: 1.35; }
.ab-entry-when { flex: none; font-weight: 400; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ab-entries dd { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }

/* ---------- Let's work together (last section) ---------- */
.cta {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100svh; padding: 120px var(--gutter) 210px;   /* bottom padding lifts the block above the dock */
  background: var(--navy); color: #fff; text-align: center;
}
.cta-title {
  position: relative; margin: 0 0 .5em;
  font-size: clamp(56px, 7.5vw, 160px); font-weight: 400; line-height: .95; letter-spacing: -0.05em;
}
.cta-line { display: block; }
/* Photo sits between the lines: over "Let's work", under "together" */
.cta-avatar {
  position: absolute; z-index: 1; left: 50%; top: 1.02em; translate: -50% -50%;
  width: .86em; height: .86em; border-radius: 50%; overflow: hidden; background: var(--bg);
}
.cta-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: grayscale(1); }
.cta-accent { position: relative; z-index: 2; color: var(--mint); }

.cta-label { margin: 0 0 4px; font-size: 16px; letter-spacing: -0.02em; color: rgba(255, 255, 255, .78); }
.cta-email { display: flex; align-items: center; gap: 10px; font-size: clamp(20px, 1.5vw, 32px); letter-spacing: -0.04em; }
.cta-email a:hover { text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.cta-footer {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 24px;
  display: flex; justify-content: space-between; align-items: center; font-size: 16px;
}
.cta-footer .socials { gap: 14px; }
.cta-where { opacity: .65; font-size: 14px; }   /* where the work is offered (also read by search engines) */
.cta-footer .socials a { font-size: 16px; }

/* Header slides away over sections marked data-header="hide" */
.site-header { transition: translate .5s cubic-bezier(.16, 1, .3, 1), opacity .3s ease; }
.site-header.is-hidden { translate: 0 -120%; opacity: 0; pointer-events: none; }
.site-header.is-hidden > * { pointer-events: none; }

/* Reel video modal */
.reel-modal .modal-dialog { max-width: min(1280px, 92vw); }
.reel-modal .modal-content { position: relative; overflow: hidden; border: 0; border-radius: 20px; background: #000; }
.reel-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.reel-close {
  position: absolute; top: 16px; right: 16px; z-index: 2; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 6px;
  background: var(--mint); color: var(--ink); font-size: 16px;
}
.modal-backdrop { --bs-backdrop-bg: #070c22; }
.modal-backdrop.show { opacity: .72; }

/* ---------- Bottom pill nav ---------- */
.dock {
  position: fixed; z-index: 30; left: 50%; bottom: 20px; translate: -50% 0;
  display: flex; gap: 12px; padding: 11px 20px;
  background: var(--surface); border-radius: 999px;
  box-shadow: 0 10px 30px rgba(20, 33, 80, .06);
}
.dock a {
  padding: 5px 12px; border-radius: 999px;
  font-size: 14px; line-height: 18px; text-transform: uppercase; letter-spacing: 0; white-space: nowrap;
  transition: background-color .2s ease;
}
.dock a:hover { background: var(--bg); }
.dock a.active { background: var(--mint); }

/* ---------- Quick info ---------- */
.quick-tab {
  position: fixed; z-index: 30; right: 0; top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  padding: 14px 10px; border: 0; border-radius: 0 8px 8px 0;
  background: var(--surface); color: var(--ink); font-size: 13px;
}

.quick-panel {
  --bs-offcanvas-width: min(636px, 100vw);
  --bs-offcanvas-bg: var(--panel);
  --bs-offcanvas-color: var(--ink);
  --bs-offcanvas-border-width: 0;
  --bs-offcanvas-transition: transform .7s cubic-bezier(.16, 1, .3, 1);
  padding: 20px;
  border-radius: 20px 0 0 20px;
}
.offcanvas-backdrop { background-color: var(--navy); }
.offcanvas-backdrop.fade { transition: opacity .45s ease; }
.offcanvas-backdrop.show { opacity: .82; }

.qi-head {
  position: relative; flex-shrink: 0; height: 80px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.qi-title { margin: 0; font-size: clamp(36px, 4vw, 50px); font-weight: 400; line-height: 1; letter-spacing: -0.05em; }
.qi-close {
  position: absolute; left: 0; top: 0; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 6px;
  background: var(--ink); color: #fff; font-size: 16px; transition: background-color .2s ease;
}
.qi-close i { transition: transform .35s ease; }
.qi-close:hover { background: #22337a; }
.qi-close:hover i { transform: rotate(90deg); }

.qi-body {
  flex: 1; overflow-y: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; gap: 32px; padding-top: 28px;
}
.qi-intro { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -0.03em; }
.qi-grid { display: grid; grid-template-columns: 55.5% 1fr; }
.qi-label { margin: 0 0 16px; font-size: 14px; font-weight: 400; text-transform: uppercase; letter-spacing: 0; color: var(--muted); }
.qi-list { margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.65; letter-spacing: -0.02em; }
.qi-works a { text-underline-offset: 3px; transition: color .2s ease; }
.qi-works a:hover { text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2px; }
.qi-works span { margin-left: 8px; color: var(--muted); }

.qi-email { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 20%; font-size: 16px; }
.qi-copy {
  flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: var(--mint); color: var(--ink); font-size: 15px;
  transition: background-color .2s ease;
}
.qi-copy:hover { background: var(--mint-hover); }
.qi-socials { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 32px; }
.qi-socials a:hover { opacity: .55; }

/* Close cursor that follows the pointer over the dimmed page */
.qi-cursor {
  position: fixed; left: 0; top: 0; z-index: 1050; margin: -22px 0 0 -22px;
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 6px;
  background: var(--mint); color: var(--ink); font-size: 16px;
  pointer-events: none; opacity: 0; scale: .5; transition: opacity .2s ease, scale .25s ease;
}
.qi-cursor.is-visible { opacity: 1; scale: 1; }
@media (hover: hover) and (pointer: fine) { .offcanvas-backdrop { cursor: none; } }

/* ---------- Inner pages ---------- */
.page { padding-top: clamp(120px, 18vh, 200px); padding-bottom: 140px; }
.page-title {
  font-size: clamp(56px, 9vw, 160px); font-weight: 400;
  letter-spacing: -0.06em; line-height: .95; margin-bottom: .35em;
}
.form-label { font-size: 14px; color: var(--ink-soft); }
.form-control { background: var(--surface); border: 0; border-radius: 14px; padding: 14px 18px; }
.form-control:focus { box-shadow: 0 0 0 2px var(--navy), 0 0 0 5px var(--mint); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0; transform: translateY(40px);
    animation: reveal 1.1s cubic-bezier(.2, .7, .2, 1) forwards;
    animation-delay: var(--d, 0s);
  }
  @keyframes reveal { to { opacity: 1; transform: none; } }

  /* Scroll reveals (JS adds .is-in) */
  .js [data-reveal] {
    opacity: 0; transform: translateY(32px); filter: blur(6px);
    transition: opacity .9s ease, transform 1.1s cubic-bezier(.16, 1, .3, 1), filter .9s ease;
    transition-delay: var(--d, 0s);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

  .qi-reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .8s cubic-bezier(.16, 1, .3, 1); }
  .quick-panel.showing .qi-reveal,
  .quick-panel.show:not(.hiding) .qi-reveal { opacity: 1; transform: none; transition-delay: var(--d, 0s); }
}

/* Reel pill grows as it scrolls into view (browsers with scroll-driven animations) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reel { animation: reel-grow linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    @keyframes reel-grow { from { scale: .7; } to { scale: 1; } }
  }
}

/* ---------- Mobile ---------- */

/* ---------- About: CV download ---------- */
.btn-cv { gap: 10px; margin-bottom: 36px; font-size: 15px; height: 44px; padding: 0 24px; }
.btn-cv .bi-download { font-size: 14px; }

/* ---------- Contact ---------- */
.ct {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 112px);
  padding: clamp(120px, 18vh, 200px) var(--gutter) 160px;
  align-items: start;
}
.ct-aside { position: sticky; top: 140px; }
.ct-title {
  margin: 0 0 24px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(46px, 5.2vw, 100px); line-height: .92; letter-spacing: -0.05em;
  text-wrap: balance;
}
.ct-title em { font-style: italic; }
.ct-lead {
  max-width: 34ch; margin: 0 0 44px;
  font-size: clamp(16px, 1.15vw, 19px); line-height: 1.5; color: var(--ink-soft);
}

.ct-meta { margin: 0 0 32px; padding: 0; list-style: none; }
.ct-meta li { padding: 16px 0; border-top: 1px solid var(--rule); font-size: 16px; line-height: 1.45; }
.ct-meta li:last-child { border-bottom: 1px solid var(--rule); }
.ct-meta span {
  display: block; margin: 0 0 4px; font-size: 13px;
  text-transform: uppercase; color: var(--ink-soft);
}
.ct-email { display: flex; align-items: center; gap: 10px; }
.ct-email a { text-underline-offset: 4px; }
.ct-email a:hover { text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2px; }

.ct-social { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ct-social a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid var(--rule); border-radius: 999px;
  font-size: 14px; transition: border-color .2s ease, background-color .2s ease;
}
.ct-social a:hover { background: var(--surface); border-color: transparent; }
.ct-social .bi-arrow-up-right { font-size: 12px; color: var(--muted); }

/* The fields are the surface here — no card wrapper. */
.ct-form { display: flex; flex-direction: column; gap: 22px; }
.ct-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.ct-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ct-field label, .ct-chips legend {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0; color: var(--ink-soft);
}
.ct-opt { text-transform: none; color: var(--muted); font-size: 12px; }
.ct-field input, .ct-field textarea {
  width: 100%; padding: 15px 18px; border: 1px solid transparent; border-radius: 14px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px;
  caret-color: var(--navy);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.ct-field textarea { resize: vertical; min-height: 150px; line-height: 1.55; }
.ct-field ::placeholder { color: var(--muted); }
.ct-field input:hover, .ct-field textarea:hover { border-color: var(--rule); }
.ct-field input:focus-visible, .ct-field textarea:focus-visible {
  outline: 0; border-color: transparent;
  box-shadow: 0 0 0 2px var(--navy), 0 0 0 5px var(--mint);
}
.ct-field.is-bad input, .ct-field.is-bad textarea { border-color: var(--danger); }

.ct-err { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--danger); }
.ct-alert {
  display: flex; align-items: center; gap: 10px; margin: 0 0 24px;
  padding: 14px 18px; border-radius: 14px;
  background: rgba(179, 51, 76, .08); color: var(--danger); font-size: 15px;
}

.ct-chips { min-width: 0; margin: 0; padding: 0; border: 0; }
.ct-chips legend { padding: 0; margin-bottom: 10px; }
.ct-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ct-chip span {
  display: inline-block; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent;
  font-size: 14px; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.ct-chip span:hover { background: var(--surface); }
.ct-chip input:checked + span { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.ct-chip input:focus-visible + span { box-shadow: 0 0 0 2px var(--navy), 0 0 0 5px var(--mint); }

.ct-submit { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
.ct-submit .btn-pill[aria-busy="true"] { opacity: .65; pointer-events: none; }
.ct-note { margin: 0; max-width: 32ch; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* Honeypot: reachable by a bot, never by a person. */
.ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ct-done { max-width: 42ch; padding-top: 4px; }
.ct-done-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin-bottom: 28px; border-radius: 50%;
  background: var(--mint); color: var(--ink); font-size: 26px;
}
.ct-done-title {
  margin: 0 0 14px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 3.6vw, 64px); line-height: 1; letter-spacing: -0.04em;
}
.ct-done-text { margin: 0 0 32px; font-size: 17px; line-height: 1.55; color: var(--ink-soft); }
.ct-done-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ct-again { font-size: 15px; color: var(--ink-soft); text-underline-offset: 4px; text-decoration: underline; text-decoration-color: var(--rule); }
.ct-again:hover { color: var(--ink); text-decoration-color: var(--mint); text-decoration-thickness: 2px; }

@media (max-width: 767.98px) {
  .btn-pill { height: 40px; padding: 0 20px; font-size: 14px; }
  .hero { --fs: 13vw; --hero-min: 640px; }
  .hero-copy { top: 100px; }
  .hero-tagline { font-size: 15px; }
  .hero-figure { top: calc(180px + 39vw); height: auto; } /* starts just below the tagline */
  .hero-figure img { max-width: none; }
  .hero-bottom { display: none; }
  .quick-tab { font-size: 12px; padding: 12px 8px; }
  .quick-panel { padding: 16px; border-radius: 0; }
  .qi-body { gap: 30px; }
  .qi-contact { grid-template-columns: 1fr; row-gap: 30px; }
  .qi-email { justify-content: flex-start; padding-right: 0; }
  .intro { --statement: 7.6vw; min-height: 0; padding-bottom: 130px; }
  .intro-statement { margin-bottom: 56px; }
  .intro-outro { font-size: 7.4vw; }
  .reel { width: 100%; margin-bottom: 56px; }
  .works-track { gap: 16px; }
  .cta { padding-bottom: 240px; }
  .cta-title { font-size: 17vw; }
  .cta-footer { bottom: 96px; flex-wrap: wrap; gap: 10px; }   /* sits above the dock */
  .cta-where { order: -1; flex-basis: 100%; text-align: center; font-size: 13px; }
  .sw-title { --sw-fs: 12vw; }
  .sw-list { --sw-card-w: 78vw; }
  .sw-card, .sw-card:nth-child(n) { margin-left: 0; margin-right: 0; }
  .sw-card:nth-child(even) { margin-left: auto; }
  .sw-card + .sw-card { margin-top: 10vh; }
  .pm { --pm-top: 72px; }
  .pm-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 12px; }
  .pm-info { position: static; padding-top: 12px; }
  .pm-title { margin-bottom: 32px; }
  .pm-block + .pm-block { margin-top: 28px; }
  .pm-gallery { gap: 12px; }
  .pm-marquee { --slide-h: 180px; padding-bottom: 60px; }
  .pm-marquee-set { gap: 12px; padding-right: 12px; }
  .ab-title { font-size: 9.6vw; }
  .ab-title .line + .line { padding-left: .6em; }
  .ab-intro, .ab-block, .ab-grid { grid-template-columns: minmax(0, 1fr); }
  .ab-meta { grid-template-columns: minmax(0, 1fr); }
  .ab-stats { gap: 16px; }
  .ab-stats dd { font-size: 13px; }
  .ab-block { gap: 32px; }
  .ab-heading { position: static; }
  .ab-job-top { flex-direction: column; gap: 6px; }
  .ab-work-row { grid-template-columns: minmax(0, 1fr); }

  .ct { grid-template-columns: minmax(0, 1fr); gap: 44px; padding-bottom: 120px; }
  .ct-aside { position: static; }
  .ct-title { font-size: 13vw; }
  .ct-lead { margin-bottom: 32px; }
  .ct-row { grid-template-columns: minmax(0, 1fr); }
  .ct-submit { gap: 14px; }
}

/* ---------- Language switch (EN / FR) beside the Contact button ---------- */
.header-end { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: flex; align-items: center; gap: 2px; height: 48px; padding: 0 7px;
  border-radius: 999px; background: var(--surface);
}
.lang-switch a {
  padding: 5px 10px; border-radius: 999px;
  font-size: 13px; line-height: 18px; letter-spacing: .02em; color: var(--ink);
  transition: background-color .2s ease;
}
.lang-switch a:hover { background: var(--bg); }
.lang-switch a.active { background: var(--mint); }
/* "VOIR LE REEL" is longer than "PLAY REEL": scale the label down so it still fits the pill */
:lang(fr) .reel-label { font-size: 14.5cqw; }

@media (max-width: 767.98px) {
  .header-end { gap: 8px; }
  .lang-switch { height: 40px; padding: 0 5px; }
  .lang-switch a { padding: 4px 8px; font-size: 12px; }
}

/* =====================================================================
   Two portfolios: landing page "/", the side switch, the developer pages
   ===================================================================== */

/* ---------- Landing "/" : hook + photo + two doors ---------- */
.ld {
  --fs: min(9.4vw, 13svh);
  position: relative; height: 100svh; min-height: 660px; overflow: hidden;
}
.ld-copy {
  position: absolute; z-index: 3; top: max(11svh, 92px); left: 50%; translate: -50% 0;
  width: max-content; max-width: calc(100vw - 2 * var(--gutter)); text-align: center; pointer-events: none;
}
.ld-title { margin: 0; font-family: var(--serif); font-size: var(--fs); font-weight: 400; line-height: .9; letter-spacing: -0.05em; }
.ld-title em { font-style: italic; }
.ld-hook {
  max-width: 24em; margin: calc(var(--fs) * .22) auto 0; text-wrap: balance;
  font-size: clamp(17px, 1.45vw, 26px); line-height: 1.25; letter-spacing: -0.025em;
}
.ld-hook em { font-style: normal; background: var(--mint); padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ld-figure { position: absolute; z-index: 2; bottom: 0; left: 50%; translate: -50% 0; height: 64%; }
.ld-figure img { display: block; height: 100%; width: auto; filter: grayscale(1); }

/* The doors: mint for design, navy for code, either side of the photo */
.ld-doors {
  position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter); bottom: 64px;
  display: flex; justify-content: space-between; gap: 24px; pointer-events: none;
}
.ld-door {
  pointer-events: auto; position: relative;
  display: flex; flex-direction: column; width: min(26vw, 400px); padding: 22px 24px 24px;
  border-radius: 22px; background: var(--mint); color: var(--ink);
  box-shadow: 0 24px 60px rgba(20, 33, 80, .12);
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), box-shadow .5s ease, background-color .3s ease;
}
.ld-door.is-code { background: var(--navy); color: #fff; }
.ld-door:hover { color: inherit; transform: translateY(-8px); box-shadow: 0 34px 70px rgba(20, 33, 80, .2); }
.ld-door.is-code:hover { color: #fff; }
.ld-door-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; font-size: 14px; }
.ld-door-num { display: inline-flex; align-items: center; gap: 8px; opacity: .8; }
.ld-door-go {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 16px;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.ld-door.is-code .ld-door-go { background: var(--mint); color: var(--ink); }
.ld-door:hover .ld-door-go { transform: rotate(45deg) scale(1.08); }
.ld-door-name { font-family: var(--serif); font-size: clamp(36px, 3.1vw, 58px); line-height: .92; letter-spacing: -0.04em; }
.ld-door-name em { font-style: italic; }
.ld-door-desc { margin-top: 16px; font-size: 15px; line-height: 1.4; opacity: .82; }
.ld-foot {
  position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter); bottom: 18px;
  display: flex; justify-content: space-between; align-items: center; font-size: 14px;
}
.ld-foot a:hover { text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ld-foot .socials a { font-size: 16px; }
.ld-foot .socials a:hover { text-decoration: none; }

/* ---------- Dock: the way across to the other portfolio ---------- */
.dock .dock-switch {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 4px;
  background: var(--navy); color: #fff;
}
.dock .dock-switch:hover { background: #22337a; color: #fff; }
.dock .dock-switch i { font-size: 13px; }

/* ---------- Developer home: the stack strip in the navy statement ---------- */
.dev-stack {
  width: min(1100px, 100%); margin: 0 0 85px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.dev-stack-track { display: flex; width: max-content; animation: dev-stack 32s linear infinite; }
.dev-stack:hover .dev-stack-track { animation-play-state: paused; }
.dev-stack-set { display: flex; gap: 12px; margin: 0; padding: 0 12px 0 0; list-style: none; }
.dev-stack-set li {
  padding: 12px 22px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
  font-size: clamp(16px, 1.3vw, 22px); letter-spacing: -0.02em; white-space: nowrap;
}
.dev-stack-set li:nth-child(3n+1) { background: var(--mint); border-color: var(--mint); color: var(--ink); }
@keyframes dev-stack { to { transform: translateX(-50%); } }

/* ---------- Browser frame (project screenshots) ---------- */
.bw {
  display: block; overflow: hidden; border-radius: 14px; background: #fff;
  box-shadow: 0 1px 0 rgba(20, 33, 80, .06), 0 30px 60px rgba(20, 33, 80, .14);
}
.bw-bar {
  position: relative; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  background: #eceef3; border-bottom: 1px solid #dfe2ea;
}
.bw-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.bw-bar i:nth-child(2) { background: #febc2e; }
.bw-bar i:nth-child(3) { background: #28c840; }
.bw-url {
  position: absolute; left: 50%; translate: -50% 0; max-width: 55%; padding: 3px 16px;
  border-radius: 999px; background: #fff; color: #6b7280;
  font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bw-screen { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #dddcdc; container-type: size; }
.bw-screen img { display: block; width: 100%; height: auto; min-height: 100%; object-fit: cover; object-position: top center; }
/* Full-page captures scroll through the frame on hover */
.bw.has-page .bw-screen img { transition: transform 7s cubic-bezier(.45, 0, .2, 1); }
.bw.has-page:hover .bw-screen img { transform: translateY(calc(-100% + 100cqh)); transition-duration: 9s; }

/* ---------- Developer home: selected projects ---------- */
.dp { position: relative; z-index: 1; background: var(--bg); padding: clamp(90px, 14vh, 160px) var(--gutter) clamp(110px, 16vh, 180px); }
.dp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(40px, 6vh, 72px); }
.dp-title { position: relative; margin: 0; font-size: clamp(44px, 5.4vw, 112px); font-weight: 400; line-height: 1; letter-spacing: -0.055em; }
.dp-title em { font-family: var(--serif); font-style: italic; letter-spacing: -0.04em; }
.dp-count { margin-left: .2em; font-size: max(12px, .16em); letter-spacing: 0; vertical-align: super; }
.dp-all { flex: none; }
.dp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 80px) clamp(24px, 3vw, 48px); }
.dp-card { display: block; }
.dp-card:nth-child(even) { margin-top: clamp(40px, 9vh, 120px); }   /* staggered, like the works list */
.dp-card .bw-screen img { transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.dp-card:hover .bw-screen img { transform: scale(1.03); }
.dp-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 18px; }
.dp-name { font-size: clamp(22px, 1.7vw, 32px); letter-spacing: -0.04em; }
.dp-type { font-size: 15px; color: var(--ink-soft); text-align: right; }
.dp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dp-chips span { padding: 4px 12px; border: 1px solid var(--rule); border-radius: 999px; font-size: 13px; color: var(--ink-soft); }

/* ---------- /software-engineer/projects ---------- */
.dpl { padding: clamp(130px, 20vh, 200px) var(--gutter) clamp(80px, 12vh, 140px); }
.dpl-head { max-width: 900px; margin-bottom: clamp(60px, 10vh, 120px); }
.dpl-title { position: relative; margin: 0 0 28px; font-size: clamp(56px, 8vw, 170px); font-weight: 400; line-height: .92; letter-spacing: -0.055em; }
.dpl-title em { font-family: var(--serif); font-style: italic; letter-spacing: -0.04em; }
.dpl-intro { max-width: 36ch; margin: 0; font-size: clamp(18px, 1.5vw, 26px); line-height: 1.3; letter-spacing: -0.03em; color: var(--ink-soft); }
.dpl-item {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px);
  align-items: start; padding: clamp(48px, 8vh, 96px) 0; border-top: 1px solid var(--rule); scroll-margin-top: 80px;
}
.dpl-item:nth-of-type(even) .dpl-shot { order: -1; }   /* frames alternate sides */
.dpl-info { position: sticky; top: 120px; }
.dpl-num { display: block; margin-bottom: 18px; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.dpl-name { margin: 0; font-family: var(--serif); font-size: clamp(40px, 4vw, 80px); font-weight: 400; line-height: .95; letter-spacing: -0.04em; }
.dpl-meta { margin: 12px 0 28px; font-size: 16px; color: var(--ink-soft); }
.dpl-text { margin: 0 0 28px; font-size: clamp(17px, 1.25vw, 21px); line-height: 1.45; letter-spacing: -0.02em; text-wrap: pretty; }
.dpl-label { margin: 0 0 12px; font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: 0; color: var(--muted); }
.dpl-points { display: grid; gap: 10px; margin: 0 0 28px; padding: 0; list-style: none; font-size: 16px; line-height: 1.5; }
.dpl-points li { position: relative; padding-left: 22px; }
.dpl-points li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--mint); }
.dpl-facts { display: grid; gap: 14px; margin: 0 0 32px; padding-top: 22px; border-top: 1px solid var(--rule); }
.dpl-facts > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.dpl-facts dt { font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--muted); }
.dpl-facts dd { margin: 0; font-size: 16px; }
.dpl-facts .dp-chips { margin-top: 0; }
.dpl-visit { gap: 10px; }
.dpl-shot { align-self: start; }
/* internal app (no live site): a quiet line instead of the visit button, and no link hover on /about */
.dpl-private { display: flex; gap: 10px; align-items: baseline; margin: 0; font-size: 15px; color: var(--muted); }
/* a project sold as a product: "For sale" badge on the frame / next to the type, and an offer box */
.dp-card .bw { position: relative; }
.dp-sale {
  position: absolute; z-index: 2; top: 50px; left: 14px; display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px; background: var(--mint); color: var(--navy);
  font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(20, 33, 80, .18);
}
.dp-sale.is-inline { position: static; margin-left: 10px; padding: 3px 11px; font-size: 12px; box-shadow: none; vertical-align: .1em; }
.dpl-sale { display: grid; gap: 18px; justify-items: start; padding: 24px; border-radius: 14px; background: var(--navy); color: #fff; }
.dpl-sale p { margin: 0; font-size: 16px; line-height: 1.5; }
.ab-work-row.is-private:hover .ab-work-name { translate: none; }
.ab-work-row.is-private:hover .ab-work-name i { background: none; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
  .ld { --fs: 15vw; height: auto; min-height: 100svh; padding-bottom: 28px; display: flex; flex-direction: column; }
  .ld-copy { position: static; translate: none; width: auto; margin: 120px var(--gutter) 0; }
  .ld-hook { font-size: 18px; }
  .ld-figure { position: relative; left: auto; translate: none; align-self: center; height: 42svh; margin-top: 22px; }
  .ld-doors { position: relative; left: auto; right: auto; bottom: auto; flex-direction: column; gap: 12px; margin: -18px var(--gutter) 0; }
  .ld-door { width: 100%; padding: 18px 20px 20px; }
  .ld-door-top { margin-bottom: 14px; }
  .ld-door-name { font-size: 34px; }
  .ld-door-name br { display: none; }
  .ld-door-name em { margin-left: .2em; }
  .ld-foot { position: static; margin: 28px var(--gutter) 0; flex-direction: column; gap: 14px; }
  .dock { gap: 6px; padding: 9px 12px; }
  .dock a { padding: 5px 9px; font-size: 13px; }
  .dock .dock-switch { margin-left: 0; }
  .dev-stack { margin-bottom: 56px; }
  .dev-stack-set li { padding: 9px 16px; }
  .dp-head { flex-direction: column; align-items: flex-start; }
  .dp-grid { grid-template-columns: minmax(0, 1fr); }
  .dp-card:nth-child(even) { margin-top: 0; }
  .dp-caption { flex-direction: column; gap: 4px; }
  .dp-type { text-align: left; }
  .dpl-item { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .dpl-item:nth-of-type(even) .dpl-shot { order: 0; }
  .dpl-info { position: static; }
  .dpl-title { font-size: 15vw; }
}

/* No hover on touch screens: the full-page capture scrolls once by itself when it comes into view */
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .bw.has-page.is-in .bw-screen img { animation: bw-scroll 9s cubic-bezier(.45, 0, .2, 1) 1s 2 alternate both; }
  @keyframes bw-scroll { to { transform: translateY(calc(-100% + 100cqh)); } }
}
@media (prefers-reduced-motion: reduce) {
  .dev-stack { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
  .dev-stack-track { animation: none; }
  .bw.has-page:hover .bw-screen img { transform: none; }
}

/* Developer statement: no reel, so the block sits in the middle of its screen */
.intro-dev { justify-content: center; }

/* ---------- /software-engineer/projects/<slug>: product design case study ---------- */
.dpl-case { gap: 10px; margin: 0 10px 14px 0; }
.dp-case { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 12px; }
.cs { padding: clamp(120px, 18vh, 180px) var(--gutter) 0; }
.cs-head { max-width: 1400px; }
.cs-back { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 36px; font-size: 15px; color: var(--ink-soft); }
.cs-back:hover { color: var(--ink); }
.cs-head .intro-label { margin-bottom: 24px; }
.cs-title { margin: 0 0 24px; font-family: var(--serif); font-size: clamp(56px, 8vw, 160px); font-weight: 400; line-height: .92; letter-spacing: -0.045em; }
.cs-summary { max-width: 38ch; margin: 0 0 48px; font-size: clamp(20px, 1.9vw, 32px); line-height: 1.25; letter-spacing: -0.03em; text-wrap: pretty; }
.cs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px 32px; margin: 0 0 clamp(48px, 8vh, 80px); padding-top: 24px; border-top: 1px solid var(--rule); }
.cs-facts dt { margin-bottom: 6px; font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--muted); }
.cs-facts dd { margin: 0; font-size: 16px; line-height: 1.4; }
.cs-facts .dp-chips { margin-top: 0; }
.cs-hero { margin: 0 0 clamp(60px, 10vh, 120px); }
.cs-hero img { display: block; width: 100%; height: auto; }

.cs-sec {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px clamp(32px, 5vw, 96px);
  padding: clamp(48px, 8vh, 96px) 0; border-top: 1px solid var(--rule);
}
.cs-side { display: flex; flex-direction: column; gap: 6px; align-self: start; position: sticky; top: 110px; }
.cs-num { font-size: 15px; color: var(--muted); }
.cs-label { font-size: 15px; text-transform: uppercase; letter-spacing: .02em; }
.cs-body { max-width: 760px; }
.cs-h { margin: 0 0 24px; font-size: clamp(28px, 2.6vw, 48px); font-weight: 400; line-height: 1.08; letter-spacing: -0.04em; text-wrap: balance; }
.cs-p { margin: 0 0 18px; font-size: clamp(17px, 1.2vw, 20px); line-height: 1.55; letter-spacing: -0.015em; color: var(--ink-soft); text-wrap: pretty; }
.cs-points { margin-top: 8px; }

.cs-figs { grid-column: 2; display: grid; gap: 28px; margin-top: 16px; }
.cs-figs.is-pair { grid-template-columns: 1fr 1fr; align-items: start; }
.cs-figs.is-mixed { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; }
.cs-fig { margin: 0; }
.cs-frame { display: block; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 1px 0 rgba(20, 33, 80, .06), 0 24px 50px rgba(20, 33, 80, .12); }
.cs-frame img { display: block; width: 100%; height: auto; }
.cs-fig.is-phone .cs-frame { max-width: 340px; margin-inline: auto; border-radius: 28px; border: 8px solid var(--navy); }
.cs-fig figcaption { max-width: 70ch; margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.cs-outcome { margin: 0 calc(var(--gutter) * -1); padding: clamp(70px, 12vh, 140px) var(--gutter); background: var(--navy); color: #fff; }
.cs-outcome-text { max-width: 34ch; margin: 0 0 40px; font-size: clamp(24px, 2.6vw, 44px); line-height: 1.2; letter-spacing: -0.035em; text-wrap: pretty; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.cs-next { display: inline-flex; gap: 10px; align-items: center; color: #fff; font-size: 17px; border-bottom: 1px solid rgba(255, 255, 255, .4); padding-bottom: 3px; }
.cs-next:hover { color: var(--mint); border-color: var(--mint); }

@media (max-width: 767.98px) {
  .cs-sec { grid-template-columns: minmax(0, 1fr); }
  .cs-side { position: static; flex-direction: row; gap: 12px; }
  .cs-figs, .cs-figs.is-pair, .cs-figs.is-mixed { grid-column: 1; grid-template-columns: minmax(0, 1fr); }
}

/* ---------- /software-engineer/projects/<slug>: sales page of a ready-made platform ---------- */
.pd-title { max-width: 16ch; margin: 0 0 24px; font-family: var(--serif); font-size: clamp(44px, 6vw, 112px); font-weight: 400; line-height: .98; letter-spacing: -0.04em; text-wrap: balance; }
.pd-answer { max-width: 46ch; margin-bottom: 32px; font-size: clamp(19px, 1.6vw, 27px); line-height: 1.3; }
.pd-cta { margin-bottom: clamp(48px, 8vh, 80px); }
.pd-steps { margin: 0; padding-left: 1.3em; font-size: clamp(20px, 1.8vw, 30px); line-height: 1.3; letter-spacing: -0.03em; }
.pd-steps li { margin-bottom: 14px; padding-left: 6px; }
.pd-steps li::marker { color: var(--muted); }
.pd-q { margin: 26px 0 8px; font-size: clamp(19px, 1.5vw, 24px); font-weight: 500; letter-spacing: -0.025em; }
.pd-q:first-child { margin-top: 0; }
.pd-demo { margin: 28px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- /software-engineer/ready-made ---------- */
.dp-ready { display: inline-flex; gap: 8px; align-items: center; font-size: 16px; border-bottom: 1px solid var(--mint); padding-bottom: 2px; }
.dpl-head .dp-ready { margin-top: 24px; }
.dp-head .dp-ready { margin-left: auto; margin-right: 18px; align-self: center; }
.rm-for { display: block; margin-top: 8px; font-size: 16px; color: var(--ink-soft); }
.rm-grid { margin-bottom: clamp(48px, 8vh, 96px); }
.rm-sec .btn-pill { margin-top: 18px; }
