/* Active preview: shirt-black continuity, broad asymmetric light fields, continuous grain.
   Radii: 16px media, 18px chrome, pill controls. Layers: content 0, chrome 20, grain 25, skip link 30. */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage-grotesque-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --hero-bg: #222222;
  --hero-light: #606060;
  --hero-shade: #0A0A0A;
  --section-dark: #090A0A;
  --paper: var(--hero-bg);
  --ink: #EFEFEF;
  --ink-2: #C7C7C7;
  --muted: #AAAAAA;
  --line: #3C3C3C;
  --soft: rgb(255 255 255 / .08);
  --primary: #E7E7E7;
  --on-primary: #232323;
  --sans: 'Bricolage Grotesque', system-ui, sans-serif;
  --disp: var(--sans);
  --gut: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
[data-phase='light'] {
  --paper: #F2F2F2;
  --ink: #222222;
  --ink-2: #424242;
  --muted: #626262;
  --soft: rgb(0 0 0 / .06);
  --primary: #222222;
  --on-primary: #F2F2F2;
}
[data-phase] { color: var(--ink); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
.contact-open, .contact-open body { overflow: hidden; overscroll-behavior: none; }
.contact-open body { padding-right: var(--contact-scrollbar-gap, 0px); }
body {
  margin: 0;
  background: var(--section-dark);
  color: var(--ink);
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
#main { isolation: isolate; background: var(--section-dark); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
::selection { color: var(--on-primary); background: var(--primary); }
section[id], #top, #main, #contact-content { scroll-margin-top: 96px; }
#work, #record, #contact { scroll-margin-top: 0; }
.shell { width: 100%; max-width: var(--max); padding-inline: var(--gut); margin-inline: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 16px;
  left: 20px;
  z-index: 30;
  padding: 12px 20px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }
h1, h2, h3, p { margin-top: 0; }
h2 { font-size: clamp(22px, 2.3vw, 30px); font-weight: 500; line-height: 1.15; letter-spacing: -.045em; }

/* Full-height panels grow naturally when their content needs more room. */
.work, .rec, .close, .doc-open, .doc-close {
  --panel-pad-top: clamp(80px, 10dvh, 104px);
  --panel-pad-bottom: clamp(32px, 5dvh, 56px);
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--panel-pad-top) var(--panel-pad-bottom);
}
.work > *, .rec > *, .close > *, .doc-open > * { flex-shrink: 0; }

/* Chrome swaps palettes immediately for contrast; appearance and press motion stay. */
.nav {
  position: fixed;
  top: 14px;
  left: var(--gut);
  right: var(--gut);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: calc(var(--max) - 2 * var(--gut));
  margin-inline: auto;
  padding: 8px 18px;
  color: var(--ink);
  background: var(--hero-bg);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.contact-open .nav { right: calc(var(--gut) + var(--contact-scrollbar-gap, 0px)); }
.nav[data-surface='dark'] { background: color-mix(in srgb, var(--section-dark) 96%, transparent); }
.nav[data-surface='paper'] { background: var(--paper); box-shadow: 0 4px 22px rgb(0 0 0 / .12); }
.mark { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; font-weight: 600; letter-spacing: -.035em; }
.nav-mid { display: flex; gap: 26px; }
.nav-mid a { display: inline-flex; align-items: center; min-height: 44px; font-size: 11px; font-weight: 500; color: var(--muted); }
.nav-mid a:hover { color: var(--ink); }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, transform .2s var(--ease);
}
.pill.solid { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.pill:focus-visible { outline-color: var(--ink); }
.brand-icon { width: 14px; height: 14px; flex: 0 0 auto; object-fit: contain; }
.go { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; background: var(--soft); }
.solid .go { background: color-mix(in srgb, var(--on-primary) 8%, transparent); }
svg.icon { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.go svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.hero-cta .go, .close-cta .go { width: 24px; height: 24px; }
.hero-cta .go svg, .close-cta .go svg { width: 12px; height: 12px; }
.pill:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .pill:hover { border-color: var(--primary); }
  .pill.solid:hover { background: color-mix(in srgb, var(--primary) 88%, var(--on-primary)); border-color: color-mix(in srgb, var(--primary) 88%, var(--on-primary)); color: var(--on-primary); }
  .pill:hover .go svg { transform: translateX(2px); }
}

/* Broad studio light fades into the full-width shirt-black continuation.
   Document pages open on the same surface: there is no portrait there, but its
   geometry still drives the tonal map, so the page below starts on the same black. */
.hero, .doc-open {
  --portrait-width: min(400px, 42svh, 86vw);
  --portrait-height: calc(var(--portrait-width) * 1060 / 890);
  --shirt-seam: .03;
  position: relative;
  min-height: 100svh;
  background-color: var(--hero-bg);
  background-image:
    linear-gradient(180deg, transparent calc(100% - var(--portrait-height) * .38),
      var(--section-dark) calc(100% - var(--portrait-height) * var(--shirt-seam)), var(--section-dark) 100%),
    radial-gradient(ellipse max(65vw, calc(var(--portrait-width) * 1.9)) calc(var(--portrait-height) * 1.7)
      at calc(50% - var(--portrait-width) * .65) calc(100% - var(--portrait-height) * .58),
      color-mix(in srgb, var(--hero-shade) 56%, transparent) 0%,
      color-mix(in srgb, var(--hero-shade) 25%, transparent) 42%, transparent 85%),
    radial-gradient(ellipse max(75vw, calc(var(--portrait-width) * 2.25)) calc(var(--portrait-height) * 2)
      at calc(50% + var(--portrait-width) * .58) calc(100% - var(--portrait-height) * .5),
      color-mix(in srgb, var(--hero-light) 47%, transparent) 0%,
      color-mix(in srgb, var(--hero-light) 18%, transparent) 38%, transparent 84%);
}
.hero { isolation: isolate; overflow: clip; padding-bottom: var(--portrait-height); }
.hero-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - var(--portrait-height));
  max-width: var(--max);
  margin-inline: auto;
  padding: 88px var(--gut) 32px;
  text-align: center;
}
.hero h1 { margin: 0; font-family: var(--disp); font-size: clamp(34px, 5.8vw, 68px); font-weight: 600; line-height: 1.08; letter-spacing: -.055em; }
.hero h1 .w { display: inline-block; }
.hero-sub { display: flex; justify-content: center; gap: clamp(12px, 2vw, 22px); margin: 12px 0 0; font-size: 10px; line-height: 1.4; letter-spacing: .12em; color: var(--ink-2); }
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.face { position: absolute; z-index: 1; left: 50%; bottom: 0; width: var(--portrait-width); height: var(--portrait-height); margin: 0; transform: translateX(-50%); pointer-events: none; }
.face img { width: 100%; height: 100%; object-fit: contain; }
/* Rounded upper-arm contours continue the measured shirt edge into the black floor. */
.hero-tone {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 0;
  width: calc(var(--portrait-width) * 1.36);
  height: calc(var(--portrait-height) * .30);
  transform: translateX(-50%);
  background: var(--section-dark);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 100%);
  /* The same two cubics sampled at t = n/12 for older browsers. */
  clip-path: polygon(
    0.9253% 100.0000%, 0.6043% 91.8402%, 0.5118% 84.1723%,
    0.6529% 76.9781%, 1.0324% 70.2390%, 1.6551% 63.9366%,
    2.5260% 58.0526%, 3.6499% 52.5686%, 5.0317% 47.4661%,
    6.6763% 42.7267%, 8.5885% 38.3320%, 10.7732% 34.2636%,
    13.2353% 30.5031%, 27.2802% 11.0063%, 72.7198% 15.4088%,
    86.7647% 38.0503%, 89.2268% 42.3020%, 91.4115% 46.6753%,
    93.3237% 51.1834%, 94.9683% 55.8395%, 96.3501% 60.6567%,
    97.4740% 65.6484%, 98.3449% 70.8276%, 98.9676% 76.2076%,
    99.3471% 81.8017%, 99.4882% 87.6230%, 99.3957% 93.6847%,
    99.0747% 100.0000%
  );
}
@supports (clip-path: shape(from 0% 100%, curve to 100% 100% with 0% 0% from origin / 100% 0% from origin, close)) {
  .hero-tone {
    clip-path: shape(
      from 0.92531% 100%,
      curve to 13.23529% 30.50314%
        with -0.80965% 66.35220% from origin / 2.82551% 44.95376% from origin,
      line to 27.28024% 11.00629%,
      line to 72.71976% 15.40881%,
      line to 86.76471% 38.05031%,
      curve to 99.07469% 100%
        with 97.17449% 54.83167% from origin / 100.80965% 74.21384% from origin,
      close
    );
  }
}
@media (prefers-reduced-motion: no-preference) {
  .loaded .hero-body { animation: arrive .6s var(--ease) both; }
}
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Four real projects use the original coverflow; readable articles are the fallback. */
.work {
  --work-focus-top: 96px;
  --work-focus-bottom: 16px;
  --slide-height-limit: max(48px, calc(100dvh - var(--work-focus-top) - var(--work-focus-bottom) - 2px));
  --slide-width: min(72vw, 640px, calc(var(--slide-height-limit) * 1520 / 950));
  overflow-x: clip; overflow-y: visible; background: transparent; color: var(--ink); text-align: center;
}
.work a, .work summary, .work button { scroll-margin-block: var(--work-focus-top) var(--work-focus-bottom); }
.work-head { margin-bottom: 14px; }
.work-head h2 { margin-bottom: 8px; }
.work-head p { margin-bottom: 0; font-size: 13px; color: var(--muted); }
.work-carousel { width: 100%; max-width: var(--max); margin-inline: auto; overflow: visible; padding: 26px var(--gut) 30px; touch-action: pan-y; }
.work-carousel #rig { height: auto; }
.work-carousel .swiper-slide { min-width: 0; height: auto; }
.work-carousel.swiper-initialized { width: var(--slide-width); padding-inline: 0; }
.work-carousel.swiper-initialized #rig { display: flex; align-items: center; gap: 0; }
.work-carousel.swiper-initialized .swiper-slide { width: var(--slide-width); }
.work-carousel.swiper-initialized .project-copy { display: none; }
.work-carousel:not(.swiper-initialized) { touch-action: auto; }
.work-carousel:not(.swiper-initialized) #rig { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; align-items: start; transform: none; }
.slide { --slide-radius: 16px; display: block; border-radius: var(--slide-radius); }
.slide-in {
  position: relative; padding: 0; border: 1px solid var(--line); border-radius: var(--slide-radius); background: transparent;
  box-shadow: none; overflow: hidden;
}
.shot { overflow: hidden; aspect-ratio: 1520 / 950; border-radius: calc(var(--slide-radius) - 1px); background: #FFFFFF; }
.shot img, .shot video { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.work-carousel.swiper-initialized .slide-in::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: #000000; opacity: .32; transition: opacity .3s var(--ease); }
.work-carousel.swiper-initialized .swiper-slide-active .slide-in::after { opacity: 0; }
.slide:focus-visible { outline-color: var(--ink); }
.project-copy { padding-top: 20px; margin-inline: auto; }
.project-description { margin-bottom: 8px; font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.work-caption { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 20px; align-items: start; }
.work-foot { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; margin-top: 36px; }
.work-foot h3 { margin: 0; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.work-foot .appr-links { margin: 0; }
.meta { min-width: 0; width: 100%; max-width: 58ch; }
.meta .top { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-bottom: 9px; font-size: 11px; color: var(--muted); }
.meta h3 { margin-bottom: 12px; font-size: clamp(20px, 1.9vw, 24px); font-weight: 500; letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.project-details summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 11px; color: var(--ink-2); list-style: none; }
.project-details summary::-webkit-details-marker { display: none; }
.project-details summary::after { content: '+'; font-size: 16px; }
.project-details[open] summary::after { content: '−'; }
.project-details[open] { padding-bottom: 12px; }
.chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px 16px; padding: 0; margin: 0; list-style: none; color: var(--muted); }
.chips li { font-size: 11px; }
.project-actions { display: none; }
.work-carousel.swiper-initialized > .project-actions {
  position: absolute; inset: 0 -16px; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding-block: inherit; pointer-events: none;
}
.project-nav { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--hero-bg); color: var(--ink); pointer-events: auto; }
.project-nav[data-project-step='-1'] .icon { transform: rotate(180deg); }
.project-nav[aria-disabled='true'] { color: var(--muted); cursor: default; }
.project-nav:not([aria-disabled='true']):hover, .project-nav:not([aria-disabled='true']):active { background: color-mix(in srgb, var(--hero-bg) 85%, var(--ink)); }
.project-nav:focus-visible { outline-offset: 3px; box-shadow: 0 0 0 7px var(--hero-bg); }
.carousel-status { max-width: var(--max); margin: 0 auto; padding-inline: var(--gut); color: var(--ink-2); font-size: 13px; }

/* An open record layout, without card containers. */
.rec, .close { background: transparent; color: var(--ink); }
.rec { position: relative; text-align: center; }
/* One static light field crosses section boundaries behind the shared main content. */
.rec::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: calc(-1 * clamp(160px, 18vw, 300px));
  right: 0;
  bottom: calc(-1 * clamp(180px, 18vw, 280px));
  left: 0;
  background-image:
    radial-gradient(ellipse 110% 64% at 110% 34%,
      color-mix(in srgb, var(--hero-light) 34%, transparent) 0%,
      color-mix(in srgb, var(--hero-light) 20%, transparent) 42%, transparent 85%),
    radial-gradient(ellipse 105% 68% at -12% 68%,
      color-mix(in srgb, var(--hero-light) 22%, transparent) 0%,
      color-mix(in srgb, var(--hero-light) 12%, transparent) 44%, transparent 86%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 80%, transparent 100%);
  pointer-events: none;
}
.rec-top { max-width: 660px; margin: 0 auto 24px; }
.rec-top h2 { margin: 0 auto 16px; max-width: 18ch; }
.rec-top p { margin: 0 auto; max-width: 54ch; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.ev { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; margin: 0; }
.stat { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 20px 0 26px; }
.stat .n { order: -1; display: block; margin: 0 0 14px; font-size: clamp(28px, 3.3vw, 42px); font-weight: 500; letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .k { display: block; margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; max-width: 24ch; }
.stat .s { display: block; margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.stat:last-child { border-left: 1px solid var(--line); }
.roles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.roles-head h3 { margin-bottom: 10px; font-size: 18px; font-weight: 500; letter-spacing: -.035em; }
.roles-head p { max-width: 54ch; margin: 0 auto; font-size: 13px; line-height: 1.6; color: var(--muted); }
.role-list details { border-bottom: 1px solid var(--line); }
.role-list summary { display: grid; grid-template-columns: clamp(54px, 10vw, 126px) minmax(0, 1fr) clamp(54px, 10vw, 126px); gap: clamp(12px, 2vw, 22px); padding: 14px 0; list-style: none; cursor: pointer; }
.role-list details:first-child summary { padding-top: 0; }
.role-list summary::-webkit-details-marker { display: none; }
.role-list .y { align-self: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.role-heading { min-width: 0; }
.role-heading strong { display: block; font-size: 15px; font-weight: 500; line-height: 1.4; letter-spacing: -.02em; }
.role-heading span { display: block; margin-top: 5px; font-size: 13px; color: var(--ink-2); }
.expand-mark { align-self: center; justify-self: center; font-size: 18px; font-weight: 400; color: var(--muted); transition: transform .2s var(--ease); }
.role-list details[open] .expand-mark, .doc-questions details[open] .expand-mark { transform: rotate(45deg); }
.role-list details > p { margin: 0 auto 20px; max-width: 54ch; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

.appr { padding: 76px 0 88px; background: var(--section-dark); color: var(--ink); }
.appr h2 { margin: 0 auto 20px; text-align: center; }
.appr-intro { max-width: 60ch; margin: 0 auto; font-size: 14px; line-height: 1.75; text-align: center; color: var(--ink-2); }
.close-row { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 36px; }
.close-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
/* One portrait-led contact card also works inline without dialog enhancement. */
.contact-content, .contact-dialog {
  color-scheme: dark;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 75% 100% at 100% 0%, color-mix(in srgb, var(--hero-light) 24%, transparent), transparent 75%),
    linear-gradient(120deg, color-mix(in srgb, var(--hero-bg) 98%, transparent), color-mix(in srgb, var(--section-dark) 94%, transparent));
  color: var(--ink);
}
.contact-content { position: relative; width: 100%; max-width: 620px; margin-top: 48px; overflow: hidden; }
.contact-body {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 368px;
  padding: 62px 40px 24px;
  overflow: hidden;
  text-align: left;
}
.contact-body::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url('textures/grain-fine.webp') repeat;
  background-size: 512px 512px;
  opacity: .16;
  pointer-events: none;
}
.contact-portrait {
  position: absolute;
  z-index: -2;
  right: -12px;
  bottom: -20px;
  width: 54%;
  aspect-ratio: 890 / 1060;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #000 30%, #000 88%, transparent),
    linear-gradient(180deg, transparent, #000 12%, #000 60%, transparent 98%);
  mask-image:
    linear-gradient(90deg, transparent, #000 30%, #000 88%, transparent),
    linear-gradient(180deg, transparent, #000 12%, #000 60%, transparent 98%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.contact-portrait img {
  width: 100%;
  height: auto;
  opacity: .74;
  -webkit-mask-image: radial-gradient(circle at center, #000 .6px, transparent .85px);
  mask-image: radial-gradient(circle at center, #000 .6px, transparent .85px);
  -webkit-mask-size: 1.8px 1.8px;
  mask-size: 1.8px 1.8px;
}
.contact-content h2 { max-width: none; margin: 0 0 7px; font-size: 32px; font-weight: 500; line-height: 1.12; letter-spacing: -.045em; }
.contact-intro { max-width: 54ch; margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.contact-status { color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.contact-status:not([hidden]) { max-width: 270px; margin: 16px 0; }
.close-links { display: flex; flex-direction: column; align-items: stretch; width: 270px; max-width: 100%; gap: 0; margin-top: auto; padding-top: 28px; }
.close-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 0; border: 0; border-radius: 0; background: none; color: var(--ink); font-size: 13px; line-height: 1.5; }
.close-links a > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.close-links .go { width: 18px; height: 18px; background: none; color: var(--muted); }
.contact-detail { display: inline; margin: 0 0 0 4px; color: var(--muted); font-size: 11px; }
.contact-booking { margin: 0; padding: 0; border: 0; }
.contact-booking a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--ink-2); font-size: 11px; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
.contact-booking a svg { width: 13px; height: 13px; }
.close-links a:focus-visible, .contact-booking a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }

/* The close control stays outside the card's internally scrolling content. */
.contact-dialog {
  --contact-margin-block: max(16px, env(safe-area-inset-top, 0px), env(safe-area-inset-bottom, 0px));
  --contact-margin-inline: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  position: fixed;
  inset: 0;
  width: calc(100% - 2 * var(--contact-margin-inline));
  max-width: 620px;
  height: 370px;
  max-height: calc(100vh - 2 * var(--contact-margin-block));
  max-height: calc(100dvh - 2 * var(--contact-margin-block));
  margin: auto;
  padding: 0;
  overflow: hidden;
  font: inherit;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .04), 0 32px 90px rgb(0 0 0 / .42);
}
.contact-dialog:not([open]) { display: none; }
.contact-dialog[open] { display: flex; flex-direction: column; }
.contact-dialog::backdrop { background: color-mix(in srgb, var(--section-dark) 88%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.contact-dialog-head { position: absolute; z-index: 3; top: 12px; right: 12px; display: flex; padding: 0; }
.contact-close { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--section-dark) 50%, transparent); color: var(--ink-2); font-size: 23px; font-weight: 300; line-height: 1; }
.contact-close:focus-visible { outline-offset: 3px; }
.contact-dialog .contact-content { flex: 1 1 auto; min-height: 0; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: auto; scrollbar-width: thin; scrollbar-color: var(--hero-light) transparent; }
@media (hover: hover) and (pointer: fine) {
  .close-links a:hover, .contact-booking a:hover { color: var(--ink); background: none; text-decoration: underline; text-underline-offset: 4px; }
  .close-links a:hover .go { color: var(--ink); }
  .contact-close:hover { color: var(--ink); background: var(--soft); }
}
@media (max-width: 560px) {
  .contact-dialog { height: 432px; }
  .contact-body { min-height: 430px; padding: 182px 26px 22px; }
  .contact-content h2 { font-size: 30px; }
  .contact-portrait {
    top: -8px;
    right: -10px;
    bottom: auto;
    width: 244px;
    -webkit-mask-image:
      linear-gradient(90deg, transparent, #000 30%, #000 88%, transparent),
      linear-gradient(180deg, transparent, #000 12%, #000 44%, transparent 83%);
    mask-image:
      linear-gradient(90deg, transparent, #000 30%, #000 88%, transparent),
      linear-gradient(180deg, transparent, #000 12%, #000 44%, transparent 83%);
  }
  .close-links { width: 100%; padding-top: 24px; }
}
@media (max-height: 480px) and (min-width: 561px) {
  .contact-dialog { height: 310px; }
  .contact-body { min-height: 308px; padding-top: 36px; padding-bottom: 16px; }
  .contact-portrait { width: 48%; bottom: -28px; }
  .close-links { padding-top: 20px; }
}

.rv { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.reveal-pending { opacity: 0; transform: translateY(14px); }
.rv.in { opacity: 1; transform: none; }

/* Native DPR2 micrograin stays still; only the larger, opposing fields move.
   Exclusion keeps the same neutral texture visible on both paper and dark surfaces. */
.atmos {
  position: fixed;
  inset: 0;
  z-index: 25;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: exclusion;
  opacity: .32;
}
.atmos-grain {
  position: absolute;
  inset: 0;
  background: url('textures/grain-fine.webp') repeat;
  background-size: 512px 512px;
  opacity: .30;
}
.atmos-flow {
  position: absolute;
  inset: -18%;
  background: url('textures/grain-flow.webp') repeat;
  background-size: 960px 960px;
  opacity: .19;
  will-change: transform;
  animation: sand-flow 32s cubic-bezier(.77, 0, .175, 1) -16s infinite alternate;
}
.atmos-flow-alt {
  background-size: 1100px 1100px;
  opacity: .14;
  animation-name: sand-return;
  animation-duration: 44s;
  animation-delay: -27s;
}
@keyframes sand-flow {
  from { transform: translate3d(-2%, -1%, 0) rotate(-.65deg) scale(1.03); }
  to { transform: translate3d(2%, 1%, 0) rotate(.65deg) scale(1.05); }
}
@keyframes sand-return {
  from { transform: translate3d(1.5%, 1.5%, 0) rotate(.7deg) scale(1.04); }
  to { transform: translate3d(-1.5%, -1.5%, 0) rotate(-.7deg) scale(1.02); }
}
.motion-paused .atmos-flow, .contact-open .atmos-flow { animation-play-state: paused; }
/* The early homepage bootstrap releases these after critical loading, or fails open. */
.grain-pending .atmos-grain, .grain-pending .atmos-flow, .grain-pending .contact-body::after { background-image: none; }

@media (max-width: 1023px) {
  .ev { gap: 24px; }
}
@media (max-width: 767px) {
  .nav { left: 12px; right: 12px; top: 10px; padding: 6px 12px; }
  .contact-open .nav { right: calc(12px + var(--contact-scrollbar-gap, 0px)); }
  .nav-mid { gap: 16px; }
  /* Match by href suffix so subpage routes like ../../#work keep the shortcut. */
  .nav-mid a:not([href$='#work']) { display: none; }
  .hero h1 { font-size: clamp(32px, 9.2vw, 48px); }
  .appr { padding: 56px 0 64px; }
  .work-head { margin-bottom: 8px; }
  .work { --slide-width: min(84vw, calc(var(--slide-height-limit) * 1520 / 950)); }
  .work-carousel { padding-block: 24px 32px; }
  .work-carousel:not(.swiper-initialized) #rig { grid-template-columns: minmax(0, 1fr); }
  .slide { --slide-radius: 12px; }
  .meta .top { gap: 12px; }
  .meta h3 { margin-bottom: 10px; }
  .rec-top { margin-bottom: 20px; }
  .rec-top h2 { margin-bottom: 12px; }
  .rec-top p { font-size: 13px; line-height: 1.6; }
  .ev { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
  .stat { padding: 6px 0; }
  .stat .n { margin-bottom: 6px; }
  .stat .k { line-height: 1.4; }
  .stat .s { margin-top: 4px; }
  .stat:last-child { border-left: 0; }
  .roles { margin-top: 16px; padding-top: 16px; gap: 12px; }
  .roles-head h3 { margin-bottom: 6px; }
  .role-list summary { padding-block: 10px; }
  .role-heading strong { font-size: 14px; }
  .role-heading span { margin-top: 3px; line-height: 1.4; }
  .close-links { align-items: stretch; }
}
@media (max-width: 640px) {
  .hero { --portrait-width: min(360px, 44svh, 86vw); }
  .hero-body { padding-top: 80px; padding-bottom: 26px; }
  .hero-cta { gap: 10px; margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
  .rv.reveal-pending { opacity: 1; transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav[data-surface='hero'] { background: var(--hero-bg); }
  .nav[data-surface='paper'] { background: var(--paper); }
  .nav[data-surface='dark'] { background: var(--section-dark); }
  .contact-content, .contact-dialog { background: var(--hero-bg); }
  .contact-dialog .contact-content { background: none; }
  .contact-dialog::backdrop { background: var(--section-dark); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .contact-content, .contact-dialog { background: Canvas; border-color: CanvasText; }
  .contact-dialog .contact-content { background: none; }
  .contact-body::after, .contact-portrait { display: none; }
  .contact-close { border-color: ButtonText; }
}

/* Discreet in-page routes to the service pages and writing, under the About
   paragraph. The same row indexes a document page and closes it. */
.appr-links, .doc-index { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.appr-links { margin: 18px auto 0; }
.appr-links a, .doc-index a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 14px; color: var(--muted); }
.appr-links a:hover, .doc-index a:hover { color: var(--ink); }
.appr-links span { color: var(--line); }
/* The current page or section remains a native link in the same slot. */
.appr-links [aria-current] { color: var(--ink-2); }
.close > .shell {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  min-height: calc(var(--close-height, 100dvh) - var(--panel-pad-top) - var(--panel-pad-bottom));
}
.close-in { grid-row: 2; }
/* One quiet route row stays at the foot without moving the centred contact control. */
.close-foot { grid-row: 3; align-self: end; margin: clamp(40px, 6dvh, 64px) 0 0; text-align: center; }
.close-foot .appr-links { margin: 0; }
.close-foot .appr-links a { justify-content: center; min-width: 44px; padding-inline: clamp(2px, 2vw - 6px, 14px); }
.close-foot .appr-links > span { flex: 0 0 1px; height: 10px; overflow: hidden; background: var(--line); }

/* Document pages -- services and legal -- read as a ruled ledger on the
   Experience section's grammar, opened by the hero surface. */
.doc { background: var(--section-dark); color: var(--ink); }
.doc-open { text-align: center; }
.doc-service .doc-open { min-height: 80vh; min-height: 80dvh; }
.doc-service .doc-open h1 { overflow-wrap: anywhere; }
.doc-open-body { margin-block: auto; }
.doc-eyebrow { margin: 0 0 16px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.doc-open h1 { max-width: 13ch; margin: 0 auto 14px; font-size: clamp(34px, 5.4vw, 64px); font-weight: 600; line-height: 1.05; letter-spacing: -.055em; }
.doc-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px clamp(14px, 2.4vw, 26px); padding: 0; margin: 0 0 26px; list-style: none; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.doc-lede { max-width: 52ch; margin: 0 auto 22px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.doc-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
/* Foot of the opening panel: the .appr-links row again, as a page index. */
.doc-index { padding: 0; margin: clamp(36px, 6dvh, 64px) auto 0; list-style: none; }
.doc-index li { display: flex; align-items: center; }
.doc-index li + li::before { content: '|'; color: var(--line); }

/* One static light field, the .rec::before treatment, full-bleed across the body. */
.doc-body { position: relative; }
.doc-body::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image:
    radial-gradient(ellipse 110% 50% at 110% 18%,
      color-mix(in srgb, var(--hero-light) 30%, transparent) 0%,
      color-mix(in srgb, var(--hero-light) 17%, transparent) 42%, transparent 85%),
    radial-gradient(ellipse 105% 54% at -12% 78%,
      color-mix(in srgb, var(--hero-light) 20%, transparent) 0%,
      color-mix(in srgb, var(--hero-light) 11%, transparent) 44%, transparent 86%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 84%, transparent 100%);
  pointer-events: none;
}

/* Every section is one ruled row: index in the margin, content on a shared measure. */
.doc-row {
  --doc-track: clamp(54px, 10vw, 126px);
  display: grid;
  grid-template-columns: var(--doc-track) minmax(0, 1fr) var(--doc-track);
  gap: clamp(12px, 2vw, 22px);
  padding-block: clamp(48px, 7dvh, 84px);
  border-top: 1px solid var(--line);
  text-align: center;
}
.doc-row:first-child { border-top: 0; }
.doc-num { align-self: start; padding-top: 5px; font-size: 10px; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; text-align: left; }
.doc-cell { min-width: 0; }
.doc-cell h2 { margin: 0 auto clamp(20px, 3dvh, 30px); max-width: 20ch; text-wrap: balance; }
/* One reading width for prose, ledger, weeks and questions. */
.doc-measure { max-width: 62ch; margin-inline: auto; text-align: left; }
.doc-measure > p { margin: 0 0 14px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.doc-measure > p:last-child { margin-bottom: 0; }
/* Service numbers and standalone copy centre; structured rows keep their reading edge. */
.doc-service .doc-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
.doc-service .doc-num { padding-top: 0; margin-bottom: 14px; text-align: center; }
.doc-service .doc-measure > p { text-align: center; }
/* Only prose links are underlined; chrome rows keep the site's muted link colour. */
.doc-measure a, .doc-close .close-in > p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.doc-measure a:hover, .doc-close .close-in > p a:hover { text-decoration-color: var(--ink); }

/* Deliverables: a ruled sub-ledger with a tabular index. */
.doc-deliverables { padding: 0; margin: 0 0 22px; list-style: none; }
.doc-deliverables li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: clamp(14px, 2vw, 24px); align-items: baseline; padding: 15px 0; border-top: 1px solid var(--line); }
.doc-deliverables li:last-child { border-bottom: 1px solid var(--line); }
.doc-deliverables .doc-mark { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.doc-deliverables p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink-2); }

/* How it runs: the same rows, marked week by week. */
.doc-week { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: clamp(14px, 2vw, 24px); padding: 20px 0; border-top: 1px solid var(--line); }
.doc-week:last-child { border-bottom: 1px solid var(--line); }
.doc-week .w { padding-top: 3px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.doc-week h3 { margin: 0 0 8px; font-size: 15px; font-weight: 500; letter-spacing: -.02em; }
.doc-week p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

/* Questions: the career disclosure rows. */
.doc-questions details { border-bottom: 1px solid var(--line); }
.doc-questions details:first-child { border-top: 1px solid var(--line); }
.doc-questions summary { display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: clamp(12px, 2vw, 22px); align-items: center; min-height: 44px; padding: 14px 0; list-style: none; cursor: pointer; }
.doc-questions summary::-webkit-details-marker { display: none; }
.doc-questions summary h3 { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.45; letter-spacing: -.02em; }
.doc-questions details > p { margin: 0 0 18px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

/* Closing panel: the landing page's CTA-only close, on the same hairline measure. */
.doc-close { --close-height: 72dvh; min-height: var(--close-height); border-top: 1px solid var(--line); text-align: center; }
.doc-close .close-in > h2 { margin: 0 auto 16px; max-width: 26ch; text-wrap: balance; }
.doc-close .close-in > p { max-width: 50ch; margin: 0 auto 26px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }

@media (max-width: 767px) {
  .doc-open h1 { font-size: clamp(32px, 9vw, 46px); }
  .doc-lede { font-size: 14px; }
  .doc-row { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 44px; }
  .doc-num { padding-top: 0; margin-bottom: 14px; text-align: center; }
  .doc-cell h2 { margin-bottom: 20px; }
  .doc-deliverables li { grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 13px 0; }
  .doc-deliverables p, .doc-measure > p { font-size: 13.5px; }
  .doc-week { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .doc-week .w { padding-top: 0; }
}
/* Six pipe-separated section links do not fit one phone line; rule them instead. */
@media (max-width: 640px) {
  .appr-links a, .appr-links .is-current { padding-inline: 9px; }
  .doc-meta { gap: 6px 12px; letter-spacing: .1em; }
  .doc-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
  .doc-index li { border-bottom: 1px solid var(--line); }
  .doc-index li + li::before { content: none; }
  .doc-index a { width: 100%; justify-content: center; padding-inline: 8px; }
}
