/* ==========================================================
   joepaquin.com — Main Site Stylesheet
   Dark naturalist journal theme
   Fonts: Cormorant Garamond (display/body) + DM Mono (labels/nav)
   ========================================================== */

/* Self-hosted fonts — no Google Fonts dependency */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url('/static/fonts/cormorant-garamond-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('/static/fonts/cormorant-garamond-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/cormorant-sc-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/cormorant-sc-500.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/static/fonts/dm-mono-300.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/dm-mono-400.woff2') format('woff2');
}

/* --- CSS Variables --- */
:root {
  --black:      #0c0c0c;
  --dark:       #141412;
  --panel:      #1c1b18;
  --bone:       #f0ebe0;
  --warm:       #c8b98a;
  --gold:       #a8924a;
  --rust:       #b54a28;
  --sage:       #4a7a58;
  --muted:      rgba(240,235,224,0.45);
  --faint:      rgba(240,235,224,0.10);
  --border:     rgba(240,235,224,0.12);
  --border-hover: rgba(240,235,224,0.30);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sc:      'Cormorant SC', Georgia, serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --max-width: 700px;
  --transition: 0.25s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 19px; }
img { display: block; max-width: 100%; height: auto; }

body {
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  --bg-scale: 1;
}

a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════
   FIXED CINEMATIC BACKGROUND
   The nudibranch lives here, always.
═══════════════════════════════════════ */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url('/static/images/Spanish%20Shawl.jpg') 52% 58% / cover no-repeat;
  transform: scale(var(--bg-scale));
  transform-origin: center center;
  will-change: transform;
}

/* Subtle vignette over the fixed bg */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse 70% 70% at 50% 40%,
    transparent 0%,
    rgba(12,12,12,0.35) 100%
  );
  pointer-events: none;
}

/* --- Fixed glass nav --- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 2.5rem;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.site-nav.scrolled {
  background: rgba(12,12,12,0.30);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(240,235,224,0.06);
}

.nav-name {
  font-family: var(--font-sc);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--bone);
  text-shadow: 0 1px 12px rgba(0,0,0,0.9), 0 0 30px rgba(0,0,0,0.6);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: rgba(240,235,224,0.85);
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--bone); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--bone);
}

/* ═══════════════════════════════════════
   ABOVE-FOLD: transparent — you see the
   nudibranch fully. Text floats in void.
═══════════════════════════════════════ */

.site-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 2.5rem 5rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Very subtle gradient just under the text */
.site-hero::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35%;
  background: linear-gradient(to bottom, transparent, rgba(12,12,12,0.35));
  pointer-events: none;
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-hero > *:nth-child(1) { animation: hero-rise 0.7s cubic-bezier(0.16,1,0.3,1) 0.10s both; }
.site-hero > *:nth-child(2) { animation: hero-rise 0.7s cubic-bezier(0.16,1,0.3,1) 0.22s both; }
.site-hero > *:nth-child(3) { animation: hero-rise 0.7s cubic-bezier(0.16,1,0.3,1) 0.34s both; }
.site-hero > *:nth-child(4) { animation: hero-rise 0.7s cubic-bezier(0.16,1,0.3,1) 0.46s both; }

.hero-image { display: none; } /* legacy element — background is now on body::before */

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  color: var(--rust);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
  position: relative;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--rust);
  vertical-align: middle;
  margin-right: 0.75rem;
  opacity: 0.7;
}

.hero-name {
  font-family: var(--font-sc);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 500;
  color: var(--bone);
  letter-spacing: 0.06em;
  line-height: 0.95;
  margin-bottom: 0.75rem;
  position: relative;
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--warm);
  font-weight: 400;
  position: relative;
  max-width: 420px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.8);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  right: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: rgba(240,235,224,0.28);
  writing-mode: vertical-rl;
  animation: pulse-hint 2.5s ease-in-out infinite;
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50%       { opacity: 0.7; transform: translateY(4px); }
}

.hero-fade { display: none; } /* no longer needed — body::before handles bg */

/* ═══════════════════════════════════════
   CONTENT PANELS — frosted glass over bg
═══════════════════════════════════════ */

.content-wrap {
  position: relative;
  z-index: 2;
}

