:root {
  color-scheme: dark;
  --bg: #030303;
  --fg: #f4f1eb;
  --muted: #9b9a96;
  --line: rgba(244, 241, 235, 0.18);
  --soft: rgba(244, 241, 235, 0.08);
  --accent: #c8ffef;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.12;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 0.7px, transparent 0.7px);
  background-size: 4px 4px;
  mix-blend-mode: screen;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  mix-blend-mode: difference;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 86px;
  height: 26px;
  overflow: hidden;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 12px;
  text-transform: uppercase;
  min-width: 0;
}

.nav a {
  white-space: nowrap;
}

.nav .active-link {
  color: var(--fg);
}

.language-switch {
  display: inline-grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, 1fr);
  width: 76px;
  height: 28px;
  border: 1px solid rgba(244, 241, 235, 0.48);
  border-radius: 999px;
  padding: 2px;
}

.language-switch button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.language-switch button.active {
  background: var(--fg);
  color: var(--bg);
}

.language-switch button:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 120px 32px 36px;
}

.home-hero {
  min-height: 98vh;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.06);
  transform: none;
}

.hero-shade {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.02) 42%, rgba(0, 0, 0, 0.78)),
    radial-gradient(circle at 66% 44%, rgba(200, 255, 239, 0.12), transparent 24%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 1120px;
}

.brand-motion {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.motion-ring,
.motion-line {
  position: absolute;
  display: block;
  opacity: 0.36;
}

.motion-ring {
  border: 1px solid rgba(244, 241, 235, 0.38);
  border-radius: 999px;
  animation: drift 10s ease-in-out infinite alternate;
}

.ring-a {
  width: min(46vw, 620px);
  aspect-ratio: 1;
  right: 7vw;
  top: 14vh;
}

.ring-b {
  width: min(28vw, 360px);
  aspect-ratio: 1;
  right: 24vw;
  top: 38vh;
  animation-delay: -4s;
}

.motion-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 241, 235, 0.68), transparent);
  animation: scan 7s linear infinite;
}

.line-a {
  left: 5vw;
  right: 10vw;
  top: 34vh;
}

.line-b {
  left: 22vw;
  right: 4vw;
  top: 61vh;
  animation-delay: -3s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(-24px, 18px, 0) scale(1.04);
  }
}

@keyframes scan {
  0% {
    transform: translateX(-18%);
    opacity: 0;
  }

  18%,
  72% {
    opacity: 0.44;
  }

  100% {
    transform: translateX(18%);
    opacity: 0;
  }
}

.kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(72px, 16vw, 220px);
  line-height: 0.78;
  font-weight: 700;
}

.hero-logo-title {
  position: relative;
  display: inline-block;
  width: min(54vw, 720px);
  margin-bottom: 22px;
  cursor: default;
  isolation: isolate;
}

.hero-logo-title img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.12));
  transition: transform 520ms ease, filter 520ms ease, opacity 520ms ease;
}

.hero-logo-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 241, 235, 0.86), transparent);
  opacity: 0;
  transform: scaleX(0.18);
  transform-origin: center;
  transition: opacity 520ms ease, transform 520ms ease;
}

.hero-logo-title:hover img {
  transform: translate3d(0, -4px, 0) scale(1.035);
  filter:
    drop-shadow(0 0 18px rgba(244, 241, 235, 0.18))
    drop-shadow(0 0 42px rgba(200, 255, 239, 0.16));
}

.hero-logo-title:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.hero-line {
  max-width: 660px;
  margin-bottom: 28px;
  font-size: clamp(22px, 3vw, 42px);
  line-height: 1.04;
}

.cta,
.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  padding: 0 18px;
  background: transparent;
  color: var(--fg);
  text-transform: uppercase;
  font-size: 11px;
  cursor: pointer;
}

.hero-index {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 62px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.section {
  padding: 96px 32px;
}

.directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding-top: 0;
  padding-bottom: 0;
  background: var(--line);
}

.compact-directory .directory-item {
  min-height: 36vh;
}

.compact-directory .directory-item h2 {
  margin-top: 8vh;
}

.directory-item {
  min-height: 48vh;
  display: grid;
  align-content: space-between;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(244, 241, 235, 0.04), rgba(244, 241, 235, 0)),
    var(--bg);
  transition: background 450ms ease, color 450ms ease;
}

.directory-item:hover {
  background: var(--fg);
  color: var(--bg);
}

.directory-item span {
  color: var(--muted);
  font-size: 11px;
}

.directory-item h2 {
  margin: 14vh 0 20px;
  font-size: clamp(32px, 5.6vw, 86px);
  line-height: 0.92;
  font-weight: 560;
}

.directory-item p {
  max-width: 420px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.directory-item:hover p,
.directory-item:hover span {
  color: rgba(3, 3, 3, 0.62);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) minmax(0, 0.72fr);
  gap: 28px;
  margin-bottom: 42px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.section-heading h2,
.capability-intro h2,
.about h2,
.contact h2 {
  max-width: 980px;
  margin-bottom: 0;
  font-size: clamp(34px, 5.6vw, 88px);
  line-height: 0.96;
  font-weight: 520;
}

.category-section .section-heading {
  margin-bottom: 18px;
}

.section-copy {
  max-width: 760px;
  margin: 0 0 34px auto;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.filter.active {
  color: var(--bg);
  background: var(--fg);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.project-card {
  grid-column: span 5;
  min-height: 50vw;
  position: relative;
  overflow: hidden;
  background: #101010;
  display: block;
}

.project-card.large {
  grid-column: span 6;
}

.project-card.wide {
  grid-column: span 12;
  min-height: 38vw;
}

.project-media {
  position: absolute;
  inset: 0;
  transition: transform 700ms ease, filter 700ms ease;
}

.project-card:hover .project-media {
  transform: scale(1.045);
  filter: brightness(1.14);
}

.media-a {
  background: url("assets/quxxx-hero.png") center / cover;
}

.media-work-fm {
  background: url("assets/work-fm.png") center / cover;
}

.media-work-gosht {
  background: url("assets/work-gosht.png") center / cover;
}

.media-work-ancraetern {
  background: url("assets/work-ancraetern.jpg") center / cover;
}

.media-work-bb112cg {
  background: url("assets/work-bb112cg.png") center / cover;
}

.media-work-luma {
  background: url("assets/work-luma.png") center / cover;
}

.media-work-kolonial {
  background: url("assets/work-kolonial.png") center / cover;
}

.media-work-ugg-remake {
  background: url("assets/projects/UGG_REMAKE/cover.png") center / cover;
}

.media-b {
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.74), transparent 2%),
    radial-gradient(circle at 54% 42%, rgba(174, 205, 218, 0.28), transparent 24%),
    linear-gradient(135deg, #050505, #171717 45%, #050505);
}

.media-c {
  background:
    linear-gradient(120deg, transparent 0 44%, rgba(255, 255, 255, 0.58) 44.2% 44.6%, transparent 44.8%),
    radial-gradient(circle at 70% 50%, rgba(184, 255, 231, 0.22), transparent 22%),
    #070707;
}

.media-d {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 46px),
    radial-gradient(circle at 28% 44%, rgba(255, 255, 255, 0.34), transparent 3%),
    radial-gradient(circle at 62% 58%, rgba(200, 255, 239, 0.16), transparent 28%),
    #060606;
}

.media-e {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.18), transparent 24%),
    radial-gradient(circle at 42% 46%, rgba(255, 255, 255, 0.4), transparent 5%),
    radial-gradient(circle at 65% 38%, rgba(200, 255, 239, 0.16), transparent 18%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 20px),
    #080808;
}

