/*
Theme Name: Better Photos Guide
Theme URI: https://betterphotosguide.com
Author: Better Photos Guide Team
Description: A custom dark-mode photography theme optimized for content, readability, and SEO.
Version: 1.0
License: MIT
Text Domain: bpg
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Surfaces */
  --color-bg-base: #0f172a;
  --color-bg-surface: #1e293b;
  --color-bg-elevated: #334155;
  --color-bg-card: rgba(30, 41, 59, 0.5);
  --color-bg-card-hover: #1e293b;
  --color-bg-code: rgba(51, 65, 85, 0.4);
  --color-bg-tag: rgba(212, 160, 74, 0.15);
  --color-bg-sidebar-item: rgba(255, 255, 255, 0.03);

  /* Borders */
  --color-border: #334155;
  --color-border-hover: #64748b;
  --color-border-accent: rgba(212, 160, 74, 0.3);

  /* Text */
  --color-text-primary: #f1f5f9;
  --color-text-body: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-text-placeholder: #64748b;
  --color-text-heading: #f8fafc;

  /* Accent - Photography warm gold */
  --color-accent: #d4a04a;
  --color-accent-hover: #e8b84a;
  --color-accent-dim: rgba(212, 160, 74, 0.15);
  --color-accent-glow: rgba(212, 160, 74, 0.25);

  /* Semantic */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;

  --leading-tight: 1.15;
  --leading-normal: 1.6;
  --leading-relaxed: 1.85;

  --tracking-wide: 0.05em;
  --tracking-wider: 0.08em;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Layout */
  --content-max: 1200px;
  --content-narrow: 720px;
  --sidebar-width: 320px;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-button-inset: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --shadow-button-press: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-glow-accent: 0 0 12px rgba(212, 160, 74, 0.25);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease-out;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-body);
  background-color: var(--color-bg-base);
  min-height: 100vh;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-text-heading);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-5);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

strong, b { font-weight: 600; color: var(--color-text-primary); }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  background: var(--color-bg-code);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
}

pre {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}
pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  margin-bottom: var(--space-5);
  padding-left: var(--space-6);
}
li {
  margin-bottom: var(--space-2);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.site-content {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

/* Two-column layout for single posts */
.content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-12);
  align-items: start;
}

.content-main {
  min-width: 0;
}

.content-sidebar {
  position: sticky;
  top: calc(80px + var(--space-8));
}

/* Full-width variant */
.content-area--full {
  grid-template-columns: 1fr;
  max-width: var(--content-narrow);
  margin: 0 auto;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-heading);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.site-title:hover {
  color: var(--color-accent);
  text-decoration: none;
}
.site-title .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--color-bg-base);
  font-weight: 800;
}
.site-title .custom-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.main-nav a {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  text-decoration: none;
}
.main-nav a:hover,
.main-nav a.current-menu-item {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.main-nav a.current-menu-item {
  color: var(--color-accent);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-body);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-lg);
  transition: all var(--transition-fast);
}
.menu-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ============================================================
   HOMEPAGE HERO
   ============================================================ */
.hero-section {
  position: relative;
  padding: var(--space-20) 0 var(--space-16);
  text-align: center;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(212, 160, 74, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* Hero with background image */
.hero-section.with-bg {
  background-size: cover;
  background-position: center 30%;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-section.with-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.75) 50%, rgba(15, 23, 42, 0.95) 100%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: var(--color-bg-tag);
  border: 1px solid var(--color-border-accent);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  color: var(--color-text-heading);
}
.hero-title .highlight {
  color: var(--color-accent);
  text-shadow: 0 0 40px rgba(212, 160, 74, 0.3);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-10);
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  background: var(--color-accent);
  color: var(--color-bg-base);
  font-weight: 600;
  font-size: var(--text-base);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-button-inset);
  transition: all var(--transition-base);
}
.hero-cta:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-button-inset), var(--shadow-glow-accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.hero-cta:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-button-press);
}

/* Hero stats bar */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-top: var(--space-16);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.hero-stat {
  background: var(--color-bg-base);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}
.hero-stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: var(--space-1);
}
.hero-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* ============================================================
   CATEGORY CARDS (Homepage)
   ============================================================ */
.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-8);
  color: var(--color-text-heading);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-16);
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all var(--transition-slow);
}
.category-card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  text-decoration: none;
}

.category-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-tag);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  transition: all var(--transition-base);
}
.category-card:hover .category-card-icon {
  background: rgba(212, 160, 74, 0.25);
}

.category-card-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
}

.category-card-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================================
   POST GRID (Homepage)
   ============================================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-16);
}

.post-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-slow);
}
.post-card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.post-card-image {
  width: 100%;
  height: 200px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-placeholder);
  font-size: var(--text-sm);
  overflow: hidden;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card-image .placeholder-box {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.4;
}

.post-card-body {
  padding: var(--space-6);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.post-card-category {
  color: var(--color-accent);
  font-weight: 600;
}

.post-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: var(--space-3);
  line-height: var(--leading-tight);
}
.post-card-title a {
  color: inherit;
  text-decoration: none;
}
.post-card-title a:hover {
  color: var(--color-accent);
}

