/* Self-hosted SF so Android Chrome (Pixel) doesn't fall through to Roboto. */
@font-face {
  font-family: "SF Pro Text";
  src: url("fonts/sf-pro.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  font-optical-sizing: auto;
}

:root {
  --bg: #fff;
  /* Apple near-black (29,29,31) pulled onto the warm gallery ink. */
  --ink: #1c1b19;
  /* Apple secondary gray (110,110,115) with the site’s warmth kept. */
  --muted: #6e6a64;
  --line: #dcd7cf;
  --ui-tracking: -0.01em;
  --display-tracking: -0.022em;
  --body-leading: 1.47;
  /*
    Desktop scale unit. Settings store design pixels at 1440px wide.
    --u = 1px at 1440 and below (current look). Above that:
    Npx → calc(N / 1440 * 100vw) so type, gaps, and objects grow with the screen.
    Mobile profile forces --u: 1px (true pixels inside the phone frame / live phone).
  */
  --design-w: 1440;
  --u: max(1px, 100vw / 1440);
  --gap: calc(12 * var(--u));
  --pad: calc(40 * var(--u));
  --max: calc(1080 * var(--u));
  --header-gap: calc(28 * var(--u));
  --header-top-gap: calc(28 * var(--u));
  --logo-top: calc(40 * var(--u));
  --text-gap: calc(4 * var(--u));
  --filter-gap: calc(8 * var(--u));
  --links-gap: calc(22 * var(--u));
  --bio-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bio-size: calc(14 * var(--u));
  --logo-width: calc(168 * var(--u));
  --body-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ui-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --links-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --links-size: calc(13 * var(--u));
  --filter-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --filter-size: calc(13 * var(--u));
  --filter-pad-y: calc(6 * var(--u));
  --filter-pad-x: calc(12 * var(--u));
  --header-bottom: calc(24 * var(--u));
  --works-bottom-extra: calc(56 * var(--u));
  --layout-top: calc(40 * var(--u));
  --layout-bottom: calc(88 * var(--u));
  --work-text-min: calc(260 * var(--u));
  --viewer-gutter: calc(72 * var(--u));
  --viewer-stage-top: calc(56 * var(--u));
  --viewer-stage-bottom: calc(40 * var(--u));
  --links-pad-top: calc(2 * var(--u));
  --settings-w: 248px;
  --tile-caption-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --tile-caption-size: calc(11 * var(--u));
  --tile-caption-opacity: 0.88;
  --tile-caption-ms: 280ms;
  --tile-caption-delay: 0ms;
  --tile-caption-pad-x: calc(12 * var(--u));
  --tile-caption-pad-y: calc(12 * var(--u));
  --tile-caption-tracking: 0.08em;
  --tile-veil-height: 48%;
  --tile-veil-opacity: 0.72;
  --tile-veil-blur: calc(14 * var(--u));
  --about-title-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --about-title-size: calc(52 * var(--u));
  --about-kicker-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --about-kicker-size: calc(12 * var(--u));
  --about-body-size: calc(17 * var(--u));
  --about-max: calc(570 * var(--u));
  --about-top: calc(40 * var(--u));
  --about-kicker-gap: calc(8 * var(--u));
  --about-title-gap: calc(36 * var(--u));
  --about-para-gap: calc(16 * var(--u));
  --dump-title-size: calc(22 * var(--u));
  --dump-max: calc(1080 * var(--u));
  --dump-top: calc(40 * var(--u));
  --dump-title-gap: calc(22 * var(--u));
  --dump-gap: calc(8 * var(--u));
  --dump-min: calc(160 * var(--u));
  --about-links-gap: calc(28 * var(--u));
  --about-measure: 48ch;
  --work-title-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --work-title-size: calc(42 * var(--u));
  --work-meta-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --work-meta-size: calc(11 * var(--u));
  --work-tags-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --work-tags-size: calc(11 * var(--u));
  --work-body-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --work-body-size: calc(17 * var(--u));
  --work-max: calc(1080 * var(--u));
  --work-panel-gap: calc(12 * var(--u));
  --work-split: calc(32 * var(--u));
  --work-text-pad: calc(23 * var(--u));
  --work-sticky-top: calc(40 * var(--u));
  --work-title-gap: calc(10 * var(--u));
  --work-meta-gap: calc(6 * var(--u));
  --work-tags-gap: calc(22 * var(--u));
  --work-body-gap: calc(16 * var(--u));
  --work-measure: 30ch;
  --work-back-width: calc(110 * var(--u));
  --about-back-width: calc(110 * var(--u));
  --work-back-size: calc(26 * var(--u));
  --work-back-opacity: 0.35;
  --work-back-hover-opacity: 1;
  --work-back-gap: calc(200 * var(--u));
  --about-back-gap: calc(8 * var(--u));
  --work-back-top: calc(8 * var(--u));
  --work-back-below: calc(8 * var(--u));
  --back-width: var(--work-back-width);
  --back-gap: var(--work-back-gap);
  --viewer-darkness: 0.82;
  --viewer-blur: calc(24 * var(--u));
  --viewer-nav-size: calc(48 * var(--u));
  --viewer-zone-pad: calc(28 * var(--u));
  --viewer-zone-radius: calc(22 * var(--u));
  --viewer-action-size: calc(44 * var(--u));
  --viewer-action-radius: calc(22 * var(--u));
  --viewer-action-icon: calc(22 * var(--u));
  --viewer-action-gap: calc(8 * var(--u));
  --viewer-action-top: calc(16 * var(--u));
  --viewer-action-right: calc(18 * var(--u));
  --viewer-control-opacity: 0.55;
  --viewer-control-hover-opacity: 1;
  --viewer-image-max: calc(920 * var(--u));
  --icon-stroke: calc(1.25 * var(--u));
  --year-size: calc(13 * var(--u));
  --year-font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --year-tracking: 0.06em;
  --year-opacity: 1;
  --year-indent: calc(0 * var(--u));
  --year-label-gap: calc(12 * var(--u));
  --year-group-gap: calc(48 * var(--u));
  --filter-active: #161513;
  --filter-active-ink: #fff;
  --player-height: calc(48 * var(--u));
  --player-under: calc(20 * var(--u));
  --player-pad-x: calc(14 * var(--u));
  --player-darkness: 8%;
  --player-opacity: 1;
  --player-ink: #161513;
  --player-icon-size: calc(16 * var(--u));
  --player-stroke: calc(1.5 * var(--u));
  --player-hit: calc(36 * var(--u));
  --player-gap-x: calc(10 * var(--u));
  --player-track: calc(3 * var(--u));
  --player-track-radius: calc(2 * var(--u));
  --player-knob: calc(8 * var(--u));
  --player-knob-color: #161513;
  --player-track-opacity: 0.2;
  --player-fill-opacity: 0.85;
  --player-icon-opacity: 0.72;
  --player-progress: 0;
  --preview-player-height: calc(48 * var(--u));
  --preview-player-under: calc(20 * var(--u));
  --preview-player-pad-x: calc(14 * var(--u));
  --preview-player-darkness: 100%;
  --preview-player-opacity: 0.55;
  --preview-player-ink: #fff;
  --preview-player-icon-size: calc(16 * var(--u));
  --preview-player-stroke: calc(1.5 * var(--u));
  --preview-player-hit: calc(36 * var(--u));
  --preview-player-gap-x: calc(10 * var(--u));
  --preview-player-track: calc(3 * var(--u));
  --preview-player-track-radius: calc(2 * var(--u));
  --preview-player-knob: calc(8 * var(--u));
  --preview-player-knob-color: #fff;
  --preview-player-track-opacity: 0.28;
  --preview-player-fill-opacity: 0.9;
  --preview-player-icon-opacity: 0.92;
}

/* Phone / live mobile: keep dialed pixel sizes. Studio phone frame is not 100vw. */
html.is-mobile-layout,
html[data-viewport="mobile"] {
  --u: 1px;
}

@media (max-width: 820px) {
  :root {
    --u: 1px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #fff;
  color-scheme: only light;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body-font);
  background: var(--bg);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#dor4k-root {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--settings-w) minmax(0, 1fr);
}

/* Noise is fixed; keep settings + site in the two tracks explicitly. */
#dor4k-root > .noise {
  grid-column: 1 / -1;
  grid-row: 1;
}

