/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color system */
  --brand-hue: 220;
  --brand-sat: 70%;
  --brand-50: hsl(var(--brand-hue), var(--brand-sat), 97%);
  --brand-100: hsl(var(--brand-hue), var(--brand-sat), 93%);
  --brand-200: hsl(var(--brand-hue), var(--brand-sat), 85%);
  --brand-300: hsl(var(--brand-hue), var(--brand-sat), 73%);
  --brand-400: hsl(var(--brand-hue), var(--brand-sat), 58%);
  --brand-500: hsl(var(--brand-hue), var(--brand-sat), 48%);
  --brand-600: hsl(var(--brand-hue), var(--brand-sat), 40%);
  --brand-700: hsl(var(--brand-hue), var(--brand-sat), 33%);
  --brand-800: hsl(var(--brand-hue), var(--brand-sat), 26%);
  --brand-900: hsl(var(--brand-hue), var(--brand-sat), 18%);

  --accent-hue: 160;
  --accent-sat: 65%;
  --accent-400: hsl(var(--accent-hue), var(--accent-sat), 50%);
  --accent-500: hsl(var(--accent-hue), var(--accent-sat), 42%);
  --accent-600: hsl(var(--accent-hue), var(--accent-sat), 35%);

  --neutral-50: #f8f9fa;
  --neutral-100: #e9ecef;
  --neutral-200: #dee2e6;
  --neutral-300: #ced4da;
  --neutral-400: #adb5bd;
  --neutral-500: #6c757d;
  --neutral-600: #495057;
  --neutral-700: #343a40;
  --neutral-800: #212529;
  --neutral-900: #0f1115;

  /* Semantic */
  --bg-primary: var(--neutral-50);
  --bg-secondary: #ffffff;
  --bg-tertiary: var(--brand-50);
  --text-primary: var(--neutral-800);
  --text-secondary: var(--neutral-600);
  --text-tertiary: var(--neutral-400);
  --border-color: var(--neutral-200);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);

  /* Typography */
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --font-display: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-width: 1200px;
  --content-width: 720px;
  --nav-height: 64px;
}

/* Dark mode */
[data-theme="dark"] {
  --bg-primary: var(--neutral-900);
  --bg-secondary: var(--neutral-800);
  --bg-tertiary: #1a1d23;
  --text-primary: var(--neutral-100);
  --text-secondary: var(--neutral-400);
  --text-tertiary: var(--neutral-500);
  --border-color: var(--neutral-700);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: background var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand-500);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--brand-600); }

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

/* ===== Utility ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

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

/* ===== Gradient Text ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--brand-400), var(--accent-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: background var(--transition-base), border-color var(--transition-base);
}

[data-theme="dark"] .navbar {
  background: rgba(15, 17, 21, 0.85);
  border-bottom-color: var(--border-color);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.navbar-logo .logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--brand-400), var(--accent-400));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 700;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
}

.navbar-links a {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--brand-500);
  background: var(--brand-50);
}

[data-theme="dark"] .navbar-links a:hover,
[data-theme="dark"] .navbar-links a.active {
  background: rgba(59, 130, 246, 0.1);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--brand-400);
  color: var(--brand-500);
  background: var(--brand-50);
}

[data-theme="dark"] .theme-toggle:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
}

/* Mobile nav */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md);
    gap: var(--space-xs);
    box-shadow: var(--shadow-lg);
  }

  .navbar-links.open {
    display: flex;
  }

  .navbar-links a {
    width: 100%;
    padding: var(--space-md);
  }

  .mobile-menu-btn {
    display: flex;
  }
}

/* ===== Hero Section ===== */
.hero {
  padding: calc(var(--nav-height) + var(--space-4xl)) 0 var(--space-4xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 50% 40%,
    hsla(var(--brand-hue), var(--brand-sat), 70%, 0.08) 0%,
    transparent 60%
  ),
  radial-gradient(
    circle at 80% 60%,
    hsla(var(--accent-hue), var(--accent-sat), 60%, 0.06) 0%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-lg);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brand-600);
  margin-bottom: var(--space-xl);
}

[data-theme="dark"] .hero-badge {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-500));
  color: white;
  box-shadow: 0 4px 14px hsla(var(--brand-hue), var(--brand-sat), 48%, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px hsla(var(--brand-hue), var(--brand-sat), 48%, 0.4);
  color: white;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--brand-400);
  color: var(--brand-500);
  background: var(--brand-50);
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(59, 130, 246, 0.08);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ===== Section ===== */
.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Feature Cards ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-200);
}

[data-theme="dark"] .feature-card:hover {
  border-color: var(--brand-700);
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
  color: var(--brand-500);
}

[data-theme="dark"] .feature-card .icon {
  background: rgba(59, 130, 246, 0.1);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Content Cards (Blog/Post previews) ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.content-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-200);
}

[data-theme="dark"] .content-card:hover {
  border-color: var(--brand-700);
}

.content-card .card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brand-200), var(--accent-400));
}

