/* ============================================
   北京华夏女子中学口述史档案
   Oral History Archive - Stylesheet
   ============================================ */

:root {
  --bg-page: #F7F3ED;
  --bg-surface: #FFFFFF;
  --bg-dark: #2C2825;
  --bg-accent: #FAF0F1;
  --text-primary: #2C2825;
  --text-secondary: #6B6258;
  --text-tertiary: #9B9388;
  --text-on-dark: #F7F3ED;
  --accent: #7B2D3B;
  --accent-hover: #9B3D4B;
  --accent-light: #F4E4E7;
  --gold: #B8860B;
  --gold-light: #FAEEDA;
  --border: #E0DAD0;
  --border-light: #EDE8E0;
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1140px;
  --font-serif: Georgia, "Songti SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }

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

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 64px 0; }
.section--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section--accent { background: var(--bg-accent); }

.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.section-subtitle {
  font-size: .95rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 237, .95);
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 500;
}
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
  flex-shrink: 0;
}
.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  font-size: .9rem;
  color: var(--text-secondary);
  position: relative;
}
.nav a:hover, .nav a.active { color: var(--accent); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--accent);
  border-radius: 1px;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 0.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg-surface);
}
.lang-btn {
  border: none;
  background: transparent;
  padding: 4px 12px;
  font-size: .8rem;
  border-radius: 16px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all .2s;
  font-family: var(--font-sans);
}
.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  padding: 80px 0 64px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, var(--bg-accent) 0%, var(--bg-page) 100%);
  z-index: -1;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--accent);
}
.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-style: italic;
}
.hero-desc {
  max-width: 600px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--accent);
  font-weight: 500;
}
.hero-stat-label {
  font-size: .85rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ============================================
   Begonia Tree Section — 海棠花开
   ============================================ */
.begonia-section {
  position: relative;
  padding: 72px 0 80px;
  background: linear-gradient(180deg, var(--bg-page) 0%, #FDF6F2 40%, #FDF8F5 70%, var(--bg-page) 100%);
  overflow: hidden;
}

.begonia-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.begonia-tree-wrapper {
  position: relative;
  flex: 0 0 380px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.begonia-tree {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(123, 45, 59, 0.06));
}

/* SVG falling petals — animate within the SVG viewBox */
.begonia-tree .falling-petals .petal {
  transform-origin: center;
  animation: petalFallSVG 6s ease-in-out infinite;
}
.begonia-tree .petal-1 { animation-delay: 0s; animation-duration: 5.5s; }
.begonia-tree .petal-2 { animation-delay: 1.2s; animation-duration: 6.8s; }
.begonia-tree .petal-3 { animation-delay: 2.5s; animation-duration: 7.2s; }
.begonia-tree .petal-4 { animation-delay: 0.8s; animation-duration: 6s; }
.begonia-tree .petal-5 { animation-delay: 3s; animation-duration: 7.5s; }
.begonia-tree .petal-6 { animation-delay: 1.8s; animation-duration: 6.5s; }

@keyframes petalFallSVG {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.8;
  }
  50% {
    transform: translateY(60px) translateX(15px) rotate(90deg);
    opacity: 0.6;
  }
  100% {
    transform: translateY(140px) translateX(-10px) rotate(180deg);
    opacity: 0;
  }
}

/* Floating petals outside SVG — decorative ambient effect */
.floating-petals {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}

.floating-petals .float-petal {
  position: absolute;
  width: 8px;
  height: 5px;
  border-radius: 50% 0 50% 0;
  opacity: 0;
}

.floating-petals .float-petal-1 {
  background: #F4A8A0;
  left: 15%;
  top: 20%;
  animation: floatPetal 9s ease-in-out infinite;
  animation-delay: 0s;
}
.floating-petals .float-petal-2 {
  background: #F8B8B0;
  left: 70%;
  top: 10%;
  animation: floatPetal 11s ease-in-out infinite;
  animation-delay: 2s;
}
.floating-petals .float-petal-3 {
  background: #F4A8A0;
  left: 40%;
  top: 5%;
  animation: floatPetal 10s ease-in-out infinite;
  animation-delay: 4s;
}
.floating-petals .float-petal-4 {
  background: #FCDADA;
  left: 85%;
  top: 30%;
  animation: floatPetal 12s ease-in-out infinite;
  animation-delay: 1s;
}
.floating-petals .float-petal-5 {
  background: #F4A8A0;
  left: 5%;
  top: 50%;
  animation: floatPetal 8s ease-in-out infinite;
  animation-delay: 3s;
}
.floating-petals .float-petal-6 {
  background: #F8D0D0;
  left: 60%;
  top: 45%;
  animation: floatPetal 10.5s ease-in-out infinite;
  animation-delay: 5s;
}

@keyframes floatPetal {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  50% {
    transform: translateY(120px) translateX(30px) rotate(180deg) scale(0.9);
    opacity: 0.5;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(280px) translateX(-20px) rotate(360deg) scale(0.7);
    opacity: 0;
  }
}

/* Text section beside the tree */
.begonia-text {
  flex: 1;
  padding: 20px 0;
}

.begonia-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.begonia-quote {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.9;
  margin-bottom: 8px;
  position: relative;
  padding-left: 20px;
  border-left: 3px solid #F4C2C2;
  min-height: 3.8em;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.begonia-quote-rotator.is-fading .begonia-quote,
.begonia-quote-rotator.is-fading .begonia-attribution {
  opacity: 0;
  transform: translateY(-6px);
}

.begonia-attribution {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  padding-left: 23px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.begonia-desc {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

/* Responsive — stack vertically on smaller screens */
@media (max-width: 860px) {
  .begonia-container {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .begonia-tree-wrapper {
    flex: 0 0 auto;
    width: 280px;
    max-width: 280px;
  }

  .begonia-tree {
    max-width: 280px;
  }

  .begonia-title {
    font-size: 1.7rem;
  }

  .begonia-quote {
    text-align: left;
  }

  .begonia-attribution {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .begonia-section {
    padding: 48px 0 56px;
  }

  .begonia-tree-wrapper {
    width: 220px;
    max-width: 220px;
  }

  .begonia-tree {
    max-width: 220px;
  }

  .begonia-title {
    font-size: 1.5rem;
  }

  .begonia-quote {
    font-size: 1rem;
  }

  .begonia-desc {
    font-size: 0.9rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn--outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn--outline:hover {
  background: var(--accent);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Story cards */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.story-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.story-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(123, 45, 59, .08);
  border-color: var(--accent-light);
}
.story-card-image {
  width: 100%;
  height: 180px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  position: relative;
  color: var(--accent);
}
.story-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.story-card-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.story-card-year {
  font-size: .85rem;
  color: var(--gold);
  margin-bottom: 12px;
}
.story-card-excerpt {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: .75rem;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--gold-light);
  color: var(--gold);
}

.story-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.story-card-badge.text {
  background: rgba(123, 45, 59, 0.92);
  color: #fff;
}

/* Story detail */
.story-detail { padding: 48px 0; }
.story-detail-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 0.5px solid var(--border);
}
.story-detail-name {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 8px;
}
.story-detail-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: .9rem;
  color: var(--text-secondary);
}
.story-detail-meta span { display: flex; align-items: center; gap: 6px; }

/* Audio player */
.audio-player {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}
.audio-player-bar {
  display: flex;
  align-items: center;
  gap: 16px;
}
.play-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.play-btn:hover { background: var(--accent-hover); }
.play-btn.playing { background: var(--gold); }
.audio-progress {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}
.audio-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width .1s;
}
.audio-time {
  font-size: .8rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  text-align: right;
}

/* Transcript */
.transcript {
  max-width: 760px;
  margin: 0 auto;
}
.transcript-segment {
  padding: 16px 20px;
  border-left: 3px solid transparent;
  margin-bottom: 8px;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: all .2s;
  cursor: pointer;
}
.transcript-segment:hover {
  background: var(--bg-accent);
  border-left-color: var(--accent-light);
}
.transcript-segment.active {
  background: var(--accent-light);
  border-left-color: var(--accent);
}
.transcript-time {
  font-size: .8rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.transcript-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
}
.transcript-speaker {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 100px;
  margin-bottom: 6px;
  margin-right: 8px;
  letter-spacing: .02em;
}
.transcript-speaker.interviewer {
  background: var(--gold-light);
  color: var(--gold);
}
.transcript-speaker.interviewee {
  background: var(--accent-light);
  color: var(--accent);
}

.transcript-section {
  margin: 32px 0 16px;
  padding: 12px 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 2px solid var(--accent-light);
  letter-spacing: 0.05em;
}

.transcript-section {
  margin: 32px 0 16px;
  padding: 12px 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 2px solid var(--accent-light);
  letter-spacing: 0.05em;
}

/* Photo gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.photo-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.photo-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.photo-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.photo-item figcaption {
  padding: 12px;
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Lightbox */
.story-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.story-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-content figcaption {
  color: #fff;
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.no-audio-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.no-audio-notice-icon {
  font-size: 1.4rem;
}

/* Search bar */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font-sans);
  background: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-tertiary); }

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 6px 16px;
  border: 0.5px solid var(--border);
  border-radius: 20px;
  font-size: .85rem;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-sans);
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* About section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-text p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.about-features {
  display: grid;
  gap: 20px;
}
.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.feature-title { font-weight: 500; margin-bottom: 4px; font-size: .95rem; }
.feature-desc { font-size: .85rem; color: var(--text-secondary); }

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: 12px; }
.footer-desc { font-size: .85rem; color: var(--text-tertiary); line-height: 1.6; max-width: 320px; }
.footer-domain { font-size: .8rem; color: var(--gold); margin-top: 8px; letter-spacing: .02em; }
.footer-col h4 { font-size: .9rem; margin-bottom: 12px; font-weight: 500; }
.footer-col a { display: block; font-size: .85rem; color: var(--text-tertiary); margin-bottom: 8px; }
.footer-col a:hover { color: var(--text-on-dark); }
.footer-bottom {
  border-top: 0.5px solid rgba(255,255,255,.1);
  padding-top: 20px;
  text-align: center;
  font-size: .8rem;
  color: var(--text-tertiary);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 0;
  color: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 768px) {
  .nav { display: none; }
  .hero-title { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1.1rem; }
  .hero-stats { gap: 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .container { padding: 0 16px; }
  .search-bar { flex-direction: column; }
}

/* Timeline */
.timeline-section { padding: 64px 0; }
.timeline-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 0;
  margin-bottom: 20px;
  border-bottom: 0.5px solid var(--border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.timeline-nav::-webkit-scrollbar { height: 4px; }
.timeline-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.timeline-nav-item {
  padding: 6px 14px;
  border: 0.5px solid var(--border);
  border-radius: 20px;
  font-size: .85rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  font-family: var(--font-sans);
}
.timeline-nav-item:hover { border-color: var(--accent); color: var(--accent); }
.timeline-nav-item.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.timeline-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}
.timeline-controls .btn { padding: 8px 18px; font-size: .85rem; }
.timeline-event-count {
  margin-left: auto;
  font-size: .85rem;
  color: var(--text-tertiary);
}

.timeline-container {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 32px;
}
.timeline-container::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--border) 100%);
}

