/* ============================================
   SteadyPub Dark Aesthetic — Design System
   Hybrid: Dark immersive + subtle animations + CSS 3D hero
   Tailwind v4 compatible
   ============================================ */

/* --- Design Tokens --- */
:root {
  --sp-bg-deep: #06060b;
  --sp-bg-base: #0a0a12;
  --sp-bg-elevated: #0f0f1a;
  --sp-bg-card: #14141f;
  --sp-bg-hover: #1a1a2e;
  --sp-border-subtle: rgba(255,255,255,0.06);
  --sp-border-hover: rgba(255,255,255,0.12);
  --sp-text-primary: #e8e8f0;
  --sp-text-secondary: #9494a8;
  --sp-text-muted: #6b6b80;
  --sp-accent-cyan: #00d4ff;
  --sp-accent-amber: #f59e0b;
  --sp-accent-cyan-dim: rgba(0,212,255,0.10);
  --sp-accent-amber-dim: rgba(245,158,11,0.10);
  --sp-glow-cyan: 0 0 20px rgba(0,212,255,0.15);
  --sp-glow-amber: 0 0 20px rgba(245,158,11,0.12);
  --sp-radius-sm: 6px;
  --sp-radius-md: 10px;
  --sp-radius-lg: 16px;
  --sp-transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sp-transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --sp-shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --sp-shadow-elevated: 0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
}

/* --- Light mode overrides --- */
[data-theme="light"], .light-theme {
  --sp-bg-deep: #f5f5f8;
  --sp-bg-base: #fafafc;
  --sp-bg-elevated: #f0f0f5;
  --sp-bg-card: #ffffff;
  --sp-bg-hover: #f0f0f5;
  --sp-border-subtle: rgba(0,0,0,0.06);
  --sp-border-hover: rgba(0,0,0,0.12);
  --sp-text-primary: #1a1a2e;
  --sp-text-secondary: #5a5a70;
  --sp-text-muted: #9a9ab0;
}

/* --- Base Overrides --- */
body {
  background: var(--sp-bg-deep) !important;
  color: var(--sp-text-primary);
}

/* --- Scanline Overlay --- */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
}

/* --- Grid Background --- */
.app-layout::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.app-layout {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

/* --- Sidebar --- */
.app-sidebar {
  background: var(--sp-bg-base) !important;
  border-right: 1px solid var(--sp-border-subtle) !important;
}

.sidebar-logo .logo-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sp-accent-cyan), #0891b2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: var(--sp-glow-cyan);
  transition: var(--sp-transition-smooth);
}

.sidebar-logo .logo-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0,212,255,0.25);
}

.sidebar-logo h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.sidebar-logo h1 a {
  color: var(--sp-text-primary) !important;
  text-decoration: none;
}

.sidebar-logo .sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.sidebar-logo .sidebar-title a {
  color: var(--sp-text-primary) !important;
  text-decoration: none;
}

.sidebar-logo p {
  font-size: 0.8rem;
  color: var(--sp-text-muted) !important;
  margin-top: 4px;
  line-height: 1.4;
}

.sidebar-nav a {
  color: var(--sp-text-secondary) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--sp-radius-sm);
  transition: var(--sp-transition-fast);
  text-decoration: none;
}

.sidebar-nav a:hover {
  color: var(--sp-text-primary) !important;
  background: rgba(255,255,255,0.04);
}

.sidebar-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sp-text-muted) !important;
  transition: var(--sp-transition-fast);
}

.sidebar-social a:hover {
  background: var(--sp-accent-cyan-dim) !important;
  color: var(--sp-accent-cyan) !important;
  transform: translateY(-2px);
}

.sidebar-widget h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sp-text-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.sidebar-widget ul li a {
  color: var(--sp-text-secondary) !important;
  font-size: 0.85rem;
  transition: var(--sp-transition-fast);
  text-decoration: none;
}

.sidebar-widget ul li a:hover {
  color: var(--sp-accent-cyan) !important;
}

/* Tag pills in sidebar */
.sidebar-widget a[href*="/tag/"],
.tag-pill {
  display: inline-block;
  background: var(--sp-accent-cyan-dim) !important;
  color: rgba(255,255,255,0.7) !important;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem !important;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  text-decoration: none;
  transition: var(--sp-transition-fast);
  border: 1px solid transparent;
}

