:root {
  --bg-base: #080b11;
  --bg-surface: #0f1523;
  --bg-surface-elevated: #161f33;
  --bg-surface-hover: #1e2942;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #38bdf8;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #38bdf8;
  --accent-secondary: #818cf8;
  --accent-tertiary: #c084fc;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(129, 140, 248, 0.15) 50%, rgba(192, 132, 252, 0.15) 100%);
  --glass-bg: rgba(15, 21, 35, 0.85);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 24px -4px rgba(56, 189, 248, 0.3);
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --border-focus: #0284c7;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #0284c7;
  --accent-secondary: #6366f1;
  --accent-tertiary: #9333ea;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #6366f1 50%, #9333ea 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(99, 102, 241, 0.08) 50%, rgba(147, 51, 234, 0.08) 100%);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 24px -4px rgba(2, 132, 199, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 1400px;
  height: 520px;
  background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(56, 189, 248, 0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] body::before {
  background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(2, 132, 199, 0.06), transparent 70%);
}

a { color: var(--accent-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-secondary); }

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 100;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Header */
.header {
  height: 56px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-inner {
  max-width: 1160px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-badge {
  width: 30px;
  height: 30px;
  background: var(--accent-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
  letter-spacing: -0.02em;
}

.brand-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 140%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  font-weight: 600;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.header-nav a:hover {
  color: var(--accent-primary);
  background-color: var(--bg-surface-elevated);
}

.theme-toggle-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.theme-toggle-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 24px 72px;
  width: 100%;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
  font-weight: 500;
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--accent-primary); }
.breadcrumbs span.separator { color: var(--text-muted); opacity: 0.5; }

/* Hero Section */
.hero {
  text-align: center;
  padding: 16px 12px 20px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--accent-gradient-subtle);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hero-badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  display: inline-block;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Compact Filter Toolbar */
.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.filter-categories {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
  flex: 1;
  min-width: 0;
}
.filter-categories::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-decoration: none;
}
.filter-pill:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}
.filter-pill.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}
.filter-pill-series {
  border: 1px dashed rgba(56, 189, 248, 0.4);
  color: var(--accent-primary);
}

.filter-search-box {
  position: relative;
  width: 220px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.filter-search-box .search-icon {
  position: absolute;
  left: 10px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0.6;
}
.filter-search-box .search-input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 28px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  outline: none;
  transition: all 0.15s ease;
}
.filter-search-box .search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

@media (max-width: 768px) {
  .filter-toolbar {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
    padding: 8px;
  }
  .filter-search-box {
    width: 100%;
  }
}

/* Taxonomy Pills */
.taxonomy-cloud {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.cat-pill {
  background: var(--bg-surface-elevated);
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.cat-pill:hover {
  background: var(--accent-gradient-subtle);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

.tag-pill {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.tag-pill:hover {
  border-color: var(--border-focus);
  color: var(--accent-primary);
  background: var(--bg-surface-hover);
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 28px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-surface-elevated);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

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

.card-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(129, 140, 248, 0.18) 50%, rgba(192, 132, 252, 0.12) 100%);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.card-placeholder-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.6;
}

[data-theme="light"] .card-placeholder-pattern {
  background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px);
}

.card-placeholder-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.card-placeholder-icon {
  font-size: 30px;
  color: var(--accent-primary);
  filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.4));
}

.card-placeholder-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.card-title a {
  color: inherit;
  transition: color 0.2s ease;
}
.card-title a:hover {
  color: var(--accent-primary);
}

.card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

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

.card-footer a {
  color: var(--accent-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.card:hover .card-footer a {
  gap: 8px;
}

/* Article Reader */
.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.article-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 24px;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 14px 0 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.article-hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 24px 0 32px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

/* Table of Contents (TOC) */
.toc-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  padding-left: 0;
}

.toc-item {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.5;
}
.toc-item.level-3 {
  padding-left: 18px;
  font-size: 13px;
}
.toc-item a {
  color: var(--text-secondary);
  display: inline-block;
  padding: 2px 0;
  transition: color 0.15s ease;
}
.toc-item a:hover {
  color: var(--accent-primary);
}

/* Series Navigation Box */
.series-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-secondary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}

