@font-face {
  font-family: "ZT Bros Oskon";
  src: url("/assets/ZTBrosOskon90s-Regular.otf") format("opentype");
  font-display: swap;
}

:root {
  --paper: #f2efe8;
  --ink: #171714;
  --signal: #e44f2a;
  --line: rgba(23, 23, 20, .22);
  --ease: cubic-bezier(.76, 0, .24, 1);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overscroll-behavior: none;
}

body {
  overflow: hidden;
  background: var(--paper);
}

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

button,
a,
[role="button"] { -webkit-tap-highlight-color: transparent; }

#gpu-canvas {
  position: fixed;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#portfolio-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.experience-nav,
.experience-back {
  position: fixed;
  z-index: 10;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .01em;
}

.experience-nav {
  top: 24px;
  left: 28px;
  display: flex;
  gap: 20px;
}

.experience-nav a {
  position: relative;
}

.experience-nav a::after,
.experience-back::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}

.experience-nav a:hover::after,
.experience-nav a[aria-current="page"]::after,
.experience-back:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.experience-back {
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.experience-back span { color: var(--signal); }

.experience-preloader {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px 28px;
  background: var(--ink);
  color: var(--paper);
  visibility: hidden;
  transition: clip-path 1s var(--ease);
  clip-path: inset(0 0 0 0);
}

.experience-loading .experience-preloader,
.experience-ready .experience-preloader {
  visibility: visible;
}

.experience-preloader p {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.experience-preloader strong {
  font-family: "ZT Bros Oskon", sans-serif;
  font-size: clamp(86px, 14vw, 220px);
  font-weight: 400;
  line-height: .72;
  letter-spacing: -.07em;
}

.experience-ready .experience-preloader {
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
}

.page {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100vh;
}

.page-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-title:focus:not(:focus-visible),
.content-heading:focus:not(:focus-visible) {
  outline: none;
}

.page-title:focus-visible,
.content-heading:focus-visible {
  outline: 1px solid var(--signal);
  outline-offset: 4px;
}

.carousel {
  position: fixed;
  inset: 0;
  touch-action: pan-y;
}

.slot {
  position: absolute;
  display: block;
  width: 23vw;
  min-width: 250px;
  max-width: 430px;
  margin: 0;
}

.slot figure,
.slot-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin: 0;
  border-radius: 8px;
}

.slot figure {
  position: relative;
  background: rgba(23, 23, 20, .08);
}

.gpu-ready .slot figure { background: transparent; }

.slot-video {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.gpu-ready .page-main .preview-ready .slot-video { visibility: hidden; }
.gpu-ready .page-inner .slot-video { visibility: visible; }

.slot-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 9px;
  font-size: 11px;
}

.slot-caption span:last-child { color: rgba(23, 23, 20, .55); }

.page-index {
  cursor: grab;
  touch-action: none;
}

.page-index:active { cursor: grabbing; }

.index-hit {
  position: fixed;
  z-index: 5;
  display: block;
  border-radius: 8px;
}

.index-hit span {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  width: max-content;
  font-size: 10px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .25s ease, transform .25s ease;
}

.index-hit:hover span,
.index-hit:focus-visible span {
  opacity: 1;
  transform: none;
}

.page-inner {
  position: relative;
  min-height: auto;
  padding: 14vh 0 22vh;
}

.inner-copy {
  position: fixed;
  z-index: 6;
  top: 14vh;
  left: 28px;
  width: min(230px, 22vw);
}

.inner-label,
.inner-copy h2,
.inner-fact {
  margin: 0;
}

.inner-label {
  margin-bottom: 18px;
  color: rgba(23, 23, 20, .48);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.inner-copy h2 {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
}

.inner-fact {
  max-width: 30ch;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
}

.inner-view-cue {
  display: block;
  margin-top: 20px;
  color: rgba(23, 23, 20, .48);
  font-size: 9px;
}

.stack {
  display: grid;
  gap: 7vh;
  padding-bottom: 8vh;
}

.stack .slot {
  position: relative;
  z-index: 4;
  width: min(23vw, 360px);
  min-width: 250px;
  max-width: 360px;
  margin: 0 auto;
  cursor: pointer;
}

.stack .slot figure { aspect-ratio: 4 / 5; }

.slot-still figure {
  overflow: hidden;
}

.slot-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.stack .slot:focus-visible {
  outline: 1px solid var(--signal);
  outline-offset: 6px;
}

.film-viewer-fallback,
.film-viewer-ui {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.film-viewer-fallback {
  z-index: 11;
  display: grid;
  place-items: center;
  background: #000;
}

.film-viewer-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.film-viewer-ui {
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px;
  color: #fff;
  pointer-events: none;
}

.film-viewer-ui p {
  margin: 0;
  font-size: 11px;
}

.film-viewer-ui button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  pointer-events: auto;
}

.film-viewer-open #portfolio-app,
.film-viewer-open .experience-nav,
.film-viewer-open .experience-back {
  opacity: 0;
  pointer-events: none;
}

.film-viewer-open {
  overflow: hidden !important;
}

.film-viewer-open .film-viewer-ui,
.film-viewer-open .film-viewer-fallback {
  opacity: 1;
  visibility: visible;
}

.film-viewer-open .film-viewer-fallback {
  pointer-events: auto;
}

.film-player-controls {
  --player-progress: 0%;
  position: absolute;
  bottom: 24px;
  left: 50%;
  display: grid;
  grid-template-columns: auto auto minmax(160px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  width: min(760px, calc(100vw - 56px));
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(10, 10, 9, .72);
  box-shadow: 0 14px 50px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  transform: translateX(-50%);
  transition:
    opacity .28s ease,
    transform .35s var(--ease);
}

.film-player-controls[hidden] {
  display: none;
}

.viewer-controls-hidden .film-player-controls {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
}

.film-player-controls .player-button {
  min-width: max-content;
  padding: 9px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .72);
  line-height: 1;
  transition:
    color .2s ease,
    background-color .2s ease;
}

.film-player-controls .player-button:hover,
.film-player-controls .player-button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.film-player-controls .player-button:focus-visible,
.player-progress:focus-visible {
  outline: 1px solid var(--signal);
  outline-offset: 2px;
}

.film-player-controls .player-play {
  padding-inline: 16px;
  background: var(--signal);
  color: #fff;
}

.film-player-controls .player-play:hover,
.film-player-controls .player-play:focus-visible {
  background: #f26039;
}

.player-time {
  display: flex;
  gap: 5px;
  min-width: max-content;
  color: rgba(255, 255, 255, .64);
  font-variant-numeric: tabular-nums;
}

.player-progress {
  width: 100%;
  min-width: 0;
  height: 18px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.player-progress::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    #fff 0 var(--player-progress),
    rgba(255, 255, 255, .28) var(--player-progress) 100%
  );
}

.player-progress::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -5px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .12);
}

