/* ============================================
   Programmer-Art.org — Design System
   ============================================ */

:root {
  /* Color palette */
  --bg-0: #0a0e1a;
  --bg-1: #0f1424;
  --bg-2: #151b2f;
  --bg-3: #1d2540;
  --surface: rgba(29, 37, 64, 0.6);
  --surface-hover: rgba(42, 52, 82, 0.7);
  --border: rgba(100, 116, 168, 0.15);
  --border-strong: rgba(100, 116, 168, 0.3);

  /* Accent colors */
  --accent-cyan: #22d3ee;
  --accent-cyan-dim: #0891b2;
  --accent-purple: #a78bfa;
  --accent-purple-dim: #7c3aed;
  --accent-pink: #f472b6;
  --accent-green: #4ade80;
  --accent-amber: #fbbf24;
  --accent-red: #f87171;

  /* Text */
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a0e1a;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;

  /* Spacing system (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-20: 5rem;
  --s-24: 6rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 800px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.15);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur-med: 250ms;
  --dur-slow: 400ms;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-0);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background grid pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(100, 116, 168, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 168, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at top, rgba(34, 211, 238, 0.06), transparent 50%),
              radial-gradient(ellipse at bottom right, rgba(167, 139, 250, 0.05), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: var(--s-4); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: var(--s-3); }
h4 { font-size: 1.125rem; margin-bottom: var(--s-2); }

p {
  color: var(--text-secondary);
  margin-bottom: var(--s-4);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

a:hover {
  color: var(--accent-cyan-dim);
}

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

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-4) var(--s-5);
  overflow-x: auto;
  margin-bottom: var(--s-6);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

ul, ol {
  color: var(--text-secondary);
  margin-bottom: var(--s-6);
  padding-left: var(--s-6);
}

li {
  margin-bottom: var(--s-2);
}

li::marker {
  color: var(--accent-cyan);
}

blockquote {
  border-left: 3px solid var(--accent-purple);
  padding: var(--s-3) var(--s-5);
  margin: var(--s-6) 0;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--s-12) 0;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
  position: relative;
  z-index: 1;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--s-5);
  position: relative;
  z-index: 1;
}

/* Header & navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.4));
  transition: filter 0.2s ease;
}
.logo:hover .logo-icon img {
  filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.6));
}

.logo:hover {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--s-2) 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 1px;
}

/* Nav dropdowns */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  padding: var(--s-2) 0;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: var(--s-1);
}

.nav-dropdown-toggle:hover {
  color: var(--text-primary);
}

.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 0.7rem;
  margin-top: 1px;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 240px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-2);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--dur-fast) var(--ease);
  box-shadow: var(--shadow-lg);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu li {
  margin: 0;
}

.nav-dropdown-menu a {
  display: block;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.nav-dropdown-menu a:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--s-2);
}

/* Hero section */
.hero {
  padding: var(--s-20) 0 var(--s-16);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--s-12);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: var(--s-5);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 2s infinite;
}

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

.hero h1 {
  margin-bottom: var(--s-5);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--s-8);
  max-width: 520px;
}

.hero-cta {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 14, 26, 0.1), rgba(10, 14, 26, 0.4));
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan-dim), var(--accent-purple-dim));
  color: white;
  border-color: transparent;
}

.btn-primary:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-cyan-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.btn-sm {
  padding: var(--s-2) var(--s-4);
  font-size: 0.8rem;
}

.btn-lg {
  padding: var(--s-4) var(--s-6);
  font-size: 1rem;
}

/* Section components */
.section {
  padding: var(--s-20) 0;
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: var(--s-3);
}

.section-header {
  margin-bottom: var(--s-12);
  text-align: center;
}

.section-header p {
  max-width: 620px;
  margin: var(--s-4) auto 0;
  font-size: 1.05rem;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  transition: all var(--dur-med) var(--ease);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan-dim), transparent);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

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

.card h3 {
  margin-bottom: var(--s-3);
}

