:root {
  color-scheme: dark;
  --bg: #060607;
  --ink: #f3f1eb;
  --muted: #9b9a96;
  --line: rgba(255, 255, 255, 0.22);
  --soft: #151515;
  --panel: rgba(255, 255, 255, 0.055);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

.project-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 7vw, 120px);
  background: rgba(6, 6, 7, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.project-header a,
.source-link {
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.project-stage {
  position: relative;
  width: min(1140px, calc(100vw - 36px));
  aspect-ratio: 2 / 1;
  margin: 0 auto;
  overflow: hidden;
  background: #111;
}

.project-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms ease;
}

.project-stage-embed iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-slide.is-active {
  opacity: 1;
}

.stage-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  transform: translateY(-50%);
}

.stage-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
}

.stage-arrow-prev {
  left: 12px;
}

.stage-arrow-prev::before {
  transform: translate(-35%, -50%) rotate(-45deg);
}

.stage-arrow-next {
  right: 12px;
}

.stage-arrow-next::before {
  transform: translate(-65%, -50%) rotate(135deg);
}

.stage-arrow:hover,
.stage-arrow:focus-visible {
  background: rgba(0, 0, 0, 0.68);
}

.stage-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.project-stage.has-single-slide .stage-arrow {
  display: none;
}

.project-source-bar {
  width: min(1140px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 14px 0 0;
}

.project-hero,
.project-video,
.project-copy,
.project-gallery,
.project-details {
  width: min(1140px, calc(100vw - 36px));
  margin-inline: auto;
}

.project-video {
  margin-top: 28px;
  display: grid;
  place-items: center;
}

.project-video iframe {
  display: block;
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  background: #111;
}

.project-hero {
  padding: 54px 0 28px;
}

.project-kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  font-weight: 300;
  line-height: 1;
}

.source-link {
  display: inline-flex;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.project-source-bar .source-link {
  min-height: 34px;
  align-items: center;
  padding: 0 14px;
  border-left: 3px solid var(--line);
  background: var(--panel);
}

.project-source-bar .source-link:hover,
.project-source-bar .source-link:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
}

.project-copy {
  display: grid;
  gap: 42px;
  padding: 20px 0 70px;
}

.project-copy p {
  max-width: 900px;
  margin: 0;
  font-size: 16px;
  line-height: 1.72;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 56px;
  padding-bottom: 70px;
}

.project-gallery figure {
  margin: 0;
  text-align: center;
}

.project-gallery button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.project-gallery img {
  width: 100%;
  height: auto;
  max-height: 230px;
  object-fit: contain;
  transition: filter 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.project-gallery button:hover img,
.project-gallery button:focus-visible img,
.project-gallery-item.is-active img {
  filter: contrast(1.08);
  opacity: 1;
  transform: scale(1.015);
}

.project-gallery button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.project-gallery figcaption {
  margin-top: 16px;
  padding: 14px 12px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.project-gallery-item.is-active figcaption {
  background: rgba(255, 255, 255, 0.14);
}

.project-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 42px 0 70px;
  border-top: 2px solid var(--line);
}

.detail-item {
  min-height: 70px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 26px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-item:last-child {
  border-right: 0;
}

.detail-item strong {
  font-size: 13px;
  text-transform: uppercase;
}

.detail-item span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .project-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .project-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 0;
  }
}

@media (max-width: 560px) {
  .project-stage {
    width: 100vw;
    aspect-ratio: 1.25 / 1;
  }

  .project-gallery,
  .project-details {
    grid-template-columns: 1fr;
  }

  .detail-item {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    padding-bottom: 20px;
  }
}