.sidebar-widget a[href*="/tag/"]:hover,
.tag-pill:hover {
  background: rgba(0,212,255,0.15) !important;
  color: var(--sp-accent-cyan) !important;
  border-color: rgba(0,212,255,0.2) !important;
  transform: translateY(-1px);
}

/* Light mode — sidebar tag pills */
.light-theme .sidebar-widget a[href*="/tag/"],
.light-theme .tag-pill {
  color: rgba(0,0,0,0.7) !important;
  background: rgba(0,212,255,0.1) !important;
}

.light-theme .sidebar-widget a[href*="/tag/"]:hover,
.light-theme .tag-pill:hover {
  color: var(--sp-accent-cyan) !important;
  background: rgba(0,212,255,0.18) !important;
}

/* Newsletter CTA in sidebar */
.newsletter-cta {
  background: linear-gradient(135deg, rgba(0,212,255,0.06), rgba(245,158,11,0.04)) !important;
  border: 1px solid var(--sp-border-subtle) !important;
  border-radius: var(--sp-radius-md);
  padding: 16px;
  text-align: center;
}

.newsletter-cta p {
  font-size: 0.8rem;
  color: var(--sp-text-muted) !important;
  margin-bottom: 12px;
}

/* --- Header / Nav --- */
.app-header {
  background: rgba(10,10,18,0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sp-border-hover) !important;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(12px)) {
  .app-header {
    background: var(--sp-bg-base) !important;
  }
}

[data-theme="light"] .app-header,
.light-theme .app-header {
  background: rgba(250,250,252,0.85) !important;
  border-bottom: 1px solid rgba(0,0,0,0.1) !important;
}

@supports not (backdrop-filter: blur(12px)) {
  [data-theme="light"] .app-header,
  .light-theme .app-header {
    background: rgba(250,250,252,0.98) !important;
  }
}

.app-header nav a {
  color: var(--sp-text-secondary) !important;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--sp-radius-sm);
  transition: var(--sp-transition-fast);
  text-decoration: none;
}

.app-header nav a:hover {
  color: var(--sp-text-primary) !important;
  background: rgba(255,255,255,0.06);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--sp-radius-sm);
  background: rgba(255,255,255,0.04);
  border: none;
  color: var(--sp-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--sp-transition-fast);
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.1);
  color: var(--sp-text-primary);
}

/* ========== HERO SECTION ========== */
.hero-section {
  position: relative;
  padding: 80px 48px 64px;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 20%, rgba(0,212,255,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(245,158,11,0.04) 0%, transparent 50%),
              var(--sp-bg-deep);
  border-bottom: none !important;
  max-width: none !important;
  margin: 0 !important;
}

.hero-section-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sp-accent-cyan-dim) !important;
  color: var(--sp-accent-cyan) !important;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  border: 1px solid rgba(0,212,255,0.15);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.5rem !important;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--sp-text-primary);
  background: linear-gradient(135deg, var(--sp-text-primary), var(--sp-accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 16px;
}

.hero-title a {
  color: var(--sp-text-primary) !important;
  text-decoration: none;
  background: linear-gradient(135deg, var(--sp-text-primary), var(--sp-accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title a:hover {
  opacity: 0.9;
}

.hero-excerpt {
  font-size: 1.05rem;
  color: var(--sp-text-secondary) !important;
  line-height: 1.7;
  margin: 16px 0 28px !important;
  max-width: 600px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--sp-accent-cyan), #06b6d4);
  color: #000 !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: var(--sp-radius-sm);
  text-decoration: none;
  transition: var(--sp-transition-smooth);
  box-shadow: var(--sp-glow-cyan);
  float: none !important;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0,212,255,0.3);
  color: #000 !important;
}

.hero-cta svg {
  transition: var(--sp-transition-fast);
}

.hero-cta:hover svg {
  transform: translateX(4px);
}

/* --- Hero stats --- */
.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}

.hero-stats span {
  font-size: 0.85rem;
  color: var(--sp-text-muted);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

.hero-stats span::before {
  content: '\25B9';
  color: var(--sp-accent-cyan);
  margin-right: 6px;
}

/* ========== SECTION HEADER ========== */
.section-header {
  max-width: 860px;
  margin: 0 auto 24px;
  padding: 0;
}

.section-label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sp-accent-cyan) !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sp-text-primary);
  margin: 0;
  line-height: 1.2;
}