.media-f {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent),
    radial-gradient(circle at 22% 48%, rgba(200, 255, 239, 0.2), transparent 18%),
    radial-gradient(circle at 74% 52%, rgba(255, 255, 255, 0.24), transparent 16%),
    #040404;
}

.media-g {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.32), transparent 12%),
    #050505;
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.media-h {
  background:
    conic-gradient(from 40deg at 58% 44%, transparent, rgba(244, 241, 235, 0.2), transparent 36%),
    radial-gradient(circle at 50% 50%, rgba(200, 255, 239, 0.18), transparent 22%),
    #060606;
}

.media-i {
  background:
    linear-gradient(135deg, transparent 0 35%, rgba(255, 255, 255, 0.5) 35.2% 35.6%, transparent 35.8%),
    linear-gradient(45deg, transparent 0 56%, rgba(255, 255, 255, 0.18) 56.2% 56.8%, transparent 57%),
    radial-gradient(circle at 52% 70%, rgba(200, 255, 239, 0.16), transparent 20%),
    #070707;
}

.project-meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.68));
  pointer-events: none;
}

.project-meta {
  z-index: 1;
}

.project-meta span,
.lab article span,
.clients span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.project-meta h3 {
  max-width: 420px;
  margin-bottom: 0;
  text-align: right;
  font-size: clamp(24px, 3vw, 54px);
  line-height: 1.02;
  font-weight: 520;
}

.page-hero {
  position: relative;
  min-height: 72vh;
  padding: 150px 32px 64px;
  display: grid;
  align-content: end;
  background:
    radial-gradient(circle at 74% 34%, rgba(200, 255, 239, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(244, 241, 235, 0.045), transparent 44%),
    var(--bg);
}

.back-link {
  position: absolute;
  top: 96px;
  left: 32px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.24fr) minmax(0, 0.76fr);
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.page-hero h1 {
  margin-bottom: 26px;
  font-size: clamp(58px, 11vw, 168px);
  line-height: 0.86;
  overflow-wrap: anywhere;
}

.page-hero p:not(.kicker) {
  max-width: 920px;
  color: var(--muted);
  font-size: clamp(20px, 2.4vw, 36px);
  line-height: 1.18;
}

.archive-tools {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.archive-grid .project-card {
  min-height: 44vw;
}

.media-project-list {
  display: grid;
  gap: clamp(64px, 8vw, 128px);
}

.media-project {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(280px, 0.42fr);
  grid-template-areas:
    "still video"
    "info video";
  gap: clamp(12px, 1.4vw, 22px);
  border-top: 1px solid var(--line);
  padding-top: clamp(16px, 2vw, 26px);
}

.media-project:nth-child(3n + 2) {
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  grid-template-areas:
    "video still"
    "video info";
}

.media-project:nth-child(3n) {
  grid-template-columns: minmax(0, 0.18fr) minmax(0, 0.64fr) minmax(0, 0.18fr);
  grid-template-areas:
    ". still ."
    "video video video"
    ". info .";
}

.media-project:nth-child(3n) .project-still {
  min-height: min(56vw, 720px);
}

.media-project:nth-child(3n) .project-video {
  min-height: min(44vw, 560px);
}

.project-still,
.project-video {
  min-height: clamp(420px, 38vw, 680px);
  background-color: #090909;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.project-still {
  grid-area: still;
}

.project-video {
  grid-area: video;
  position: relative;
  display: grid;
  align-content: end;
  padding: 18px;
  isolation: isolate;
}

.project-video::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--video-poster, linear-gradient(135deg, #050505, #181818)) center / cover;
  filter: brightness(0.62) saturate(0.88);
}

.project-video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.78)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 18px);
}

.project-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050505;
}

.video-label {
  position: absolute;
  left: 18px;
  top: 18px;
  color: var(--fg);
  font-size: 11px;
  text-transform: uppercase;
}

.play-mark {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(244, 241, 235, 0.7);
  border-radius: 999px;
  position: relative;
  margin-bottom: 18px;
}

.play-mark::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 18px;
  border-left: 14px solid var(--fg);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.project-video p {
  max-width: 320px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.project-video.has-video {
  padding: 0;
}

.project-video.has-video .video-label,
.project-video.has-video .play-mark,
.project-video.has-video p {
  display: none;
}

.project-info {
  grid-area: info;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: clamp(86px, 8vw, 132px);
}

.project-info span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.project-info h2 {
  max-width: 760px;
  margin-bottom: 0;
  text-align: right;
  font-size: clamp(28px, 4.6vw, 78px);
  line-height: 0.98;
  font-weight: 520;
  overflow-wrap: anywhere;
}

.project-tile,
.project-tile:nth-child(3n + 2),
.project-tile:nth-child(3n) {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas: none;
  align-items: end;
  color: var(--fg);
}

.project-tile .project-still,
.project-tile:nth-child(3n) .project-still {
  grid-area: auto;
  grid-column: 1 / 9;
  width: 100%;
  min-height: clamp(420px, 44vw, 760px);
  aspect-ratio: 16 / 11;
  transition: filter 600ms ease, transform 700ms ease;
}

.project-tile .project-video {
  display: none;
}

.project-tile .project-info {
  grid-area: auto;
  grid-column: 9 / -1;
  min-height: auto;
  padding-bottom: 10px;
}

.project-tile:nth-child(3n + 2) .project-still {
  grid-column: 5 / -1;
}

.project-tile:nth-child(3n + 2) .project-info {
  grid-column: 1 / 5;
  grid-row: 1;
}

.project-tile:nth-child(3n) .project-still {
  grid-column: 3 / 11;
}

.project-tile:nth-child(3n) .project-info {
  grid-column: 3 / 11;
}

.project-tile:hover .project-still {
  filter: brightness(1.12);
  transform: scale(1.015);
}

.project-tile:nth-child(3n + 2) .project-info h2 {
  text-align: left;
}

.project-tile:nth-child(3n) .project-info {
  justify-content: center;
  text-align: center;
}

.project-tile:nth-child(3n) .project-info h2 {
  text-align: center;
}

.project-detail-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-content: end;
  padding: 150px 32px 32px;
  overflow: hidden;
}

