/* ============================================
   CEEDEFENSE.COM — Premium Dark UI
   shadcn/ui + Vercel + Intelligence Platform
   ============================================ */

/* Self-hosted fonts — no Google Fonts requests */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #09090b;
  --bg-surface: #18181b;
  --bg-raised: #27272a;
  --border: #27272a;
  --border-subtle: rgba(255,255,255,0.06);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --accent: #3b82f6;
  --accent-bright: #60a5fa;
  --accent-dim: rgba(59,130,246,0.12);
  --accent-border: rgba(59,130,246,0.35);
  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-w: 1280px;
  --article-w: 700px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --transition: 0.15s ease;
}

/* ============================================
   1. Reset + Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.7; min-height: 100vh; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================
   2. Skip Link
   ============================================ */
.skip-link { position: absolute; top: -40px; left: 0; background: var(--accent); color: white; padding: 8px 16px; z-index: 1000; border-radius: 0 0 var(--radius) 0; transition: top var(--transition); }
.skip-link:focus { top: 0; }

/* ============================================
   3. Site Header — Glassmorphic Sticky Nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-logo {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fafafa;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-defense {
  color: var(--accent-bright);
}
.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link, .nav-btn {
  font-size: 13.5px;
  font-weight: 450;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  letter-spacing: 0;
}
.nav-link:hover, .nav-btn:hover { color: var(--text); background: var(--bg-raised); }
.nav-search-btn {
  font-size: 13px;
  color: var(--text-faint);
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  cursor: pointer;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color var(--transition), color var(--transition);
}
.nav-search-btn:hover { border-color: #52525b; color: var(--text-muted); }
.search-shortcut { font-size: 11px; opacity: 0.5; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--text-muted); flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: currentColor; transition: transform var(--transition), opacity var(--transition); border-radius: 2px; }

/* Legacy search toggle (keep for JS compatibility) */
.search-toggle { display: none; }

/* ============================================
   4. Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 24px;
}
/* Dot grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}
/* Fade to black at edges */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 20%, var(--bg) 80%);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-bright);
  padding: 5px 12px;
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  background: var(--accent-dim);
  margin-bottom: 32px;
}
.hero-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fafafa;
  margin-bottom: 24px;
}
.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 40px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(59,130,246,0.4); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-raised); border-color: #52525b; }
.hero-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}
.hero-stat-num {
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  letter-spacing: -0.02em;
}
.hero-stat-label {
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono);
}

/* ============================================
   5. Section Containers
   ============================================ */
.section { padding: 80px 24px; }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-header { margin-bottom: 40px; }
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.section-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; color: #fafafa; }
.section-intro { margin-top: 12px; color: var(--text-muted); font-size: 15px; max-width: 560px; }

/* Legacy section names used in existing templates */
.featured-section,
.category-section,
.about-section,
.recent-section { padding: 80px 24px; }

/* ============================================
   6. Article Cards (Featured Grid)
   ============================================ */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.featured-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.featured-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59,130,246,0.08);
}
.card-link { display: contents; }
.card-eyebrow,
.card-category,
.featured-card-category,
.featured-card-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.card-title,
.featured-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.featured-card:hover .card-title,
.featured-card:hover .featured-card-title { color: #fafafa; }
.card-subtitle,
.featured-card-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }
.card-summary,
.featured-card-summary { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.card-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}
.featured-card-read {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  display: block;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.importance-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 8px;
}
/* Foundational card variant */
.featured-card--foundational {
  border-color: var(--accent-border);
}

/* ============================================
   7. Category Grid
   ============================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition), background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.category-card:hover { border-color: var(--accent-border); background: var(--bg-raised); }
.category-name,
.category-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.category-count,
.category-card-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}
.category-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   8. Article Layout
   ============================================ */

/* Breadcrumb */
.breadcrumb { margin-bottom: 24px; }
.breadcrumb ol { display: flex; align-items: center; gap: 8px; list-style: none; font-size: 13px; font-family: var(--mono); }
.breadcrumb li { color: var(--text-faint); }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 8px; opacity: 0.4; }
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current] { color: var(--text-muted); }

