@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Caslon+Display&display=swap");

:root {
  color-scheme: dark;
  --ink: #080c1d;
  --panel: #12182d;
  --cream: #f5eee3;
  --muted: #abaec1;
  --gold: #efb45e;
  --line: rgba(243, 228, 202, .16);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    radial-gradient(circle at 12% 0, rgba(100, 77, 143, .26), transparent 36rem),
    radial-gradient(circle at 95% 30%, rgba(34, 120, 124, .14), transparent 42rem),
    var(--ink);
}

a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.gallery-header, #gallery { width: min(1440px, calc(100% - 2rem)); margin-inline: auto; }
.gallery-header { padding: clamp(2rem, 6vw, 6rem) clamp(.2rem, 3vw, 3rem) 2.5rem; }
.gallery-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.back-link { color: var(--gold); text-underline-offset: .3em; }
.gallery-language select {
  min-width: 6.8rem;
  padding: .45rem 1.8rem .45rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  background: var(--panel);
  font: inherit;
  cursor: pointer;
}
.gallery-language select:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.eyebrow { margin: 3rem 0 .8rem; color: var(--gold); font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
h1, h2 { font-family: "Libre Caslon Display", Georgia, serif; font-weight: 400; }
h1 { max-width: 850px; margin: 0 0 1.2rem; font-size: clamp(3.7rem, 10vw, 8.4rem); line-height: .85; letter-spacing: -.055em; }
.lede { max-width: 680px; color: #d2cfda; font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.6; }
.section-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.section-links a { padding: .65rem .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; }
.section-links a:hover, .section-links a:focus-visible { color: var(--cream); border-color: rgba(239, 180, 94, .5); }

.gallery-section { padding: 2.5rem clamp(.2rem, 3vw, 3rem) 4rem; scroll-margin-top: 1rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0 0 .9rem; font-size: clamp(2.2rem, 5vw, 4.2rem); }
.section-head p { max-width: 600px; margin: 0 0 1.1rem; color: var(--muted); line-height: 1.5; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1rem; }
.image-grid.sources { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
figure { margin: 0; min-width: 0; padding: .55rem; border: 1px solid var(--line); border-radius: 1.15rem; background: rgba(18, 24, 45, .86); box-shadow: 0 18px 52px rgba(0, 0, 0, .22); }
figure a { display: block; overflow: hidden; border-radius: .8rem; background: #050713; }
figure img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .25s ease; }
figure a:hover img { transform: scale(1.018); }
.sources img { aspect-ratio: 16 / 10; }
figcaption { padding: .72rem .3rem .2rem; }
figcaption strong { display: block; font-size: .88rem; }
figcaption span { display: block; margin-top: .28rem; color: var(--muted); font-size: .74rem; line-height: 1.35; }

.lightbox {
  width: min(94vw, 900px);
  max-height: 94vh;
  padding: 0;
  border: 1px solid rgba(243, 228, 202, .28);
  border-radius: 1.25rem;
  color: var(--cream);
  background: #0b1024;
  box-shadow: 0 30px 100px rgba(0,0,0,.7);
}
.lightbox::backdrop { background: rgba(2,5,15,.84); backdrop-filter: blur(12px); }
.lightbox-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .42fr); max-height: 94vh; }
.lightbox-panel > img { display: block; width: 100%; max-height: 82vh; aspect-ratio: 2 / 3; object-fit: contain; background: #050713; }
.lightbox-copy { align-self: end; padding: 1.4rem; }
.lightbox-copy h2 { margin: 0; font-size: 2rem; }
.lightbox-copy p { margin: .7rem 0 0; color: var(--muted); line-height: 1.5; }
.lightbox-close { position: absolute; z-index: 2; top: .8rem; right: .8rem; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--cream); background: rgba(8,12,29,.86); cursor: pointer; }
.lightbox-close:hover, .lightbox-close:focus-visible { border-color: var(--gold); outline: 2px solid transparent; }

@media (max-width: 700px) {
  .gallery-header, #gallery { width: min(100% - 1rem, 1440px); }
  .gallery-header { padding-top: 1.5rem; }
  .section-head { display: block; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  figure { padding: .35rem; border-radius: .8rem; }
  figure a { border-radius: .58rem; }
  figcaption { padding-inline: .18rem; }
  figcaption span { display: none; }
  .lightbox { width: calc(100vw - 1rem); }
  .lightbox-panel { display: block; overflow-y: auto; }
  .lightbox-panel > img { max-height: 76vh; }
  .lightbox-copy { padding: 1rem; }
}
