:root {
  --bg: #0b0b0c;
  --ink: #ece9e2;
  --mute: #8f8d87;
  --line: rgba(236, 233, 226, .14);
  --rail: clamp(320px, 33vw, 540px);
  --gutter: 32px;
  --top: 64px;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --c: #8f8d87;
  --deep: #1c1c1e;
  --light: #ece9e2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: var(--top); }
body {
  margin: 0;
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* One arrow everywhere. The stroke stays even at any size. */
.arrow {
  display: inline-block; width: .72em; height: .72em; vertical-align: -.04em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.25px; vector-effect: non-scaling-stroke;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.arrow path { vector-effect: non-scaling-stroke; }
.contact-big .arrow, .contact-mail .arrow, .case-next-title .arrow { width: .62em; height: .62em; stroke-width: 2.5px; }
@media (hover: hover) {
  :where(a, button):hover > .arrow { transform: translate(.08em, -.08em); }
}

/* ---------- letter roll on hover ---------- */
.tx { --tx-gap: .3em; }
.tx-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tx-word { display: inline-flex; }
.tx-char { display: block; overflow: clip; padding-block: .1em; margin-block: -.1em; }
.tx-glyph {
  position: relative; display: block; white-space: pre;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(var(--i) * 15ms);
}
.tx-glyph::after { content: attr(data-c); position: absolute; top: calc(100% + var(--tx-gap)); left: 0; }
@media (hover: hover) {
  :where(a, button):hover .tx-glyph { transform: translateY(calc(-100% - var(--tx-gap))); }
  .contact-mail:hover .tx-glyph { transition-delay: calc(var(--i) * 8ms); }
}
:where(a, button):focus-visible .tx-glyph { transform: translateY(calc(-100% - var(--tx-gap))); }

/* The current tab rolls away and leaves three small dots. */
.tx-dots { position: absolute; top: 50%; left: 0; display: flex; gap: 3px; transform: translateY(-50%); }
.tx-dots i {
  display: block; width: 3px; height: 3px; border-radius: 50%; background: currentColor;
  transform: scale(0);
}
a[aria-current] .tx-dots i { transform: scale(1); transition: transform .5s cubic-bezier(.22, 1, .36, 1) calc(.25s + var(--i) * 60ms); }
.topbar-nav a[aria-current] { pointer-events: none; }
.topbar-nav a[aria-current] .tx-glyph { transform: translateY(calc(-100% - var(--tx-gap))); }
.topbar-nav a[aria-current] .tx-glyph::after { opacity: 0; }

/* ---------- page transitions ---------- */
/* Everything except the header and the sea of dots fades. */
body > :not(.topbar):not(.waves):not(.flight):not(.loader):not(.toast) { transition: opacity .4s ease; }
html.is-leaving body > :not(.topbar):not(.waves):not(.flight):not(.loader):not(.toast),
html.is-entering body > :not(.topbar):not(.waves):not(.flight):not(.loader):not(.toast) { opacity: 0; }

/* A flight lands on the case study: only the first media tile is there at once. */
.flight { position: fixed; z-index: 30; object-fit: cover; transform-origin: 0 0; pointer-events: none; }
.tile-frame { position: relative; }
.flight-hold { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.flight-hold.is-off { opacity: 0; }
.flight--photo { z-index: 25; object-position: 50% 40%; }
html.is-flight.is-entering .case { opacity: 1; }
.is-flight .case-rail, .is-flight .chapter:not(:first-child), .is-flight .mosaic > :not(:first-child), .is-flight .case-next { transition: opacity .6s ease; }
html.is-flight.is-entering .case-rail,
html.is-flight.is-entering .chapter:not(:first-child),
html.is-flight.is-entering .mosaic > :not(:first-child),
html.is-flight.is-entering .case-next { opacity: 0; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 8px 14px; background: var(--ink); color: var(--bg);
}
.skip:focus { top: 12px; }
.noscript { padding: 120px var(--gutter); text-align: center; }

.eyebrow {
  font: 500 11px/1.3 var(--sans);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--mute);
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  font: 500 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
  transition: background .3s, color .3s, border-color .3s;
}
a.pill:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill--quiet { color: var(--mute); border-color: transparent; padding-left: 0; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: var(--top);
  padding: 0 var(--gutter);
  font: 500 11px/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase;
  background: linear-gradient(var(--bg) 55%, transparent);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar-name { margin-right: auto; }
.topbar-nav { display: flex; gap: 22px; }
.topbar-cta { height: 32px; padding: 0 15px; }
.topbar button.topbar-cta { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.topbar button.topbar-cta:hover { background: none; color: var(--ink); }
.page-home .topbar { background: none; }
.name-short { display: none; }
.topbar-nav a { position: relative; padding: 6px 0; color: var(--mute); transition: color .25s; }
.topbar-nav a:hover, .topbar-nav a[aria-current] { color: var(--ink); }

/* ---------- loader ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 72px var(--gutter) var(--gutter);
  background: var(--bg);
  clip-path: inset(0 0 0 0);
  transition: clip-path .9s cubic-bezier(.76, 0, .24, 1);
}
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader-name {
  font: 300 clamp(44px, 9.4vw, 148px)/.96 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.025em;
}
.loader-foot { display: flex; align-items: center; gap: 14px; }
.loader-count { width: 28px; font: 500 11px/1 var(--sans); font-variant-numeric: tabular-nums; }
.loader-bar { flex: 1; height: 1px; background: var(--line); }
.loader-bar i { display: block; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; }

/* ---------- sea of dots behind everything ---------- */
.waves { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

/* ---------- intro ---------- */
/* Portrait on the left, text beside it with a fixed gap. */
.intro-top {
  --band-gap: 44px;
  position: relative; z-index: 2;
  display: flex; align-items: flex-start; gap: 48px;
  padding: calc(var(--top) + 24px) var(--gutter) var(--band-gap);
}
.portrait {
  flex: none;
  width: min(8svw, 15svh); aspect-ratio: 4 / 5; height: auto;
  object-fit: cover; object-position: 50% 40%;
  background: #151516;
}
.intro-body { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.statement {
  max-width: 34em;
  font: 300 min(2.15vw, 4.4svh)/1.2 var(--serif);
  font-variation-settings: 'opsz' 60;
  letter-spacing: -.016em;
  text-wrap: pretty;
}
.statement span { color: var(--mute); }
.numbers { display: flex; flex-wrap: wrap; gap: 8px 56px; }
.numbers dd {
  font: 300 clamp(24px, 2vw, 32px)/1 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.025em;
}
.numbers dt { margin-top: 5px; font-size: 12px; line-height: 1.3; color: var(--mute); white-space: nowrap; }

.js .portrait, .js .intro-body { opacity: 0; transform: translateY(14px); }
.is-ready .portrait, .is-ready .intro-body { opacity: 1; transform: none; transition: opacity .9s, transform 1.1s var(--ease); }
.is-ready .intro-body { transition-delay: .12s; }

/* ---------- work track ---------- */
html:has(.page-home), .page-home { height: 100%; overflow: hidden; overscroll-behavior: none; }
.work { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.work-stage {
  position: relative;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}
.track { position: absolute; inset: 0; }
.card {
  position: absolute; left: 0; bottom: 76px;
  display: block;
  will-change: transform;
}
.card-label {
  position: absolute; left: 0; bottom: 100%;
  padding-bottom: 10px;
  font: 500 11px/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  will-change: transform;
}
.card-go { opacity: 0; transition: opacity .3s; }
.card.is-active .card-go { opacity: 1; }
.card-media {
  display: block; overflow: hidden;
  transform-origin: left bottom;
  will-change: transform, opacity;
  background: #151516;
}
.card-media video, .card-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1);
  transition: filter .6s;
}
.card.is-active .card-media video, .card.is-active .card-media img { filter: none; }
.card:not(.is-active):hover .card-media video,
.card:not(.is-active):hover .card-media img { filter: grayscale(.3); }

.work-meter {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 32px;
  display: flex; align-items: center; gap: 14px;
  font: 500 11px/1 var(--sans); letter-spacing: .06em; color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.work-bar { flex: 1; height: 1px; background: var(--line); }
.work-bar i { display: block; height: 1px; background: var(--ink); transform: scaleX(.2); transform-origin: left; }

/* ---------- about ---------- */
.about-side { min-width: 0; }
.about-photo { width: min(240px, 72%); height: auto; margin-top: 16px; }
.page-about main { padding-top: var(--top); }
.page-about .about:first-child { border-top: 0; }
.about {
  position: relative;
  display: grid; grid-template-columns: var(--rail) minmax(0, 1fr);
  padding: 96px var(--gutter);
  border-top: 1px solid var(--line);
}
.about-body { padding-left: 16px; min-width: 0; }
.about-lead {
  max-width: 21em;
  margin-bottom: 96px;
  font: 300 clamp(30px, 3.5vw, 54px)/1.08 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.02em;
}
.about-label { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.about-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
.about-services li { padding: 9px 0; border-bottom: 1px solid var(--line); }

.exp-list { padding-left: 16px; min-width: 0; }
.exp-row {
  display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px;
  align-items: baseline;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
}
.exp-row:last-child { border-bottom: 1px solid var(--line); }
.exp-period { font: 500 11px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.exp-main h3 {
  margin: 0;
  font: 300 clamp(26px, 2.6vw, 38px)/1.08 var(--serif);
  font-variation-settings: 'opsz' 60;
  letter-spacing: -.015em;
}
.exp-place { margin-top: 4px; color: var(--mute); }
.exp-note { color: var(--mute); max-width: 44ch; }

.upwork-badge {
  display: inline-block; margin-top: 12px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  font: 500 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
}
.upwork-heading {
  max-width: 17em; margin-bottom: 56px;
  font: 300 clamp(30px, 3.5vw, 54px)/1.08 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.02em;
}
.upwork-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 64px; }
.upwork-stats div { border-top: 1px solid var(--line); padding-top: 10px; }
.upwork-stats dt { font: 500 11px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin-bottom: 24px; }
.upwork-stats dd {
  font: 300 clamp(40px, 5vw, 80px)/1 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.03em;
}
.upwork-reviews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 40px; }
.review { padding-top: 14px; border-top: 1px solid var(--line); }
.review blockquote {
  margin: 0 0 16px;
  font: 300 clamp(21px, 1.9vw, 28px)/1.2 var(--serif);
  font-variation-settings: 'opsz' 40;
  letter-spacing: -.01em;
}
.review figcaption { font: 500 11px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }

/* ---------- contact ---------- */
.contact {
  position: relative;
  padding: 88px var(--gutter) var(--gutter);
  border-top: 1px solid var(--line);
}
.contact-mail {
  display: block;
  margin: 18px 0 96px;
  font: 300 clamp(36px, 8.6vw, 148px)/1 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
  transition: opacity .3s;
}
.contact-mail:hover { opacity: .6; }
.contact-foot {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font: 500 11px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--mute);
}
.contact-social { display: flex; gap: 20px; }
.contact-social a { color: var(--ink); }

/* ---------- copy email ---------- */
button.pill, button.contact-mail, .contact-rows button {
  appearance: none; background: none; color: inherit; cursor: pointer;
}
button.pill:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
button.contact-mail, .contact-rows button { padding: 0; border: 0; text-align: left; }
.contact-rows button { font: inherit; }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  max-width: calc(100vw - 32px); padding: 11px 16px;
  background: var(--ink); color: var(--bg);
  font: 500 13px/1.3 var(--sans);
  opacity: 0; transform: translate(-50%, 10px); pointer-events: none;
  transition: opacity .3s, transform .5s cubic-bezier(.22, 1, .36, 1);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- contact page ---------- */
.contact-page {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--top) + 32px) var(--gutter) 32px;
}
.contact-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 56px; }
.contact-title {
  max-width: 19em; margin-top: 14px;
  font: 300 min(2.9vw, 5.6svh)/1.12 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.02em;
}
.contact-title span { color: var(--mute); }
.contact-rows { flex: 0 0 min(360px, 32vw); border-top: 1px solid var(--line); }
.contact-rows div {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center;
  height: 40px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.contact-rows dt { font: 500 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }

.contact-cta {
  position: relative;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
}
.contact-prompt { margin-bottom: 8px; color: var(--mute); font-size: 14px; }
.contact-big {
  display: inline-block; padding: 0; border: 0;
  background: none; color: inherit; cursor: pointer; text-align: left;
  font: 300 min(7.6vw, 15svh)/1.02 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.03em;
}
.contact-num {
  position: absolute; top: 16px; right: 0;
  font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums;
}

/* ---------- case study ---------- */
.case { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
.case-rail {
  position: sticky; top: 0;
  display: flex; flex-direction: column;
  height: 100vh; height: 100svh;
  padding: var(--top) var(--gutter) var(--gutter);
  border-right: 1px solid var(--line);
}
.case-back { display: inline-block; align-self: flex-start; margin-bottom: 20px; transition: color .25s; }
.case-back:hover { color: var(--ink); }
.case-num { color: var(--light); margin-right: 8px; }
.case-title {
  margin-top: 10px;
  font: 300 clamp(42px, 4.9vw, 78px)/1 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.025em;
}
.case-text { display: grid; margin: auto 0; padding: 20px 0; }
.case-copy {
  grid-area: 1 / 1;
  opacity: 0; transform: translateY(14px); visibility: hidden;
  transition: opacity .45s, transform .7s var(--ease), visibility 0s .45s;
}
.case-copy.is-past { transform: translateY(-14px); }
.case-copy.is-current { opacity: 1; transform: none; visibility: visible; transition-delay: .1s, .1s, 0s; }
.case-copy h2 {
  margin-bottom: 12px;
  font: 300 clamp(23px, 2.15vw, 33px)/1.12 var(--serif);
  font-variation-settings: 'opsz' 40;
  letter-spacing: -.012em;
}
.case-copy p { max-width: 42ch; color: var(--mute); }

.case-index { border-top: 1px solid var(--line); margin-bottom: 16px; }
.case-index a {
  position: relative;
  display: grid; grid-template-columns: 30px 1fr; align-items: center;
  height: 30px;
  border-bottom: 1px solid var(--line);
  font: 500 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--mute);
  transition: color .3s;
}
.case-index li.is-active a, .case-index a:hover { color: var(--ink); }
.case-index i {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--c); transform: scaleX(0); transform-origin: left;
}
.case-cta {
  display: flex; justify-content: center; width: 100%; height: 44px; margin-top: 16px;
  background: var(--ink); color: var(--bg); border-color: var(--ink); font-size: 12px;
}
a.case-cta:hover { background: none; color: var(--ink); }
.case-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; font-size: 13px; line-height: 1.35; }
.case-meta dt { font: 500 10px/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); margin-bottom: 2px; }
.case-meta a { border-bottom: 1px solid var(--line); }

.case-main { padding: var(--top) var(--gutter) 0 40px; min-width: 0; }
.chapter { padding-bottom: 12px; scroll-margin-top: var(--top); }
.chapter-text { display: none; }
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.tile { grid-column: span 12; transition: opacity .6s; }
.tile--half { grid-column: span 6; }
.js .tile:not(.in-focus) { opacity: .42; }
.tile-frame { overflow: hidden; background: #151516; }
.tile-frame video, .tile-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Reveal: the frame opens from the bottom, like the lines of the intro. */
.js .tile[data-reveal] .tile-frame { clip-path: inset(100% 0 0 0); transition: clip-path 1.1s var(--ease); }
.js .tile[data-reveal].is-in .tile-frame { clip-path: inset(0 0 0 0); }

/* A panel in the project's colour, holding one smaller piece off-centre. */
.tile--panel {
  display: flex; justify-content: flex-end; align-items: flex-end;
  padding: 8% 6% 6%;
  aspect-ratio: 16 / 10;
  background: var(--deep);
}
.tile--panel .tile-frame { height: 100%; aspect-ratio: 1 / 1 !important; }

.tile--stats { padding: 28px 0 44px; }
.tile--stats dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile--stats div { border-top: 1px solid var(--line); padding-top: 10px; }
.tile--stats dt { font: 500 11px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin-bottom: 26px; }
.tile--stats dd {
  font: 300 clamp(44px, 6vw, 96px)/1 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.03em;
  color: var(--light);
}

.case-next {
  display: block;
  padding: 72px 0 96px;
  border-top: 1px solid var(--line);
}
.case-next-title {
  display: block; margin-top: 12px;
  font: 300 clamp(44px, 7vw, 118px)/1 var(--serif);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.03em;
}

/* Short laptop screens: keep the rail from overflowing. */
@media (min-width: 901px) and (max-height: 720px) {
  .case-title { font-size: clamp(36px, 4vw, 54px); }
  .case-copy h2 { font-size: 22px; }
  .case-copy p { font-size: 14px; line-height: 1.42; }
  .case-back { margin-bottom: 12px; }
  .case-index a { height: 26px; }
  .case-index { margin-bottom: 12px; }
}
@media (min-width: 901px) and (max-height: 660px) {
  .case-meta { display: none; }
}

/* Short laptop screens: everything scales down together, keeping the air. */
@media (min-width: 901px) and (max-height: 720px) {
  .intro-top { --band-gap: 28px; gap: 32px; padding-top: calc(var(--top) + 10px); }
  .portrait { width: 13svh; }
  .intro-body { gap: 16px; }
  .statement { max-width: 42em; font-size: min(1.9vw, 3.8svh); line-height: 1.18; }
  .numbers { column-gap: 40px; }
  .numbers dd { font-size: 22px; }
  .numbers dt { margin-top: 3px; font-size: 11px; }
}

/* Short screens keep the contact page on one screen. */
@media (min-width: 901px) and (max-height: 640px) {
  .contact-page { gap: 16px; padding-top: calc(var(--top) + 12px); padding-bottom: 20px; }
  .contact-cta { padding: 12px 0 14px; }
  .contact-big { font-size: min(7.2vw, 13.5svh); }
}

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .contact-page { padding-top: calc(var(--top) + 20px); padding-bottom: 20px; }
  .contact-top { display: block; }
  .contact-title { font-size: min(7.4vw, 4.4svh); }
  .contact-rows { margin-top: 24px; }
  .contact-big { font-size: min(13vw, 8svh); }
}
@media (max-width: 900px) {
  :root { --gutter: 16px; --top: 56px; }
  .topbar-cta { display: none; }
  .name-full { display: none; }
  .name-short { display: inline; }
  .topbar-nav { padding-left: 0; gap: 14px; }

  .about, .case { display: block; }

  .intro-top {
    --band-gap: 32px;
    display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 28px 20px; align-items: end;
    padding-top: calc(var(--top) + 20px);
  }
  .intro-body { display: contents; }
  .statement { grid-column: 1 / -1; order: -1; max-width: none; font-size: min(7vw, 3.4svh); line-height: 1.22; }
  .portrait { width: 60px; height: 75px; }
  .numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
  .numbers div:nth-child(n+4) { display: none; }
  .numbers dd { font-size: min(7.2vw, 28px); }
  .numbers dt { margin-top: 3px; font-size: 11px; white-space: normal; }
  .js .intro-body { opacity: 1; transform: none; }
  .card { bottom: 56px; }
  .work-meter { left: var(--gutter); right: var(--gutter); bottom: 20px; }

  .about { padding: 72px var(--gutter); }
  .about-side { margin-bottom: 20px; }
  .about-photo { width: 160px; }
  .about-body { padding-left: 0; }
  .about-lead { margin-bottom: 56px; }
  .about-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exp-list { padding-left: 0; }
  .exp-row { grid-template-columns: 1fr; gap: 8px; }
  .upwork-badge { margin-bottom: 20px; }
  .upwork-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; margin-bottom: 44px; }
  .upwork-reviews { grid-template-columns: 1fr; }

  .contact { padding-top: 64px; }
  .contact-mail { font-size: 10vw; margin-bottom: 64px; }

  .case-rail {
    position: static; height: auto; display: block;
    padding-bottom: 28px; border-right: 0;
  }
  .case-title { font-size: 56px; }
  .case-text { display: none; }
  .case-foot { margin-top: 28px; }
  .case-index { display: none; }
  .case-main { padding: 0 var(--gutter); }
  .chapter { padding-bottom: 28px; }
  .chapter-text { display: block; padding: 28px 0 22px; }
  .chapter-text h2 {
    margin: 10px 0;
    font: 300 28px/1.12 var(--serif);
    font-variation-settings: 'opsz' 40;
    letter-spacing: -.012em;
  }
  .chapter-text p:last-child { color: var(--mute); }
  .mosaic { gap: 8px; }
  .js .tile:not(.in-focus) { opacity: 1; }
  .tile--stats dl { grid-template-columns: 1fr; gap: 16px; }
  .tile--stats dt { margin-bottom: 8px; }
}

/* Visually hide the mobile chapter text on desktop but keep it for screen
   readers, since the rail copy is aria-hidden. */
@media (min-width: 901px) {
  .chapter-text {
    display: block; position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .line > span { transform: none; }
  .js .tile[data-reveal] .tile-frame { clip-path: none; }
}