#dor4k-root > .settings {
  grid-column: 1;
  grid-row: 1;
}

#dor4k-root > .site {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

#dor4k-root > .device-stage {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

/* Clean / live site — no settings rail, no studio phone frame (?view=site or dor4k.com). */
html[data-view="site"] #dor4k-root {
  grid-template-columns: minmax(0, 1fr);
  height: auto;
  overflow: visible;
}

html[data-view="site"] #dor4k-root > .settings {
  display: none !important;
}

html[data-view="site"] #dor4k-root > .site,
html[data-view="site"] #dor4k-root > .device-stage {
  grid-column: 1;
  grid-row: 1;
}

html[data-view="site"] #dor4k-root > .device-stage {
  display: block;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}

html[data-view="site"] .device-shell,
html[data-view="site"] .device-frame {
  width: 100% !important;
  height: auto !important;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  transform: none !important;
}

html[data-view="site"] .device-nav,
html[data-view="site"] .device-chrome {
  display: none !important;
}

html[data-view="site"] .device-frame > .site {
  padding-top: 0;
  padding-bottom: 0;
  height: auto;
  overflow: visible;
}

html[data-view="site"] .device-frame > .viewer {
  position: fixed;
  inset: 0;
  border-radius: 0;
  z-index: 80;
}

/* Back rail sits after the settings column; pin to the viewport edge when settings are gone. */
html[data-view="site"] .work-back {
  left: 0;
}

html.is-soft-nav,
html.is-soft-nav body {
  background: var(--bg, #fff) !important;
}

#nav-veil {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: var(--bg, #fff);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  /* Avoid opacity transitions — Firefox can flash the dark canvas between frames. */
  transition: none;
}

html.is-soft-nav #nav-veil {
  opacity: 1;
  visibility: visible;
}

/* Opacity-only reveal — top-to-bottom stagger, no motion. */
html.is-reveal-pending .reveal-item {
  opacity: 0;
}

html.is-reveal-pending.is-reveal-tiles .tile:not(.is-hidden),
html.is-reveal-pending.is-reveal-tiles .year-group:not(.is-hidden) .year-label {
  opacity: 0;
}