.card p {
  margin-bottom: 0;
  font-size: 0.925rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(167, 139, 250, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-4);
  font-size: 1.25rem;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-6);
}

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

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-12);
  align-items: center;
}

.two-col.reverse .col-text {
  order: 2;
}

.two-col.reverse .col-image {
  order: 1;
}

.col-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.col-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Feature list */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list .check {
  color: var(--accent-green);
  flex-shrink: 0;
  margin-top: 2px;
  font-weight: bold;
}

.feature-list strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--s-1);
}

.feature-list p {
  margin: 0;
  font-size: 0.9rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: var(--s-6) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-2);
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-display);
}

td {
  color: var(--text-secondary);
}

tr:hover td {
  background: var(--surface);
}

/* Callout */
.callout {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  margin: var(--s-6) 0;
}

.callout-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-content {
  flex: 1;
}

.callout-content strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--s-1);
}

.callout-content p {
  margin: 0;
  font-size: 0.9rem;
}

.callout.info { border-left-color: var(--accent-cyan); }
.callout.tip { border-left-color: var(--accent-green); }
.callout.warning { border-left-color: var(--accent-amber); }
.callout.danger { border-left-color: var(--accent-red); }

/* FAQ accordion */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--s-3);
  background: var(--surface);
  overflow: hidden;
}

.faq-item summary {
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--dur-fast) var(--ease);
}

.faq-item summary:hover {
  background: var(--surface-hover);
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--accent-cyan);
  font-weight: 300;
  transition: transform var(--dur-fast) var(--ease);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item .faq-body {
  padding: 0 var(--s-5) var(--s-4);
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.65;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 500;
  border-radius: 100px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.tag-purple {
  background: rgba(167, 139, 250, 0.1);
  color: var(--accent-purple);
  border-color: rgba(167, 139, 250, 0.2);
}

.tag-green {
  background: rgba(74, 222, 128, 0.1);
  color: var(--accent-green);
  border-color: rgba(74, 222, 128, 0.2);
}

.tag-amber {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent-amber);
  border-color: rgba(251, 191, 36, 0.2);
}

.tag-pink {
  background: rgba(244, 114, 182, 0.1);
  color: var(--accent-pink);
  border-color: rgba(244, 114, 182, 0.2);
}

/* Forms */
.form-group {
  margin-bottom: var(--s-5);
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-cyan-dim);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--s-2);
}

.form-error {
  font-size: 0.8rem;
  color: var(--accent-red);
  margin-top: var(--s-2);
  display: none;
}

.form-group.error input,
.form-group.error textarea {
  border-color: var(--accent-red);
}

.form-group.error .form-error {
  display: block;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.825rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: var(--s-6);
  padding: var(--s-3) 0;
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--accent-cyan);
}

.breadcrumbs span {
  margin: 0 var(--s-2);
  color: var(--text-muted);
}

/* Page header */
.page-header {
  padding: var(--s-16) 0 var(--s-10);
  position: relative;
}

.page-header h1 {
  margin-bottom: var(--s-4);
}

.page-header .subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 640px;
}

.page-meta {
  display: flex;
  gap: var(--s-6);
  margin-top: var(--s-6);
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.page-meta span strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Content article */
.content-article {
  padding: 0 0 var(--s-20);
}

.content-article h2 {
  margin-top: var(--s-12);
  padding-top: var(--s-2);
}

.content-article h3 {
  margin-top: var(--s-8);
}

.content-article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin: var(--s-6) 0;
}

/* CTA section */
.cta-section {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(8, 145, 178, 0.1));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: var(--s-12);
  text-align: center;
  margin: var(--s-16) 0;
}

.cta-section h2 {
  margin-bottom: var(--s-3);
}

.cta-section p {
  max-width: 520px;
  margin: 0 auto var(--s-6);
}

/* Footer */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: var(--s-16) 0 var(--s-8);
  position: relative;
  z-index: 1;
}

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

