:root {
  --bg: #111;
  --fg: #eee;
  --muted: #999;
  --gap: 1.25rem;
  --edge: max(1.5rem, calc((100% - 1400px) / 2 + 1.5rem)); /* left/right edge shared by header, hero text, content and footer */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; } /* same layout width whether or not a page scrolls */
body { margin: 0; background: var(--bg); color: var(--fg); line-height: 1.6; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem var(--edge);
  background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0));
}
.brand { font-weight: 700; text-decoration: none; letter-spacing: .02em; }
.site-header nav a { margin-left: 1.25rem; text-decoration: none; font-size: .95rem; }
.site-header nav a:hover, .brand:hover { text-decoration: underline; }

.hero { position: relative; height: 100vh; height: 100svh; min-height: min(420px, 100svh); overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 50% 0 0 0; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.65)); }
.hero-text { position: absolute; z-index: 1; left: var(--edge); right: var(--edge); bottom: 3.5rem; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.hero-text h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 5rem); line-height: 1; }
.hero-text p { margin: .5rem 0 0; font-size: 1.1rem; }

.section { max-width: 1400px; margin: 0 auto; padding: 5rem 1.5rem 2rem; }
h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); font-weight: 600; margin: 0 0 1.5rem; }

.grid { columns: 3 320px; column-gap: var(--gap); }
.grid figure { break-inside: avoid; margin: 0 0 var(--gap); }
figure { margin: 0; }
figcaption { font-size: .85rem; color: var(--muted); padding-top: .4rem; }
figure a { display: block; }
figure img { transition: opacity .2s; }
figure a:hover img { opacity: .85; }

.series-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gap); }
.series-card figure img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.series-card figcaption { display: none; }
.series-card h2 { margin: .6rem 0 0; font-size: 1.2rem; font-weight: 600; color: var(--fg); text-transform: none; letter-spacing: normal; }
.series-card h2 a { text-decoration: none; }
h1 span, h2 span { color: var(--muted); font-weight: 400; }

.about { max-width: 720px; }
.page-title { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0 0 1.5rem; }
.about p { font-size: 1.1rem; }

.series-page { max-width: 1100px; }
.series-page h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0; }
.back a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.intro { font-size: 1.15rem; max-width: 720px; color: #ccc; margin-bottom: 3rem; }
.sequence figure { margin-bottom: 4rem; }
.sequence figcaption { display: none; }
.sequence img { width: 100%; max-height: 90vh; object-fit: contain; }

.site-footer { padding: 3rem var(--edge); color: var(--muted); font-size: .85rem; }
.home .site-footer { position: absolute; left: 0; right: 0; top: 100vh; top: 100svh; transform: translateY(-100%); z-index: 2; padding-top: 0; padding-bottom: 1rem; color: #ddd; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.home .site-footer a { color: #ddd; }
.home .site-footer p { margin: 0; }
.home .hero-text { bottom: 4.5rem; }

dialog { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
dialog::backdrop { background: rgba(0,0,0,.94); }
dialog img { max-width: 96vw; max-height: 88vh; width: auto; height: auto; margin: 0 auto; }
dialog p { color: var(--muted); text-align: center; margin: .5rem 0 0; font-size: .9rem; }
dialog .close { position: fixed; top: .75rem; right: 1rem; background: none; border: 0; color: #fff; font-size: 2.25rem; cursor: pointer; line-height: 1; }

@media (max-width: 600px) {
  .site-header nav a { margin-left: .9rem; }
  .section { padding-top: 3.5rem; }
}