html.is-reveal-active .reveal-item {
  animation: reveal-fade var(--reveal-duration, 760ms) cubic-bezier(0.33, 0, 0.2, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

html.is-reveal-active.is-reveal-tiles .reveal-item:not(.tile):not(.year-label) {
  animation: none !important;
  opacity: 1 !important;
}

html.is-reveal-skip .reveal-item {
  opacity: 1 !important;
  animation: none !important;
}

/* Hide About copy until reveal starts — otherwise the full page paints for a frame. */
html.is-reveal-pending body.about-page .about > *,
html:not(.is-reveal-active):not(.is-reveal-skip) body.about-page .about > *,
html.is-reveal-pending body.dump-page .dump-head > *,
html.is-reveal-pending body.dump-page .dump-empty,
html.is-reveal-pending body.dump-page .dump-grid,
html:not(.is-reveal-active):not(.is-reveal-skip) body.dump-page .dump-head > *,
html:not(.is-reveal-active):not(.is-reveal-skip) body.dump-page .dump-empty,
html:not(.is-reveal-active):not(.is-reveal-skip) body.dump-page .dump-grid {
  opacity: 0;
}

@keyframes reveal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.is-reveal-pending .reveal-item,
  html.is-reveal-active .reveal-item,
  html.is-reveal-pending.is-reveal-tiles .tile:not(.is-hidden),
  html.is-reveal-pending.is-reveal-tiles .year-group:not(.is-hidden) .year-label,
  html.is-reveal-pending body.about-page .about > *,
  html:not(.is-reveal-active):not(.is-reveal-skip) body.about-page .about > *,
  html.is-reveal-pending body.dump-page .dump-head > *,
  html.is-reveal-pending body.dump-page .dump-empty,
  html.is-reveal-pending body.dump-page .dump-grid,
  html:not(.is-reveal-active):not(.is-reveal-skip) body.dump-page .dump-head > *,
  html:not(.is-reveal-active):not(.is-reveal-skip) body.dump-page .dump-empty,
  html:not(.is-reveal-active):not(.is-reveal-skip) body.dump-page .dump-grid {
    opacity: 1 !important;
    animation: none !important;
  }
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

.g3 {
  border-radius: 0;
}

.tile.g3,
.panel.g3 {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.028;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header,
.works,
.grid,
.back,
.page-nav,
.work-layout,
.about,
.dump-layout,
.settings,
.site {
  position: relative;
  z-index: 2;
}

/* Settings panel */

.settings {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 22px 16px 40px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.settings-title {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.settings-reset {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-reset:hover,
.settings-open-site:hover {
  color: var(--ink);
}

.settings-open-site {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.settings-group {
  margin: 0 0 22px;
}

.settings-group h2 {
  margin: 0 0 10px;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.setting {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.setting span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
}

.setting em {
  font-style: normal;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.settings-group > .setting-cross {
  margin: -4px 0 12px;
}

.setting-cross {
  display: block;
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  line-height: 1.4;
  color: var(--muted);
}

.setting-cross:empty {
  display: none;
}

.setting input[type="range"] {
  width: 100%;
  accent-color: #161513;
}

.setting select {
  appearance: none;
  width: 100%;
  border: 0;
  background-color: transparent;
  background-image: var(--g3-stroke);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: var(--ink);
  font: inherit;
  font-size: 0.68rem;
  padding: 7px 8px;
}

.setting-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}

.settings-btn {
  appearance: none;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: background 220ms ease, color 220ms ease;
}

.settings-btn:hover {
  color: var(--ink);
}

.settings-btn[aria-pressed="true"],
.settings-btn.is-pressed {
  background: var(--ink);
  color: var(--bg);
}

.site {
  min-width: 0;
}

/* Device frame — inert on desktop; active in mobile preview */

.device-stage {
  min-width: 0;
}

.device-shell {
  min-width: 0;
  min-height: 0;
}

.device-frame {
  min-width: 0;
  min-height: 100%;
}

.device-chrome {
  display: none;
}

.device-nav {
  display: none;
}

html[data-viewport="mobile"] {
  --phone-w: 390px;
  --phone-h: 844px;
  --phone-ratio: 390 / 844;
}

html[data-viewport="mobile"] #dor4k-root {
  height: 100vh;
  overflow: hidden;
}

html[data-viewport="mobile"] #dor4k-root > .settings {
  height: 100vh;
  overflow: auto;
}

html[data-viewport="mobile"] #dor4k-root > .device-stage {
  display: grid;
  grid-template-columns: 48px auto 48px;
  align-items: center;
  justify-content: center;
  justify-items: center;
  column-gap: 10px;
  height: 100vh;
  min-height: 0;
  padding: 40px 20px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 40%, #f0ebe4 0%, #ddd6cc 62%, #d2cbc0 100%);
}

html[data-viewport="mobile"] .device-shell {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 28px;
}

html[data-viewport="mobile"] .device-frame {
  position: relative;
  width: var(--phone-w);
  height: var(--phone-h);
  border-radius: 36px;
  border: 1px solid rgba(22, 21, 19, 0.16);
  background: var(--bg);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4) inset,
    0 1px 0 rgba(255, 255, 255, 0.35),
    0 18px 48px rgba(22, 21, 19, 0.14);
  overflow: hidden;
  min-height: 0;
}

html[data-viewport="mobile"] .device-nav {
  display: grid;
  place-items: center;
  appearance: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 8px 20px rgba(22, 21, 19, 0.1);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

html[data-viewport="mobile"] .device-nav:hover {
  background: #fff;
  transform: scale(1.04);
}

html[data-viewport="mobile"] .device-nav:active {
  transform: scale(0.98);
}

html[data-viewport="mobile"] .device-nav svg {
  width: 20px;
  height: 20px;
  display: block;
}

html[data-viewport="mobile"] .device-chrome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  padding: 11px 0 8px;
}

html[data-viewport="mobile"] .device-island {
  display: block;
  width: 84px;
  height: 24px;
  border-radius: 14px;
  background: #161513;
}

html[data-viewport="mobile"] .device-home {
  display: block;
  width: 108px;
  height: 4px;
  border-radius: 99px;
  background: rgba(22, 21, 19, 0.22);
}

html[data-viewport="mobile"] .device-frame > .site {
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* Studio-only stand-in for the phone status bar. Live clears data-viewport. */
  padding-top: 34px;
  padding-bottom: 14px;
  touch-action: pan-y;
  position: relative;
  z-index: 1;
}

html[data-viewport="mobile"] .device-frame > .site.is-swiping-back {
  touch-action: none;
}

/* Swipe-back: match page ground (never yellow plaster) so status-bar gap isn’t tinted.
   Live site clears data-viewport — key off is-mobile-layout / is-swiping-back too. */
html.is-swiping-back body.work-page,
html.is-swiping-back body.about-page,
html.is-swiping-back body.dump-page {
  background: var(--bg, #fff);
}

html[data-viewport="mobile"].is-swiping-back .device-frame,
html.is-mobile-layout.is-swiping-back .device-frame {
  background: var(--bg, #fff);
  position: relative;
}

.nav-underlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg, #fff);
}

.nav-underlay.has-page {
  background: var(--bg, #fff);
}

.nav-underlay.is-fallback {
  background: var(--bg, #fff);
}

.nav-underlay > .site {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: auto;
  pointer-events: none;
  background: var(--bg, #fff);
}

/* Header */

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--logo-top, calc(var(--pad) + 8 * var(--u))) var(--pad) var(--header-bottom);
  display: flex;
  flex-direction: column;
  gap: var(--header-gap);
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--header-top-gap);
}

.identity {
  display: flex;
  flex-direction: column;
  gap: var(--text-gap);
  min-width: 0;
}

.name {
  margin: 0;
  line-height: 0;
  color: var(--ink);
}

.brand-link {
  display: block;
  width: fit-content;
  line-height: 0;
  color: inherit;
  cursor: pointer;
}

.brand-logo {
  display: block;
  width: var(--logo-width, calc(168 * var(--u)));
  height: auto;
  overflow: visible;
  color: var(--ink);
}

.bio {
  margin: 0;
  font-family: var(--bio-font);
  color: var(--muted);
  font-size: var(--bio-size);
  font-weight: 400;
  letter-spacing: var(--ui-tracking);
  line-height: 1.285;
  text-transform: none;
}

.links {
  display: flex;
  gap: var(--links-gap);
  padding-top: var(--links-pad-top);
  font-family: var(--links-font);
}

.links a {
  font-size: var(--links-size);
  font-weight: 400;
  letter-spacing: var(--ui-tracking);
  color: var(--muted);
  border-bottom: 0;
  transition: color 240ms ease;
}

.links a:hover {
  color: var(--ink);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--filter-gap);
}

.filter {
  appearance: none;
  margin: 0;
  padding: var(--filter-pad-y) var(--filter-pad-x);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--filter-font);
  font-size: var(--filter-size);
  font-weight: 400;
  letter-spacing: var(--ui-tracking);
  cursor: pointer;
  position: relative;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color 240ms ease;
}

.filter.is-active {
  color: var(--filter-active-ink);
}

.filter::before,
.settings-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--line);
  -webkit-mask-image: var(--g3-ring);
  mask-image: var(--g3-ring);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* Active fill lives on a G3-masked layer — never a square button background
   (iOS was painting black corners outside the continuous corner). */
.filter::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--filter-active);
  opacity: 0;
  transition: opacity 240ms ease;
  -webkit-mask-image: var(--g3-fill);
  mask-image: var(--g3-fill);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.filter.is-active::after {
  opacity: 1;
}

.filter.is-active::before,
.settings-btn[aria-pressed="true"]::before,
.settings-btn.is-pressed::before {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .settings-btn:hover::before {
    background: var(--ink);
  }
}

/* Experimental grid */

.works {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) calc(var(--pad) + var(--works-bottom-extra));
  display: flex;
  flex-direction: column;
  gap: var(--year-group-gap);
}

.year-group.is-hidden {
  display: none;
}