.footer-brand p {
  font-size: 0.9rem;
  margin-top: var(--s-3);
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--s-4);
  font-family: var(--font-mono);
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: var(--s-2);
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
  font-size: 0.825rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: var(--s-3);
}

.footer-bottom-links {
  display: flex;
  gap: var(--s-5);
}

.footer-bottom-links a {
  color: var(--text-muted);
}

.footer-bottom-links a:hover {
  color: var(--text-secondary);
}

/* 404 page */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s-16) 0;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--s-4);
}

.error-page h1 {
  margin-bottom: var(--s-4);
}

.error-page p {
  max-width: 480px;
  margin: 0 auto var(--s-8);
}

/* Step list */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: var(--s-5);
  padding: var(--s-4) 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.steps li:last-child {
  border-bottom: none;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(167, 139, 250, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
  font-size: 0.9rem;
}

.steps h4 {
  color: var(--text-primary);
  margin-bottom: var(--s-1);
}

.steps p {
  margin: 0;
  font-size: 0.925rem;
}

/* Tool cards directory */
.tool-card {
  display: flex;
  gap: var(--s-5);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--dur-fast) var(--ease);
}

.tool-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.tool-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid var(--border);
}

.tool-info h3 {
  font-size: 1rem;
  margin-bottom: var(--s-1);
}

.tool-info p {
  font-size: 0.875rem;
  margin-bottom: var(--s-2);
}

.tool-tags {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

/* Glossary */
.glossary-item {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--border);
}

.glossary-item:last-child {
  border-bottom: none;
}

.glossary-term {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
}

.glossary-term span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 400;
  margin-left: var(--s-3);
}

.glossary-def {
  color: var(--text-secondary);
  font-size: 0.925rem;
  margin: 0;
}

/* Showcases */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-6);
}

.showcase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--dur-med) var(--ease);
}

.showcase-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.showcase-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  overflow: hidden;
}

.showcase-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-body {
  padding: var(--s-5);
}

.showcase-body h3 {
  font-size: 1rem;
  margin-bottom: var(--s-2);
}

.showcase-body p {
  font-size: 0.85rem;
  margin-bottom: var(--s-3);
}

/* Comparison / before-after */
.compare-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  margin: var(--s-6) 0;
}

.compare-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.compare-label {
  padding: var(--s-3) var(--s-4);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.compare-label.before { color: var(--accent-red); }
.compare-label.after { color: var(--accent-green); }

.compare-box img {
  width: 100%;
  height: auto;
  display: block;
}

/* Topic cluster / sitemap */
.topic-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-6);
}

.topic-group h3 {
  font-size: 1rem;
  margin-bottom: var(--s-3);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.topic-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.topic-group li {
  margin-bottom: var(--s-2);
  padding-left: var(--s-3);
  border-left: 2px solid var(--border);
  font-size: 0.9rem;
}

.topic-group li:hover {
  border-left-color: var(--accent-cyan);
}

/* Focus states */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Selection */
::selection {
  background: rgba(167, 139, 250, 0.3);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: 5px;
  border: 2px solid var(--bg-0);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--s-10);
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: var(--s-8);
  }

  .two-col.reverse .col-text {
    order: 1;
  }

  .two-col.reverse .col-image {
    order: 2;
  }

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

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

  .compare-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    padding: var(--s-4) var(--s-5);
    gap: var(--s-3);
    align-items: flex-start;
  }

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

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: var(--s-4);
    min-width: 0;
  }

  .nav-dropdown-toggle {
    display: none;
  }

  .hero {
    padding: var(--s-12) 0 var(--s-10);
  }

  .section {
    padding: var(--s-12) 0;
  }

  .cta-section {
    padding: var(--s-8) var(--s-5);
  }

  .card-grid.cols-3,
  .card-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--s-8);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .tool-card {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

/* Print */
@media print {
  body::before, body::after { display: none; }
  .site-header, .site-footer, .hero-cta, .cta-section { display: none; }
  body { background: white; color: black; }
}