/* --- Main content column --- */
.site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 2.5rem 8rem;
  background: rgba(10,10,9,0.07);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

/* Species caption — nod to the hero photo */
.species-note {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.6rem 0 2.4rem;
  margin-bottom: 2.4rem;
  border-bottom: 1px solid var(--border);
}

@property --swatch-angle {
  syntax: '<angle>';
  initial-value: 135deg;
  inherits: false;
}

.species-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(var(--swatch-angle), var(--rust) 0%, #3a6a9a 100%);
  flex-shrink: 0;
  opacity: 0.8;
  transition: --swatch-angle 1.2s ease, opacity 0.3s;
  cursor: default;
}

.species-swatch:hover {
  --swatch-angle: 315deg;
  opacity: 1;
}

.species-name-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--bone);
  margin-bottom: 0.2rem;
}

.species-meta-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* --- Footer --- */
.site-footer {
  background: rgba(12,12,12,0.72);
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
}

.footer-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-name {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--bone); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

/* --- Intro --- */
.intro-section {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.intro-body {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--bone);
  max-width: 600px;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.intro-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--faint);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  transition: color var(--transition), border-color var(--transition);
}

a.intro-tag:hover {
  color: var(--bone);
  border-color: rgba(240,235,224,0.3);
}

/* --- Mobile nav --- */
@media (max-width: 600px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(20,20,18,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    min-width: 140px;
    border: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    display: block;
    padding: 0.7rem 1.5rem;
    font-size: 0.75rem;
  }
  .site-nav { padding: 1.2rem 1.5rem; }
  .site-hero { min-height: 85vh; padding: 0 1.5rem 4rem; }
  .site-main { padding: 3rem 1.25rem 5rem; }
}

/* --- Inner pages: no hero, content starts below nav with bg visible --- */
.inner-spacer {
  height: 40vh;
  min-height: 200px;
}

/* --- Inner page header --- */
.page-header {
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--bone);
  line-height: 1.2;
}

.page-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* --- About body --- */
.about-body p {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 300;
  color: var(--bone);
  line-height: 1.75;
  margin-bottom: 1.2rem;
  max-width: 560px;
}

/* --- Error pages --- */
.error-back {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.error-back a {
  color: var(--sage);
  transition: color var(--transition);
}

.error-back a:hover { color: var(--bone); }

/* --- App cards (apps.html) --- */
.app-card-full {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.app-card-full .app-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.app-card-full .app-icon svg {
  width: 100%;
  height: 100%;
}

.app-card-full h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--bone);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.app-card-full .app-version {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.app-card-full > div > p:not(.app-version) {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
}

.app-card-full .btn.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--sage);
  border: 1px solid var(--sage);
  padding: 0.4rem 1rem;
  transition: color var(--transition), border-color var(--transition);
}

.app-card-full .btn.btn-primary:hover {
  color: var(--bone);
  border-color: var(--border-hover);
}

@media (max-width: 600px) {
  .app-card-full {
    flex-direction: column;
    gap: 1rem;
  }
}

/* --- Journal feed --- */
.journal-feed {
  padding: 3rem 0;
}

.journal-entries {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.journal-entry {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.journal-entry:first-child { padding-top: 0; }

.entry-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.entry-date,
.entry-location {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.entry-image {
  display: block;
  width: 100%;
  height: auto;
  background: var(--panel);
}

.journal-entry.starred .entry-image {
  box-shadow: 0 -2px 0 var(--gold);
}

.entry-species {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--sage);
  margin-top: 0.75rem;
  font-style: italic;
}

.entry-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.4rem;
  max-width: 560px;
}

.entry-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.8rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.entry-print-link {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px dashed rgba(240,235,224,0.2);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}

.entry-print-link:hover {
  color: var(--rust);
  border-color: var(--rust);
}

.journal-more {
  padding-top: 2rem;
  text-align: center;
}

.journal-gallery-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 1px solid rgba(240,235,224,0.15);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}

.journal-gallery-link:hover {
  color: var(--bone);
  border-color: rgba(240,235,224,0.4);
}

/* --- Tools strip --- */
.tools-strip {
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.tools-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.tool-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--faint);
}

.tool-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tool-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--bone);
}

.tool-desc {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.5;
}

