.gallery-main {
  width: min(1600px, calc(100% - 64px));
  margin: 0 auto;
}

.gallery-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
  gap: 28px;
  align-items: end;
  padding: clamp(70px, 10vw, 148px) 0 58px;
}

.gallery-intro .ng-kicker {
  grid-column: 1 / -1;
}

.gallery-intro h1 {
  margin: 0;
  font-size: clamp(5.5rem, 13vw, 13rem);
  line-height: 0.78;
  letter-spacing: -0.08em;
}

.gallery-intro > p:last-child {
  max-width: 460px;
  margin: 0;
  color: var(--ng-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.featured-work {
  border-top: 1px solid var(--ng-line);
}

.featured-work__frame {
  position: relative;
  display: grid;
  min-height: min(72vw, 900px);
  max-height: 900px;
  overflow: hidden;
  border-right: 1px solid var(--ng-line);
  border-bottom: 1px solid var(--ng-line);
  border-left: 1px solid var(--ng-line);
  background: #070706;
}

.featured-work__frame img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  max-height: inherit;
  object-fit: contain;
  background: #070706;
}

.featured-work__frame img.is-visible {
  display: block;
}

.featured-work__index {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  padding: 9px 11px;
  color: rgba(238, 234, 224, 0.78);
  background: rgba(11, 11, 10, 0.74);
  font: 400 0.64rem/1 var(--ng-mono);
  letter-spacing: 0.14em;
}

.void-desert {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 0 58%, rgba(107, 31, 36, 0.08) 58.2%, transparent 59%),
    radial-gradient(circle at 62% 36%, rgba(235, 225, 201, 0.05), transparent 19%),
    linear-gradient(180deg, #050505, #0f0d0b 62%, #18110d);
}

.void-desert::before,
.void-desert::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -9%;
  left: -8%;
  height: 40%;
  background: #17100c;
  clip-path: polygon(0 64%, 16% 48%, 35% 58%, 52% 35%, 72% 55%, 88% 32%, 100% 48%, 100% 100%, 0 100%);
}

.void-desert::after {
  bottom: -21%;
  height: 48%;
  background: #0d0b09;
  clip-path: polygon(0 28%, 22% 43%, 42% 26%, 63% 47%, 82% 25%, 100% 37%, 100% 100%, 0 100%);
}

.void-desert__moon {
  position: absolute;
  top: 18%;
  right: 17%;
  width: clamp(64px, 9vw, 140px);
  aspect-ratio: 1;
  border: 1px solid rgba(238, 234, 224, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(154, 31, 40, 0.12);
}

.void-desert__monolith {
  position: absolute;
  z-index: 2;
  bottom: 20%;
  left: 54%;
  width: clamp(22px, 3vw, 48px);
  height: clamp(130px, 24vw, 340px);
  transform: skewY(-5deg);
  background: linear-gradient(90deg, #080808, #1f1d1a 72%, #050505);
  box-shadow: 42px 26px 60px rgba(0, 0, 0, 0.66);
}

.void-desert__horizon {
  position: absolute;
  right: 0;
  bottom: 39%;
  left: 0;
  height: 1px;
  background: rgba(238, 234, 224, 0.12);
}

.void-desert__grain {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.void-desert strong {
  position: absolute;
  bottom: 11%;
  left: 6%;
  z-index: 3;
  color: rgba(238, 234, 224, 0.72);
  font-size: clamp(2rem, 5vw, 6rem);
  line-height: 0.86;
  letter-spacing: -0.06em;
}

.featured-work__caption {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1fr) minmax(220px, 0.45fr);
  gap: clamp(28px, 5vw, 80px);
  padding: 34px 0 70px;
  border-bottom: 1px solid var(--ng-line);
}

.featured-work__caption h2 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 3.6vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.featured-work__caption > p {
  max-width: 640px;
  margin: 0;
  color: var(--ng-muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.featured-meta {
  display: grid;
  gap: 18px;
  margin: 0;
}

.featured-meta[hidden] {
  display: none;
}

.featured-meta div {
  display: grid;
  gap: 7px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ng-faint-line);
}

.featured-meta dt,
.featured-meta dd,
.gallery-archive__head > span,
.gallery-card__date,
.gallery-card__number {
  font-family: var(--ng-mono);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.featured-meta dt {
  color: var(--ng-muted);
}

.featured-meta dd {
  margin: 0;
  color: var(--ng-bone);
}

.gallery-archive {
  padding: 74px 0 100px;
}

.gallery-archive__head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding-bottom: 28px;
}

.gallery-archive__head h2 {
  margin: 12px 0 0;
  font-size: clamp(2.8rem, 6vw, 6.5rem);
  line-height: 0.86;
  letter-spacing: -0.06em;
}

.gallery-archive__head > span {
  color: var(--ng-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ng-line);
  border-left: 1px solid var(--ng-line);
}

.gallery-card {
  position: relative;
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 14px 14px 22px;
  border: 0;
  border-right: 1px solid var(--ng-line);
  border-bottom: 1px solid var(--ng-line);
  color: var(--ng-bone);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.gallery-card:hover,
.gallery-card:focus-visible,
.gallery-card.is-active {
  background: var(--ng-panel-raised);
  outline: none;
}

.gallery-card.is-active::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 2px;
  background: var(--ng-oxblood);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #080807;
  filter: saturate(0.86);
}

.gallery-card__copy {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
}

.gallery-card__number,
.gallery-card__date {
  color: var(--ng-muted);
}

.gallery-card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
  font-weight: 500;
}

.gallery-card__date {
  display: block;
  line-height: 1.4;
}

.gallery-empty {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 90px 1fr;
  min-height: 190px;
  align-items: center;
  padding: 30px;
  border-right: 1px solid var(--ng-line);
  border-bottom: 1px solid var(--ng-line);
  color: var(--ng-muted);
}

.gallery-empty span {
  font: 400 0.66rem/1 var(--ng-mono);
  letter-spacing: 0.14em;
}

.gallery-empty p {
  margin: 0;
}

@media (max-width: 980px) {
  .gallery-main {
    width: min(100% - 32px, 1600px);
  }

  .gallery-intro,
  .featured-work__caption {
    grid-template-columns: 1fr;
  }

  .featured-work__frame {
    min-height: 68vw;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .gallery-intro {
    padding-top: 72px;
  }

  .gallery-intro h1 {
    font-size: clamp(4.8rem, 25vw, 8rem);
  }

  .featured-work__frame {
    min-height: 108vw;
  }

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

  .gallery-archive__head {
    align-items: flex-start;
  }
}