.timeline-year {
  position: relative;
  margin-bottom: 8px;
}
.timeline-year::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-page);
  z-index: 1;
}

.timeline-year-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  user-select: none;
}
.timeline-year-num {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 500;
}
.timeline-year-count {
  font-size: .8rem;
  color: var(--text-tertiary);
}
.timeline-year-toggle {
  font-size: .85rem;
  color: var(--text-tertiary);
  margin-left: auto;
  transition: transform .3s;
}
.timeline-year.expanded .timeline-year-toggle { transform: rotate(0deg); }

.timeline-year-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height .4s ease;
}
.timeline-year.expanded .timeline-year-content { max-height: 20000px; }

.timeline-year-summary {
  padding: 12px 16px;
  margin-bottom: 12px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.timeline-event {
  padding: 10px 16px;
  margin-bottom: 6px;
  border-left: 3px solid var(--border);
  transition: border-color .2s, background .2s;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.timeline-event:hover {
  border-left-color: var(--accent);
  background: var(--bg-surface);
}
.timeline-event-date {
  font-size: .85rem;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 4px;
}
.timeline-event-text {
  font-size: .92rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Timeline teaser on homepage */
.timeline-teaser {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 32px;
}
.timeline-teaser::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--border) 100%);
}
.timeline-teaser .timeline-year::before {
  left: -31px;
}

/* Utility */
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
