/* =============================================
   OUR MEMORIES — CSS
   Theme: warm, sentimental college album
   Palette: cream/warm base, terracotta & sea blue accents
   ============================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Light mode (default) */
  --bg-primary: #FDF6EC;
  --bg-secondary: #F7EFE2;
  --bg-card: #FFFFFF;
  --bg-overlay: rgba(0, 0, 0, 0.8);
  --text-primary: #2C1810;
  --text-secondary: #6B4E3D;
  --text-muted: #9C8578;
  --accent-terracotta: #C45D3E;
  --accent-terracotta-light: #E8856A;
  --accent-blue: #3A7CA5;
  --accent-blue-light: #5BA4C9;
  --border-color: #E8DDD0;
  --shadow-soft: 0 2px 12px rgba(44, 24, 16, 0.08);
  --shadow-hover: 0 6px 24px rgba(44, 24, 16, 0.14);
  --shadow-card: 0 1px 6px rgba(44, 24, 16, 0.06);
  --timeline-line: #D4C5B5;
  --timeline-dot: var(--accent-terracotta);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-serif: 'Playfair Display', 'Georgia', serif;
  --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* Dark mode */
[data-theme="dark"] {
  --bg-primary: #1A1210;
  --bg-secondary: #231B17;
  --bg-card: #2C2220;
  --text-primary: #F0E6DC;
  --text-secondary: #C4AFA3;
  --text-muted: #8A7568;
  --accent-terracotta: #E8856A;
  --accent-terracotta-light: #F0A08A;
  --accent-blue: #5BA4C9;
  --accent-blue-light: #7DC0E0;
  --border-color: #3D2F28;
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 6px rgba(0, 0, 0, 0.2);
  --timeline-line: #4A3D35;
  --timeline-dot: var(--accent-terracotta);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent-blue-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Focus styles */
:focus-visible {
  outline: 3px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 80px 24px 60px;
  background: radial-gradient(
    ellipse at 50% 30%,
    var(--bg-secondary) 0%,
    var(--bg-primary) 70%
  );
  overflow: hidden;
}

/* Ambient glow orbs */
.hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.5;
  z-index: 0;
}
.hero__glow--1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(196, 93, 62, 0.25) 0%, transparent 70%);
  top: 10%;
  left: 15%;
  animation: glow-float 12s ease-in-out infinite alternate;
}
.hero__glow--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(58, 124, 165, 0.2) 0%, transparent 70%);
  bottom: 10%;
  right: 15%;
  animation: glow-float 14s ease-in-out infinite alternate-reverse;
}

@keyframes glow-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
  100% { transform: translate(-20px, 30px) scale(0.95); }
}

/* Center Content */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero__badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-terracotta);
  box-shadow: 0 0 0 0 rgba(196, 93, 62, 0.7);
  animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
  0% { box-shadow: 0 0 0 0 rgba(196, 93, 62, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(196, 93, 62, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 93, 62, 0); }
}

.hero__title {
  font-size: clamp(2.8rem, 7.5vw, 5.5rem);
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.hero__title span {
  color: var(--accent-terracotta);
  font-style: italic;
  font-weight: 800;
}

.hero__kicker {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-style: italic;
  color: var(--accent-blue);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero__subtitle {
  font-size: clamp(0.98rem, 2vw, 1.18rem);
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 660px;
  line-height: 1.7;
}

/* Stat Cards */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 680px;
  margin-bottom: 36px;
}

.hero__stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  text-align: left;
  transition: transform var(--transition), box-shadow var(--transition);
}
.hero__stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-terracotta);
}

.hero__stat-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.hero__stat-data {
  display: flex;
  flex-direction: column;
}

.hero__stat-number {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  line-height: 1.1;
}