.year-label {
  margin: 0 0 var(--year-label-gap);
  padding-left: var(--year-indent);
  font-family: var(--year-font);
  font-size: var(--year-size);
  font-weight: 400;
  letter-spacing: var(--year-tracking);
  text-transform: uppercase;
  color: var(--muted);
  opacity: var(--year-opacity);
}

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

.tile,
.tile * {
  -webkit-tap-highlight-color: transparent;
}

.tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #161513;
  isolation: isolate;
}

.tile.is-hidden {
  display: none;
}

html[data-filter="3d"] .tile:not([data-tags*="3d"]),
html[data-filter="conceptual"] .tile:not([data-tags*="conceptual"]),
html[data-filter="graphic"] .tile:not([data-tags*="graphic"]),
html[data-filter="industrial"] .tile:not([data-tags*="industrial"]) {
  display: none;
}

html[data-filter="3d"] .year-group:not(:has(.tile[data-tags*="3d"])),
html[data-filter="conceptual"] .year-group:not(:has(.tile[data-tags*="conceptual"])),
html[data-filter="graphic"] .year-group:not(:has(.tile[data-tags*="graphic"])),
html[data-filter="industrial"] .year-group:not(:has(.tile[data-tags*="industrial"])) {
  display: none;
}

.tile::before {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -8%;
  height: var(--tile-veil-height);
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, var(--tile-veil-opacity)) 0%,
    rgba(0, 0, 0, calc(var(--tile-veil-opacity) * 0.55)) 42%,
    transparent 100%
  );
  filter: blur(var(--tile-veil-blur));
  opacity: 0;
  transition: opacity var(--tile-caption-ms) ease var(--tile-caption-delay);
}

.tile-caption {
  position: absolute;
  left: var(--tile-caption-pad-x);
  right: var(--tile-caption-pad-x);
  bottom: var(--tile-caption-pad-y);
  z-index: 3;
  margin: 0;
  font-family: var(--tile-caption-font);
  font-size: var(--tile-caption-size);
  font-weight: 500;
  letter-spacing: var(--tile-caption-tracking);
  line-height: 1.15;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tile-caption-ms) ease var(--tile-caption-delay);
}

.tile:hover::before,
.tile:focus-visible::before {
  opacity: 1;
}

.tile:hover .tile-caption,
.tile:focus-visible .tile-caption {
  opacity: var(--tile-caption-opacity);
}

.field {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--tile-color, #161513);
  transition: background-color 320ms ease;
}

.field img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

.tile:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

html.is-mobile-layout .tile:focus,
html.is-mobile-layout .tile:focus-visible {
  outline: none;
}

.palette-swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin: 0 0 12px;
}

.palette-swatches span {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--swatch, #ccc);
}

/* Work + about pages */

.work-page,
.about-page,
.dump-page,
.missing-page {
  background: var(--bg);
}

.page-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: var(--pad) var(--pad) 0;
  font-family: var(--ui-font);
}

.back {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 240ms ease;
}

.back:hover,
.back.is-current {
  color: var(--ink);
}

.work-page {
  --back-width: var(--work-back-width);
  --back-gap: var(--work-back-gap);
}

.about-page {
  --back-width: var(--about-back-width);
  --back-gap: var(--about-back-gap);
}

.dump-page {
  --back-width: var(--about-back-width);
  --back-gap: var(--about-back-gap);
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(var(--work-text-min), 0.8fr);
  width: min(100%, calc(var(--work-max) + var(--back-width) + var(--back-gap)));
  max-width: none;
  margin: 0;
  padding: var(--layout-top) var(--pad) var(--layout-bottom);
  padding-left: calc(var(--back-width) + var(--back-gap));
  min-height: 100vh;
  column-gap: 0;
}

.work-page .site,
.about-page .site,
.dump-page .site {
  position: relative;
}

.work-back {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--settings-w);
  z-index: 30;
  width: var(--back-width);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  opacity: var(--work-back-opacity);
  text-decoration: none;
  background: transparent;
  transition: opacity 220ms ease;
}

.work-back:hover,
.work-back:focus-visible {
  opacity: var(--work-back-hover-opacity);
  background: transparent;
  outline: none;
}

.work-back-icon {
  width: var(--work-back-size);
  height: var(--work-back-size);
  display: block;
  pointer-events: none;
}

.work-back-icon path,
.viewer-control-icon path {
  stroke-width: var(--icon-stroke);
}

.about-layout {
  max-width: var(--about-max);
  margin: 0;
  padding: var(--layout-top) var(--pad) var(--layout-bottom);
  padding-left: calc(var(--back-width) + var(--back-gap));
  min-height: 100vh;
}

.dump-layout {
  width: min(100%, calc(var(--dump-max) + var(--back-width) + var(--back-gap)));
  max-width: none;
  margin: 0;
  padding: var(--dump-top) var(--pad) var(--layout-bottom);
  padding-left: calc(var(--back-width) + var(--back-gap));
  min-height: 100vh;
}

.dump-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--dump-title-gap);
  margin-bottom: var(--year-label-gap);
}

.dump-title {
  margin: 0;
  font-family: var(--ui-font);
  font-size: var(--dump-title-size);
  font-weight: 500;
  letter-spacing: var(--display-tracking);
  color: var(--ink);
  line-height: 1.1;
}

.dump-empty {
  margin: var(--year-label-gap) 0 0;
  font-family: var(--ui-font);
  font-size: var(--filter-size);
  color: var(--muted);
  letter-spacing: var(--ui-tracking);
}

.dump-empty[hidden] {
  display: none;
}

.dump-grid {
  display: flex;
  flex-direction: column;
  gap: var(--year-group-gap);
}

.dump-shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--dump-min), 1fr));
  gap: var(--dump-gap);
}

.dump-shot {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: 0;
  display: block;
  width: 100%;
  background: #161513;
  cursor: zoom-in;
  color: inherit;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.dump-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.work-photos {
  display: flex;
  flex-direction: column;
  gap: var(--work-panel-gap);
  padding-right: var(--work-split);
}

.panel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #161513;
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  cursor: zoom-in;
  color: inherit;
  font: inherit;
}

.panel-portrait {
  aspect-ratio: 4 / 5;
}

.panel-tall {
  aspect-ratio: 3 / 4;
}

.panel-square {
  aspect-ratio: 1 / 1;
}

.panel-landscape {
  aspect-ratio: 16 / 10;
}

.panel-wide {
  aspect-ratio: 21 / 9;
}

.panel.is-media {
  background: #111;
}

.panel.is-media::before,
.panel.is-media::after {
  display: none;
}

.panel.is-media img,
.panel.is-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  /* Fast swipe promotes <img> onto its own layer; inherit the G3 clip
     so the original square photo never shows through. */
  -webkit-mask-image: inherit;
  mask-image: inherit;
  -webkit-mask-repeat: inherit;
  mask-repeat: inherit;
  -webkit-mask-size: inherit;
  mask-size: inherit;
  clip-path: inherit;
  -webkit-clip-path: inherit;
}

