:root {
  --color-bg: #0d0b09;
  --color-bg-alt: #1a1613;
  /* Same as --color-bg but translucent (~70% opacity via the trailing
     hex alpha) — used only on the panels that scroll over the fixed
     hero photo, so it shows through faintly rather than the photo
     itself dimming. Kept separate from --color-bg since body's own
     backdrop should stay fully opaque. */
  --color-panel: #0d0b09bf;
  --color-fg: #f1e9d8;
  --color-accent: #dd9a3a;
  --color-accent-2: #9caa82;
  --color-muted: #a79880;
  --font-display: 'Rye', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 960px;
  --nav-height: 3.5rem;
  /* The photo (960x767) only has max-width:100%, so below a 960px
     viewport it shrinks proportionally — this tracks its actual
     rendered height at any viewport width instead of a guessed
     constant, so the reserved space below never runs short on mobile. */
  --hero-photo-height: min(767px, calc(100vw * 767 / 960));
  /* Fixed allowance for the tagline line + breathing room below the
     photo — not measured, so update if that text's sizing changes. */
  --hero-caption-height: 2.5rem;
  --hero-height: calc(var(--nav-height) + var(--hero-photo-height) + var(--hero-caption-height));
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--nav-height);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  line-height: 1.5;
  /* Reserves space up front so the page's real content starts right
     below the photo on load — the fixed hero below doesn't take up
     document flow space itself, so something has to. */
  padding-top: var(--hero-height);
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  height: var(--nav-height);
  align-items: center;
  background: var(--color-bg-alt);
  border-bottom: 1px solid #2a241f;
}

.site-nav a {
  font-family: var(--font-display);
  color: var(--color-fg);
  text-decoration: none;
  letter-spacing: 0.04em;
  font-size: 1rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-accent);
}

.hero {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  z-index: 0;
  text-align: center;
  background: var(--color-bg-alt);
}

.hero img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.tagline {
  color: var(--color-accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  /* Shrinks to fit on one line at any viewport width instead of
     wrapping — --hero-caption-height assumes a constant single-line
     height, which wrapping would break. */
  font-size: clamp(0.6rem, 2.8vw, 0.9rem);
  white-space: nowrap;
  margin: 0.75rem 0 0;
  padding: 0 1rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

main {
  position: relative;
  z-index: 1;
  background: var(--color-panel);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 1rem 0 2rem;
  border-bottom: 1px solid #2a241f;
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

#media-grid {
  /* Masonry via JS: media.js builds one .media-column per column and
     greedily assigns each item to the shortest column so far, since
     CSS's own multi-column balancing can leave a whole column short
     when one item (an Instagram embed) runs much taller than the rest. */
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.media-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1 1 0;
  min-width: 0;
}

.video-card {
  background: var(--color-bg-alt);
  border-radius: 6px;
  overflow: hidden;
}

.video-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-card .video-meta {
  padding: 0.6rem 0.8rem;
}

.video-card .video-title {
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
}

.video-card .video-channel {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 0;
}

.instagram-card .instagram-media {
  /* Instagram's embed sets its own inline min-width (~326px) which can
     overflow a narrow masonry column, and no max-width, which lets it
     balloon in a single-column layout — override both. */
  width: 100% !important;
  min-width: 0 !important;
  max-width: 400px !important;
  margin: 0 !important;
}

.loading,
.error {
  color: var(--color-muted);
  font-style: italic;
}

.social-links {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--color-fg);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent);
}

footer {
  position: relative;
  z-index: 1;
  background: var(--color-panel);
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}