.hero__stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Actions */
.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.hero__cta--primary {
  background: var(--accent-terracotta);
  color: #FFFFFF !important;
  box-shadow: 0 4px 18px rgba(196, 93, 62, 0.35);
}
.hero__cta--primary:hover {
  background: var(--accent-terracotta-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(196, 93, 62, 0.45);
}

.hero__cta--secondary {
  background: var(--bg-card);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
}
.hero__cta--secondary:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue) !important;
  transform: translateY(-2px);
}

/* Highlights Ribbon */
.hero__highlights {
  width: 100%;
  max-width: 780px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.hero__highlights-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  font-weight: 600;
}

.hero__highlights-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  cursor: pointer;
}
.highlight-pill img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent-terracotta);
}
.highlight-pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent-terracotta);
  box-shadow: var(--shadow-hover);
  color: var(--accent-terracotta);
}

/* Scroll Indicator */
.hero__scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  transition: opacity var(--transition);
  z-index: 2;
}
.hero__scroll-indicator:hover {
  opacity: 1;
  color: var(--accent-terracotta);
}

.hero__scroll-mouse {
  width: 20px;
  height: 32px;
  border: 2px solid currentColor;
  border-radius: 12px;
  position: relative;
}
.hero__scroll-mouse::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 6px;
  background: currentColor;
  border-radius: 2px;
  transform: translateX(-50%);
  animation: mouse-scroll 1.8s infinite;
}

@keyframes mouse-scroll {
  0% { transform: translate(-50%, 0); opacity: 1; }
  80% { transform: translate(-50%, 10px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 0; }
}

/* Floating Polaroids (Desktop / Large Displays) */
.hero__polaroids {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  z-index: 1;
  display: none;
  flex-direction: column;
  gap: 24px;
  pointer-events: none;
}
.hero__polaroids--left {
  left: 30px;
}
.hero__polaroids--right {
  right: 30px;
}

@media (min-width: 1100px) {
  .hero__polaroids {
    display: flex;
  }
}

.polaroid-card {
  pointer-events: all;
  background: #FFFFFF;
  padding: 8px 8px 16px 8px;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  width: 175px;
}
[data-theme="dark"] .polaroid-card {
  background: #2D2320;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.polaroid-card__inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.polaroid-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

.polaroid-card__caption {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: #3A2A25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
[data-theme="dark"] .polaroid-card__caption {
  color: #E6D8D0;
}

/* Individual Polaroid Angled Positions */
.polaroid--1 {
  transform: rotate(-7deg);
  animation: float-polaroid 7s ease-in-out infinite alternate;
}
.polaroid--2 {
  transform: rotate(5deg) translateX(25px);
  animation: float-polaroid 8.5s ease-in-out infinite alternate-reverse;
}
.polaroid--3 {
  transform: rotate(-4deg);
  animation: float-polaroid 6.8s ease-in-out infinite alternate;
}
.polaroid--4 {
  transform: rotate(6deg);
  animation: float-polaroid 7.5s ease-in-out infinite alternate-reverse;
}
.polaroid--5 {
  transform: rotate(-6deg) translateX(-25px);
  animation: float-polaroid 9s ease-in-out infinite alternate;
}
.polaroid--6 {
  transform: rotate(8deg);
  animation: float-polaroid 7.2s ease-in-out infinite alternate-reverse;
}

.polaroid-card:hover {
  transform: scale(1.15) rotate(0deg) !important;
  z-index: 20;
  box-shadow: 0 20px 42px rgba(196, 93, 62, 0.35);
}

@keyframes float-polaroid {
  0% { transform: translateY(0) rotate(var(--rot, -5deg)); }
  100% { transform: translateY(-12px) rotate(var(--rot, -5deg)); }
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 16px 40px;
    min-height: auto;
  }
  .hero__stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero__stat-card {
    padding: 12px 16px;
  }
  .hero__stat-number {
    font-size: 1.4rem;
  }
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }
  .hero__cta {
    width: 100%;
    justify-content: center;
  }
  .hero__scroll-indicator {
    display: none;
  }
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition);
}
.theme-toggle:hover {
  box-shadow: var(--shadow-hover);
  transform: scale(1.05);
}

