/* ============================================================
   PALETTE — restated from index.html so gallery pages are
   fully self-contained (no shared CSS file to maintain).
   Keep in sync with index.html if palette ever changes.
   ============================================================ */
:root[data-theme="light"] {
  --primary:       #8B2635;
  --primary-dark:  #5C161F;
  --primary-hover: #A03040;
  --gray:          #7A7570;
  --bg:            #F5EFE3;
  --surface:       #FBF7ED;
  --surface-2:     #FFFFFF;
  --text:          #2A1F1A;
  --text-soft:     #5C4F47;
  --rule:          #E0D6C4;
  --rule-soft:     #ECE3D2;
  --accent:        #D4A857;
  --accent-text:   #8C6E1F;
  --on-primary:    #F5EFE3;
  --on-accent:     #2A1F1A;
  --shadow:        0 1px 3px rgba(42, 31, 26, 0.08);
  --shadow-hover:  0 6px 20px rgba(42, 31, 26, 0.12);
}
:root[data-theme="dark"] {
  --primary:       #B83545;
  --primary-dark:  #8B2635;
  --primary-hover: #C84050;
  --gray:          #9B9690;
  --bg:            #1A1416;
  --surface:       #251D20;
  --surface-2:     #2F2529;
  --text:          #F0E9D8;
  --text-soft:     #C4BCA8;
  --rule:          #3A2F33;
  --rule-soft:     #2A2226;
  --accent:        #D4A857;
  --accent-text:   #D4A857;
  --on-primary:    #F0E9D8;
  --on-accent:     #1A1416;
  --shadow:        0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-hover:  0 6px 20px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   BASE RESET & TYPOGRAPHY
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   SITE HEADER — identical to index.html
   ============================================================ */
.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.015em;
  text-decoration: none;
  line-height: 1;
}
.logo:hover { color: var(--primary-hover); }

.site-header nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.site-header nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-header nav a:hover {
  color: var(--primary);
  background: var(--rule-soft);
}
.site-header nav a[aria-current="page"] {
  color: var(--primary);
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: all 0.15s ease;
  padding: 0;
}
.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"]  .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"]  .theme-toggle .icon-moon { display: none; }

@media (max-width: 600px) {
  .site-header nav .nav-links { display: none; }
  .logo { font-size: 22px; }
}

/* ============================================================
   PAGE HERO
   ============================================================ */
.page-hero {
  padding: 56px 0 40px;
}
.page-hero .eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}
.page-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.1;
}
.page-hero p {
  font-size: 16px;
  color: var(--text-soft);
  max-width: 56ch;
  line-height: 1.65;
}
.hero-rule {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin-top: 24px;
  border-radius: 2px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  padding: 20px 0 0;
  font-size: 13px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a {
  color: var(--text-soft);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--rule); font-size: 11px; }

/* ============================================================
   SECTION LABEL
   ============================================================ */
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray);
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 28px;
}

/* ============================================================
   GALLERY LANDING — ALBUM GRID & CARDS
   ============================================================ */
.albums-section {
  padding: 8px 0 64px;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 700px) {
  .album-grid { grid-template-columns: 1fr; }
}
@media (min-width: 701px) and (max-width: 900px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); }
}

.album-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.album-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.album-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: var(--rule-soft);
}
.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.album-card:hover .album-cover img {
  transform: scale(1.03);
}
.album-count-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(42, 31, 26, 0.65);
  backdrop-filter: blur(4px);
  color: #F5EFE3;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

.album-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.album-date {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-text);
  font-weight: 600;
  margin-bottom: 6px;
}
.album-title {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
  flex: 1;
}
.album-arrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
}

/* ============================================================
   ALBUM PAGE — PHOTO GRID
   ============================================================ */
.album-header {
  padding: 20px 0 32px;
}
.album-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.album-meta {
  font-size: 14px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.album-meta .date { font-weight: 500; }
.album-meta .count { color: var(--gray); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-bottom: 64px;
}
@media (max-width: 600px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
}

.thumb-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
  background: var(--rule-soft);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow);
  display: block;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.thumb-wrap:hover {
  box-shadow: var(--shadow-hover);
  transform: scale(1.01);
}
.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.thumb-wrap:hover img {
  transform: scale(1.04);
}

/* VIDEO TILE */
.video-thumb {
  background: #1a1416;
}
.video-indicator {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(42, 31, 26, 0.35);
  transition: background 0.2s ease;
}
.video-thumb:hover .video-indicator {
  background: rgba(42, 31, 26, 0.5);
}
.play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(245, 239, 227, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform 0.15s ease;
}
.video-thumb:hover .play-btn {
  transform: scale(1.08);
}

/* HOVER CAPTION */
.thumb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(42, 31, 26, 0.65));
  color: #F5EFE3;
  font-size: 12px;
  font-style: italic;
  padding: 28px 10px 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.thumb-wrap:hover .thumb-caption {
  opacity: 1;
}

/* PHOTOSWIPE CAPTION BAR */
.pswp__custom-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-style: italic;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  pointer-events: none;
}
.pswp__custom-caption:empty {
  display: none;
}

/* ============================================================
   FOOTER — identical to index.html
   ============================================================ */
footer {
  padding: 40px 0 60px;
  font-size: 13px;
  color: var(--gray);
  border-top: 1px solid var(--rule);
}
footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  align-items: baseline;
}
footer a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.15s ease;
}
footer a:hover { color: var(--primary); }
footer .footer-links a { margin-left: 16px; }
@media (max-width: 500px) {
  footer .footer-links a:first-child { margin-left: 0; }
}