.player-progress::-moz-range-track {
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .28);
}

.player-progress::-moz-range-progress {
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.player-progress::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.experience-cursor {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: grid;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
  will-change: transform;
}

.experience-cursor span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: 50%;
  background: var(--signal);
  color: var(--paper);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
  transform: scale(.65);
  transition:
    color .18s ease,
    background-color .18s ease,
    transform .28s var(--ease);
}

.cursor-back .experience-cursor span {
  background: transparent;
  color: var(--ink);
  font-size: 0;
  transform: scale(1);
}

.cursor-back .experience-cursor span::before {
  content: "\2190";
  display: block;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  transform: translateX(-2px);
}

.film-viewer-open.cursor-back .experience-cursor span {
  color: #fff;
}

.cursor-video .experience-cursor span {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  filter: none;
  font-size: 0;
  transform: scale(1);
  transition: transform .18s var(--ease);
}

.cursor-video .experience-cursor span::before {
  content: "";
  display: block;
  filter:
    drop-shadow(-1px 0 0 #fff)
    drop-shadow(1px 0 0 #fff)
    drop-shadow(0 -1px 0 #fff)
    drop-shadow(0 1px 0 #fff);
}

.cursor-video.cursor-video-paused .experience-cursor span::before {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid #000;
  transform: translateX(1px);
}

.cursor-video:not(.cursor-video-paused) .experience-cursor span::before {
  width: 10px;
  height: 12px;
  background: linear-gradient(
    90deg,
    #000 0 3px,
    transparent 3px 7px,
    #000 7px 10px
  );
}

body.cursor-back,
body.cursor-back * {
  cursor: none !important;
}

body.cursor-view,
body.cursor-view * {
  cursor: none !important;
}

body.cursor-video,
body.cursor-video * {
  cursor: none !important;
}

.cursor-active .experience-cursor {
  opacity: 1;
}

.cursor-active .experience-cursor span {
  transform: scale(1);
}

.page.is-incoming {
  pointer-events: none;
}

.route-busy a { pointer-events: none; }

@media (max-width: 760px) {
  .experience-nav { top: 18px; left: 18px; }
  .experience-back { top: auto; bottom: 18px; left: 18px; transform: none; }
  .experience-preloader { padding: 18px; }

  .slot {
    width: 68vw;
    min-width: 0;
  }

  .slot-caption {
    font-size: 10px;
  }

  .inner-fact {
    max-width: 34ch;
    font-size: 12px;
  }

  .page-inner {
    padding-top: 110px;
  }

  .inner-copy {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100vw - 36px);
    margin: 0 18px 72px;
  }

  .stack { gap: 9vh; }

  .stack .slot {
    width: min(72vw, 320px);
    min-width: 0;
  }

  .film-viewer-ui { padding: 18px; }
  .experience-cursor { display: none; }

  .film-player-controls {
    bottom: 12px;
    grid-template-columns: auto 1fr auto auto;
    gap: 8px;
    width: calc(100vw - 24px);
    padding: 10px;
    border-radius: 18px;
  }

  .player-progress {
    grid-row: 1;
    grid-column: 1 / -1;
  }

  .film-player-controls .player-button {
    padding-inline: 8px;
  }

  .film-player-controls .player-play {
    padding-inline: 14px;
  }
}

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

/* ── Content pages (About / Contact, rendered inside the experience) ── */

body.content-shell {
  overflow: auto;
}

.page-content {
  position: relative;
  min-height: 100vh;
}

.content-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 120px 28px 140px;
}

.content-heading {
  margin: 0 0 40px;
  overflow: hidden;
  font-family: "ZT Bros Oskon", sans-serif;
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .9;
}

.content-heading span { display: block; }

.content-body {
  font-size: 14px;
  line-height: 1.65;
}

.content-body p {
  margin: 0 0 20px;
  max-width: 48ch;
}

.content-lead {
  font-size: 16px;
  line-height: 1.5;
}

/* About: text left, portrait right */

.page-about .content-wrap {
  max-width: 1080px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.content-media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(23, 23, 20, .06);
}

.content-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-media-cue {
  color: rgba(23, 23, 20, .38);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.contact-email a {
  position: relative;
  display: inline-block;
  font-family: "ZT Bros Oskon", sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1;
}

.contact-email a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 2px;
  background: var(--signal);
}

.contact-email a:hover {
  color: var(--signal);
}

.contact-email a:focus-visible {
  outline: 1px solid var(--signal);
  outline-offset: 6px;
}

@media (max-width: 760px) {
  .content-wrap {
    padding: 96px 18px 110px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .content-media {
    max-width: 320px;
  }
}
