/* AI History Blog — Ice cream theme */

:root,
body.theme-light {
  --bg: #fdf6ee;
  --surface: #fff9f4;
  --surface2: #f5ece0;
  --text: #3a2c20;
  --text-muted: #9a7e68;
  --accent: #6a8ef5;
  --accent-soft: rgba(106, 142, 245, 0.1);
  --accent-warm: #f0884a;
  --accent-green: #3db88a;
  --border: #e8d5c4;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --max-width: 44rem;
  --radius: 10px;
}

body.theme-dark {
  --bg: #12100e;
  --surface: #1c1814;
  --surface2: #252018;
  --text: #ede0d4;
  --text-muted: #8a7565;
  --accent: #7fa4f8;
  --accent-soft: rgba(127, 164, 248, 0.12);
  --accent-warm: #f5a066;
  --accent-green: #4ecba0;
  --border: #2e2620;
}

*, *::before, *::after { box-sizing: border-box; }

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

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

/* ─── Skip to content ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 300;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Back to Top ─── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.15s, color 0.15s;
  pointer-events: none;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Reading Progress Bar ─── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-warm) 100%);
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ─── Header ─── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.header-left { flex: 1; }

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.header-stats {
  display: flex;
  gap: 1.25rem;
}

.header-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.header-stat-number {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.header-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.theme-toggle {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.6rem;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.15s;
  flex-shrink: 0;
}

.theme-toggle:hover { border-color: var(--accent); }

.site-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1.3;
}

.site-title:hover { text-decoration: none; opacity: 0.85; }

.site-tagline {
  margin: 0.1rem 0 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.site-nav { display: flex; gap: 1.2rem; }
.site-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; border-bottom-color: var(--accent); opacity: 0.7; }
.site-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.nav-random {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color 0.15s;
}

.nav-random:hover { color: var(--accent); }

/* ─── Main ─── */
.main {
  flex: 1;
  max-width: 64rem;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ─── Home ─── */
.home-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.home-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.25;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-warm) 100%);
  filter: brightness(1.05);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
}

.home-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

.stat { text-align: center; }
.stat-number { font-size: 1.75rem; font-weight: 700; color: var(--accent); display: block; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-weight: 600;
}

/* ─── Post Cards ─── */
.post-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  gap: 0;
  overflow: hidden;
}

.post-card:hover { border-color: var(--accent); border-left-color: var(--accent); background: var(--surface2); }

.post-card-thumb {
  width: 120px;
  min-width: 120px;
  overflow: hidden;
  display: block;
  background: var(--surface2);
  align-self: stretch;
}

.post-card-thumb img {
  width: 120px;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-thumb--empty {
  width: 120px;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface2);
}

.post-card-body {
  padding: 1rem 1.25rem;
  flex: 1;
  min-width: 0;
}

.post-card-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; flex-wrap: wrap; }

.era-badge, .category-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.era-badge { background: var(--accent-soft); color: var(--accent); }
.category-badge { background: rgba(255, 166, 87, 0.15); color: var(--accent-warm); }
.cat-film---fiction { background: rgba(63, 185, 80, 0.15); color: var(--accent-green); }
.cat-research { background: var(--accent-soft); color: var(--accent); }
.cat-policy { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.cat-culture { background: rgba(251, 191, 36, 0.12); color: #d97706; }

.post-card-title { font-size: 1rem; font-weight: 600; margin: 0 0 0.25rem; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent); text-decoration: none; }

.post-card-excerpt { font-size: 0.84rem; color: var(--text-muted); margin: 0 0 0.6rem; line-height: 1.5; }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-card-date { font-family: var(--font-mono); }

.post-card--read { opacity: 0.7; }
.post-card--read .post-card-title a::after {
  content: ' ✓';
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 700;
}

/* ─── This Day In AI History ─── */
.this-day-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem;
  background: var(--accent-soft);
  border: 1px solid rgba(106, 142, 245, 0.25);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.this-day-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  white-space: nowrap;
}

.this-day-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.this-day-title:hover { color: var(--accent); text-decoration: none; }