.media-block {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.media-block > .panel {
  position: relative;
  z-index: 2;
}

.player {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--player-gap-x);
  box-sizing: border-box;
  width: 100%;
  height: calc(var(--player-height) + var(--player-under));
  margin-top: calc(var(--player-under) * -1);
  padding: var(--player-under) var(--player-pad-x) 0;
  background: color-mix(
    in srgb,
    color-mix(in srgb, var(--bg) calc(100% - var(--player-darkness)), var(--ink) var(--player-darkness))
      calc(var(--player-opacity) * 100%),
    transparent
  );
  color: var(--player-ink);
  user-select: none;
  -webkit-user-select: none;
}

/* Sit the controls in the true middle of the gap between this video and the next photo. */
.work-photos .media-block:not(:last-child) .player {
  padding-top: calc(
    var(--player-under) +
      max(0px, (var(--player-height) + var(--work-panel-gap) - var(--player-hit)) / 2)
  );
}

.player-btn {
  appearance: none;
  flex: 0 0 auto;
  width: var(--player-hit);
  height: var(--player-hit);
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: color-mix(in srgb, var(--player-ink) calc(var(--player-icon-opacity) * 100%), transparent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.player-btn:hover,
.player-btn:focus-visible {
  color: var(--player-ink);
  background: transparent;
  outline: none;
}

.player-icon {
  width: var(--player-icon-size);
  height: var(--player-icon-size);
  display: block;
  pointer-events: none;
}

.player-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: var(--player-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-preview {
  --player-height: var(--preview-player-height);
  --player-under: var(--preview-player-under);
  --player-pad-x: var(--preview-player-pad-x);
  --player-darkness: var(--preview-player-darkness);
  --player-opacity: var(--preview-player-opacity);
  --player-ink: var(--preview-player-ink);
  --player-icon-size: var(--preview-player-icon-size);
  --player-stroke: var(--preview-player-stroke);
  --player-hit: var(--preview-player-hit);
  --player-gap-x: var(--preview-player-gap-x);
  --player-track: var(--preview-player-track);
  --player-track-radius: var(--preview-player-track-radius);
  --player-knob: var(--preview-player-knob);
  --player-knob-color: var(--preview-player-knob-color);
  --player-track-opacity: var(--preview-player-track-opacity);
  --player-fill-opacity: var(--preview-player-fill-opacity);
  --player-icon-opacity: var(--preview-player-icon-opacity);
}

.player-timeline {
  flex: 1 1 auto;
  position: relative;
  min-width: 0;
  height: var(--player-hit);
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.player-timeline:focus-visible {
  outline: none;
}

.player-track {
  position: relative;
  width: 100%;
  height: var(--player-track);
  border-radius: var(--player-track-radius);
  background: color-mix(in srgb, var(--player-ink) calc(var(--player-track-opacity) * 100%), transparent);
}

.player-fill {
  height: 100%;
  width: calc(var(--player-progress) * 100%);
  border-radius: inherit;
  background: color-mix(in srgb, var(--player-ink) calc(var(--player-fill-opacity) * 100%), transparent);
  pointer-events: none;
}

.player-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: var(--player-knob);
  height: var(--player-knob);
  border-radius: 50%;
  background: var(--player-knob-color);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.player:focus-visible {
  outline: 1px solid var(--player-ink);
  outline-offset: 3px;
}

.panel:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

body.is-viewer-open {
  overflow: hidden;
}

body.is-viewer-open .site,
body.is-viewer-open .settings,
body.is-viewer-open .noise {
  filter: blur(var(--viewer-blur));
}

/* Photo zoom stays inside the phone during Mobile preview.
   Keep studio chrome sharp; the page inside the phone still blurs. */
html[data-viewport="mobile"] body.is-viewer-open .settings,
html[data-viewport="mobile"] body.is-viewer-open .noise,
html[data-viewport="mobile"] body.is-viewer-open .device-nav,
html[data-viewport="mobile"] body.is-viewer-open .device-stage {
  filter: none;
}

html[data-viewport="mobile"] .device-frame {
  isolation: isolate;
}

html[data-viewport="mobile"] .device-frame > .viewer {
  position: absolute;
  inset: 0;
  z-index: 40;
  border-radius: inherit;
  overflow: hidden;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(var(--viewer-gutter), 1fr) minmax(0, var(--viewer-image-max)) minmax(var(--viewer-gutter), 1fr);
  grid-template-rows: 1fr;
  align-items: stretch;
  justify-items: stretch;
  column-gap: 0;
  padding: 0;
}

.viewer[hidden] {
  display: none;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / var(--viewer-darkness));
  cursor: pointer;
}

@media (prefers-reduced-transparency: reduce) {
  body.is-viewer-open .site,
  body.is-viewer-open .settings,
  body.is-viewer-open .noise {
    filter: none;
  }
}

.viewer-control {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  background: transparent;
  color: rgb(255 255 255 / var(--viewer-control-opacity));
  cursor: pointer;
  transition: color 200ms ease;
}

.viewer-control:hover,
.viewer-control:focus-visible {
  color: rgb(255 255 255 / var(--viewer-control-hover-opacity));
  background: transparent;
  outline: none;
}

.viewer-control-icon {
  width: var(--viewer-nav-size);
  height: var(--viewer-nav-size);
  display: block;
  pointer-events: none;
}

.viewer-zone {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding-inline: var(--viewer-zone-pad);
  border-radius: var(--viewer-zone-radius);
}

.viewer-stage {
  position: relative;
  z-index: 1;
  justify-self: stretch;
  align-self: stretch;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: var(--viewer-stage-top) 0 var(--viewer-stage-bottom);
  pointer-events: none;
  container-type: size;
}

.viewer-track {
  display: contents;
}

.viewer-panel {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  cursor: default;
  animation: none;
  pointer-events: auto;
}

/* Fit inside the stage without forcing one axis — keeps ratio in Mobile preview */
.viewer-panel.panel-portrait {
  aspect-ratio: 4 / 5;
  width: min(100cqw, calc(100cqh * 4 / 5));
  height: auto;
}

.viewer-panel.panel-tall {
  aspect-ratio: 3 / 4;
  width: min(100cqw, calc(100cqh * 3 / 4));
  height: auto;
}

.viewer-panel.panel-square {
  aspect-ratio: 1 / 1;
  width: min(100cqw, 100cqh);
  height: auto;
}

.viewer-panel.panel-landscape {
  aspect-ratio: 16 / 10;
  width: min(100cqw, calc(100cqh * 16 / 10));
  height: auto;
}

.viewer-panel.panel-wide {
  aspect-ratio: 21 / 9;
  width: min(100cqw, calc(100cqh * 21 / 9));
  height: auto;
}

.viewer-panel.is-media {
  aspect-ratio: var(--media-w) / var(--media-h);
  width: min(100cqw, calc(100cqh * var(--media-w) / var(--media-h)));
  height: auto;
}

.viewer-stage .viewer-media {
  width: min(100cqw, calc((100cqh - var(--preview-player-height)) * var(--media-w) / var(--media-h)));
  max-width: 100%;
  pointer-events: auto;
}

.viewer-stage .viewer-media > .viewer-panel.is-media {
  width: 100%;
  max-width: none;
  max-height: none;
}

.viewer-actions {
  position: absolute;
  top: var(--viewer-action-top);
  right: var(--viewer-action-right);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--viewer-action-gap);
}

.viewer-action {
  width: var(--viewer-action-size);
  height: var(--viewer-action-size);
  border-radius: var(--viewer-action-radius);
}

.viewer-action .viewer-control-icon {
  width: var(--viewer-action-icon);
  height: var(--viewer-action-icon);
}

.viewer-action.is-pending {
  opacity: 0.45;
  pointer-events: none;
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}

/* Per-work abstract panels */

.p-grain-a,
.p-grain-b {
  background:
    repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, #000 0 1px, transparent 1px 4px),
    #222;
  filter: contrast(1.2);
}
.p-grain-a::before,
.p-grain-b::before {
  inset: 0;
  border-radius: 0;
  background: radial-gradient(circle, transparent 20%, #000 70%);
  filter: blur(20px);
  opacity: 0.7;
}
.p-grain-a::after,
.p-grain-b::after { display: none; }
.p-grain-b {
  transform: scaleX(-1);
}

.p-eclipse-a { background: #eee; }
.p-eclipse-a::before {
  left: 20%;
  top: 22%;
  width: 55%;
  height: 55%;
  background: #000;
  filter: blur(8px);
}
.p-eclipse-a::after {
  left: 38%;
  top: 28%;
  width: 48%;
  height: 48%;
  background: #eee;
  filter: blur(6px);
}

.p-eclipse-b { background: #0a0a0a; }
.p-eclipse-b::before {
  inset: 25%;
  background: #fff;
  filter: blur(35px);
}
.p-eclipse-b::after { display: none; }

.p-eclipse-c { background: #111; }
.p-eclipse-c::before {
  left: -10%;
  top: 30%;
  width: 70%;
  height: 70%;
  background: #fff;
}
.p-eclipse-c::after {
  right: 5%;
  bottom: 10%;
  width: 40%;
  height: 40%;
  background: #000;
}

.p-signal-a,
.p-signal-b {
  background:
    linear-gradient(
      98deg,
      #000 0 18%,
      #fff 18% 24%,
      #000 24% 48%,
      #fff 48% 52%,
      #000 52% 78%,
      #fff 78% 100%
    );
  filter: blur(16px);
}
.p-signal-a::before,
.p-signal-b::before,
.p-signal-a::after,
.p-signal-b::after { display: none; }
.p-signal-b {
  filter: blur(28px) contrast(1.35);
}

.p-rift-a { background: #f7f7f7; }
.p-rift-a::before {
  inset: -20% 40% -20% -10%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: #000;
  filter: blur(45px);
  transform: skewX(-18deg);
}
.p-rift-a::after { display: none; }

.p-rift-b { background: #0d0d0d; }
.p-rift-b::before {
  inset: 0 35% 0 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: #fff;
  filter: blur(50px);
}
.p-rift-b::after { display: none; }

.p-rift-c { background: #888; }
.p-rift-c::before {
  inset: 10% 10%;
  width: auto;
  height: auto;
  border-radius: 40% 60% 55% 45%;
  background: #000;
  filter: blur(40px);
}
.p-rift-c::after {
  inset: 35% 30%;
  background: #fff;
  filter: blur(25px);
}

.p-pulse-a { background: #050505; }
.p-pulse-a::before {
  left: 15%;
  top: 20%;
  width: 70%;
  height: 60%;
  background: #fff;
  animation: pulse-blob 4s ease-in-out infinite;
}
.p-pulse-a::after { display: none; }

.p-pulse-b { background: #f0f0f0; }
.p-pulse-b::before {
  left: 20%;
  top: 25%;
  width: 60%;
  height: 55%;
  background: #000;
  animation: pulse-blob 4s ease-in-out infinite reverse;
}
.p-pulse-b::after { display: none; }

.p-chassis-a { background: #0a0a0a; }
.p-chassis-a::before {
  inset: 18% 12%;
  width: auto;
  height: auto;
  border-radius: 8%;
  background: #fff;
  filter: blur(28px);
}
.p-chassis-a::after {
  inset: 40% 35%;
  background: #000;
  filter: blur(18px);
}

.p-chassis-b { background: #eaeaea; }
.p-chassis-b::before {
  inset: -15% 25% -15% -5%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: #111;
  filter: blur(40px);
  transform: skewY(-8deg);
}
.p-chassis-b::after { display: none; }

.p-glyph-a { background: #111; }
.p-glyph-a::before {
  left: 28%;
  top: 15%;
  width: 18%;
  height: 70%;
  border-radius: 0;
  background: #fff;
  filter: blur(10px);
}
.p-glyph-a::after {
  left: 28%;
  top: 55%;
  width: 45%;
  height: 14%;
  border-radius: 0;
  background: #fff;
  filter: blur(10px);
}

.p-glyph-b { background: #f4f4f4; }
.p-glyph-b::before {
  inset: 20%;
  background: #000;
  filter: blur(45px);
}
.p-glyph-b::after { display: none; }

.p-glyph-c { background: #222; }
.p-glyph-c::before {
  left: 15%;
  top: 20%;
  width: 70%;
  height: 20%;
  border-radius: 0;
  background: #fff;
  filter: blur(14px);
}
.p-glyph-c::after {
  left: 40%;
  top: 20%;
  width: 20%;
  height: 60%;
  border-radius: 0;
  background: #fff;
  filter: blur(14px);
}

.p-mold-a { background: #0d0d0d; }
.p-mold-a::before {
  inset: 22%;
  background: #fff;
  filter: blur(50px);
  opacity: 0.35;
}
.p-mold-a::after {
  inset: 35%;
  background: #000;
  filter: blur(20px);
}

.p-mold-b { background: #ddd; }
.p-mold-b::before {
  inset: 15% 20%;
  width: auto;
  height: auto;
  border-radius: 42%;
  background: #000;
  filter: blur(35px);
}
.p-mold-b::after { display: none; }

.p-axiom-a { background: #f7f7f7; }
.p-axiom-a::before {
  inset: 25% 18%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: #000;
  filter: blur(8px);
}
.p-axiom-a::after { display: none; }

.p-axiom-b { background: #111; }
.p-axiom-b::before {
  inset: 30% 22%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: #fff;
  filter: blur(22px);
}
.p-axiom-b::after { display: none; }

.p-offset-a { background: #888; }
.p-offset-a::before {
  left: 15%;
  top: 20%;
  width: 55%;
  height: 55%;
  background: #fff;
  filter: blur(20px);
}
.p-offset-a::after {
  left: 30%;
  top: 30%;
  width: 55%;
  height: 55%;
  background: #000;
  filter: blur(20px);
  opacity: 0.7;
}

.p-offset-b { background: #0a0a0a; }
.p-offset-b::before {
  left: 10%;
  top: 25%;
  width: 50%;
  height: 40%;
  border-radius: 0;
  background: #fff;
  filter: blur(12px);
}
.p-offset-b::after {
  left: 28%;
  top: 35%;
  width: 50%;
  height: 40%;
  border-radius: 0;
  background: #fff;
  filter: blur(12px);
  opacity: 0.4;
}

.p-offset-c { background: #eee; }
.p-offset-c::before {
  inset: 18% 25% 35% 10%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: #000;
  filter: blur(16px);
}
.p-offset-c::after {
  inset: 30% 10% 20% 30%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: #000;
  filter: blur(16px);
  opacity: 0.45;
}

.p-torque-a { background: #050505; }
.p-torque-a::before {
  inset: -20%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: repeating-linear-gradient(25deg, #fff 0 8%, transparent 8% 18%);
  filter: blur(14px);
}
.p-torque-a::after { display: none; }

.p-torque-b { background: #f2f2f2; }
.p-torque-b::before {
  inset: -15%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: repeating-linear-gradient(-25deg, #000 0 6%, transparent 6% 16%);
  filter: blur(18px);
}
.p-torque-b::after { display: none; }

.p-flare-a { background: #0a0a0a; }
.p-flare-a::before {
  left: 28%;
  top: 22%;
  width: 55%;
  height: 55%;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, transparent 68%);
  filter: blur(28px);
}
.p-flare-a::after {
  left: 42%;
  top: 36%;
  width: 18%;
  height: 18%;
  border-radius: 50%;
  background: #fff;
  filter: blur(10px);
  opacity: 0.85;
}

.p-flare-b { background: #ececec; }
.p-flare-b::before {
  left: -10%;
  top: 10%;
  width: 70%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, #000 0%, transparent 70%);
  filter: blur(40px);
}
.p-flare-b::after { display: none; }

.p-seam-a { background: #111; }
.p-seam-a::before {
  left: 48%;
  top: -20%;
  width: 3px;
  height: 140%;
  border-radius: 0;
  background: #fff;
  filter: blur(6px);
}
.p-seam-a::after {
  left: 42%;
  top: 20%;
  width: 18%;
  height: 60%;
  border-radius: 0;
  background: #fff;
  filter: blur(22px);
  opacity: 0.2;
}

.p-seam-b { background: #f0f0f0; }
.p-seam-b::before {
  inset: 0 52% 0 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: #0a0a0a;
  filter: blur(14px);
}
.p-seam-b::after { display: none; }

.p-seam-c { background: #888; }
.p-seam-c::before {
  left: -5%;
  top: 45%;
  width: 110%;
  height: 2px;
  border-radius: 0;
  background: #fff;
  filter: blur(4px);
}
.p-seam-c::after {
  left: 20%;
  top: 30%;
  width: 60%;
  height: 40%;
  border-radius: 0;
  background: #000;
  filter: blur(30px);
  opacity: 0.35;
}

.work-text {
  position: sticky;
  top: var(--work-sticky-top);
  align-self: start;
  padding: 0 0 0 var(--work-text-pad);
}

.work-text h1 {
  margin: 0 0 var(--work-title-gap);
  font-family: var(--work-title-font);
  font-size: var(--work-title-size);
  font-weight: 400;
  letter-spacing: var(--display-tracking);
  line-height: 1.07;
}

.work-text .meta {
  margin: 0 0 var(--work-meta-gap);
  font-family: var(--work-meta-font);
  color: var(--muted);
  font-size: var(--work-meta-size);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.work-text p {
  margin: 0 0 var(--work-body-gap);
  max-width: var(--work-measure);
  font-family: var(--work-body-font);
  font-size: var(--work-body-size);
  letter-spacing: var(--display-tracking);
  line-height: var(--body-leading);
  color: var(--ink);
}

.work-text p:not(.meta):last-child {
  margin-bottom: 0;
}

.about {
  max-width: none;
  margin: 0;
  padding: var(--about-top) 0 0;
}

.about .about-kicker {
  margin: 0 0 var(--about-kicker-gap);
  max-width: none;
  font-family: var(--about-kicker-font);
  color: var(--muted);
  font-size: var(--about-kicker-size);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.about h1 {
  margin: 0 0 var(--about-title-gap);
  font-family: var(--about-title-font);
  font-size: var(--about-title-size);
  font-weight: 400;
  letter-spacing: var(--display-tracking);
  line-height: 1.07;
}

.about p:not(.about-kicker) {
  margin: 0 0 var(--about-para-gap);
  max-width: min(100%, var(--about-measure));
  font-size: var(--about-body-size);
  letter-spacing: var(--display-tracking);
  line-height: var(--body-leading);
  color: var(--ink);
}

.about p:not(.about-kicker):has(+ .about-links) {
  margin-bottom: 0;
}

.about-links {
  padding-top: var(--about-links-gap);
}

@keyframes drift {
  from { transform: translate(-4%, -2%) scale(1); }
  to { transform: translate(8%, 6%) scale(1.15); }
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

@keyframes pulse-field {
  0%, 100% { transform: scale(1); filter: blur(24px); }
  50% { transform: scale(1.18); filter: blur(34px); }
}

@keyframes pulse-blob {
  0%, 100% { transform: scale(0.85); opacity: 0.75; }
  50% { transform: scale(1.15); opacity: 1; }
}

@media (max-width: 820px) {
  #dor4k-root {
    grid-template-columns: 1fr;
  }

  #dor4k-root > .settings,
  #dor4k-root > .site,
  #dor4k-root > .device-stage {
    grid-column: 1;
  }

  #dor4k-root > .settings {
    grid-row: 1;
  }

  #dor4k-root > .site,
  #dor4k-root > .device-stage {
    grid-row: 2;
  }

  .device-chrome {
    display: none !important;
  }

  html[data-viewport="mobile"] body {
    overflow: auto;
  }

  html[data-viewport="mobile"] #dor4k-root {
    height: auto;
    overflow: visible;
  }

  html[data-viewport="mobile"] #dor4k-root > .settings {
    height: auto;
  }

  html[data-viewport="mobile"] #dor4k-root > .device-stage {
    display: block;
    height: auto;
    min-height: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
  }

  html[data-viewport="mobile"] .device-shell {
    width: 100% !important;
    height: auto !important;
    border-radius: 0;
    overflow: visible;
  }

  html[data-viewport="mobile"] .device-frame {
    width: 100% !important;
    height: auto !important;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    transform: none !important;
  }

  html[data-viewport="mobile"] .device-nav {
    display: none !important;
  }

  html[data-viewport="mobile"] .device-frame > .site {
    padding-top: 0;
    padding-bottom: 0;
    height: auto;
    overflow: visible;
  }

  html[data-viewport="mobile"] .device-frame > .viewer {
    position: fixed;
    inset: 0;
    border-radius: 0;
    z-index: 80;
  }

  .viewer {
    grid-template-columns: minmax(56px, 1fr) minmax(0, var(--viewer-image-max)) minmax(56px, 1fr);
  }

  .viewer-stage {
    padding: 52px 0 24px;
  }

  .viewer-actions {
    top: min(10px, var(--viewer-action-top));
    right: min(10px, var(--viewer-action-right));
  }

  .work-back {
    left: 0;
  }

  .settings {
    position: relative;
    height: auto;
    max-height: 42vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Mobile viewer: no side arrows — swipe horizontally between photos */
html.is-mobile-layout .viewer {
  grid-template-columns: minmax(0, 1fr);
}

html.is-mobile-layout .viewer-zone {
  display: none;
}

html.is-mobile-layout .viewer-stage {
  /* No side padding — that created the hard left/right crop “mask”.
     Vertical pad only, for download/close. Clip at the phone edge. */
  padding: 52px 0 28px;
  pointer-events: auto;
  overflow: hidden;
  place-items: stretch;
}

html.is-mobile-layout .viewer-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
}

html.is-mobile-layout .viewer-track::-webkit-scrollbar {
  display: none;
}

html.is-mobile-layout .viewer-slide {
  /* Side inset on each slide: rounded cards sit off the bezel,
     and adjacent pads add up to the gap between photos. */
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  min-width: 0;
  padding-inline: 18px;
  box-sizing: border-box;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

html.is-mobile-layout .viewer-panel {
  touch-action: pan-x;
  max-width: 100%;
  /* Rasterize the G3 mask into this layer so fast left/right
     scrolling doesn't drop clip-path and flash square corners. */
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Fit to the slide content box (after side inset), not the full stage */
html.is-mobile-layout .viewer-panel.panel-portrait {
  width: min(100%, calc(100cqh * 4 / 5));
}

html.is-mobile-layout .viewer-panel.panel-tall {
  width: min(100%, calc(100cqh * 3 / 4));
}

html.is-mobile-layout .viewer-panel.panel-square {
  width: min(100%, 100cqh);
}

html.is-mobile-layout .viewer-panel.panel-landscape {
  width: min(100%, calc(100cqh * 16 / 10));
}

html.is-mobile-layout .viewer-panel.panel-wide {
  width: min(100%, calc(100cqh * 21 / 9));
}

html.is-mobile-layout .viewer-panel.is-media {
  width: min(100%, calc(100cqh * var(--media-w) / var(--media-h)));
}

html.is-mobile-layout .viewer-slide .viewer-media {
  width: min(100%, calc((100cqh - var(--preview-player-height)) * var(--media-w) / var(--media-h)));
}

html.is-mobile-layout .viewer-slide .viewer-media > .viewer-panel.is-media {
  width: 100%;
}

/* Shared mobile layout — real narrow screens + Settings → Mobile */
html.is-mobile-layout .header-top {
  flex-direction: column;
  align-items: flex-start;
}

/* Header links only — keep .about-links padding for Body → links gap */
html.is-mobile-layout .links:not(.about-links) {
  padding-top: 0;
}

html.is-mobile-layout .filters {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin: 0 calc(var(--pad) * -1);
  /* End pad is a flex item — padding-inline-end is swallowed by overflow-x
     and was clipping the last G3 hairline. */
  padding: 1px 0 1px var(--pad);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

html.is-mobile-layout .filters::-webkit-scrollbar {
  display: none;
}

html.is-mobile-layout .filters::after {
  content: "";
  flex: 0 0 var(--pad);
  pointer-events: none;
}

html.is-mobile-layout .filter {
  flex: 0 0 auto;
  /* Extra space after the G3 shape so overflow-x doesn't clip the hairline.
     Keep it on the border, not padding — padding is where the label is centered. */
  border-right: 3px solid transparent;
}

html.is-mobile-layout .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Mobile: cassette titles always on — no hover fade */
html.is-mobile-layout .tile::before {
  opacity: 1;
  transition: none;
}

html.is-mobile-layout .tile-caption {
  opacity: var(--tile-caption-opacity);
  transition: none;
}

html.is-mobile-layout .work-layout {
  grid-template-columns: 1fr;
  padding-top: 0;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

html.is-mobile-layout .work-photos {
  padding-right: 0;
  order: 2;
}

html.is-mobile-layout .work-text {
  position: static;
  padding: 8px 0 28px;
  order: 1;
  max-width: none;
}

html.is-mobile-layout .about-layout {
  padding-left: var(--pad);
  padding-right: var(--pad);
  padding-top: 0;
  min-height: 0;
}

html.is-mobile-layout .dump-layout {
  padding-left: var(--pad);
  padding-right: var(--pad);
  padding-top: var(--dump-top);
  min-height: 0;
}

html.is-mobile-layout .site-header {
  padding: var(--logo-top, calc(var(--pad) + 4px)) var(--pad) 20px;
}

html.is-mobile-layout .works {
  padding-left: var(--pad);
  padding-right: var(--pad);
  padding-bottom: calc(var(--pad) + 40px);
}

/* Compact home control — deep links to a project/bio still need a way back. */
html.is-mobile-layout .work-back {
  position: relative;
  inset: auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: var(--work-back-top) 0 var(--work-back-below) calc(var(--pad) - 4px);
  padding: 0;
  opacity: var(--work-back-opacity);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html.is-mobile-layout .work-back.reveal-item,
html.is-mobile-layout.is-reveal-pending .work-back.reveal-item,
html.is-mobile-layout.is-reveal-active .work-back.reveal-item {
  animation: none !important;
  opacity: var(--work-back-opacity) !important;
}

html.is-mobile-layout .work-back:active,
html.is-mobile-layout .work-back:focus-visible {
  opacity: var(--work-back-hover-opacity) !important;
}

html.is-mobile-layout .year-label {
  letter-spacing: var(--year-tracking);
}

html.is-mobile-layout .site.is-swiping-back {
  background: var(--bg, #fff) !important;
  border-radius: 0;
  box-shadow: -1px 0 0 rgba(22, 21, 19, 0.08);
  transform-origin: left center;
  /* Full-bleed while dragging so the status bar isn’t a different color. */
  position: fixed !important;
  inset: 0;
  z-index: 20;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  overflow: auto;
  will-change: transform;
  backface-visibility: hidden;
}

html.is-mobile-layout .device-frame {
  position: relative;
}