/* ========== ARTICLE GRID ========== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 860px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.article-card {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border-subtle);
  border-radius: var(--sp-radius-lg);
  overflow: hidden;
  transition: var(--sp-transition-smooth);
  position: relative;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--sp-accent-cyan), transparent);
  opacity: 0;
  transition: var(--sp-transition-smooth);
  z-index: 1;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--sp-border-hover);
  box-shadow: var(--sp-shadow-elevated);
  background: var(--sp-bg-hover);
}

.article-card:hover::before {
  opacity: 1;
}

.article-card-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 0 !important;
}

.article-card-body {
  padding: 16px;
}

.article-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
}

.article-card-title a {
  color: var(--sp-text-primary) !important;
  text-decoration: none;
  transition: var(--sp-transition-fast);
}

.article-card-title a:hover {
  color: var(--sp-accent-cyan) !important;
}

.article-card-meta {
  color: var(--sp-text-muted) !important;
  font-size: 0.72rem;
  margin-bottom: 8px;
}

.article-card-meta a {
  color: var(--sp-text-muted) !important;
  text-decoration: none;
  transition: var(--sp-transition-fast);
}

.article-card-meta a:hover {
  color: var(--sp-accent-cyan) !important;
}

.article-card-excerpt {
  font-size: 0.8rem;
  color: var(--sp-text-secondary) !important;
  line-height: 1.5;
}

.article-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.article-card-tag {
  display: inline-block;
  background: var(--sp-accent-cyan-dim) !important;
  color: rgba(255,255,255,0.6) !important;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  text-decoration: none;
  transition: var(--sp-transition-fast);
}

.article-card-tag:hover {
  background: rgba(0,212,255,0.12) !important;
  color: var(--sp-accent-cyan) !important;
}

/* Light mode — article card tags */
.light-theme .article-card-tag {
  color: rgba(0,0,0,0.65) !important;
  background: rgba(0,212,255,0.08) !important;
}

.light-theme .article-card-tag:hover {
  color: var(--sp-accent-cyan) !important;
  background: rgba(0,212,255,0.15) !important;
}

/* ========== ARTICLE PAGE ========== */
.article-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
}

articleheader h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.article-meta {
  color: var(--sp-text-muted) !important;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.article-meta a {
  color: var(--sp-text-muted) !important;
  text-decoration: none;
  transition: var(--sp-transition-fast);
}

.article-meta a:hover {
  color: var(--sp-accent-cyan) !important;
}

.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--sp-text-primary);
}

.article-body a {
  color: var(--sp-accent-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: #06b6d4;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px auto;
  max-width: 720px;
  padding: 0 24px;
}

.article-tags a {
  display: inline-block;
  background: var(--sp-accent-cyan-dim) !important;
  color: rgba(255,255,255,0.7) !important;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  text-decoration: none;
  transition: var(--sp-transition-fast);
  border: 1px solid transparent;
}

.article-tags a:hover {
  background: rgba(0,212,255,0.15) !important;
  color: var(--sp-accent-cyan) !important;
  border-color: rgba(0,212,255,0.2);
}

/* Light mode — article page tags */
.light-theme .article-tags a {
  color: rgba(0,0,0,0.7) !important;
  background: rgba(0,212,255,0.1) !important;
}

.light-theme .article-tags a:hover {
  color: var(--sp-accent-cyan) !important;
  background: rgba(0,212,255,0.18) !important;
  border-color: rgba(0,212,255,0.3);
}

/* ========== PAGINATION ========== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 40px !important;
  padding: 0 !important;
}

@media (max-width: 640px) {
  .pagination-container {
    gap: 2px;
  }
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--sp-radius-sm);
  background: rgba(255,255,255,0.04);
  color: var(--sp-text-secondary) !important;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--sp-transition-fast);
  border: 1px solid transparent;
}

.pagination-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--sp-text-primary) !important;
}

.pagination-btn.active {
  background: var(--sp-accent-cyan) !important;
  color: #000 !important;
  font-weight: 600;
  box-shadow: var(--sp-glow-cyan);
}

.pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ========== FOOTER ========== */
.app-footer {
  padding: 32px 48px;
  border-top: 1px solid var(--sp-border-subtle);
  text-align: center;
}

.app-footer p {
  color: var(--sp-text-muted) !important;
  font-size: 0.85rem;
}

.app-footer a {
  color: var(--sp-text-muted) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: var(--sp-transition-fast);
}

.app-footer a:hover {
  color: var(--sp-accent-cyan) !important;
}

/* ========== SECTIONS (categories, tags, etc) ========== */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
}

