:root {
  --primary: #d97706;
  --accent: #ea580c;
  --primary-rgb: 217, 119, 6;
  --accent-rgb: 234, 88, 12;
}
:root.dark {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #334155;
}
:root.light {
  --bg: #ffffff;
  --surface: #f8fafc;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); transition: background 0.3s, color 0.3s; }
h1, h2, h3, h4 { font-family: 'Inter', sans-serif; font-weight: 800; letter-spacing: -0.02em; }
code, pre { font-family: 'JetBrains Mono', monospace; }
.navbar { backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 80%, transparent); border-bottom: 1px solid var(--border); }
.hero-bg { background: radial-gradient(ellipse at top, rgba(var(--primary-rgb), 0.15), transparent 50%), radial-gradient(ellipse at bottom right, rgba(var(--accent-rgb), 0.1), transparent 50%); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); z-index: 100; transition: width 0.1s; }
.prose-content { max-width: 760px; margin: 0 auto; line-height: 1.75; }
.prose-content p { margin-bottom: 1.25rem; }
.prose-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.5rem; }
.prose-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.25rem; }
.prose-content ul, .prose-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.prose-content li { margin-bottom: 0.5rem; }
.prose-content code { background: var(--surface); padding: 0.15rem 0.4rem; border-radius: 0.25rem; font-size: 0.875rem; }
.ref-section { background: var(--surface); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.5rem; margin-top: 2.5rem; }
.ref-section a { color: var(--primary); text-decoration: none; }
.ref-section a:hover { text-decoration: underline; }
.btn-primary { background: var(--primary); color: white; padding: 0.75rem 1.5rem; border-radius: 0.75rem; font-weight: 600; transition: opacity 0.2s; }
.btn-primary:hover { opacity: 0.9; }
.tag { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; background: rgba(var(--primary-rgb), 0.1); color: var(--primary); }
@media (max-width: 768px) { .toc-sidebar { display: none; } }