/* Design System & Custom Properties */
:root {
  --bg-dark: #090c15;
  --bg-surface: #101524;
  --bg-card: #161e32;
  --border-color: #1e2942;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-red: #f43f5e;       /* Rose Red */
  --accent-red-rgb: 244, 63, 94;
  --accent-blue: #3b82f6;      /* Electric Blue */
  --accent-blue-rgb: 59, 130, 246;
  --accent-gold: #fbbf24;
  
  --font-serif: 'Merriweather', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  
  --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.light-theme {
  --bg-dark: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #f1f5f9;
  --border-color: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent-red: #e11d48;
  --accent-blue: #2563eb;
  --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

/* Basic Reset & Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition: var(--transition-smooth);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* Header & Navigation */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--border-color);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.header-left, .header-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.header-right {
  justify-content: flex-end;
  gap: 1rem;
}

.site-logo {
  text-align: center;
  display: block;
}

.site-logo span {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.logo-accent-red {
  color: var(--accent-red);
  text-shadow: 0 0 15px rgba(var(--accent-red-rgb), 0.3);
}

.logo-accent-blue {
  color: var(--accent-blue);
  text-shadow: 0 0 15px rgba(var(--accent-blue-rgb), 0.3);
}

.logo-sub {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-top: -0.25rem;
}

/* Search Bar */
.header-search-wrapper {
  position: relative;
  z-index: 100;
}

.header-search-form {
  position: relative;
  width: 260px;
  max-width: 100%;
}

.header-search-input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border-radius: 20px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

.header-search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(var(--accent-blue-rgb), 0.2);
}

.header-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
}

.header-search-btn:hover {
  color: var(--accent-red);
}

.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 320px;
  max-height: 380px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-premium);
  margin-top: 0.5rem;
  overflow-y: auto;
  display: none;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.search-results-dropdown.active {
  display: block;
}

.search-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: block;
  transition: var(--transition-smooth);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: rgba(var(--accent-blue-rgb), 0.08);
}

.search-result-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.search-result-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.search-result-category {
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-red);
}

.search-result-empty {
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Theme Toggle button */
.theme-toggle-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

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

/* Navigation Links */
.site-nav {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-blue));
  transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  background: radial-gradient(circle at top, rgba(var(--accent-blue-rgb), 0.1) 0%, transparent 70%),
              radial-gradient(circle at bottom, rgba(var(--accent-red-rgb), 0.05) 0%, transparent 60%);
  padding: 5rem 0 3rem 0;
  text-align: center;
}

.hero-tag {
  color: var(--accent-red);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  display: inline-block;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 800px;
  margin: 0 auto 1.5rem auto;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

/* Section Header */
.section-header {
  margin-bottom: 2rem;
  position: relative;
  text-align: center;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-header-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-blue));
  margin: 0.5rem auto 0 auto;
  border-radius: 2px;
}

/* Timeline Container */
.timeline-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-premium);
  margin-top: 2rem;
}

.timeline-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.timeline-year-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.timeline-year-btn:hover {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-blue));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

/* Featured Article Section */
.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 992px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

/* Article Cards & Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 480px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

.article-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-blue-rgb), 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.card-img-link {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.article-card:hover .card-img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category-badge {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-red);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.card-title a:hover {
  color: var(--accent-blue);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 4.5em;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

/* Featured Large Card */
.article-card.large-card {
  grid-column: span 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

@media (max-width: 768px) {
  .article-card.large-card {
    grid-template-columns: 1fr;
  }
}

.article-card.large-card .card-img-link {
  height: 100%;
  aspect-ratio: auto;
  min-height: 300px;
}

/* Taxonomy Split & Clouds */
.split-taxonomy-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3.5rem;
}

.split-taxonomy-section .split-column:first-child .taxonomy-cloud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.split-taxonomy-section .split-column:last-child .taxonomy-cloud {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}

