* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #0f0f0f;
  --ink-soft: #3a3a3a;
  --ink-muted: #7a7a7a;
  --cream: #faf8f4;
  --cream-dark: #f0ece4;
  --accent: #c0392b;
  --accent-hover: #a93226;
  --rule: #d5d0c8;
  --rule-heavy: #1a1a1a;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
  --card-hover: 0 8px 25px rgba(0,0,0,0.12), 0 3px 8px rgba(0,0,0,0.08);
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === HEADER === */
header {
  padding: 2.5rem 2rem 0;
  text-align: center;
  border-bottom: 3px double var(--rule-heavy);
  max-width: 1100px;
  margin: 0 auto;
}
.header-link {
  text-decoration: none;
  color: inherit;
}
header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 2.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 0.15rem;
}
header .tagline {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
nav.top-nav {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}
nav.top-nav a {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.2rem 0;
}
nav.top-nav a:hover { color: var(--accent); }
nav.top-nav a.active { color: var(--accent); border-bottom: 2px solid var(--accent); }

/* === CONTAINER === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* === SECTION TITLES === */
.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 1.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

/* === BREADCRUMBS === */
.breadcrumb {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--accent); }

/* === FEATURED CARDS === */
.featured { padding: 2.5rem 0 3rem; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.card {
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover);
}
.card-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--cream-dark);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-img img { transform: scale(1.04); }
.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.video-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.card-body {
  padding: 1.2rem 1.3rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-pub {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.card-body h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  color: var(--ink);
}
.card-date {
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}
.card-desc {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.55;
  flex: 1;
}

/* === BIOGRAPHY === */
.bio { padding: 3rem 0; }
.bio-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}
.bio-portrait {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.bio-portrait img { width: 100%; display: block; }
.bio-body {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.bio-body p { margin-bottom: 1.2rem; }
.pub-list {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-muted);
  line-height: 1.7;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

/* === STORY ARCHIVE (Topic Index) === */
.archive { padding: 3rem 0; }
.archive-category {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.archive-category > h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--ink);
}
.topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.topic-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  text-decoration: none;
  transition: all 0.2s;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
}
.topic-link:hover {
  border-color: var(--ink);
  box-shadow: var(--card-shadow);
  color: var(--accent);
}
.topic-link .count {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-muted);
}

/* === CHRONOLOGICAL === */
.chrono { padding: 3rem 0; }
.year-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.year-pills a {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.3rem 0.55rem;
  border-radius: 3px;
  transition: all 0.15s;
}
.year-pills a:hover { background: var(--ink); color: var(--cream); }

.year-section { margin-bottom: 2rem; }
.year-label {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--rule);
  margin-bottom: 0.8rem;
  padding-top: 1rem;
}
.chrono-item {
  padding: 0.7rem 0 0.7rem 1.5rem;
  border-left: 2px solid var(--rule);
  margin-left: 0.5rem;
  transition: border-color 0.2s;
}
.chrono-item:hover { border-left-color: var(--accent); }
.chrono-item a {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
  display: block;
  margin-bottom: 0.2rem;
  transition: color 0.2s;
}
.chrono-item a:hover { color: var(--accent); }
.chrono-meta {
  font-size: 0.72rem;
  color: var(--ink-muted);
  display: block;
}
.chrono-meta strong { color: var(--ink-soft); }

/* === THEME PAGE (individual topic) === */
.theme-page { padding: 3rem 0; }
.theme-article {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.theme-article:last-child { border-bottom: none; }
.theme-article a {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  display: block;
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}
.theme-article a:hover { color: var(--accent); }

/* === CONTACT === */
.contact { padding: 3rem 0; }
.contact-body {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 500px;
}
.contact-email {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
}
.contact-email a {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  text-decoration: underline;
}

/* === FOOTER === */
footer {
  margin-top: 3rem;
  padding: 2rem;
  border-top: 3px double var(--rule-heavy);
  text-align: center;
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  header h1 { font-size: 1.8rem; }
  nav.top-nav { gap: 1.2rem; }
  .card-grid { grid-template-columns: 1fr; }
  .bio-layout { grid-template-columns: 1fr; }
  .container { padding: 0 1.25rem; }
  .bio-portrait { max-width: 200px; }
}
@media (max-width: 480px) {
  header h1 { font-size: 1.4rem; letter-spacing: 0.03em; }
  nav.top-nav { gap: 0.8rem; }
  nav.top-nav a { font-size: 0.68rem; }
}
html { scroll-behavior: smooth; }
