.gallery-home .site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}
.gallery-home .nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: .55rem;
  padding: .55rem 1.1rem;
  font-size: .95rem;
}
.gallery-home .brand-titles:has(.brand-tagline) .brand-name {
  font-size: .95rem;
  font-weight: 550;
  letter-spacing: 0;
}
.gallery-home .brand-tagline {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.025em;
}
.gallery-home .nav [aria-current] { background: var(--purple); color: var(--button-text); }
.gallery-home .nav a:not([aria-current]) { background: var(--soft-accent); }
.gallery-home .nav a:not([aria-current]):hover { background: var(--line); }
.gallery-banner {
  --gallery-night: color-mix(in srgb, #100c21 84%, var(--purple));
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  overflow: clip;
  min-height: clamp(28rem, 50vw, 44rem);
  color: white;
  background: var(--gallery-night);
}
.gallery-banner-image {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  max-width: none;
  height: 116%;
  object-fit: cover;
  object-position: right 43%;
  z-index: -2;
  translate: 0 var(--gallery-drift, 0px);
}
.gallery-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.gallery-intro { padding-block: clamp(2.75rem, 7vw, 6.5rem); }
.gallery-intro .eyebrow { color: #fff; opacity: .84; }
.gallery-intro h1 { font-size: clamp(2.9rem, 6vw, 5.45rem); max-width: 10ch; line-height: 1.02; }
.gallery-intro h1 em {
  display: block;
  font-style: normal;
  color: color-mix(in srgb, white 86%, var(--purple));
}
.gallery-description {
  margin-top: 1.25rem;
  max-width: 35ch;
  color: color-mix(in srgb, white 91%, var(--purple));
  font-size: clamp(1rem, 1.8vw, 1.23rem);
}
.gallery-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.65rem; }
.gallery-about { background: #12102168; border-color: #ffffff85; color: white; }
.gallery-about:hover { background: #ffffff29; }
.gallery-caption { color: #ffffffcc; margin-top: 1rem; font-size: .9rem; }
.gallery-section { background: var(--paper); border-bottom: 1px solid var(--line); }
.gallery-section:nth-child(even) { background: color-mix(in srgb, var(--hero) 62%, var(--paper)); }
.gallery-section-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: start;
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 7vw, 6.5rem);
  padding-block: clamp(3.3rem, 7vw, 6.5rem);
}
.gallery-section-inner h2 {
  width: fit-content;
  padding-bottom: .65rem;
  border-bottom: 3px solid var(--purple);
  overflow-wrap: anywhere;
}
.gallery-section-details p { max-width: 55ch; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); }
.gallery-explore {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.15rem;
  font-weight: 700;
}
.gallery-explore span { font-size: 1.25em; line-height: 1; }
.gallery-preview-cards {
  grid-column: 1 / -1;
  grid-template-columns: repeat(var(--preview-count), minmax(0, 1fr));
}
.gallery-preview-cards .card-image { background-image: radial-gradient(ellipse, #ffffff50, transparent 76%); }
@media (max-width: 960px) {
  .gallery-preview-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .gallery-preview-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .gallery-banner { min-height: 0; }
  .gallery-banner.has-image { grid-template-rows: auto 1fr; }
  .gallery-banner-image {
    position: relative;
    inset: auto;
    grid-row: 1;
    width: 100%;
    height: clamp(13rem, 58vw, 23rem);
    object-position: 70% 40%;
    translate: none;
  }
  .gallery-banner.has-image::after {
    inset: 0 0 auto;
    height: clamp(13rem, 58vw, 23rem);
  }
  .gallery-banner.has-image .gallery-intro { padding-block: .25rem 2.65rem; }
  .gallery-section-inner { grid-template-columns: minmax(0, 1fr); }
  .gallery-home .brand-tagline { font-size: 1.25rem; }
  .gallery-home .brand-titles:has(.brand-tagline) .brand-name { font-size: .84rem; }
  .gallery-home .nav a { padding-inline: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-banner-image { translate: none; }
}

.gallery-home { --gallery-header-height: 5.25rem; }
.gallery-home :is(#main, #portfolio, [data-gallery-zone]) {
  scroll-margin-top: calc(var(--gallery-header-height) + .55rem);
}
.gallery-home .nav a { transition: background-color .16s ease, color .16s ease; }
.gallery-banner-image { filter: saturate(1.14) contrast(1.08); }
.gallery-banner::after {
  background:
    linear-gradient(120deg, transparent 46%, color-mix(in srgb, var(--purple) 21%, transparent)),
    linear-gradient(90deg, var(--gallery-night) 2%,
      color-mix(in srgb, var(--gallery-night) 94%, transparent) 25%,
      color-mix(in srgb, var(--gallery-night) 72%, transparent) 44%,
      color-mix(in srgb, var(--purple) 14%, transparent) 66%, transparent 90%);
}
.gallery-section { position: relative; isolation: isolate; overflow: clip; }
.gallery-intro, .gallery-section-inner { position: relative; z-index: 1; }
.gallery-orbs {
  position: absolute;
  inset: 0;
  overflow: clip;
  pointer-events: none;
  z-index: 0;
}
.gallery-orbs span {
  position: absolute;
  width: clamp(11rem, 24vw, 28rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--purple) 22%, transparent), transparent 70%);
  transform: translate(var(--orb-jitter-x, 0%), var(--orb-jitter-y, 0%));
  translate: 0 calc(var(--orb-drift, 0px) * var(--orb-speed, 1));
}
.gallery-orbs span:first-child { --orb-speed: .9; top: 3%; right: -7%; }
.gallery-orbs span:nth-child(2) {
  --orb-speed: -.65;
  left: -7%;
  bottom: -12%;
  width: clamp(10rem, 20vw, 22rem);
  background: radial-gradient(circle, color-mix(in srgb, var(--purple) 15%, transparent), transparent 71%);
}
.gallery-orbs span:nth-child(3) {
  --orb-speed: .52;
  left: 40%;
  top: 15%;
  width: clamp(9rem, 17vw, 21rem);
  background: radial-gradient(circle, color-mix(in srgb, var(--purple) 34%, transparent), transparent 70%);
}
.gallery-banner .gallery-orbs span:first-child { top: -12%; right: 4%; }
.gallery-banner .gallery-orbs span:nth-child(2) { left: 22%; bottom: -8%; }
.gallery-section:nth-child(even) .gallery-orbs span:first-child { right: auto; left: -5%; }
.gallery-section:nth-child(even) .gallery-orbs span:nth-child(2) { left: auto; right: -4%; }
@media (max-width: 720px) {
  .gallery-home { --gallery-header-height: 9rem; }
  .gallery-banner.has-image::after {
    background:
      linear-gradient(0deg, var(--gallery-night), transparent 52%),
      linear-gradient(100deg, color-mix(in srgb, var(--purple) 22%, transparent), transparent 68%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-orbs span { translate: none; }
  .gallery-home .nav a { transition: none; }
}