.this-day-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── View Toggle ─── */
.view-toggle {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.view-btn {
  padding: 0.28rem 0.85rem;
  border: none;
  border-radius: calc(var(--radius) - 3px);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.view-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.view-btn:hover:not(.active) { color: var(--accent); }

/* ─── List Controls (search + filters) ─── */
.list-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-input {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  width: 220px;
  outline: none;
  transition: border-color 0.15s;
}

.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.no-results { color: var(--text-muted); font-size: 0.9rem; margin: 1rem 0; }

/* ─── Filter Pills ─── */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-pill {
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Category-specific filter pill colors */
.filter-pill[data-filter="Research"].active { background: var(--accent); border-color: var(--accent); }
.filter-pill[data-filter="Film & Fiction"].active { background: var(--accent-green); border-color: var(--accent-green); }
.filter-pill[data-filter="Commercial"].active { background: var(--accent-warm); border-color: var(--accent-warm); }
.filter-pill[data-filter="Culture"].active { background: #d97706; border-color: #d97706; }
.filter-pill[data-filter="Policy"].active { background: #a78bfa; border-color: #a78bfa; }

.filter-pill[data-filter="Film & Fiction"]:hover { border-color: var(--accent-green); color: var(--accent-green); }
.filter-pill[data-filter="Commercial"]:hover { border-color: var(--accent-warm); color: var(--accent-warm); }
.filter-pill[data-filter="Culture"]:hover { border-color: #d97706; color: #d97706; }
.filter-pill[data-filter="Policy"]:hover { border-color: #a78bfa; color: #a78bfa; }

/* ─── Eras Index ─── */
.eras-index-page { max-width: 56rem; margin: 0 auto; }

.eras-index-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.era-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: background 0.15s, border-left-color 0.15s;
}

.era-row:last-child { border-bottom: none; }

.era-row:hover {
  background: var(--surface2);
  border-left-color: var(--accent);
  text-decoration: none;
}

.era-row-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--border);
  min-width: 2.5rem;
  line-height: 1;
  transition: color 0.15s;
}

.era-row:hover .era-row-num { color: var(--accent-warm); }

.era-row-body {
  flex: 1;
  min-width: 0;
}

.era-row-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.era-row-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.era-row-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.era-row-period {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}

.era-row-count {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent);
  white-space: nowrap;
}

/* ─── Era Detail Page ─── */
.era-page { max-width: 56rem; margin: 0 auto; }

.era-page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.era-page-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }

.era-period-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-warm);
  background: rgba(240, 136, 74, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  border: 1px solid rgba(240, 136, 74, 0.25);
}

.era-page-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.era-page-blurb {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
  max-width: 42rem;
}


/* ─── Era Milestone List ─── */
.era-milestones-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.milestone-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: background 0.15s, border-left-color 0.15s;
}

.milestone-row:last-child { border-bottom: none; }

.milestone-row:hover {
  background: var(--surface2);
  border-left-color: var(--accent);
  text-decoration: none;
}

.milestone-row-year {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--border);
  min-width: 3rem;
  line-height: 1;
  transition: color 0.15s;
}

.milestone-row:hover .milestone-row-year { color: var(--accent-warm); }

.milestone-row-body { flex: 1; min-width: 0; }

.milestone-row-cat {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
  color: var(--accent-warm);
}
.milestone-row-cat.cat-research { color: var(--accent); }
.milestone-row-cat.cat-film---fiction { color: var(--accent-green); }
.milestone-row-cat.cat-policy { color: #a78bfa; }
.milestone-row-cat.cat-culture { color: #d97706; }

.milestone-row-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
  line-height: 1.35;
}

.milestone-row-sub {
  font-size: 0.81rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.era-page-footer { padding-top: 1.5rem; border-top: 1px solid var(--border); }

@media (max-width: 640px) {
  .era-row { gap: 1rem; padding: 1rem 1.1rem; }
  .era-row-desc { display: none; }
  .era-row-num { font-size: 1.1rem; min-width: 2rem; }
  .milestone-row { gap: 1rem; padding: 0.9rem 1.1rem; }
  .milestone-row-sub { display: none; }
}

/* ─── Related Posts ─── */
.related-posts {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.related-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-weight: 600;
}

.related-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }

.related-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.related-thumb {
  width: 48px;
  min-width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  display: block;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.related-thumb img { width: 48px; height: 48px; object-fit: cover; display: block; }

.related-post-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  line-height: 1.3;
}

.related-post-title:hover { color: var(--accent); text-decoration: none; }
.related-post-date { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ─── People Index ─── */
.people-page { max-width: 56rem; margin: 0 auto; }

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

.person-card-link { text-decoration: none; }

.person-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.person-card-link:hover .person-card { border-color: var(--accent); transform: translateY(-2px); }

.person-card-portrait {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--surface2);
}

.person-card-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

.person-card-portrait-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--border);
  background: var(--surface2);
  text-transform: uppercase;
}

.person-card-body { padding: 0.85rem 1rem; }

.person-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.person-known-for-small {
  font-size: 0.75rem;
  color: var(--accent);
  line-height: 1.3;
}

/* ─── Person Detail Page ─── */
.person-page { max-width: var(--max-width); margin: 0 auto; }