/* Article header */
.article-header { padding: 56px 24px 40px; border-bottom: 1px solid var(--border-subtle); }
.article-header-inner { max-width: calc(var(--article-w) + 280px + 64px); margin: 0 auto; }
.article-title { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; color: #fafafa; margin-bottom: 12px; }
.article-subtitle { font-size: 18px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}
.meta-item { display: flex; align-items: center; gap: 6px; }
.tag {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd;
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 450;
}

/* Two-column article layout */
.article-layout { max-width: calc(var(--article-w) + 280px + 64px); margin: 0 auto; padding: 48px 24px; display: grid; grid-template-columns: 240px 1fr; gap: 64px; align-items: start; }

/* TOC */
.article-toc { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow-y: auto; padding-bottom: 24px; }
.toc { }
.toc-title { font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 12px; }
.toc ul { list-style: none; padding: 0; }
.toc li { margin: 0; }
.toc a {
  display: block;
  font-size: 13px;
  color: var(--text-faint);
  padding: 5px 0 5px 12px;
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  line-height: 1.4;
}
.toc a:hover { color: var(--text-muted); border-color: var(--border); }
.toc a.active { color: var(--accent-bright); border-color: var(--accent); }
.toc .toc-h3 a { padding-left: 24px; font-size: 12.5px; }

/* Prose */
.prose { font-size: 16px; line-height: 1.8; color: var(--text); }
.prose h1,.prose h2,.prose h3,.prose h4 { color: #fafafa; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.prose h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; padding-top: 2rem; border-top: 1px solid var(--border-subtle); }
.prose h3 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }
.prose h4 { font-size: 1rem; margin: 1.5rem 0 0.5rem; color: var(--text); }
.prose p { margin-bottom: 1.25rem; }
.prose a { color: var(--accent-bright); text-decoration: underline; text-decoration-color: rgba(96,165,250,0.3); text-underline-offset: 3px; transition: text-decoration-color var(--transition), color var(--transition); }
.prose a:hover { color: white; text-decoration-color: rgba(255,255,255,0.5); }
.prose ul,.prose ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose li { margin-bottom: 0.4rem; color: var(--text); }
.prose blockquote { border-left: 3px solid var(--accent); padding: 12px 20px; margin: 1.5rem 0; background: var(--accent-dim); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote p { color: var(--text-muted); margin-bottom: 0; font-style: italic; }
.prose code { font-family: var(--mono); font-size: 0.875em; background: var(--bg-raised); color: #93c5fd; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }
.prose pre { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; overflow-x: auto; margin: 1.5rem 0; }
.prose pre code { background: none; border: none; padding: 0; color: var(--text-muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 14px; }
.prose th { background: var(--bg-surface); padding: 10px 16px; text-align: left; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); border-bottom: 1px solid var(--border); }
.prose td { padding: 10px 16px; border-bottom: 1px solid var(--border-subtle); color: var(--text); }
.prose tr:hover td { background: var(--bg-surface); }
.prose strong { color: #fafafa; font-weight: 600; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* Internal links */
a.internal-link { color: var(--accent-bright); }
.broken-link { color: var(--text-muted); opacity: 0.6; }

/* Mobile TOC */
.mobile-toc-container { max-width: calc(var(--article-w) + 280px + 64px); margin: 0 auto; padding: 0 24px; display: none; }
.mobile-toc-toggle { width: 100%; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-muted); cursor: pointer; font-family: var(--font); transition: background var(--transition); }
.mobile-toc-toggle:hover { background: var(--bg-raised); }
.mobile-toc { display: none; padding: 12px 0; }
.mobile-toc.open { display: block; }

/* ============================================
   9. Article Footer (Related / Backlinks)
   ============================================ */
.article-footer { border-top: 1px solid var(--border-subtle); padding: 56px 24px; }
.article-footer-inner { max-width: calc(var(--article-w) + 280px + 64px); margin: 0 auto; display: flex; flex-direction: column; gap: 48px; }
.article-footer h2 { font-size: 14px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 20px; font-weight: 500; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.related-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: border-color var(--transition), background var(--transition); display: block; }
.related-card:hover { border-color: var(--accent-border); background: var(--bg-raised); }
.related-category { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); display: block; margin-bottom: 6px; }
.related-title { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.4; }
.backlinks { }
.backlink-groups { display: flex; flex-direction: column; gap: 12px; }
.backlink-group dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 6px; }
.backlink-group dd a { font-size: 14px; color: var(--accent-bright); margin-right: 8px; }

/* ============================================
   10. Category Pages
   ============================================ */
.category-header { padding: 56px 24px 40px; border-bottom: 1px solid var(--border-subtle); }
.category-header-inner { max-width: var(--max-w); margin: 0 auto; }
.category-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.03em; color: #fafafa; margin-bottom: 12px; }
.category-description { font-size: 16px; color: var(--text-muted); max-width: 600px; line-height: 1.65; margin-bottom: 12px; }
.category-count { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }
.category-content { padding: 48px 24px; }
.category-content-inner { max-width: var(--max-w); margin: 0 auto; display: flex; flex-direction: column; gap: 48px; }
.article-group { }
.group-title { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border-subtle); }
.article-list { display: flex; flex-direction: column; gap: 2px; }
.list-article a { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); transition: background var(--transition); }
.list-article a:hover .list-title { color: var(--accent-bright); }
.list-title { font-size: 15.5px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; grid-column: 1; }
.list-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 3px; grid-column: 1; }
.list-summary { font-size: 13.5px; color: var(--text-muted); grid-column: 1; margin-top: 4px; }
.list-meta { font-family: var(--mono); font-size: 11px; color: var(--text-faint); grid-column: 2; grid-row: 1; white-space: nowrap; }
.list-article.foundational .list-title::before { content: '★ '; color: var(--accent); font-size: 10px; vertical-align: middle; }