.tool-link {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--sage);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--transition);
}

.tool-link:hover { color: var(--bone); }

/* --- Prints page --- */
.prints-intro p,
.prints-option p,
.contact-section p {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 300;
  color: var(--bone);
  line-height: 1.75;
  margin-bottom: 1rem;
  max-width: 560px;
}

.prints-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
}

.prints-option h3 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.prints-cc {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.prints-cc h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--bone);
  margin-bottom: 0.75rem;
}

.prints-cc p {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 0.75rem;
}

.cc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  margin-top: 0.5rem;
  transition: color var(--transition), border-color var(--transition);
}

.cc-badge:hover {
  color: var(--bone);
  border-color: var(--border-hover);
}

.prints-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
}

.print-card img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  background: var(--panel);
  display: block;
}

.print-caption {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}

.print-buy-btn {
  display: block;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--sage);
  background: none;
  border: 1px solid var(--sage);
  padding: 0.45rem 0;
  margin-top: 0.6rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.print-buy-btn:hover {
  color: var(--bone);
  border-color: var(--bone);
  background: rgba(74, 122, 88, 0.1);
}

.contact-section {
  padding: 2.5rem 0;
}

.contact-section h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--bone);
  margin-bottom: 0.75rem;
}

.contact-section a { color: var(--sage); }
.contact-section a:hover { color: var(--bone); }

.btn.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--sage);
  border: 1px solid var(--sage);
  padding: 0.4rem 1rem;
  margin-top: 1rem;
  transition: color var(--transition), border-color var(--transition);
}

.btn.btn-primary:hover {
  color: var(--bone);
  border-color: var(--border-hover);
}

@media (max-width: 600px) {
  .prints-options { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* --- Gallery page --- */
.gallery-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2.5rem 8rem;
  background: rgba(10,10,9,0.07);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.gallery-view { }

.gallery-nav-row {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.gallery-back {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color var(--transition);
  white-space: nowrap;
}

.gallery-back:hover { color: var(--gold); }

.gallery-album-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--bone);
}

.gallery-loading,
.gallery-empty {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 3rem 0;
}

/* Album grid */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.album-card {
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition);
  outline: none;
}

.album-card:hover,
.album-card:focus-visible {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.album-cover {
  display: block;
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  background: var(--panel);
}

.album-cover-empty {
  background: var(--panel);
}

.album-info {
  padding: 0.75rem 1rem 0.9rem;
}

.album-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 300;
  color: var(--bone);
  line-height: 1.3;
}

.album-count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* Photos grid */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.photo-thumb-wrapper { overflow: hidden; }

.photo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  background: var(--panel);
  transition: transform var(--transition), opacity var(--transition);
  outline: none;
}

.photo-thumb:hover,
.photo-thumb:focus-visible {
  transform: scale(1.03);
  opacity: 0.85;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 12, 0.96);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Author CSS (display:flex) has higher specificity than user-agent [hidden].
   This restores correct hidden behaviour. */
.lightbox[hidden] { display: none; }

.lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(90vw, 1000px);
  max-height: 90vh;
  gap: 1.25rem;
  padding: 4rem 1rem 1.5rem;
  overflow-y: auto;
}

.lightbox-photo {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: transparent;
}

.lightbox-caption {
  width: 100%;
  max-width: 640px;
  text-align: center;
}

.lightbox-species {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--sage);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.lightbox-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

.lightbox-meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  opacity: 0.7;
}

.lightbox-print-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px dashed rgba(240,235,224,0.2);
  padding-bottom: 1px;
  margin-top: 0.75rem;
  transition: color var(--transition), border-color var(--transition);
}

.lightbox-print-link:hover {
  color: var(--rust);
  border-color: var(--rust);
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.1rem;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition);
  z-index: 1001;
}

.lightbox-close:hover { color: var(--bone); border-color: var(--border-hover); }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.5rem;
  width: 2.5rem;
  height: 4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition);
  z-index: 1001;
}

.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--gold);
  border-color: var(--gold);
}

@media (max-width: 600px) {
  .gallery-main { padding: 0 1.25rem 4rem; }
  .albums-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .photos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.35rem; }
  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
  .lightbox-inner { padding: 3.5rem 0.5rem 1rem; }
}