/* ---------- Year Navigation ---------- */
.year-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  transition: background-color var(--transition), border-color var(--transition);
}

.year-nav__inner {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.year-nav__inner::-webkit-scrollbar {
  display: none;
}

.year-nav__logo {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  white-space: nowrap;
  padding: 12px 16px 12px 4px;
  flex-shrink: 0;
}

.year-nav__btn {
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--transition);
  border-bottom: 3px solid transparent;
  flex-shrink: 0;
}
.year-nav__btn:hover {
  color: var(--text-primary);
}
.year-nav__btn.active {
  color: var(--accent-terracotta);
  border-bottom-color: var(--accent-terracotta);
  font-weight: 600;
}

/* ---------- Search & Filter Bar ---------- */
.filter-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  transition: background-color var(--transition);
}

.filter-bar__inner {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.filter-bar__search {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.filter-bar__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
}

.filter-bar__input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--border-color);
  border-radius: 100px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: all var(--transition);
}
.filter-bar__input::placeholder {
  color: var(--text-muted);
}
.filter-bar__input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(58, 124, 165, 0.15);
  outline: none;
}

.filter-bar__select-wrap {
  position: relative;
}

.filter-bar__select {
  padding: 9px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
}
.filter-bar__select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(58, 124, 165, 0.15);
}

.filter-bar__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.filter-chip:hover {
  border-color: var(--accent-terracotta);
  color: var(--accent-terracotta);
}
.filter-chip.active {
  background: var(--accent-terracotta);
  color: #FFFFFF;
  border-color: var(--accent-terracotta);
}

/* ---------- Timeline Section ---------- */
.timeline-section {
  padding: 60px 0 80px;
}

.timeline-year {
  margin-bottom: 60px;
}

.timeline-year__heading {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--accent-terracotta);
  text-align: center;
  margin-bottom: 8px;
  position: relative;
}

.timeline-year__sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

/* Timeline line */
.timeline {
  position: relative;
  padding: 0 0 0 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--timeline-line);
  transform: translateX(-50%);
}

/* ---------- Timeline Card ---------- */
.timeline-card {
  position: relative;
  display: flex;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .timeline-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero::before {
    animation: none;
  }
}

.timeline-card:nth-child(odd) {
  justify-content: flex-start;
  padding-right: calc(50% + 32px);
  padding-left: 20px;
}

.timeline-card:nth-child(even) {
  justify-content: flex-end;
  padding-left: calc(50% + 32px);
  padding-right: 20px;
}

/* Timeline dot */
.timeline-card::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 24px;
  width: 14px;
  height: 14px;
  background: var(--timeline-dot);
  border: 3px solid var(--bg-primary);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: background-color var(--transition), transform var(--transition);
}

.timeline-card:hover::after {
  transform: translateX(-50%) scale(1.3);
}