.project-detail-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(120px, 0.18fr) minmax(0, 0.82fr);
  gap: 28px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.project-detail-head h1 {
  max-width: 1180px;
  margin-bottom: 0;
  font-size: clamp(54px, 10vw, 156px);
  line-height: 0.9;
  overflow-wrap: anywhere;
}

.detail-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
  filter: brightness(0.42) saturate(0.92);
  transform: none;
}

.project-detail-section {
  padding-top: 72px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) minmax(0, 0.72fr);
  gap: 42px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.detail-meta {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 18px;
  align-content: start;
}

.detail-meta span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.detail-meta p {
  min-width: 0;
  margin-bottom: 0;
  color: rgba(244, 241, 235, 0.76);
  overflow-wrap: anywhere;
}

.detail-copy h2 {
  max-width: 920px;
  font-size: clamp(30px, 4.8vw, 72px);
  line-height: 1;
  font-weight: 520;
}

.detail-copy p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.5;
}

.detail-media-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.detail-media {
  min-height: 34vw;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: #050505;
}

.detail-media:nth-child(1) {
  grid-column: span 6;
}

.detail-media:nth-child(2) {
  grid-column: span 5;
}

.detail-media:nth-child(3) {
  grid-column: 3 / 11;
  min-height: 42vw;
}

.detail-video {
  position: relative;
  min-height: auto;
  aspect-ratio: 16 / 9;
  max-height: 82vh;
  display: grid;
  align-content: end;
  padding: 22px;
  overflow: hidden;
  isolation: isolate;
  background: #080808;
}

.detail-video::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--video-poster, url("assets/quxxx-hero.png")) center / cover;
  filter: brightness(0.58) saturate(0.88);
}

.detail-video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.78));
}

.detail-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
}

.detail-video.has-video {
  padding: 0;
}

.detail-video.has-video .video-label,
.detail-video.has-video .play-mark,
.detail-video.has-video p {
  display: none;
}

.project-credits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.project-credits div {
  min-height: 180px;
  display: grid;
  align-content: space-between;
  padding: 18px;
  background: var(--bg);
}

.project-credits span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.project-credits p {
  margin-bottom: 0;
  color: rgba(244, 241, 235, 0.78);
  font-size: clamp(18px, 2.2vw, 32px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

body[data-page="3d"] .page-hero,
body[data-page="mixed"] .page-hero,
body[data-page="space"] .page-hero {
  min-height: 46vh;
}

body[data-page="3d"] .work-section,
body[data-page="mixed"] .work-section,
body[data-page="space"] .work-section {
  padding-top: 42px;
}

.media-project-list {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 1.8vw, 28px);
  align-items: start;
}

.project-tile,
.project-tile:nth-child(3n + 2),
.project-tile:nth-child(3n) {
  grid-column: span 6;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "still"
    "info";
  gap: 14px;
  align-items: stretch;
  border-top: 0;
  padding-top: 0;
  color: var(--fg);
}

.project-tile:nth-child(4n + 1),
.project-tile:nth-child(4n) {
  grid-column: span 6;
}

.project-tile:nth-child(4n + 2),
.project-tile:nth-child(4n + 3) {
  grid-column: span 4;
  margin-top: clamp(34px, 4.8vw, 82px);
}

.project-tile .project-still,
.project-tile:nth-child(3n + 2) .project-still,
.project-tile:nth-child(3n) .project-still {
  position: relative;
  grid-area: still;
  grid-column: auto;
  min-height: auto;
  aspect-ratio: 4 / 5;
  background-position: center;
  overflow: hidden;
  transition: filter 600ms ease, transform 700ms ease;
}

.project-hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}

.project-tile.is-hovering .project-hover-video {
  opacity: 1;
}

.project-tile:nth-child(4n + 1) .project-still,
.project-tile:nth-child(4n) .project-still {
  aspect-ratio: 16 / 9;
}

.project-tile .project-info,
.project-tile:nth-child(3n + 2) .project-info,
.project-tile:nth-child(3n) .project-info {
  grid-area: info;
  grid-column: auto;
  grid-row: auto;
  min-height: auto;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 0;
  text-align: left;
}

.project-tile .project-info h2,
.project-tile:nth-child(3n + 2) .project-info h2,
.project-tile:nth-child(3n) .project-info h2 {
  max-width: none;
  text-align: left;
  font-size: clamp(24px, 3.4vw, 54px);
  line-height: 1;
}

.project-tile:hover .project-still {
  filter: brightness(1.12) saturate(1.02);
  transform: scale(1.012);
}

.project-detail-hero {
  min-height: min(42vh, 520px);
  padding-bottom: 28px;
}

.project-detail-head {
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: start;
}

.detail-grid {
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 0.66fr);
}

.detail-media-grid {
  gap: clamp(14px, 1.8vw, 26px);
}

.detail-media {
  min-height: auto;
  aspect-ratio: 16 / 11;
}

.detail-media:nth-child(1) {
  grid-column: 1 / 8;
  aspect-ratio: 4 / 5;
}

.detail-media:nth-child(2) {
  grid-column: 8 / -1;
  margin-top: 12vw;
  aspect-ratio: 4 / 5;
}

.detail-media:nth-child(3) {
  grid-column: 2 / 12;
  min-height: auto;
  aspect-ratio: 16 / 9;
}

[data-project-detail] {
  display: flex;
  flex-direction: column;
}

.project-detail-section {
  order: 2;
}

.project-video-section {
  order: 1;
}

.project-gallery-section {
  order: 3;
}

.project-credits-section {
  order: 4;
}


.project-video-section,
.project-gallery-section,
.project-detail-section,
.project-credits-section {
  padding-top: clamp(46px, 5vw, 72px);
  padding-bottom: clamp(46px, 5vw, 72px);
}

.project-gallery-section,
.project-video-section,
.project-detail-section,
.project-credits-section {
  width: min(100%, 1720px);
  margin-left: auto;
  margin-right: auto;
}
.capabilities {
  display: grid;
  grid-template-columns: minmax(0, 0.52fr) minmax(320px, 0.48fr);
  gap: 42px;
}