.page-content h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
}

/* ========== CATEGORIES PAGE ========== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 48px;
}
.category-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border: 1px solid var(--sp-border-subtle);
  border-radius: var(--sp-radius-lg);
  text-decoration: none;
  background: var(--sp-bg-card);
  transition: var(--sp-transition-smooth);
  overflow: hidden;
  isolation: isolate;
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--sp-accent-cyan), transparent 80%);
  opacity: 0;
  transition: var(--sp-transition-smooth);
  z-index: 1;
}
.category-card:hover {
  border-color: rgba(0,212,255,0.25);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 20px rgba(0,212,255,0.08);
  background: var(--sp-bg-hover);
}
.category-card:hover::before {
  opacity: 1;
}
.category-card-glow {
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 40%, rgba(0,212,255,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: var(--sp-transition-smooth);
  pointer-events: none;
  z-index: 0;
}
.category-card:hover .category-card-glow {
  opacity: 1;
}
.category-card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}
.category-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--sp-radius-md);
  background: linear-gradient(135deg, var(--sp-accent-cyan), #0891b2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0,212,255,0.15);
  transition: var(--sp-transition-smooth);
  letter-spacing: 0.04em;
}
.category-card:hover .category-icon {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0,212,255,0.25);
}
.category-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--sp-text-primary);
  transition: var(--sp-transition-fast);
  line-height: 1.3;
}
.category-card:hover .category-name {
  color: var(--sp-accent-cyan);
}
.category-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
}
.category-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 100px;
  background: var(--sp-accent-amber-dim);
  color: var(--sp-accent-amber);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  transition: var(--sp-transition-fast);
}
.category-card:hover .category-count-badge {
  background: rgba(245,158,11,0.18);
  box-shadow: var(--sp-glow-amber);
}
.category-count-label {
  font-size: 0.78rem;
  color: var(--sp-text-muted);
  font-weight: 400;
}

/* Light mode overrides for categories */
[data-theme="light"] .category-card:hover .category-name,
.light-theme .category-card:hover .category-name {
  color: #0891b2;
}
[data-theme="light"] .category-count-badge,
.light-theme .category-count-badge {
  background: rgba(245,158,11,0.1);
  color: #b45309;
}
[data-theme="light"] .category-card:hover .category-count-badge,
.light-theme .category-card:hover .category-count-badge {
  background: rgba(245,158,11,0.18);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--sp-bg-base);
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.15);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100% !important;
    height: auto;
    position: relative;
    border-right: none !important;
    border-bottom: 1px solid var(--sp-border-subtle);
    padding: 24px 20px !important;
  }

  .hero-section {
    padding: 48px 24px 40px;
  }

  .hero-title {
    font-size: 1.75rem !important;
  }

  .hero-excerpt {
    font-size: 0.95rem;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .app-header {
    padding: 12px 20px !important;
  }

  .app-footer {
    padding: 24px 20px;
  }

  .article-container {
    padding: 16px;
  }

  .page-content {
    padding: 32px 16px;
  }
}

/* ============================================
   ARTICLE CONTENT — Dark Aesthetic
   Tables, Code Blocks, Blockquotes, Lists, Images
   ============================================ */

/* --- Article body wrapper --- */
.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--sp-text-primary);
  max-width: 720px;
  margin: 0 auto;
  padding: 0 4px;
}

/* --- Paragraph spacing --- */
.article-body p {
  margin-bottom: 1.2em;
}

/* --- Links in content --- */
.article-body a {
  color: var(--sp-accent-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.article-body a:hover {
  color: #06b6d4;
}

/* --- Headings within article --- */
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2em 0 0.8em;
  color: var(--sp-text-primary);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--sp-border-subtle);
  padding-bottom: 0.4em;
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.8em 0 0.6em;
  color: var(--sp-accent-cyan);
}

