/* bios — biographical media platform */
/* Clean, readable typography for biographical content */

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

:root {
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #555;
  --color-text-muted: #888;
  --color-border: #e0e0e0;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --max-width: 800px;
  --max-width-wide: 1100px;
  /* Category colors */
  --cat-actors: #e74c3c;
  --cat-athletes: #3498db;
  --cat-business: #2ecc71;
  --cat-companies: #9b59b6;
  --cat-fictional: #e67e22;
  --cat-historical: #1abc9c;
  --cat-musicians: #f39c12;
  --cat-sports-teams: #34495e;
}

html { font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

/* Layout */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}
.site-logo span { color: var(--color-accent); }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--color-accent); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 2rem; }
.container-wide { max-width: var(--max-width-wide); margin: 0 auto; padding: 2rem; }

/* Hero Section */
.hero {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--color-border);
}
.hero-category {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-subcategory {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid;
  margin-bottom: 1rem;
  margin-left: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Subcategory navigation pills */
.subcategory-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.subcategory-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border: 1.5px solid;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.subcategory-pill:hover {
  background: currentColor;
  color: #fff !important;
}
.subcategory-pill:hover .pill-count { color: #fff; }
.pill-count {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Card subcategory label */
.card-subcat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.3rem;
  color: var(--color-text);
}
.hero-dates {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.hero-summary {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* Table of Contents */
.toc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.toc h2 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 0.4rem; }
.toc-list a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.95rem;
}
.toc-list a:hover { text-decoration: underline; }

/* Chapter Content */
.chapter {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
}
.chapter h1, .chapter h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}
.chapter h1:first-child, .chapter h2:first-child { margin-top: 0; }
.chapter h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.chapter h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}
.chapter p {
  margin-bottom: 1rem;
  line-height: 1.8;
}
.chapter ul, .chapter ol {
  margin: 0.75rem 0 1rem 1.5rem;
}
.chapter li { margin-bottom: 0.3rem; }
.chapter strong { font-weight: 600; }
.chapter blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--color-text-secondary);
  font-style: italic;
}
.chapter a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Related People */
.related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.related h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.related-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.related-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.related-card h3 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.related-card .related-dates { font-size: 0.8rem; color: var(--color-text-muted); }

/* Category Index */
.category-header {
  margin-bottom: 2rem;
}
.category-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
}
.category-header .count {
  color: var(--color-text-muted);
  font-size: 1rem;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.person-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.person-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.person-card h2 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.person-card .card-dates { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.person-card .card-summary {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Homepage */
.home-hero {
  text-align: center;
  padding: 3rem 0;
}
.home-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.home-hero p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.category-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.category-card .cat-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.category-card h2 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.category-card .cat-count { color: var(--color-text-muted); font-size: 0.9rem; }

/* Doorway page (Tier 1) */
.doorway-hero {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  margin-bottom: 2rem;
}
.doorway-hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.doorway-hero .dates {
  font-size: 1.3rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}
.doorway-hero .summary {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.doorway-cta {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.15s;
}
.doorway-cta:hover { background: var(--color-accent-hover); }
.doorway-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.doorway-highlights .highlight {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
}
.doorway-highlights .highlight h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.doorway-highlights .highlight p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
}
.site-footer a { color: var(--color-text-secondary); }

/* Responsive */
@media (max-width: 768px) {
  html { font-size: 16px; }
  .container, .container-wide { padding: 1rem; }
  .hero { padding: 1.5rem; }
  .hero h1 { font-size: 1.8rem; }
  .chapter { padding: 1.25rem; }
  .doorway-hero { padding: 2rem 1rem; }
  .doorway-hero h1 { font-size: 2rem; }
  .site-header { padding: 0.75rem 1rem; }
}

/* Print */
@media print {
  .site-header, .site-footer, .toc, .related, .site-nav { display: none; }
  .chapter { border: none; box-shadow: none; padding: 0; margin-bottom: 1rem; }
  .hero { border: none; }
  body { background: #fff; }
}
