:root {
  color-scheme: light;
  --page-bg: #e5e5e5;
  --ink: #151515;
  --reel-ratio: 4096 / 2160;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.site-header {
  min-height: 70px;
  padding: 0 2.3%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.site-header nav a {
  color: inherit;
  font-size: clamp(12px, 1.35vw, 18px);
  font-weight: 300;
  text-decoration: none;
  white-space: nowrap;
}

.brand {
  letter-spacing: 0.005em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.35vw, 42px);
}

.site-header nav a {
  transition: opacity 160ms ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  opacity: 0.55;
}

.page-content {
  width: 82.5%;
  max-width: 1800px;
  margin: 30px auto 0;
  padding-bottom: clamp(40px, 7.5vw, 150px);
}

.home-page .page-content {
  max-width: none;
  padding-bottom: 31.8vw;
}

.hero,
.hero-video {
  width: 100%;
  aspect-ratio: var(--reel-ratio);
}

.hero {
  overflow: hidden;
  background: #111;
}

.hero-video {
  position: relative;
}

.hero-video iframe,
.hero-video video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.hero-reel-link {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.8vw, 22px);
  background: #d2d2d2;
  color: var(--ink);
  font-size: clamp(16px, 1.8vw, 26px);
  font-weight: 300;
  text-decoration: none;
  transition: background-color 180ms ease;
}

.hero-reel-link:hover,
.hero-reel-link:focus-visible {
  background: #d8d8d8;
}

.hero-reel-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -5px;
}

.hero-reel-play-icon {
  position: relative;
  display: grid;
  width: clamp(48px, 5.4vw, 72px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.hero-reel-play-icon::after {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
  content: "";
}

.projects {
  margin-top: clamp(22px, 3.2vw, 42px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 2.65%;
  row-gap: 3.9vw;
}

.projects[hidden] {
  display: none;
}

.project-card-spacer {
  min-width: 0;
  aspect-ratio: var(--reel-ratio);
}

.project-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: var(--reel-ratio);
  background: #252525;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}

.project-card img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: filter 220ms ease, transform 350ms ease;
}

.project-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgb(0 0 0 / 42%);
  content: "";
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-title {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 12px;
  color: #fff;
  font-size: clamp(13px, 1.65vw, 25px);
  font-weight: 300;
  text-align: center;
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-card:hover img,
.project-card:focus-visible img {
  filter: brightness(0.58);
  transform: scale(1.025);
}

.project-card:hover::after,
.project-card:focus-visible::after,
.project-card:hover .project-title,
.project-card:focus-visible .project-title {
  opacity: 1;
}

.project-card:focus-visible {
  outline: 2px solid #151515;
  outline-offset: 3px;
}

.me-content {
  width: 88.4%;
  max-width: none;
  min-height: calc(100vh - 70px);
  margin: clamp(80px, 11vw, 212px) auto 0;
}

.me-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(48px, 16vw, 308px);
}

.me-photo {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center;
}

.me-copy {
  max-width: 660px;
  margin-top: clamp(12px, 1.65vw, 32px);
}

.me-heading {
  margin: 0 0 16px;
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 300;
}

.me-copy p {
  max-width: none;
  margin: 0 0 1.6em;
  font-size: clamp(16px, 1.65vw, 32px);
  line-height: 1.2;
}

.project-detail {
  width: 82.5%;
  max-width: 1800px;
  margin: 30px auto 0;
  text-align: center;
}

.project-heading {
  margin: 30px 0;
  font-size: clamp(14px, 1.55vw, 20px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-transform: lowercase;
}

.project-video {
  position: relative;
  width: 100%;
  aspect-ratio: var(--reel-ratio);
  background: #111;
}

.project-video iframe,
.project-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-section {
  margin: 0 auto;
}

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

.project-stills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.project-stills-grid img {
  display: block;
  flex: 0 1 calc((100% - 16px) / 3);
  width: calc((100% - 16px) / 3);
  aspect-ratio: var(--reel-ratio);
  object-fit: cover;
}

.project-stills {
  margin-top: 0;
}

.project-crew {
  margin-top: clamp(42px, 5.2vw, 52px);
  text-align: left;
}

.project-crew-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(14px, 1.55vw, 16px);
  line-height: 1.25;
  text-align: left;
}

.project-crew-list li {
  display: block;
}

.project-bts {
  margin-top: clamp(80px, 9vw, 88px);
}

.project-bts-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1vw, 20px);
}