.capability-list {
  border-top: 1px solid var(--line);
}

.capability-list a {
  display: flex;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(22px, 3.2vw, 46px);
}

.compact {
  grid-template-columns: minmax(120px, 0.2fr) minmax(0, 0.8fr);
}

.lab-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.lab article {
  min-height: 300px;
  padding: 18px;
  background: var(--bg);
}

.lab article h3 {
  margin-top: 88px;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.02;
  font-weight: 520;
}

.about-grid,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(320px, 0.42fr);
  gap: 44px;
}

.about-grid p {
  max-width: 620px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
}

.clients {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.clients div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.clients p {
  color: rgba(244, 241, 235, 0.68);
  font-size: clamp(20px, 3vw, 42px);
}

.mail-link {
  display: inline-flex;
  margin-top: 26px;
  color: var(--muted);
  font-size: 20px;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
  background: transparent;
  color: var(--fg);
  outline: none;
}

select option {
  background: #080808;
}

textarea {
  resize: vertical;
}

.full,
.submit {
  grid-column: 1 / -1;
}

.submit {
  justify-self: start;
  margin-top: 10px;
}

.footer {
  display: grid;
  grid-template-columns: 1fr repeat(3, auto);
  gap: 20px;
  padding: 28px 32px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (max-width: 1120px) {
  .media-project,
  .media-project:nth-child(3n + 2) {
    grid-template-columns: minmax(0, 0.54fr) minmax(260px, 0.46fr);
  }

  .media-project:nth-child(3n) {
    grid-template-columns: minmax(0, 0.1fr) minmax(0, 0.8fr) minmax(0, 0.1fr);
  }

  .project-still,
  .project-video {
    min-height: clamp(360px, 46vw, 560px);
  }
}

@media (max-width: 820px) {
  .site-header {
    padding: 18px;
  }

  .brand {
    width: 74px;
    height: 22px;
  }

  .nav {
    gap: 12px;
  }

  .header-actions {
    gap: 14px;
  }

  .hero,
  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    min-height: 92vh;
  }

  .hero-index,
  .section-heading,
  .directory,
  .page-hero-grid,
  .capabilities,
  .about-grid,
  .contact,
  .clients {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .lab-track,
  .clients div,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .directory-item {
    min-height: 42vh;
  }

  .compact-directory .directory-item {
    min-height: 34vh;
  }

  .directory-item h2 {
    margin-top: 10vh;
  }

  .section-copy {
    margin-left: 0;
    font-size: 17px;
  }

  .project-card,
  .project-card.large,
  .project-card.wide {
    grid-column: auto;
    min-height: 112vw;
  }

  .project-meta {
    align-items: start;
    flex-direction: column;
  }

  .project-meta h3 {
    text-align: left;
  }

  .lab article {
    min-height: 220px;
  }

  .lab article h3 {
    margin-top: 58px;
  }

  .footer {
    grid-template-columns: 1fr 1fr;
  }

  .page-hero {
    min-height: 64vh;
    padding: 132px 18px 46px;
  }

  .back-link {
    left: 18px;
    top: 92px;
  }

  .archive-grid .project-card {
    min-height: 112vw;
  }

  .media-project {
    grid-template-columns: 1fr;
    grid-template-areas:
      "still"
      "video"
      "info";
  }

  .media-project:nth-child(3n + 2),
  .media-project:nth-child(3n) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "still"
      "video"
      "info";
  }

  .project-tile,
  .project-tile:nth-child(3n + 2),
  .project-tile:nth-child(3n) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "still"
      "info";
  }

  .project-tile .project-still,
  .project-tile:nth-child(3n + 2) .project-still,
  .project-tile:nth-child(3n) .project-still {
    grid-area: still;
    grid-column: auto;
    min-height: clamp(300px, 92vw, 620px);
  }

  .project-tile .project-info,
  .project-tile:nth-child(3n + 2) .project-info,
  .project-tile:nth-child(3n) .project-info {
    grid-area: info;
    grid-column: auto;
    grid-row: auto;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    justify-content: stretch;
    text-align: left;
  }

  .project-still,
  .project-video,
  .media-project:nth-child(3n) .project-still,
  .media-project:nth-child(3n) .project-video {
    min-height: clamp(280px, 76vw, 620px);
  }

  .project-info {
    align-items: start;
    flex-direction: column;
    min-height: auto;
  }

  .project-info h2 {
    text-align: left;
  }

  .project-tile:nth-child(3n) .project-info h2 {
    text-align: left;
  }

  .project-detail-hero {
    min-height: 44vh;
    padding: 120px 18px 22px;
  }

  .project-detail-head,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    filter: brightness(0.38) saturate(0.9);
  }

  .detail-meta {
    grid-template-columns: 92px 1fr;
  }

  .detail-media-grid {
    grid-template-columns: 1fr;
  }

  .detail-media,
  .detail-media:nth-child(1),
  .detail-media:nth-child(2),
  .detail-media:nth-child(3) {
    grid-column: auto;
    min-height: clamp(280px, 82vw, 620px);
  }

  .detail-video {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  body[data-page="3d"] .page-hero,
  body[data-page="mixed"] .page-hero,
  body[data-page="space"] .page-hero {
    min-height: 48vh;
  }

  .media-project-list {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .project-tile,
  .project-tile:nth-child(3n + 2),
  .project-tile:nth-child(3n),
  .project-tile:nth-child(4n + 1),
  .project-tile:nth-child(4n),
  .project-tile:nth-child(4n + 2),
  .project-tile:nth-child(4n + 3) {
    grid-column: auto;
    margin-top: 0;
  }

  .project-tile .project-still,
  .project-tile:nth-child(3n + 2) .project-still,
  .project-tile:nth-child(3n) .project-still,
  .project-tile:nth-child(4n + 1) .project-still,
  .project-tile:nth-child(4n) .project-still {
    aspect-ratio: 4 / 5;
    min-height: auto;
  }

  .project-detail-head {
    grid-template-columns: 1fr;
  }

  .project-credits {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 14px;
  }

  .header-actions {
    width: 100%;
    max-width: none;
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 10px;
  }

  .nav {
    max-width: 100%;
    justify-content: flex-start;
    gap: 8px 12px;
    font-size: 10px;
  }

  .language-switch {
    align-self: flex-start;
    width: 68px;
  }

  .hero-line {
    max-width: 340px;
  }

  .hero-logo-title {
    width: min(78vw, 380px);
  }

  .capability-list a {
    min-height: 58px;
  }

  .media-project-list {
    gap: 58px;
  }

  .project-video {
    padding: 14px;
  }

  .video-label {
    left: 14px;
    top: 14px;
  }

  .play-mark {
    width: 48px;
    height: 48px;
  }

  .play-mark::after {
    left: 19px;
    top: 14px;
  }
}











.detail-copy,
.detail-copy h2,
.detail-copy p {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .detail-copy h2 {
    font-size: clamp(28px, 10vw, 42px);
    line-height: 1.04;
  }

  .archive-tools {
    align-items: flex-start;
  }
}

/* Final layout tuning overrides */
.site-header {
  padding: 26px 36px;
}

.brand {
  width: 104px;
  height: 31px;
}

.nav {
  gap: 26px;
  font-size: 13px;
}

body[data-page="3d"] .page-hero .back-link,
body[data-page="mixed"] .page-hero .back-link,
body[data-page="space"] .page-hero .back-link {
  display: none;
}

body[data-page="3d"] .work-section,
body[data-page="mixed"] .work-section,
body[data-page="space"] .work-section {
  max-width: 1680px;
  margin-inline: auto;
}

.media-project-list {
  max-width: 1500px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 560px));
  justify-content: center;
  align-items: start;
  column-gap: clamp(48px, 6vw, 120px);
  row-gap: clamp(54px, 6vw, 104px);
}

