.gallery-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 55% 24% at 18% 18%, rgba(13,122,122,0.2), transparent 62%),
    radial-gradient(ellipse 48% 26% at 82% 6%, rgba(26,184,184,0.1), transparent 58%),
    linear-gradient(180deg, #04101e 0%, #071e38 45%, #04101e 100%);
}

.gallery-page nav {
  background: rgba(4,16,30,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26,184,184,0.15);
}

.gallery-page .nav-links a[aria-current="page"] {
  color: var(--aqua);
}

.gallery-shell {
  position: relative;
  z-index: 2;
  padding: 11rem 4rem 5rem;
  overflow: hidden;
}

.gallery-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(108deg, transparent 0%, transparent 8%, rgba(125,232,232,0.025) 8.6%, transparent 9.2%);
  opacity: 0.7;
}

.gallery-hero {
  max-width: 1200px;
  margin: 0 auto 3.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: end;
  gap: 3rem;
}

.gallery-hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(3.2rem, 6vw, 6rem);
  font-weight: 300;
  line-height: 0.95;
  color: var(--white);
  justify-self: end;
  max-width: 680px;
}

.gallery-hero h1 em {
  color: var(--foam);
  font-style: italic;
  font-weight: 300;
}

.gallery-hero p {
  max-width: 410px;
  color: rgba(200,222,222,0.78);
  font-size: 0.86rem;
  line-height: 1.9;
}

.gallery-mosaic {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(280px, 23vw, 360px);
  grid-auto-flow: row;
  gap: 8px;
}

.mosaic-item {
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: rgba(7,30,56,0.6);
  border: 1px solid rgba(26,184,184,0.12);
  isolation: isolate;
}

.mosaic-item::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(4,16,30,0.7), transparent 42%),
    radial-gradient(ellipse at 50% 0%, rgba(125,232,232,0.12), transparent 48%);
  opacity: 0.86;
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.01);
  transition: transform 0.8s ease, filter 0.8s ease;
}

.mosaic-item:hover img {
  transform: scale(1.065);
  filter: saturate(1.16) contrast(1.06);
}

.mosaic-item figcaption {
  position: absolute;
  left: 1rem;
  bottom: 0.85rem;
  z-index: 2;
  color: rgba(240,246,246,0.88);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.span-2 { grid-column: span 3; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.row-2 { grid-row: span 1; }

.gallery-cta {
  max-width: 1250px;
  margin: 5rem auto 0;
  padding: 3.5rem 0 0;
  border-top: 1px solid rgba(26,184,184,0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.gallery-cta h2 {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 300;
  line-height: 1;
  color: var(--white);
}

.gallery-cta h2 em {
  color: var(--foam);
  font-style: italic;
  font-weight: 300;
}

@media (max-width: 1000px) {
  .gallery-shell {
    padding: 9rem 2rem 4rem;
  }

  .gallery-hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-mosaic {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 260px;
  }

  .span-2,
  .span-3,
  .span-4,
  .span-5,
  .span-6 {
    grid-column: span 3;
  }

  .gallery-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .gallery-shell {
    padding: 8rem 1rem 3rem;
  }

  .gallery-hero {
    margin-bottom: 2rem;
  }

  .gallery-mosaic {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
    gap: 5px;
  }

  .span-2,
  .span-3,
  .span-4,
  .span-5,
  .span-6 {
    grid-column: 1 / -1;
  }

  .row-2 {
    grid-row: span 1;
  }

  .mosaic-item figcaption {
    left: 0.75rem;
    bottom: 0.7rem;
    font-size: 0.52rem;
  }
}
