:root {
  --bg: #090b0d;
  --panel: #101417;
  --panel-strong: #151c20;
  --text: #d8f6ff;
  --muted: #7fa8b7;
  --cyan: #6cc2e4;
  --cyan-bright: #93e4ff;
  --line: rgba(108, 194, 228, 0.26);
  --shadow: rgba(0, 0, 0, 0.62);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(108, 194, 228, 0.14), transparent 34rem),
    linear-gradient(180deg, rgba(9, 12, 14, 0.7) 0%, var(--bg) 48%, #050607 100%),
    url("/images/hubble-xdf-background.jpg") center top / cover fixed,
    #050607;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(108, 194, 228, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 194, 228, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 72%);
}

img,
iframe {
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(12px);
}

.nav-links a[href*="forms.gle"] {
  border-color: var(--line);
}

.home-header {
  position: relative;
}

.site-mark {
  color: var(--cyan-bright);
  font-size: clamp(1.7rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 0.9;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.nav-links a,
.button-link,
.stacked-links a,
.social-links a {
  color: var(--cyan);
  text-decoration: none;
}

.nav-links a {
  border-bottom: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.social-links a:hover,
.stacked-links a:hover {
  color: var(--cyan-bright);
  border-color: currentColor;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 28px;
  align-items: stretch;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 112px);
  margin: 0 auto;
  padding: 20px 0 58px;
}

.hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-block: 1px solid var(--line);
  padding: 34px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 7ch;
  margin-bottom: 18px;
  color: var(--cyan-bright);
  font-size: clamp(4rem, 7.2vw, 6.6rem);
  line-height: 0.84;
  text-transform: uppercase;
}

h1 span {
  display: block;
}

h2 {
  color: var(--cyan-bright);
  font-size: clamp(1.7rem, 4vw, 3.6rem);
  line-height: 0.98;
}

p {
  max-width: 100%;
  color: var(--text);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.hero-text {
  max-width: 32rem;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions,
.stacked-links,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-link,
.stacked-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid var(--cyan);
  padding: 0 18px;
  font-weight: 700;
  text-transform: uppercase;
}

.button-link:hover,
.button-link:focus-visible,
.stacked-links a:hover,
.stacked-links a:focus-visible {
  background: var(--cyan);
  color: var(--bg);
}

.button-link.ghost {
  border-color: var(--line);
}

.hero-image {
  min-height: 420px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 22px 60px var(--shadow);
}

.hero-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.8);
}

.split-section,
.feature-grid,
.page-shell {
  min-width: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr);
  gap: 34px;
  border-top: 1px solid var(--line);
  padding: 64px 0;
}

.copy-block {
  max-width: 680px;
}

.feature-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 70px;
}

.compact-section {
  padding-top: 44px;
  padding-bottom: 44px;
}

.list-panel {
  border: 1px solid var(--line);
  background: rgba(16, 20, 23, 0.62);
}

.empty-state {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

.full-list {
  max-width: 900px;
}

.show-archive {
  margin-top: 40px;
}

.show-archive h2 {
  margin-bottom: 16px;
}

.show-notes {
  white-space: pre-line;
  margin-top: 8px;
}

.show-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.show-row:last-child {
  border-bottom: 0;
}

.show-row strong,
.show-row span {
  display: block;
}

.show-row strong {
  color: var(--cyan-bright);
}

.show-row span {
  margin-top: 4px;
  color: var(--muted);
}

.show-row a {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 56px;
}

.member-card {
  display: grid;
  min-height: 150px;
  align-content: end;
  border: 1px solid var(--line);
  background: rgba(16, 20, 23, 0.78);
  padding: 18px;
}

.member-card.has-image {
  align-content: stretch;
  gap: 14px;
  padding: 12px;
}

.member-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: saturate(0.82) contrast(1.05);
}

.member-card span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.member-card strong {
  display: block;
  color: var(--cyan-bright);
  font-size: 1.5rem;
}