.project-tile,
.project-tile:nth-child(3n + 2),
.project-tile:nth-child(3n),
.project-tile:nth-child(4n + 1),
.project-tile:nth-child(4n),
.project-tile:nth-child(4n + 2),
.project-tile:nth-child(4n + 3) {
  grid-column: auto;
  margin-top: 0;
}

.project-tile:nth-child(even) {
  margin-top: clamp(38px, 5vw, 86px);
}

.project-tile .project-still,
.project-tile:nth-child(3n + 2) .project-still,
.project-tile:nth-child(3n) .project-still,
.project-tile:nth-child(4n + 1) .project-still,
.project-tile:nth-child(4n) .project-still {
  aspect-ratio: 5 / 4;
  min-height: auto;
}

.project-tile .project-info h2,
.project-tile:nth-child(3n + 2) .project-info h2,
.project-tile:nth-child(3n) .project-info h2 {
  font-size: clamp(24px, 2.7vw, 46px);
}

.project-detail-hero {
  min-height: min(56vh, 620px);
  padding: 138px 32px 30px;
}

.detail-cover {
  object-fit: cover;
  transform: none;
  background: #050505;
}

[data-project-detail] {
  display: flex;
  flex-direction: column;
}

.project-detail-section {
  order: 1;
}

.project-video-section {
  order: 2;
}

.project-gallery-section {
  order: 3;
}

.project-credits-section {
  order: 4;
}

.project-detail-section,
.project-video-section,
.project-gallery-section,
.project-credits-section {
  width: min(100%, 1680px);
  margin-inline: auto;
  padding-top: clamp(46px, 5vw, 76px);
  padding-bottom: clamp(46px, 5vw, 76px);
}

.detail-video {
  aspect-ratio: 16 / 9;
  min-height: auto;
  max-height: 82vh;
}

.detail-video video {
  object-fit: contain;
  background: #050505;
}

.detail-media-grid {
  max-width: 1480px;
  margin-inline: auto;
  align-items: start;
}

.detail-media {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #050505;
  min-height: auto;
}

.detail-media.is-landscape {
  grid-column: span 7;
  aspect-ratio: 16 / 10;
}

.detail-media.is-wide {
  grid-column: 2 / 12;
  aspect-ratio: 16 / 9;
}

.detail-media.is-portrait {
  grid-column: span 5;
  aspect-ratio: 4 / 5;
}

.detail-media.is-square {
  grid-column: span 6;
  aspect-ratio: 1 / 1;
}

@media (min-width: 1720px) {
  .media-project-list {
    grid-template-columns: repeat(2, minmax(320px, 600px));
  }

  .detail-video,
  .detail-media-grid {
    max-width: 1500px;
  }
}

@media (max-width: 820px) {
  .site-header {
    padding: 18px;
  }

  .brand {
    width: 88px;
    height: 26px;
  }

  .nav {
    font-size: 11px;
    gap: 12px;
  }

  .media-project-list {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 52px;
  }

  .project-tile:nth-child(even) {
    margin-top: 0;
  }

  .project-detail-hero {
    min-height: 52vh;
    padding: 122px 18px 24px;
  }

  .detail-media,
  .detail-media.is-landscape,
  .detail-media.is-wide,
  .detail-media.is-portrait,
  .detail-media.is-square {
    grid-column: auto;
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
  }

  .detail-media::before {
    content: "";
    display: block;
    aspect-ratio: var(--media-ratio, 16 / 9);
  }
}

/* Project detail final responsive refinements */
body[data-page="project"] .project-detail-hero .back-link {
  display: inline-flex;
  position: absolute;
  z-index: 3;
  top: 110px;
  left: 32px;
  align-items: center;
  min-height: 28px;
  color: var(--text);
  letter-spacing: 0.06em;
}

body[data-page="project"] .project-detail-hero .back-link::before {
  content: "←";
  margin-right: 8px;
}

.detail-copy,
.detail-meta,
.detail-copy h2,
.detail-copy p,
.detail-meta p {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  body[data-page="project"] .project-detail-hero .back-link {
    top: 142px;
    left: 18px;
    font-size: 10px;
  }

  .detail-grid {
    gap: 30px;
  }

  .detail-meta {
    display: grid;
    grid-template-columns: minmax(76px, 0.35fr) minmax(0, 0.65fr);
    column-gap: 14px;
    row-gap: 10px;
  }

  .detail-copy h2 {
    font-size: clamp(38px, 14vw, 56px);
    line-height: 0.98;
  }

  .detail-copy p {
    font-size: 16px;
    line-height: 1.55;
  }
}