@media (max-width: 1200px) {
  .split-taxonomy-section .split-column:first-child .taxonomy-cloud {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .split-taxonomy-section {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .split-taxonomy-section .split-column:first-child .taxonomy-cloud {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .split-taxonomy-section .split-column:first-child .taxonomy-cloud {
    grid-template-columns: repeat(2, 1fr);
  }
  .split-taxonomy-section .split-column:last-child .taxonomy-cloud {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .split-taxonomy-section .split-column:first-child .taxonomy-cloud,
  .split-taxonomy-section .split-column:last-child .taxonomy-cloud {
    grid-template-columns: 1fr;
  }
}

.taxonomy-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2.5rem auto;
  max-width: 1000px;
}

.taxonomy-tag-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.82rem;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-align: left;
}

.taxonomy-tag-btn span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  min-width: 0;
  flex: 1;
}

.taxonomy-tag-btn:hover {
  border-color: var(--accent-blue);
  background-color: rgba(var(--accent-blue-rgb), 0.05);
  transform: translateY(-2px);
}

.taxonomy-tag-btn .tag-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.taxonomy-tag-btn.country-tag i {
  color: var(--accent-blue);
  margin-right: 0.5rem;
}

.taxonomy-tag-btn.person-tag i {
  color: var(--accent-red);
  margin-right: 0.5rem;
}

.see-all-link {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.see-all-link:hover {
  color: var(--accent-red);
}

.see-all-link i {
  transition: var(--transition-smooth);
}

.see-all-link:hover i {
  transform: translateX(5px);
}

/* Article Detail Layout */
.article-page-container {
  padding-bottom: 5rem;
}

.breadcrumbs {
  display: block;
  line-height: 1.6;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.breadcrumbs a,
.breadcrumbs span {
  display: inline;
}

.breadcrumbs a:hover {
  color: var(--accent-blue);
}

.breadcrumbs i {
  display: inline-block;
  margin: 0 0.4rem;
  font-size: 0.6rem;
  vertical-align: middle;
}

.article-header-box {
  margin-bottom: 2rem;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.article-category-badge {
  background: linear-gradient(90deg, var(--accent-red), var(--accent-blue));
  color: white;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.article-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .article-title {
    font-size: 2rem;
  }
}

.article-meta-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Cover Image Placeholder and Styles */
.article-cover-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  margin-bottom: 2.5rem;
  border: 1px solid var(--border-color);
}

.article-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-tags-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  width: 100%;
}

.tags-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tags-group-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 0.5rem;
  width: 130px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Grid layout for reading mode */
.article-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.5rem;
}

.article-content-body {
  min-width: 0;
  width: 100%;
}

@media (max-width: 992px) {
  .article-grid-layout {
    grid-template-columns: 1fr;
  }
  
  .article-sidebar {
    display: none;
  }
}

/* Sidebar TOC & Stats */
.article-sidebar {
  position: relative;
}

.sidebar-sticky-card {
  position: sticky;
  top: 100px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.sidebar-section-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  color: var(--text-main);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toc-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  line-height: 1.3;
}

.toc-link:hover {
  color: var(--accent-blue);
  transform: translateX(3px);
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 1.5rem 0;
}

.quick-facts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quick-facts-list li strong {
  color: var(--text-main);
}

/* Article Body rendering */
.article-content-body {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-main);
}

.article-content-body.light-theme {
  font-weight: 350;
}

.summary-bullets-box {
  background-color: var(--bg-surface);
  border-left: 4px solid var(--accent-red);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-card);
}

.summary-bullets-box h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-red);
  margin-bottom: 1rem;
}

.summary-bullets-box ul {
  list-style-type: square;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--text-muted);
}

.markdown-rendered-content h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.markdown-rendered-content h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.markdown-rendered-content p {
  margin-bottom: 1.5rem;
}

.markdown-rendered-content strong {
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: 1.05rem;
}