.article-body h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5em 0 0.5em;
  color: var(--sp-text-primary);
}

/* --- Lists --- */
.article-body ul,
.article-body ol {
  margin: 0 0 1.2em 1.5em;
  color: var(--sp-text-primary);
}

.article-body li {
  margin-bottom: 0.3em;
  line-height: 1.7;
}

.article-body li > ul,
.article-body li > ol {
  margin-top: 0.3em;
  margin-bottom: 0.3em;
}

/* --- Bold / Strong --- */
.article-body strong {
  color: var(--sp-text-primary);
  font-weight: 700;
}

/* --- Code (inline) --- */
.article-body code {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.85em;
  padding: 2px 6px;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 4px;
  color: var(--sp-accent-cyan);
  word-break: break-word;
}

/* --- Code blocks (pre > code) --- */
.article-body pre {
  background: #0d0d1a !important;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 20px !important;
  overflow-x: auto;
  margin: 1.5em 0;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.article-body pre code {
  background: none !important;
  padding: 0 !important;
  color: var(--sp-text-primary) !important;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* --- Tables --- */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
  border: 1px solid var(--sp-border-subtle);
  border-radius: 8px;
  overflow: hidden;
}

.article-body thead {
  background: var(--sp-bg-elevated);
}

.article-body th {
  font-weight: 600;
  color: var(--sp-text-primary);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--sp-border-subtle);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-body td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--sp-border-subtle);
  color: var(--sp-text-secondary);
  vertical-align: top;
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* --- Blockquotes --- */
.article-body blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  background: rgba(0, 212, 255, 0.04);
  border-left: 3px solid var(--sp-accent-cyan);
  border-radius: 0 8px 8px 0;
  color: var(--sp-text-secondary);
  font-style: italic;
}

.article-body blockquote p {
  margin-bottom: 0;
}

.article-body blockquote strong {
  color: var(--sp-accent-cyan);
}

/* --- Horizontal Rule --- */
.article-body hr {
  border: none;
  height: 1px;
  background: var(--sp-border-subtle);
  margin: 2em 0;
}

/* --- Images in articles --- */
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em 0;
  border: 1px solid var(--sp-border-subtle);
}

/* --- Admonition / Note boxes --- */
.article-body .admonition {
  margin: 1.5em 0;
  padding: 16px 20px;
  border-radius: 8px;
  border-left: 3px solid var(--sp-accent-cyan);
  background: var(--sp-bg-card);
}