@media (max-width: 720px) {
  body[data-page="project"] {
    overflow-x: hidden;
  }

  body[data-page="project"] .section,
  body[data-page="project"] .project-detail-section,
  body[data-page="project"] .project-video-section,
  body[data-page="project"] .project-gallery-section,
  body[data-page="project"] .project-credits-section {
    width: 100%;
    max-width: 100%;
    padding-left: 18px;
    padding-right: 18px;
    box-sizing: border-box;
  }

  body[data-page="project"] .detail-grid,
  body[data-page="project"] .detail-copy,
  body[data-page="project"] .detail-meta {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  body[data-page="project"] .detail-copy h2 {
    max-width: 100%;
    font-size: clamp(34px, 11.5vw, 46px);
    word-break: normal;
  }

  body[data-page="project"] .detail-copy p,
  body[data-page="project"] .detail-meta p {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  body[data-page="project"] .detail-copy h2 {
    font-size: clamp(30px, 9vw, 36px);
    line-height: 1.08;
  }

  body[data-page="project"] .detail-copy p {
    font-size: 15px;
  }

  body[data-page="project"] .archive-tools {
    gap: 18px;
  }
}

@media (max-width: 720px) {
  body[data-page="project"] .project-detail-section .detail-grid,
  body[data-page="project"] .detail-copy,
  body[data-page="project"] .detail-meta,
  body[data-page="project"] .detail-copy h2,
  body[data-page="project"] .detail-copy p {
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
  }

  body[data-page="project"] .detail-meta {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  body[data-page="project"] .detail-copy h2,
  body[data-page="project"] .detail-copy p,
  body[data-page="project"] .detail-meta p {
    white-space: normal;
  }
}

@media (max-width: 720px) {
  body[data-page="project"] .project-detail-section .detail-grid,
  body[data-page="project"] .detail-copy,
  body[data-page="project"] .detail-meta,
  body[data-page="project"] .detail-copy h2,
  body[data-page="project"] .detail-copy p {
    width: calc(100vw - 72px);
    max-width: calc(100vw - 72px);
  }

  body[data-page="project"] .detail-copy h2 {
    font-size: clamp(28px, 8.2vw, 34px);
  }
}

@media (max-width: 720px) {
  body[data-page="project"] .detail-copy h2,
  body[data-page="project"] .detail-copy p {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }
}

.media-work-ugg-ai {
  background: url("assets/projects/UGG_AI/A1_cover.png") center / cover;
}

/* Adaptive project covers and rich project media */
body[data-page="mixed"] .media-project-list {
  grid-template-columns: repeat(2, minmax(280px, 640px));
  column-gap: clamp(56px, 7vw, 140px);
  row-gap: clamp(62px, 7vw, 120px);
}

.project-tile {
  position: relative;
  overflow: hidden;
  background: #050505;
}

.project-tile .project-still {
  display: grid;
  place-items: center;
  background-color: #050505;
  background-image: none !important;
  aspect-ratio: auto !important;
  min-height: 0 !important;
}

.project-tile .project-still img,
.project-tile .project-still .project-hover-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 760px);
  object-fit: contain;
}

.project-tile .project-still .project-hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  background: #050505;
}

.project-tile .project-info,
.project-tile:nth-child(3n + 2) .project-info,
.project-tile:nth-child(3n) .project-info {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(14px, 2vw, 26px);
  color: var(--fg);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
  pointer-events: none;
}

.project-tile .project-info span {
  color: rgba(244, 241, 235, 0.76);
}

.project-tile .project-info h2,
.project-tile:nth-child(3n + 2) .project-info h2,
.project-tile:nth-child(3n) .project-info h2 {
  max-width: min(70%, 520px);
  text-align: right;
  font-size: clamp(24px, 4vw, 68px);
  line-height: 0.94;
}

.detail-video {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 34px);
  aspect-ratio: auto;
  max-height: none;
  background: transparent;
  justify-items: center;
}

.detail-video-item {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050505;
}

.detail-video-item::before {
  content: attr(data-video-index);
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 2;
  color: rgba(244, 241, 235, 0.72);
  font-size: 11px;
}

.detail-video-item video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
}

.detail-media {
  background-image: none !important;
  background: #050505;
  overflow: hidden;
}

.detail-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-media::before {
  content: none !important;
}

@media (max-width: 820px) {
  body[data-page="mixed"] .media-project-list,
  .detail-video {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-tile .project-info,
  .project-tile:nth-child(3n + 2) .project-info,
  .project-tile:nth-child(3n) .project-info {
    padding: 14px;
  }

  .project-tile .project-info h2,
  .project-tile:nth-child(3n + 2) .project-info h2,
  .project-tile:nth-child(3n) .project-info h2 {
    max-width: 74%;
    font-size: clamp(24px, 11vw, 48px);
  }

  .project-tile .project-still img {
    max-height: none;
  }
}


/* Project listing cover height guard */
body[data-page="mixed"] .project-tile .project-still {
  height: clamp(420px, 48vw, 680px) !important;
  min-height: 0 !important;
}

body[data-page="mixed"] .project-tile .project-still img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

body[data-page="mixed"] .project-tile .project-still .project-hover-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 820px) {
  body[data-page="mixed"] .project-tile .project-still {
    height: clamp(360px, 110vw, 620px) !important;
  }
}


/* Final cover ratio and native video aspect overrides */
body[data-page="mixed"] .project-tile .project-still {
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
}

body[data-page="mixed"] .project-tile .project-still img {
  width: 100%;
  height: auto !important;
  max-height: none !important;
  object-fit: contain;
}

body[data-page="mixed"] .project-tile .project-still .project-hover-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-page="mixed"] .project-tile .project-info,
body[data-page="mixed"] .project-tile:nth-child(3n + 2) .project-info,
body[data-page="mixed"] .project-tile:nth-child(3n) .project-info {
  inset: auto 0 0 0;
}

.detail-video {
  align-items: start;
}

.detail-video-item {
  aspect-ratio: var(--video-ratio, 16 / 9);
  width: 100%;
}

.detail-video-item.is-video-portrait {
  width: min(100%, 520px);
  justify-self: center;
}

.detail-video-item.is-video-square {
  width: min(100%, 680px);
  justify-self: center;
}

.detail-video-item.is-video-landscape {
  width: min(100%, 1480px);
  justify-self: center;
}

@media (min-width: 821px) {
  .detail-video-item.is-video-portrait {
    grid-column: span 1;
  }

  .detail-video-item:only-child {
    grid-column: 1 / -1;
  }

  .detail-video-item.is-video-landscape {
    grid-column: 1 / -1;
  }

  .detail-video-item.is-video-landscape + .detail-video-item.is-video-landscape {
    grid-column: 1 / -1;
  }

  .detail-video-item.is-video-portrait:only-child {
    width: min(100%, 720px);
  }

  .detail-video-item.is-video-square:only-child {
    width: min(100%, 860px);
  }
}

@media (max-width: 820px) {
  body[data-page="mixed"] .project-tile .project-still {
    height: auto !important;
  }

  .detail-video-item.is-video-portrait,
  .detail-video-item.is-video-square,
  .detail-video-item.is-video-landscape {
    width: 100%;
  }
}