/* ============================================
   11. Search Modal
   ============================================ */
.search-modal { display: none; position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); align-items: flex-start; justify-content: center; padding-top: 15vh; }
.search-modal.open { display: flex; }
.search-modal-inner { width: 100%; max-width: 600px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); margin: 0 16px; position: relative; }
.search-input { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--border-subtle); padding: 16px 20px; font-size: 16px; color: var(--text); font-family: var(--font); outline: none; }
.search-input::placeholder { color: var(--text-faint); }
.search-results { max-height: 400px; overflow-y: auto; padding: 8px; }
.search-result-item { display: block; padding: 12px 16px; border-radius: var(--radius); transition: background var(--transition); }
.search-result-item:hover { background: var(--bg-raised); }
.search-result-category { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 4px; }
.search-result-title { font-size: 14px; font-weight: 600; color: var(--text); }
.search-result-summary { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.search-close { position: absolute; top: 12px; right: 12px; background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 20px; padding: 4px 8px; }
.search-empty { padding: 32px; text-align: center; color: var(--text-faint); font-size: 14px; }

/* ============================================
   12. Footer
   ============================================ */
.site-footer { border-top: 1px solid var(--border-subtle); padding: 56px 24px 32px; margin-top: auto; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 200px 1fr; gap: 48px; }
.footer-logo { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--text); display: block; margin-bottom: 8px; }
.footer-tagline { font-size: 13px; color: var(--text-faint); line-height: 1.5; }
.footer-about { font-size: 13px; color: var(--text-faint); line-height: 1.5; margin-top: 8px; }
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-section h4 { font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 14px; }
.footer-section ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-section a { font-size: 13.5px; color: var(--text-muted); transition: color var(--transition); }
.footer-section a:hover { color: var(--text); }
.footer-bottom { grid-column: 1 / -1; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

/* ============================================
   13. Reading Progress Bar
   ============================================ */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: transparent; z-index: 200; }
.reading-progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width 0.1s ease; }

/* ============================================
   14. 404 Page
   ============================================ */
.page-not-found { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; }
.page-not-found h1 { font-size: 5rem; font-family: var(--mono); font-weight: 700; color: var(--border); letter-spacing: -0.05em; margin-bottom: 16px; }
.page-not-found h2 { font-size: 1.5rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.page-not-found p { color: var(--text-muted); font-size: 15px; margin-bottom: 32px; }

/* Legacy 404 classes (keep for compatibility) */
.not-found { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.not-found-inner { text-align: center; max-width: 560px; }
.not-found-code { font-size: 5rem; font-family: var(--mono); font-weight: 700; color: var(--border); letter-spacing: -0.05em; margin-bottom: 16px; }
.not-found-title { font-size: 1.5rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.not-found-message { color: var(--text-muted); font-size: 15px; margin-bottom: 32px; }
.not-found-categories { margin-top: 48px; }
.not-found-categories h2 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 20px; }
.not-found-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; text-align: left; }
.not-found-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: border-color var(--transition); display: flex; flex-direction: column; gap: 6px; }
.not-found-card:hover { border-color: var(--accent-border); }
.not-found-card strong { font-size: 14px; color: var(--text); }
.not-found-card span { font-size: 12px; color: var(--text-faint); line-height: 1.4; }

/* About section (legacy) */
.about-inner { display: grid; grid-template-columns: 1fr 280px; gap: 64px; }
.about-text h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; color: #fafafa; margin-bottom: 20px; }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; }
.about-nations h3 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 16px; }
.nations-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.nations-list li { font-size: 14px; color: var(--text-muted); padding: 6px 0; border-bottom: 1px solid var(--border-subtle); }

/* Recent list (legacy) */
.recent-list { display: flex; flex-direction: column; gap: 2px; }
.recent-item { display: block; padding: 20px 0; border-bottom: 1px solid var(--border-subtle); transition: padding-left var(--transition); }
.recent-item:hover { padding-left: 8px; }
.recent-item-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.recent-item-category { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 500; }
.recent-item-time { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.recent-item-title { font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; margin-bottom: 6px; line-height: 1.4; }
.recent-item:hover .recent-item-title { color: #fafafa; }
.recent-item-summary { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

/* ============================================
   15. Responsive
   ============================================ */
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { display: none; }
  .mobile-toc-container { display: block; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .featured-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 64px 24px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .main-nav { display: none; }
  .main-nav.open { display: block; position: fixed; top: 56px; left: 0; right: 0; background: rgba(9,9,11,0.98); border-bottom: 1px solid var(--border); padding: 16px; backdrop-filter: blur(20px); }
  .main-nav.open .nav-list { flex-direction: column; gap: 4px; }
  .nav-toggle { display: flex; }
  .footer-nav { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.25rem; }
  .article-header { padding: 32px 24px 24px; }
  .not-found-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
}