.person-hero {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.person-portrait {
  width: 160px;
  min-width: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.person-portrait img { width: 160px; display: block; object-fit: cover; }
.person-portrait-credit { font-size: 0.65rem; color: var(--text-muted); text-align: center; padding: 0.3rem; margin: 0; background: var(--surface2); }

.person-hero-body { flex: 1; }

.person-page .person-name {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
}

.person-known-for {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 1rem;
}

.person-accomplishments {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.person-accomplishments li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.person-accomplishments li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-warm);
}

.person-bio {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.person-milestones { margin-bottom: 2rem; }

.person-milestones-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-weight: 600;
}

.person-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}


@media (max-width: 640px) {
  .person-hero { flex-direction: column; }
  .person-portrait { width: 120px; min-width: 120px; }
  .person-portrait img { width: 120px; }
}

/* ─── Post ─── */
.post { max-width: var(--max-width); margin: 0 auto; }

.post-header { padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.75rem; }

.post-meta-top { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }

.post-title {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.4rem;
}

.post-subtitle { font-size: 1.05rem; color: var(--text-muted); margin: 0 0 1rem; }

.post-meta { font-size: 0.85rem; color: var(--text-muted); }
.post-meta time { font-family: var(--font-mono); }

.post-people { margin-top: 0.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.people-label { font-size: 0.78rem; }
.person-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-size: 0.78rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

a.person-tag:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.post-image { margin: 1.5rem 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.post-image img { width: 100%; height: auto; display: block; }
.image-caption { font-size: 0.78rem; color: var(--text-muted); text-align: center; padding: 0.5rem; margin: 0; background: var(--surface2); }

.post-quote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-quote p { font-size: 1.1rem; font-style: italic; margin: 0 0 0.5rem; color: var(--text); }
.post-quote cite { font-size: 0.85rem; color: var(--text-muted); font-style: normal; }

.post-content { line-height: 1.8; }
.post-content h2 { font-size: 1.25rem; margin-top: 2rem; color: var(--text); }
.post-content h3 { font-size: 1.05rem; margin-top: 1.5rem; color: var(--text-muted); }
.post-content p { margin: 0 0 1.25rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content li { margin-bottom: 0.35rem; }
.post-content strong { color: var(--accent-warm); }
.post-content em { color: var(--accent); }
.post-content code {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.significance-box {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(106, 142, 245, 0.07);
  border: 1px solid rgba(106, 142, 245, 0.18);
  border-radius: var(--radius);
}

.significance-box h3 { margin: 0 0 0.5rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.significance-box p { margin: 0; font-size: 0.92rem; }

.post-references { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.post-references h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 0 0 0.75rem; }
.post-references ul { list-style: none; padding: 0; margin: 0; }
.post-references li { margin-bottom: 0.35rem; font-size: 0.88rem; }

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
}

.post-nav-link:hover { border-color: var(--accent); background: var(--surface2); text-decoration: none; }
.post-nav-next { text-align: right; }

.post-nav-dir {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  font-weight: 600;
}

.post-nav-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.post-nav-year {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-warm);
}

.post-footer-links {
  display: flex;
  justify-content: space-between;
}

.back-link { font-size: 0.85rem; color: var(--text-muted); }
.back-link:hover { color: var(--accent); }

/* ─── Timeline Page ─── */
.timeline-page { max-width: 56rem; margin: 0 auto; }

.timeline-header { margin-bottom: 2rem; }
.timeline-header h1 { font-size: 1.75rem; margin: 0 0 0.4rem; }
.timeline-header p { color: var(--text-muted); margin: 0 0 1.25rem; }

.timeline-era { margin-bottom: 1.5rem; }

.timeline-era-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-warm);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 0.4rem;
}

.timeline-era-title:hover { background: var(--surface); border-color: var(--accent); }
.timeline-era-title[aria-expanded="false"] { margin-bottom: 0; }
.timeline-era-title[aria-expanded="false"] .era-toggle-icon { transform: rotate(-90deg); }

.timeline-era-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.timeline-era-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.era-toggle-icon { transition: transform 0.2s; font-style: normal; }

.timeline-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.timeline-list[hidden] {
  display: none;
}

.timeline-list.collapsing {
  overflow: hidden;
  opacity: 0;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
}

.footer-inner { max-width: 64rem; margin: 0 auto; }
.site-footer p { margin: 0.25rem 0; font-size: 0.82rem; color: var(--text-muted); }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .home-stats { gap: 1rem; }
  .post-title { font-size: 1.5rem; }
  .post-footer { flex-direction: column; gap: 0.75rem; }
  .header-stats { display: none; }
  .site-tagline { display: none; }
  .post-card-thumb, .post-card-thumb--empty { width: 80px; min-width: 80px; }
  .post-card-thumb img { width: 80px; }
}
