.life-gallery {
  display: grid;
  width: var(--event-content-width);
  margin-inline: auto;
  padding-block: clamp(72px, 11vw, 150px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(80px, 10vw, 160px) clamp(12px, 3.5vw, 52px);
  align-items: start;
}

.life-gallery > :is(a, .scroll-photo) {
  --photo-origin: right center;
  display: block;
  width: 66.6667%;
  position: relative;
  justify-self: end;
}

.life-gallery > .life-portrait { width: min(66.6667%, 30svh); }

.life-gallery > :is(a, .scroll-photo):nth-child(even) {
  justify-self: start;
  margin-top: clamp(100px, 17vw, 240px);
}

.life-gallery > :is(a, .scroll-photo):nth-child(4n + 3) {
  width: 58%;
  margin-right: 8%;
}

.life-gallery > :is(a, .scroll-photo):nth-child(4n + 4) {
  width: 58%;
  margin-left: 7%;
}

.life-gallery img {
  width: 100%;
  height: auto;
}

.life-gallery > :is(a, .scroll-photo) > :is(img, .masterclass-zoom) {
  transform-origin: var(--photo-origin);
  transition: transform 550ms cubic-bezier(.22, .61, .36, 1);
}

.life-gallery > :is(a, .scroll-photo):nth-child(even) { --photo-origin: left center; }
.life-gallery > .is-active { z-index: 1; }
.life-gallery > .is-active > :is(img, .masterclass-zoom) { transform: scale(1.5); }

@media (max-width: 700px) {
  .life-gallery {
    grid-template-columns: minmax(0, 1fr);
    row-gap: clamp(80px, 22vw, 120px);
  }

  .life-gallery > :is(a, .scroll-photo),
  .life-gallery > .life-portrait,
  .life-gallery > :is(a, .scroll-photo):nth-child(4n + 3),
  .life-gallery > :is(a, .scroll-photo):nth-child(4n + 4) {
    width: 60%;
    margin: 0;
  }

  .life-gallery > :is(a, .scroll-photo):nth-child(odd) { justify-self: start; }
  .life-gallery > :is(a, .scroll-photo):nth-child(even) {
    justify-self: end;
    margin-top: 0;
  }

  .life-gallery > :is(a, .scroll-photo):nth-child(4n + 3) {
    justify-self: start;
    margin-left: 8%;
  }

  .life-gallery > :is(a, .scroll-photo):nth-child(odd) { --photo-origin: left center; }
  .life-gallery > :is(a, .scroll-photo):nth-child(even) { --photo-origin: right center; }
}

@media (prefers-reduced-motion: reduce) {
  .life-gallery > :is(a, .scroll-photo) > :is(img, .masterclass-zoom) { transition: none; }
}

.masterclass-zoom { margin: 0; }

.masterclass-scroll figcaption {
  margin-top: 14px;
  text-align: center;
  font: clamp(15px, 2.2vw, 28px)/1.3 var(--serif);
}

.masterclass-scroll #masterclass-yong-hi-moon img {
  aspect-ratio: 1440 / 1920;
  object-fit: contain;
}

.masterclass-scroll #masterclass-vladimir-viardo img {
  aspect-ratio: 1280 / 1706;
  object-fit: contain;
}

.masterclass-scroll > .scroll-photo:nth-child(3),
.masterclass-scroll > .scroll-photo:nth-child(4) { width: 44.4445%; }

@media (max-width: 700px) {
  .masterclass-scroll > .scroll-photo:nth-child(2),
  .masterclass-scroll > .scroll-photo:nth-child(3),
  .masterclass-scroll > .scroll-photo:nth-child(4) { width: 40%; }
}