/* Month label */
.timeline-card__month {
  position: absolute;
  top: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.timeline-card:nth-child(odd) .timeline-card__month {
  right: calc(50% - 60px);
  text-align: right;
  transform: translateX(50%);
}

.timeline-card:nth-child(even) .timeline-card__month {
  left: calc(50% - 60px);
  text-align: left;
  transform: translateX(-50%);
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  width: 100%;
  cursor: pointer;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card__mosaic {
  display: grid;
  gap: 2px;
  height: 180px;
  overflow: hidden;
}

.card__mosaic--1 { grid-template-columns: 1fr; }
.card__mosaic--2 { grid-template-columns: 1fr 1fr; }
.card__mosaic--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.card__mosaic--3 img:first-child { grid-row: 1 / -1; }
.card__mosaic--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.card__mosaic--5 {
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.card__mosaic--5 img:first-child {
  grid-row: 1 / -1;
}

.card__mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card__mosaic img {
  transform: scale(1.03);
}

.card__mosaic .mosaic-placeholder {
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2rem;
}

.card__body {
  padding: 16px 20px 20px;
}

.card__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card__date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.card__date .estimated {
  color: var(--accent-terracotta);
  font-size: 0.75rem;
  font-style: italic;
}

.card__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge--photo {
  background: rgba(58, 124, 165, 0.1);
  color: var(--accent-blue);
}

.badge--video {
  background: rgba(196, 93, 62, 0.1);
  color: var(--accent-terracotta);
}

.card__cta {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-terracotta);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}

.card:hover .card__cta {
  gap: 8px;
}

/* ---------- Detail Overlay ---------- */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg-primary);
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-overlay.open {
  transform: translateY(0);
}

.detail-overlay__header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.detail-overlay__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--bg-secondary);
  transition: all var(--transition);
  flex-shrink: 0;
}
.detail-overlay__close:hover {
  background: var(--accent-terracotta);
  color: #fff;
}

.detail-overlay__title-wrap {
  flex: 1;
  min-width: 0;
}

.detail-overlay__title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-overlay__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.detail-gallery {
  padding: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.detail-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.detail-gallery__item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: var(--bg-secondary);
}

.detail-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.detail-gallery__item:hover img {
  transform: scale(1.05);
}

.detail-gallery__item--video {
  position: relative;
}

.detail-gallery__item--video::after {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  pointer-events: none;
  transition: background-color var(--transition);
}

.detail-gallery__item--video:hover::after {
  background: var(--accent-terracotta);
}

.detail-gallery__load-more {
  display: block;
  margin: 32px auto;
  padding: 12px 32px;
  border-radius: 100px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.detail-gallery__load-more:hover {
  border-color: var(--accent-terracotta);
  color: var(--accent-terracotta);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__content img {
  max-width: 95vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox__content iframe {
  width: min(90vw, 960px);
  height: min(70vh, 540px);
  border: none;
  border-radius: var(--radius-sm);
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition);
  z-index: 10;
}
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10;
}
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.3);
}
.lightbox__nav--prev {
  left: 16px;
}
.lightbox__nav--next {
  right: 16px;
}

.lightbox__counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10;
}

.lightbox__actions {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.lightbox__action-btn {
  padding: 8px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color var(--transition);
}
.lightbox__action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.footer__message {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer__sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.footer__signature {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__signature span {
  color: var(--accent-terracotta);
  font-weight: 600;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state__text {
  font-size: 1.1rem;
}

/* ---------- Loading Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-color) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-terracotta);
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 90;
}
.scroll-top.visible {
  opacity: 1;
  pointer-events: all;
}
.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* Mobile: single column timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-card {
    padding-left: 48px !important;
    padding-right: 16px !important;
    justify-content: flex-start !important;
  }

  .timeline-card::after {
    left: 20px;
    transform: translateX(-50%);
  }

  .timeline-card__month {
    position: static !important;
    transform: none !important;
    text-align: left !important;
    margin-bottom: 8px;
  }

  .card__mosaic {
    height: 150px;
  }

  .hero__stats {
    gap: 20px;
  }

  .hero__stat-number {
    font-size: 1.5rem;
  }

  .timeline-year__heading {
    font-size: 2rem;
  }

  .detail-gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 4px;
  }

  .lightbox__nav {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }

  .lightbox__content img {
    max-width: 100vw;
    border-radius: 0;
  }

  .lightbox__content iframe {
    width: 100vw;
    height: 56vw;
  }

  .filter-bar__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar__search {
    min-width: unset;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .timeline-card:nth-child(odd) {
    padding-right: calc(50% + 24px);
  }
  .timeline-card:nth-child(even) {
    padding-left: calc(50% + 24px);
  }
}

/* Large screens */
@media (min-width: 1281px) {
  .detail-gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}