/* Natural selected-frames layout */
.project-gallery-section {
  background: var(--bg);
}

.project-gallery-section .detail-media-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(24px, 3vw, 56px);
  row-gap: clamp(34px, 4vw, 76px);
  max-width: 1500px;
  margin-inline: auto;
  align-items: start;
}

.project-gallery-section .detail-media,
.project-gallery-section .detail-media:nth-child(1),
.project-gallery-section .detail-media:nth-child(2),
.project-gallery-section .detail-media:nth-child(3),
.project-gallery-section .detail-media.is-wide,
.project-gallery-section .detail-media.is-landscape,
.project-gallery-section .detail-media.is-portrait,
.project-gallery-section .detail-media.is-square {
  grid-column: span 6;
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.project-gallery-section .detail-media.is-wide,
.project-gallery-section .detail-media.is-landscape {
  grid-column: span 7;
}

.project-gallery-section .detail-media.is-portrait {
  grid-column: span 5;
  justify-self: center;
  width: min(100%, 520px);
}

.project-gallery-section .detail-media.is-square {
  grid-column: span 5;
  justify-self: center;
  width: min(100%, 560px);
}

.project-gallery-section .detail-media.is-gif,
.project-gallery-section .detail-media.is-small-media,
.project-gallery-section .detail-media.is-logo-like {
  grid-column: span 5;
  justify-self: center;
  width: min(100%, 520px);
}

.project-gallery-section .detail-media.is-logo-like {
  padding: clamp(34px, 5vw, 88px);
  background: #041f31;
}

.project-gallery-section .detail-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(82vh, 920px);
  object-fit: contain;
}

.project-gallery-section .detail-media.is-logo-like img,
.project-gallery-section .detail-media.is-gif img {
  max-height: min(54vh, 560px);
}

.project-gallery-section .detail-media:nth-child(3n + 1).is-wide,
.project-gallery-section .detail-media:nth-child(4n + 1).is-landscape {
  grid-column: 2 / 12;
}

.project-gallery-section .detail-media:nth-child(4n + 2).is-portrait {
  margin-top: clamp(24px, 5vw, 86px);
}

@media (min-width: 1500px) {
  .project-gallery-section .detail-media.is-portrait,
  .project-gallery-section .detail-media.is-gif,
  .project-gallery-section .detail-media.is-small-media,
  .project-gallery-section .detail-media.is-logo-like {
    width: min(100%, 600px);
  }
}

@media (max-width: 820px) {
  .project-gallery-section .detail-media-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 34px;
  }

  .project-gallery-section .detail-media,
  .project-gallery-section .detail-media:nth-child(1),
  .project-gallery-section .detail-media:nth-child(2),
  .project-gallery-section .detail-media:nth-child(3),
  .project-gallery-section .detail-media.is-wide,
  .project-gallery-section .detail-media.is-landscape,
  .project-gallery-section .detail-media.is-portrait,
  .project-gallery-section .detail-media.is-square,
  .project-gallery-section .detail-media.is-gif,
  .project-gallery-section .detail-media.is-small-media,
  .project-gallery-section .detail-media.is-logo-like {
    grid-column: auto;
    width: 100%;
    margin-top: 0;
  }

  .project-gallery-section .detail-media.is-logo-like {
    padding: 28px;
  }

  .project-gallery-section .detail-media img,
  .project-gallery-section .detail-media.is-logo-like img,
  .project-gallery-section .detail-media.is-gif img {
    max-height: none;
  }
}


/* Clean native video presentation */
.project-video-section,
.project-video-section .detail-video,
.project-video-section .detail-video-item {
  background-image: none !important;
}

.project-video-section .detail-video {
  background: transparent !important;
}

.project-video-section .detail-video-item {
  background: #050505 !important;
}

.project-video-section .detail-video-item::after,
.project-video-section .detail-video::before,
.project-video-section .detail-video::after,
.project-video-section .detail-video-item::before {
  background-image: none !important;
}

.project-video-section .detail-video-item::before {
  background: transparent !important;
}

.project-video-section .detail-video-item video {
  background: #050505;
}


/* Global project media refinements */
body[data-page="3d"] .project-tile .project-info h2,
body[data-page="mixed"] .project-tile .project-info h2,
body[data-page="space"] .project-tile .project-info h2,
.project-tile .project-info h2,
.project-tile:nth-child(3n + 2) .project-info h2,
.project-tile:nth-child(3n) .project-info h2 {
  max-width: min(68%, 460px);
  font-size: clamp(20px, 2.5vw, 42px);
  line-height: 0.98;
}

.project-tile .project-info,
.project-tile:nth-child(3n + 2) .project-info,
.project-tile:nth-child(3n) .project-info {
  padding: clamp(12px, 1.6vw, 22px);
}

.project-tile .project-info span {
  font-size: 10px;
}

.project-tile.is-hovering .project-hover-video {
  opacity: 0.68;
}

.project-tile .project-hover-video {
  background: #050505;
}

.project-video-section,
.project-video-section .detail-video,
.project-video-section .detail-video-item {
  background: transparent !important;
  background-image: none !important;
}

.project-video-section .detail-video-item {
  background-color: #050505 !important;
}

.project-video-section .detail-video::before,
.project-video-section .detail-video::after,
.project-video-section .detail-video-item::before,
.project-video-section .detail-video-item::after {
  background: transparent !important;
  background-image: none !important;
}

@media (max-width: 820px) {
  body[data-page="3d"] .project-tile .project-info h2,
  body[data-page="mixed"] .project-tile .project-info h2,
  body[data-page="space"] .project-tile .project-info h2,
  .project-tile .project-info h2,
  .project-tile:nth-child(3n + 2) .project-info h2,
  .project-tile:nth-child(3n) .project-info h2 {
    max-width: 72%;
    font-size: clamp(22px, 8vw, 38px);
  }

  .project-tile .project-info,
  .project-tile:nth-child(3n + 2) .project-info,
  .project-tile:nth-child(3n) .project-info {
    padding: 12px;
  }
}


/* Hover: keep preview clear, soften overlay text */
.project-tile.is-hovering .project-hover-video {
  opacity: 1 !important;
}

.project-tile.is-hovering .project-info,
.project-tile.is-hovering:nth-child(3n + 2) .project-info,
.project-tile.is-hovering:nth-child(3n) .project-info {
  opacity: 0.34;
}

.project-tile .project-info,
.project-tile:nth-child(3n + 2) .project-info,
.project-tile:nth-child(3n) .project-info {
  transition: opacity 260ms ease;
}