.series-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.series-box-header a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.series-box-header a:hover { color: var(--accent-primary); }

.series-box-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.series-box-link {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}
.series-box-link:hover {
  border-color: var(--accent-primary);
  background: var(--bg-surface-hover);
  transform: translateY(-1px);
}

.series-box-link .series-link-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.series-box-link .series-link-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

/* Series Hub Part List */
.series-part-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.series-part-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.series-part-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.series-part-number {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 3px 10px rgba(56, 189, 248, 0.3);
}

.series-part-body { flex: 1; }
.series-part-body .card-title { margin-bottom: 6px; }
.series-part-body .card-excerpt { margin-bottom: 0; }

/* Non-Intrusive Sponsored & Ad Units */
.ad-container {
  margin: 0;
  padding: 0;
  text-align: center;
  display: none;
  position: relative;
  overflow: hidden;
  clear: both;
}

.ad-container:has(iframe),
.ad-container:has(ins.adsbygoogle[data-ad-status="filled"]) {
  display: block;
  margin: 36px auto;
  max-width: 728px;
  padding: 12px 16px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .ad-container:has(iframe),
[data-theme="light"] .ad-container:has(ins.adsbygoogle[data-ad-status="filled"]) {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

.ad-label {
  font-size: 9.5px;
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
  opacity: 0.65;
  display: block;
}

.ad-container ins.adsbygoogle {
  display: block;
  width: 100%;
}

.ad-in-article,
.ad-container[data-ad-type="in-article"] {
  margin: 44px auto;
}

.ad-post-article,
.ad-container[data-ad-type="post-article"] {
  margin: 36px auto 44px;
}

/* Article Body Content */
.article-content {
  font-size: 17.5px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content p { margin-bottom: 1.6em; }
.article-content h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2.2em 0 0.8em;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  scroll-margin-top: 80px;
  letter-spacing: -0.02em;
}
.article-content h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.8em 0 0.6em;
  scroll-margin-top: 80px;
  letter-spacing: -0.015em;
}
.article-content ul, .article-content ol { margin-bottom: 1.6em; padding-left: 28px; }
.article-content li { margin-bottom: 0.5em; }
.article-content blockquote {
  border-left: 4px solid var(--accent-primary);
  padding: 16px 22px;
  margin: 1.8em 0;
  background: var(--bg-surface-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}
.article-content pre {
  background: #090d16;
  color: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin: 1.8em 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  box-shadow: var(--shadow-sm);
}
.article-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-primary);
  padding: 2px 7px;
  border-radius: 4px;
}
.article-content pre code { background: transparent; padding: 0; color: inherit; }
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 28px auto;
  display: block;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 14.5px;
}
.article-content th, .article-content td {
  border: 1px solid var(--border-subtle);
  padding: 12px 16px;
  text-align: left;
}
.article-content th { background: var(--bg-surface-elevated); font-weight: 700; font-family: var(--font-display); }

/* Social Share Bar */
.share-bar {
  margin: 40px 0 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.share-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}
.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.share-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.share-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

/* Author Box */
.author-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}
.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 26px;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}
.author-info h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.author-info p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Next / Prev Navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0;
}
.post-nav-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.post-nav-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.post-nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.post-nav-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Related Posts Section */
.related-section {
  margin: 50px 0 20px;
}
.related-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 22px;
  color: var(--text-primary);
  border-left: 4px solid var(--accent-primary);
  padding-left: 14px;
  letter-spacing: -0.015em;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-focus);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 600;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}
.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 40px 24px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}
.footer a { color: var(--text-secondary); margin: 0 10px; }
.footer a:hover { color: var(--accent-primary); }

@media (max-width: 768px) {
  .header { height: 56px; }
  .header-inner { padding: 0 16px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; }
  .grid { grid-template-columns: 1fr; }
  .article-title { font-size: 28px; }
  .article-container { padding: 20px 16px 60px; }
  .post-nav { grid-template-columns: 1fr; }
}