.project-bts-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 0.85vw, 16px);
}

.project-bts-row[data-count="3"] {
  flex-wrap: nowrap;
  justify-content: space-between;
}

.project-bts-grid img {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  width: var(--bts-width, auto);
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.project-credits {
  margin: clamp(36px, 5vw, 90px) 0;
  font: 300 clamp(14px, 1.2vw, 22px) / 1.48 "Helvetica Neue", Helvetica, Arial, sans-serif;
  white-space: pre-wrap;
}

.project-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 3vw, 54px);
}

.project-gallery img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-not-found {
  padding: 80px 0;
  font-size: 18px;
}

.project-not-found a {
  color: inherit;
}

@media (max-width: 680px) {
  .site-header {
    min-height: 70px;
    padding: 0 4%;
    gap: 10px;
  }

  .brand,
  .site-header nav a {
    font-size: clamp(9px, 2.5vw, 13px);
  }

  .site-header nav {
    gap: clamp(9px, 3vw, 18px);
  }

  .page-content,
  .project-detail {
    width: 92%;
    margin-top: 22px;
  }

  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 2.8%;
    margin-top: 18px;
  }

  .project-title {
    font-size: clamp(12px, 3.3vw, 16px);
  }

  .me-content {
    width: 92%;
    min-height: calc(100vh - 70px);
    margin-top: 32px;
  }

  .me-layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
  }

  .me-photo {
    max-width: 100%;
  }

  .me-copy {
    margin-top: 0;
  }

  .me-copy p {
    margin-bottom: 1.2em;
    font-size: clamp(16px, 4.5vw, 20px);
    line-height: 1.45;
  }

  .project-heading {
    margin: 22px 0;
    font-size: 15px;
  }

  .project-stills-grid img {
    flex-basis: calc((100% - 8px) / 2);
    width: calc((100% - 8px) / 2);
  }

  .project-crew {
    margin-top: 34px;
  }

  .project-crew-list {
    font-size: 14px;
  }

  .project-bts {
    margin-top: 52px;
  }

  .project-bts-grid {
    gap: 8px;
  }

  .project-bts-row[data-count="3"] {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 4px;
  }

  .project-credits {
    margin: 34px 0;
    font-size: 14px;
  }

  .project-gallery {
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .home-page .site-header {
    padding-right: 1.955%;
    padding-left: 1.955%;
  }

  .home-page .page-content {
    width: 70.125%;
    max-width: none;
    padding-bottom: 37.4vw;
  }

  .home-page .projects {
    margin-top: 3.76vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Full-screen photo viewer for project stills and behind-the-scenes images. */
.project-stills-grid img[data-fullscreen-photo],
.project-bts-grid img[data-fullscreen-photo] {
  cursor: zoom-in;
}

.project-stills-grid img[data-fullscreen-photo]:focus-visible,
.project-bts-grid img[data-fullscreen-photo]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #fff;
}

.photo-lightbox::backdrop {
  background: rgb(0 0 0 / 96%);
}

.photo-lightbox-stage {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 56px 76px;
}

.photo-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 112px);
  object-fit: contain;
}

.photo-lightbox button {
  position: fixed;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
  background: rgb(20 20 20 / 70%);
  color: #fff;
  font: 300 32px / 1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  cursor: pointer;
}

.photo-lightbox button:hover,
.photo-lightbox button:focus-visible {
  background: rgb(70 70 70 / 85%);
}

.photo-lightbox-close {
  top: 22px;
  right: 22px;
}

.photo-lightbox-previous {
  top: 50%;
  left: 22px;
  transform: translateY(-50%);
}

.photo-lightbox-next {
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
}

@media (max-width: 680px) {
  .photo-lightbox-stage {
    padding: 58px 18px 86px;
  }

  .photo-lightbox-image {
    max-height: calc(100vh - 144px);
  }

  .photo-lightbox-close {
    top: 14px;
    right: 14px;
  }

  .photo-lightbox-previous {
    top: auto;
    bottom: 16px;
    left: calc(50% - 56px);
    transform: none;
  }

  .photo-lightbox-next {
    top: auto;
    right: calc(50% - 56px);
    bottom: 16px;
    transform: none;
  }
}