/* Wide desktop listing and cleaner gallery media */
@media (min-width: 1280px) {
  body[data-page="mixed"] .work-section,
  body[data-page="3d"] .work-section,
  body[data-page="space"] .work-section,
  body[data-page="mixed"] .project-list-section,
  body[data-page="3d"] .project-list-section,
  body[data-page="space"] .project-list-section {
    width: min(100% - 56px, 1880px);
    max-width: none;
  }

  body[data-page="mixed"] .media-project-list,
  body[data-page="3d"] .media-project-list,
  body[data-page="space"] .media-project-list {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    column-gap: clamp(42px, 4vw, 92px);
    row-gap: clamp(74px, 7vw, 132px);
  }

  body[data-page="mixed"] .project-tile,
  body[data-page="mixed"] .project-tile:nth-child(3n + 2),
  body[data-page="mixed"] .project-tile:nth-child(3n),
  body[data-page="mixed"] .project-tile:nth-child(4n + 1),
  body[data-page="mixed"] .project-tile:nth-child(4n + 2),
  body[data-page="mixed"] .project-tile:nth-child(4n + 3),
  body[data-page="mixed"] .project-tile:nth-child(4n),
  body[data-page="3d"] .project-tile,
  body[data-page="3d"] .project-tile:nth-child(3n + 2),
  body[data-page="3d"] .project-tile:nth-child(3n),
  body[data-page="3d"] .project-tile:nth-child(4n + 1),
  body[data-page="3d"] .project-tile:nth-child(4n + 2),
  body[data-page="3d"] .project-tile:nth-child(4n + 3),
  body[data-page="3d"] .project-tile:nth-child(4n),
  body[data-page="space"] .project-tile,
  body[data-page="space"] .project-tile:nth-child(3n + 2),
  body[data-page="space"] .project-tile:nth-child(3n),
  body[data-page="space"] .project-tile:nth-child(4n + 1),
  body[data-page="space"] .project-tile:nth-child(4n + 2),
  body[data-page="space"] .project-tile:nth-child(4n + 3),
  body[data-page="space"] .project-tile:nth-child(4n) {
    grid-column: auto;
  }

  body[data-page="mixed"] .project-tile:nth-child(4n + 2),
  body[data-page="mixed"] .project-tile:nth-child(4n + 3),
  body[data-page="3d"] .project-tile:nth-child(4n + 2),
  body[data-page="3d"] .project-tile:nth-child(4n + 3),
  body[data-page="space"] .project-tile:nth-child(4n + 2),
  body[data-page="space"] .project-tile:nth-child(4n + 3) {
    grid-column: span 5;
  }
}

@media (min-width: 1680px) {
  body[data-page="mixed"] .work-section,
  body[data-page="3d"] .work-section,
  body[data-page="space"] .work-section,
  body[data-page="mixed"] .project-list-section,
  body[data-page="3d"] .project-list-section,
  body[data-page="space"] .project-list-section {
    width: min(100% - 72px, 2140px);
    max-width: none;
  }

  body[data-page="mixed"] .project-tile,
  body[data-page="mixed"] .project-tile:nth-child(3n + 2),
  body[data-page="mixed"] .project-tile:nth-child(3n),
  body[data-page="3d"] .project-tile,
  body[data-page="3d"] .project-tile:nth-child(3n + 2),
  body[data-page="3d"] .project-tile:nth-child(3n),
  body[data-page="space"] .project-tile,
  body[data-page="space"] .project-tile:nth-child(3n + 2),
  body[data-page="space"] .project-tile:nth-child(3n) {
    grid-column: span 6;
  }
}

body[data-page="mixed"] .project-tile .project-info h2,
body[data-page="3d"] .project-tile .project-info h2,
body[data-page="space"] .project-tile .project-info h2,
.project-tile .project-info h2,
.project-tile:nth-child(3n + 2) .project-info h2,
.project-tile:nth-child(3n) .project-info h2 {
  max-width: min(58%, 390px);
  font-size: clamp(18px, 2vw, 34px);
}

.project-gallery-section .detail-media,
.project-gallery-section .detail-media:nth-child(1),
.project-gallery-section .detail-media:nth-child(2),
.project-gallery-section .detail-media:nth-child(3),
.project-gallery-section .detail-media.is-wide,
.project-gallery-section .detail-media.is-landscape,
.project-gallery-section .detail-media.is-portrait,
.project-gallery-section .detail-media.is-square,
.project-gallery-section .detail-media.is-small-media {
  background: transparent !important;
  overflow: visible;
}

.project-gallery-section .detail-media img {
  width: 100%;
  height: auto;
  max-height: none;
}

.project-gallery-section .detail-media.is-portrait img,
.project-gallery-section .detail-media.is-square img {
  max-height: min(86vh, 980px);
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

.project-gallery-section .detail-media.is-logo-like {
  background: transparent !important;
  padding: 0;
}

.project-gallery-section .detail-media.is-logo-like img,
.project-gallery-section .detail-media.is-gif img {
  max-height: min(60vh, 680px);
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

@media (min-width: 1280px) {
  body[data-page="mixed"] .media-project-list,
  body[data-page="3d"] .media-project-list,
  body[data-page="space"] .media-project-list {
    max-width: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }

  body[data-page="mixed"] .project-tile,
  body[data-page="mixed"] .project-tile:nth-child(3n + 2),
  body[data-page="mixed"] .project-tile:nth-child(3n),
  body[data-page="mixed"] .project-tile:nth-child(4n + 1),
  body[data-page="mixed"] .project-tile:nth-child(4n + 2),
  body[data-page="mixed"] .project-tile:nth-child(4n + 3),
  body[data-page="mixed"] .project-tile:nth-child(4n),
  body[data-page="3d"] .project-tile,
  body[data-page="3d"] .project-tile:nth-child(3n + 2),
  body[data-page="3d"] .project-tile:nth-child(3n),
  body[data-page="3d"] .project-tile:nth-child(4n + 1),
  body[data-page="3d"] .project-tile:nth-child(4n + 2),
  body[data-page="3d"] .project-tile:nth-child(4n + 3),
  body[data-page="3d"] .project-tile:nth-child(4n),
  body[data-page="space"] .project-tile,
  body[data-page="space"] .project-tile:nth-child(3n + 2),
  body[data-page="space"] .project-tile:nth-child(3n),
  body[data-page="space"] .project-tile:nth-child(4n + 1),
  body[data-page="space"] .project-tile:nth-child(4n + 2),
  body[data-page="space"] .project-tile:nth-child(4n + 3),
  body[data-page="space"] .project-tile:nth-child(4n) {
    grid-column: auto !important;
  }
}