.markdown-rendered-content ul, .markdown-rendered-content ol {
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.markdown-rendered-content li {
  margin-bottom: 0.5rem;
}

.markdown-rendered-content blockquote {
  border-left: 4px solid var(--accent-blue);
  background-color: var(--bg-surface);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.markdown-rendered-content blockquote p {
  margin-bottom: 0;
}

/* Callout alerts styled */
.alert-block {
  border-left: 4px solid var(--accent-blue) !important;
  background-color: var(--bg-surface) !important;
  padding: 1.5rem !important;
  margin: 2.5rem 0 !important;
  border-radius: 0 10px 10px 0 !important;
  box-shadow: var(--shadow-card);
}

.alert-block-important { border-color: var(--accent-red) !important; }
.alert-block-warning { border-color: var(--accent-gold) !important; }
.alert-block-tip { border-color: var(--accent-blue) !important; }

.alert-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem !important;
}

.alert-block-important .alert-title { color: var(--accent-red); }
.alert-block-warning .alert-title { color: var(--accent-gold); }
.alert-block-tip .alert-title { color: var(--accent-blue); }

.alert-block p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

/* Tables styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.markdown-rendered-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background-color: var(--bg-surface);
  overflow: hidden;
}

.markdown-rendered-content th {
  background-color: var(--border-color);
  color: var(--text-main);
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--border-color);
}

.markdown-rendered-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.markdown-rendered-content tr:last-child td {
  border-bottom: none;
}

.markdown-rendered-content tr:nth-child(even) {
  background-color: rgba(255,255,255,0.02);
}

/* Footnotes Section */
.footnotes-divider {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin-top: 4rem;
  margin-bottom: 2rem;
}

.footnotes-section {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footnotes-section h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.footnotes-list {
  padding-left: 1.5rem;
}

.footnotes-list li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.footnote-backlink {
  color: var(--accent-blue);
  margin-left: 0.25rem;
}

.footnote-backlink:hover {
  color: var(--accent-red);
}

/* References link rendering */
.reference-link {
  color: var(--accent-blue);
  font-weight: 600;
  text-decoration: underline;
}

.reference-link:hover {
  color: var(--accent-red);
}

/* Collapsible FAQs Section */
.article-faq-container {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 0;
  margin-top: 4rem;
}

.faq-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-question-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-main);
  text-align: left;
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-heading);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 1.25rem;
}

.faq-question-btn i {
  transition: var(--transition-smooth);
}

.faq-item.active .faq-question-btn i {
  transform: rotate(180deg);
  color: var(--accent-red);
}

/* Related articles section */
.related-articles-section {
  padding-top: 4rem;
}

/* Taxonomy pages specific designs */
.taxonomy-hero {
  background: radial-gradient(circle at top, rgba(var(--accent-red-rgb), 0.05) 0%, transparent 70%),
              radial-gradient(circle at bottom, rgba(var(--accent-blue-rgb), 0.05) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 0;
  text-align: center;
}

.taxonomy-tag {
  color: var(--accent-blue);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.taxonomy-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.taxonomy-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
}

.taxonomy-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Footer Section */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 2px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.footer-links h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links ul a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links ul a:hover {
  color: var(--accent-red);
  padding-left: 3px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Mobile responsive menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: var(--transition-smooth);
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0.5rem 0;
  }
  
  .header-left {
    display: none;
  }
  
  .header-center {
    flex: 1;
    text-align: left;
  }
  
  .site-logo {
    text-align: left;
  }
  
  .site-logo span {
    font-size: 1.4rem;
  }
  
  .logo-sub {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    margin-top: 0;
  }
  
  .header-right {
    flex: 0 0 auto;
    gap: 0.75rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }
  
  .site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 0 0.5rem 0;
    border-top: 1px solid var(--border-color);
  }
  
  .site-nav.open {
    display: flex;
  }
}

/* Alphabet Filter */
.alphabet-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem;
  max-width: 960px;
  margin: 0 auto 2.5rem auto;
  padding: 0.35rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.filter-letter-btn {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-letter-btn:hover {
  color: var(--accent-blue);
  background-color: rgba(var(--accent-blue-rgb), 0.1);
}

.filter-letter-btn.active {
  background-color: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}
