:root {
  color-scheme: dark;
  --bg: #080808;
  --fg: #f3f0e9;
  --muted: #8d8b85;
  --line: rgba(255, 255, 255, 0.18);
  --gutter: clamp(20px, 4.5vw, 88px);
  --work-gap: clamp(104px, 13vw, 224px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", "Neue Haas Grotesk Text Pro", Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 78px;
  padding: 0 var(--gutter);
  background: rgba(8, 8, 8, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.wordmark {
  width: max-content;
  color: var(--fg);
  font-size: clamp(1.05rem, 1.7vw, 1.55rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.role {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.role span::before { content: " · "; }

.role .availability {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--fg);
}

.role .availability::before { content: " · "; }

.availability i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #f4e700;
  animation: signal-blink 2.8s steps(1, end) infinite;
}

@keyframes signal-blink {
  0%, 18%, 24%, 70%, 100% { opacity: 1; }
  20%, 22%, 72%, 78% { opacity: 0.08; }
}

.header-actions {
  justify-self: end;
  display: flex;
  gap: 1rem;
}

.header-link {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.header-link:hover,
.header-link:focus-visible { color: var(--fg); }

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--work-gap);
  padding: clamp(72px, 10vw, 156px) var(--gutter) clamp(132px, 17vw, 280px);
}

.work-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  gap: clamp(18px, 2vw, 30px);
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: visible;
  color: var(--fg);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  isolation: isolate;
}

.work-card.size-full { width: 100%; }
.work-card.size-medium { width: min(86%, 1420px); }
.work-card.size-portrait-pair { width: min(74%, 1120px); }
.work-card.align-left { justify-self: start; }
.work-card.align-center { justify-self: center; }
.work-card.align-right { justify-self: end; }

.work-media,
.single-frame,
.single-video,
.video-pair {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #111;
}

.single-frame img,
.single-video video,
.video-pair video {
  display: block;
  width: 100%;
  height: auto;
}

.single-video {
  aspect-ratio: 910 / 512;
}

.single-video video {
  height: 100%;
  object-fit: cover;
}

.video-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(5px, 0.6vw, 10px);
  background: transparent;
}

.video-pair video {
  aspect-ratio: 512 / 910;
  object-fit: cover;
  background: #111;
}

.triptych {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(3px, 0.35vw, 7px);
  width: 100%;
  aspect-ratio: auto;
  overflow: hidden;
  background: #111;
}

.triptych img {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  object-fit: contain;
  filter: saturate(0.93) contrast(1.02);
  transition: filter 450ms ease;
}

.work-card:hover .triptych img,
.work-card:focus-visible .triptych img,
.work-card:hover .single-frame img,
.work-card:focus-visible .single-frame img { filter: saturate(1.04) contrast(1.03); }

.single-frame img {
  filter: saturate(0.95) contrast(1.015);
  transition: filter 450ms ease;
}

.card-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 0;
  background: none;
  opacity: 1;
}

.card-title {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 2rem);
  font-weight: 450;
  line-height: 1;
  letter-spacing: -0.045em;
}

.card-credit {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  min-height: 340px;
  padding: 140px var(--gutter) 28px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.site-footer p { margin: 0; }
.site-footer > p:last-child { justify-self: end; color: var(--muted); }
.footer-links { display: flex; gap: 1.2rem; }
.footer-links a { text-underline-offset: 0.25em; }

.player-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  color: var(--fg);
  background: rgba(4, 4, 4, 0.97);
  border: 0;
}

.player-dialog::backdrop { background: rgba(0, 0, 0, 0.94); }

.player-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  height: 100%;
  padding: var(--gutter);
}

.player-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 68px;
  gap: 1rem;
}

.player-title { margin: 0; font-size: 1rem; }
.player-credit { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.75rem; }

.close-player {
  padding: 0;
  color: var(--fg);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 0.82rem;
}

.video-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

.video-frame iframe {
  width: min(100%, 160vh);
  height: min(100%, 56.25vw);
  border: 0;
}

body.dialog-open { overflow: hidden; }
.work-card[hidden] { display: none; }

.about-contact {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(240px, 1fr);
  gap: clamp(80px, 10vw, 180px);
  padding: clamp(120px, 16vw, 260px) var(--gutter) clamp(140px, 18vw, 300px);
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0 0 clamp(30px, 4vw, 64px);
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-copy h2 {
  max-width: 1050px;
  margin: 0;
  font-size: clamp(2rem, 4.25vw, 5.1rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.about-note {
  max-width: 580px;
  margin: clamp(38px, 5vw, 72px) 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  line-height: 1.45;
}

.contact-copy {
  align-self: end;
  font-size: 1rem;
  line-height: 1.5;
}

.contact-copy > p:not(.section-label) { margin: 0; }

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: clamp(36px, 4vw, 60px);
}

.contact-links a { text-underline-offset: 0.25em; }

@media (max-width: 820px) {
  :root {
    --gutter: 14px;
    --work-gap: 88px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
  }

  .role { display: none; }
  .header-actions { gap: 0.75rem; }
  .work-grid { padding-top: 58px; padding-bottom: 128px; }

  .work-card,
  .work-card.size-full,
  .work-card.size-medium,
  .work-card.size-portrait-pair { width: 100%; }

  .triptych { gap: 2px; }

  .video-pair {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .card-overlay {
    align-items: flex-start;
    padding: 0 2px;
  }

  .card-credit { font-size: 0.68rem; }
  .site-footer {
    grid-template-columns: 1fr auto;
    min-height: 190px;
  }
  .site-footer > p:last-child { display: none; }

  .about-contact {
    grid-template-columns: 1fr;
    gap: 92px;
    padding-top: 110px;
    padding-bottom: 150px;
  }

  .about-copy h2 { font-size: clamp(2rem, 10vw, 3.25rem); }
  .contact-copy { align-self: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