.member-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-card,
.contact-card,
.stream-panel,
.video-item {
  border: 1px solid var(--line);
  background: rgba(16, 20, 23, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.feature-card,
.contact-card {
  display: grid;
  min-height: 190px;
  align-content: space-between;
  padding: 18px;
  text-decoration: none;
}

.feature-card span,
.contact-card span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.feature-card strong,
.contact-card strong {
  color: var(--cyan-bright);
  font-size: 1.6rem;
}

.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.feature-card:hover,
.contact-card:hover {
  border-color: var(--cyan-bright);
  transform: translateY(-2px);
}

.page-shell {
  min-height: calc(100vh - 164px);
  padding: 48px 0 72px;
}

.page-intro {
  max-width: 780px;
  margin-bottom: 36px;
}

.page-intro h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 9vw, 8rem);
}

.page-intro p:not(.eyebrow) {
  max-width: 42rem;
  color: var(--muted);
}

.music-layout {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.embed-frame,
.stream-panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.embed-frame {
  padding: 12px;
}

.embed-frame > * + * {
  margin-top: 12px;
}

.music-layout.links-only {
  grid-template-columns: 1fr;
}

.bandcamp-player {
  container-type: inline-size;
  width: min(100%, 350px);
}

.bandcamp-player iframe {
  display: block;
  width: 100%;
  height: 470px;
  height: calc(100cqw + 120px);
  border: 0;
}

.stream-panel {
  display: grid;
  align-content: center;
  padding: 28px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.video-item {
  padding: 12px;
}

.video-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.video-item h2 {
  margin: 12px 0 0;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.featured-video {
  width: min(100%, 900px);
  margin: 0 auto 36px;
}

main > .featured-video {
  width: min(calc(100% - 32px), 900px);
}

.featured-video h2 {
  margin: 0 0 14px;
}

.mosaic-grid {
  column-count: 3;
  column-gap: 10px;
}

.mosaic-item {
  display: block;
  width: 100%;
  padding: 0;
  break-inside: avoid;
  margin-bottom: 10px;
  border: 1px solid rgba(108, 194, 228, 0.16);
  background: var(--panel);
}

.mosaic-item img {
  width: 100%;
  display: block;
  cursor: zoom-in;
  filter: saturate(0.78) contrast(1.04);
}

.mosaic-item img:hover {
  filter: saturate(0.95) contrast(1.08);
}

.mosaic-grid[data-layout="rows"],
.mosaic-grid[data-layout="filmstrip"] {
  display: grid;
  gap: 10px;
}

.mosaic-grid[data-layout="rows"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(110px, 20vw, 235px);
}

.mosaic-grid[data-layout="rows"] .mosaic-item:nth-child(6n + 1),
.mosaic-grid[data-layout="rows"] .mosaic-item:nth-child(6n + 4) {
  grid-column: span 2;
}

.mosaic-grid[data-layout="filmstrip"] {
  grid-auto-flow: column dense;
  grid-auto-columns: min(calc(36% - 5px), 215px);
  grid-template-rows: repeat(4, clamp(115px, 19vw, 210px));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.mosaic-grid[data-layout="filmstrip"]::-webkit-scrollbar {
  display: none;
}

.filmstrip-controls:not([hidden]) {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.filmstrip-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--cyan-bright);
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.filmstrip-controls button:hover:not([aria-disabled="true"]) {
  border-color: currentColor;
}

.filmstrip-controls button[aria-disabled="true"] {
  opacity: .45;
  cursor: default;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item {
  grid-column: span 2;
  scroll-snap-align: start;
}

/* Nine columns per repeat, with small tiles tucked around taller photos. */
.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(
  :nth-child(25n + 1), :nth-child(25n + 22)
) {
  grid-row: 1 / span 2;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:nth-child(25n + 23) {
  grid-row: 3 / span 2;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(
  :nth-child(25n + 2), :nth-child(25n + 3), :nth-child(25n + 16)
) {
  grid-column: span 1;
  grid-row: 3;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(:nth-child(25n + 2), :nth-child(25n + 16)) {
  grid-row-end: span 2;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(
  :nth-child(25n + 4), :nth-child(25n + 10), :nth-child(25n + 17)
) {
  grid-column: span 1;
  grid-row: 4;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(
  :nth-child(25n + 5), :nth-child(25n + 18)
) {
  grid-row: 1 / span 4;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:nth-child(25n + 11) {
  grid-row: 1 / span 3;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:nth-child(25n + 12) {
  grid-row: 4;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(
  :nth-child(25n + 6), :nth-child(25n + 13), :nth-child(25n + 24)
) {
  grid-row: 1;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(:nth-child(25n + 19), :nth-child(25n + 20)) {
  grid-column: span 1;
  grid-row: 1;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(:nth-child(25n + 21), :nth-child(25n + 25)) {
  grid-row: 2 / span 3;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:nth-child(25n + 7) {
  grid-column: span 1;
  grid-row: 2 / span 3;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(
  :nth-child(25n + 8), :nth-child(25n + 14), :nth-child(25n + 15)
) {
  grid-column: span 1;
  grid-row: 2;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:nth-child(25n + 9) {
  grid-column: span 1;
  grid-row: 3;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:nth-child(25n + 14) {
  grid-row-end: span 2;
}

/* One full 2-by-2 cluster per four repeats. */
.mosaic-grid[data-layout="filmstrip"] .mosaic-item:nth-child(100n + 38) {
  grid-row: 1 / span 2;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(:nth-child(100n + 39), :nth-child(100n + 40)) {
  grid-row: 3;
}

.mosaic-grid[data-layout="filmstrip"] .mosaic-item:is(:nth-child(100n + 41), :nth-child(100n + 42)) {
  grid-row: 4;
}

.mosaic-grid:is([data-layout="rows"], [data-layout="filmstrip"]) .mosaic-item {
  min-width: 0;
  min-height: 0;
  margin: 0;
}

.mosaic-grid:is([data-layout="rows"], [data-layout="filmstrip"]) img {
  height: 100%;
  object-fit: cover;
}

@media (max-width: 560px) {
  .mosaic-grid[data-layout="rows"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 125px;
  }
}

.gallery-lightbox {
  margin: auto;
  padding: 0;
  max-width: 94vw;
  max-height: 92vh;
  border: 1px solid var(--line);
  background: #090b0d;
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
}

.gallery-lightbox img {
  display: block;
  max-width: 94vw;
  max-height: 90vh;
}

.gallery-lightbox button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #090b0d;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.hidden {
  display: none;
}

.contact-intro {
  max-width: 900px;
}

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 22px 0 32px;
  color: var(--muted);
}

.footer-name {
  margin-bottom: 10px;
  color: var(--cyan-bright);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.social-links a {
  font-size: 0.9rem;
}

@media (max-width: 920px) {
  .site-header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    gap: 10px 14px;
    justify-content: flex-start;
  }

  .hero,
  .split-section,
  .music-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-image {
    min-height: 360px;
    order: -1;
  }

  .feature-grid,
  .contact-grid,
  .video-grid,
  .member-grid {
    grid-template-columns: 1fr;
  }

  .show-row {
    flex-direction: column;
  }

  .mosaic-grid {
    column-count: 2;
  }
}

@media (max-width: 560px) {
  .site-header,
  .hero,
  .split-section,
  .feature-grid,
  .page-shell,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .site-mark {
    font-size: 3rem;
  }

  h1,
  .page-intro h1 {
    font-size: clamp(3rem, 19vw, 5rem);
  }

  .hero-image {
    min-height: 300px;
  }

  .hero-text {
    max-width: 30ch;
  }

  .copy-block {
    max-width: 34ch;
  }

  .mosaic-grid {
    column-count: 1;
  }
}