.content-card .card-body {
  padding: var(--space-lg);
}

.content-card .card-tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--brand-50);
  color: var(--brand-600);
  margin-bottom: var(--space-sm);
}

[data-theme="dark"] .content-card .card-tag {
  background: rgba(59, 130, 246, 0.1);
}

.content-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
  color: var(--text-primary);
}

.content-card h3 a {
  color: inherit;
}
.content-card h3 a:hover { color: var(--brand-500); }

.content-card .card-meta {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.content-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Pricing / Cloud Server Cards ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  align-items: start;
}

.pricing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  position: relative;
  transition: all var(--transition-base);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 1px var(--brand-400), var(--shadow-md);
}

.pricing-card .popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 1rem;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-500));
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xs);
}

.pricing-card .price .currency {
  font-size: 1.2rem;
  font-weight: 600;
  vertical-align: super;
}

.pricing-card .price-period {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
}

.pricing-card .features {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-xl);
}

.pricing-card .features li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pricing-card .features li::before {
  content: '✓';
  color: var(--accent-400);
  font-weight: 700;
}

/* ===== Page Header ===== */
.page-header {
  padding: calc(var(--nav-height) + var(--space-3xl)) 0 var(--space-2xl);
  text-align: center;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Article / Doc Content ===== */
.article-content {
  padding: var(--space-3xl) 0;
}

.article-content .content-narrow {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: var(--space-2xl) 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: var(--space-xl) 0 var(--space-sm);
}

.article-content p {
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

.article-content ul, .article-content ol {
  margin: 0 0 var(--space-lg) var(--space-lg);
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: var(--space-sm);
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.2em 0.4em;
  background: var(--brand-50);
  border-radius: var(--radius-sm);
  color: var(--brand-600);
}

[data-theme="dark"] .article-content code {
  background: rgba(59, 130, 246, 0.1);
}

.article-content pre {
  background: var(--neutral-800);
  color: var(--neutral-100);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  line-height: 1.6;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.article-content blockquote {
  border-left: 3px solid var(--brand-400);
  padding: var(--space-md) var(--space-lg);
  margin: 0 0 var(--space-lg);
  background: var(--bg-tertiary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-tertiary);
  font-size: 0.88rem;
}

/* ===== Table of Contents ===== */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.toc-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.toc ol {
  list-style: none;
  margin: 0;
}

.toc ol li {
  margin-bottom: 0.25rem;
}

.toc ol li a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
  display: block;
}

.toc ol li a:hover { color: var(--brand-500); }

/* ===== Sidebar Layout (for Docs) ===== */
.doc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-3xl);
  padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-3xl);
}

.doc-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-xl));
  max-height: calc(100vh - var(--nav-height) - var(--space-3xl));
  overflow-y: auto;
}

.doc-sidebar nav ul {
  list-style: none;
}

.doc-sidebar nav ul li {
  margin-bottom: 0.15rem;
}

.doc-sidebar nav ul li a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.doc-sidebar nav ul li a:hover,
.doc-sidebar nav ul li a.active {
  color: var(--brand-500);
  background: var(--brand-50);
}

[data-theme="dark"] .doc-sidebar nav ul li a:hover,
[data-theme="dark"] .doc-sidebar nav ul li a.active {
  background: rgba(59, 130, 246, 0.08);
}

.doc-sidebar .sidebar-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: var(--space-md) 0.75rem var(--space-xs);
}

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

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: var(--space-md);
  max-width: 300px;
  line-height: 1.7;
}

.footer h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: var(--space-sm);
}

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

.footer ul li a:hover { color: var(--brand-500); }

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
}

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

/* ===== Stats / Numbers ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-xl);
  text-align: center;
}

.stat-item .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-400), var(--accent-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.stat-item .stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--brand-800), var(--brand-900));
  color: white;
  text-align: center;
  padding: var(--space-4xl) 0;
}

.cta-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: white;
}

.cta-section p {
  font-size: 1.05rem;
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}

.cta-section .btn-primary {
  background: white;
  color: var(--brand-800);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.cta-section .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  color: var(--brand-800);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.stagger-children > * {
  animation: fadeInUp 0.5s ease-out both;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.10s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.30s; }

/* ===== Tags / Search ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.tag {
  display: inline-flex;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag:hover, .tag.active {
  background: var(--brand-500);
  color: white;
  border-color: var(--brand-500);
}

/* ===== Search Bar ===== */
.search-bar {
  position: relative;
  max-width: 400px;
  margin: 0 auto var(--space-2xl);
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
  outline: none;
}

.search-bar input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px hsla(var(--brand-hue), var(--brand-sat), 48%, 0.15);
}

.search-bar .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 1rem;
}

/* ===== Loading / Empty States ===== */
.empty-state {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-tertiary);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-400);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--neutral-600);
}

/* ===== Print ===== */
@media print {
  .navbar, .footer, .theme-toggle, .mobile-menu-btn { display: none; }
  body { background: white; color: black; }
}