.post-card-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-header {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumbs {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--color-accent);
}
.breadcrumbs .separator {
  color: var(--color-border);
}

.post-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.post-meta-bar .post-category {
  color: var(--color-accent);
  font-weight: 600;
}
.post-meta-bar .post-category:hover {
  color: var(--color-accent-hover);
}

.post-featured-image {
  margin-bottom: var(--space-10);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #2a2a2a;
  aspect-ratio: 800/600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-placeholder);
  border: 1px solid var(--color-border);
}
.featured-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 400px;
  background-size: cover;
  background-position: center;
}

/* Post content styling */
.post-content {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-body);
}
.post-content h2 {
  margin-top: var(--space-12);
  padding-top: var(--space-4);
}
.post-content h3 {
  margin-top: var(--space-8);
}
.post-content p {
  margin-bottom: var(--space-5);
}
.post-content img {
  border-radius: var(--radius-lg);
  margin: var(--space-8) auto;
  max-width: 100%;
}
.post-content ul, .post-content ol {
  margin-bottom: var(--space-5);
}
.post-content li {
  margin-bottom: var(--space-2);
}
.post-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Post navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}
.post-navigation a {
  flex: 1;
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all var(--transition-base);
}
.post-navigation a:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
}
.post-navigation .nav-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-2);
}
.post-navigation .nav-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

/* Related posts */
.related-posts {
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid var(--color-border);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget {
  margin-bottom: var(--space-8);
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.sidebar-widget-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

/* Table of Contents */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li {
  margin-bottom: var(--space-1);
}
.toc-list a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.toc-list a:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-sidebar-item);
}
.toc-list a.toc-active {
  color: var(--color-accent);
  background: var(--color-bg-tag);
}

.toc-list .toc-h3 {
  padding-left: var(--space-6);
  font-size: var(--text-xs);
}

/* Related sidebar list */
.sidebar-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-post-list li {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}
.sidebar-post-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.sidebar-post-list a {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
  line-height: var(--leading-normal);
  transition: color var(--transition-fast);
}
.sidebar-post-list a:hover {
  color: var(--color-accent);
}

/* Gear recommendation card */
.gear-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  align-items: center;
}
.gear-card:last-child {
  margin-bottom: 0;
}
.gear-card-image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.gear-card-info {
  flex: 1;
  min-width: 0;
}
.gear-card-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}
.gear-card-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Category nav in sidebar */
.sidebar-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-cat-list li {
  margin-bottom: var(--space-1);
}
.sidebar-cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.sidebar-cat-list a:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-sidebar-item);
}
.sidebar-cat-list .cat-count {
  font-size: var(--text-xs);
  color: var(--color-text-placeholder);
  background: var(--color-bg-sidebar-item);
  padding: 1px 8px;
  border-radius: 999px;
}

/* ============================================================
   ARCHIVE / CATEGORY PAGE
   ============================================================ */
.archive-header {
  padding: var(--space-16) 0 var(--space-10);
  text-align: center;
}

.archive-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.archive-description {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-12) 0 var(--space-8);
  margin-top: var(--space-16);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
}
.footer-nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--color-accent);
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--color-text-placeholder);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 {
  text-align: center;
  padding: var(--space-20) 0;
}
.error-404 h1 {
  font-size: 6rem;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}
.pagination a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-bg-tag);
}
.pagination .current {
  background: var(--color-accent);
  color: var(--color-bg-base);
  border-color: var(--color-accent);
  font-weight: 600;
}

/* ============================================================
   AUTHOR BOX
   ============================================================ */
.author-box {
  margin-top: var(--space-10);
}
.author-box-inner {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}
.author-avatar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
}
.author-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}
.author-name a {
  color: inherit;
  text-decoration: none;
}
.author-name a:hover {
  color: var(--color-accent);
}
.author-bio {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .author-box-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ============================================================
   COOKIE CONSENT
   ============================================================ */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6);
}
.cookie-consent-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.cookie-consent-text {
  font-size: var(--text-sm);
  color: var(--color-text-body);
  margin: 0;
  line-height: var(--leading-normal);
}
.cookie-consent-text a {
  color: var(--color-accent);
  text-decoration: underline;
}
.cookie-consent-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}
.cookie-btn {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.cookie-btn-accept {
  background: var(--color-accent);
  color: var(--color-bg-base);
  box-shadow: var(--shadow-button-inset);
}
.cookie-btn-accept:hover {
  background: var(--color-accent-hover);
}
.cookie-btn-decline {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.cookie-btn-decline:hover {
  border-color: var(--color-border-hover);
  color: var(--color-text-body);
}

/* ============================================================
   UTILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .content-area {
    grid-template-columns: 1fr;
  }
  .content-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

@media (max-width: 768px) {
  :root {
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
    --text-2xl: 1.5rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .main-nav {
    display: none;
  }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg-base);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4);
    gap: var(--space-1);
  }

  .menu-toggle {
    display: block;
  }

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

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-sidebar {
    grid-template-columns: 1fr;
  }

  .post-navigation {
    flex-direction: column;
  }
}

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

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
}