.article-body .admonition-title {
  font-weight: 700;
  color: var(--sp-accent-cyan);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* --- Definition lists --- */
.article-body dt {
  font-weight: 600;
  color: var(--sp-text-primary);
  margin-top: 1em;
}

.article-body dd {
  margin-left: 1.5em;
  color: var(--sp-text-secondary);
}

/* ============================================
   PRODUCT BRAND COLORS
   Homelab/self-hosted software brand colors
   Usage: <span class="sp-brand proxmox">Proxmox</span>
   or auto-applied to product names in article body
   ============================================ */

.sp-brand {
  display: inline-block;
  padding: 0 4px;
  border-radius: 3px;
}

/* Proxmox — orange (#E57000) */
.sp-brand.proxmox {
  color: #E57000;
  font-weight: 600;
}

/* Docker — blue (#2496ED) */
.sp-brand.docker {
  color: #2496ED;
  font-weight: 600;
}

/* Kubernetes — blue (#326CE5) */
.sp-brand.kubernetes,
.sp-brand.k3s {
  color: #326CE5;
  font-weight: 600;
}

/* Tailscale — purple (#5F5FFF) */
.sp-brand.tailscale {
  color: #5F5FFF;
  font-weight: 600;
}

/* Cloudflare — orange (#F38020) */
.sp-brand.cloudflare {
  color: #F38020;
  font-weight: 600;
}

/* Nginx — green (#009639) */
.sp-brand.nginx {
  color: #009639;
  font-weight: 600;
}

/* Traefik — red (#D4201C) */
.sp-brand.traefik {
  color: #D4201C;
  font-weight: 600;
}

/* Caddy — green (#2B7A78) */
.sp-brand.caddy {
  color: #2B7A78;
  font-weight: 600;
}

/* Ubuntu — orange (#E95420) */
.sp-brand.ubuntu {
  color: #E95420;
  font-weight: 600;
}

/* Debian — red (#D70A53) */
.sp-brand.debian {
  color: #D70A53;
  font-weight: 600;
}

/* Grafana — orange (#F46800) */
.sp-brand.grafana {
  color: #F46800;
  font-weight: 600;
}

/* Prometheus — red (#E6522C) */
.sp-brand.prometheus {
  color: #E6522C;
  font-weight: 600;
}

/* Pi-hole — red (#F60C0C) */
.sp-brand.pihole,
.sp-brand.pi-hole {
  color: #F60C0C;
  font-weight: 600;
}

/* AdGuard — green (#68BC71) */
.sp-brand.adguard {
  color: #68BC71;
  font-weight: 600;
}

/* Home Assistant — blue (#41BDF5) */
.sp-brand.homeassistant {
  color: #41BDF5;
  font-weight: 600;
}

/* Nextcloud — blue (#0082C9) */
.sp-brand.nextcloud {
  color: #0082C9;
  font-weight: 600;
}

/* Jellyfin — purple (#00A4DC) */
.sp-brand.jellyfin {
  color: #00A4DC;
  font-weight: 600;
}

/* Plex — orange (#E5A00D) */
.sp-brand.plex {
  color: #E5A00D;
  font-weight: 600;
}

/* Vaultwarden — green (#175DDC) */
.sp-brand.vaultwarden,
.sp-brand.bitwarden {
  color: #175DDC;
  font-weight: 600;
}

/* Restic — green */
.sp-brand.restic {
  color: #00AD9F;
  font-weight: 600;
}

/* Kopia — purple (#8B5CF6) */
.sp-brand.kopia {
  color: #8B5CF6;
  font-weight: 600;
}

/* Duplicati — blue */
.sp-brand.duplicati {
  color: #3B82F6;
  font-weight: 600;
}

/* Portainer — blue (#13B5EA) */
.sp-brand.portainer {
  color: #13B5EA;
  font-weight: 600;
}

/* Unraid — red */
.sp-brand.unraid {
  color: #E44024;
  font-weight: 600;
}

/* TrueNAS — blue */
.sp-brand.truenas {
  color: #0078D7;
  font-weight: 600;
}

/* Synology — red */
.sp-brand.synology {
  color: #FF6600;
  font-weight: 600;
}

/* OpenMediaVault — green */
.sp-brand.openmediavault,
.sp-brand.omv {
  color: #00A878;
  font-weight: 600;
}

/* Ollama — purple */
.sp-brand.ollama {
  color: #8B5CF6;
  font-weight: 600;
}

/* Hetzner — blue (#D50C2D) */
.sp-brand.hetzner {
  color: #D50C2D;
  font-weight: 600;
}

/* Backblaze — blue */
.sp-brand.backblaze,
.sp-brand.b2 {
  color: #0066FF;
  font-weight: 600;
}

/* HashiCorp products */
.sp-brand.terraform {
  color: #844FBA;
  font-weight: 600;
}
.sp-brand.vault {
  color: #FFCD00;
  font-weight: 600;
}
.sp-brand.consul {
  color: #CA2171;
  font-weight: 600;
}

/* Elastic */
.sp-brand.elasticsearch,
.sp-brand.elastic {
  color: #00BFB3;
  font-weight: 600;
}

/* Let's Encrypt */
.sp-brand.letsencrypt {
  color: #003A70;
  font-weight: 600;
}

/* pfSense */
.sp-brand.pfsense {
  color: #D4201C;
  font-weight: 600;
}

/* Ansible */
.sp-brand.ansible {
  color: #EE0000;
  font-weight: 600;
}

/* GitLab */
.sp-brand.gitlab {
  color: #E2432A;
  font-weight: 600;
}

/* MySQL / MariaDB */
.sp-brand.mysql {
  color: #4479A1;
  font-weight: 600;
}
.sp-brand.mariadb {
  color: #003545;
  font-weight: 600;
}

/* PostgreSQL */
.sp-brand.postgresql,
.sp-brand.postgres {
  color: #336791;
  font-weight: 600;
}
