/* Static article pages (dist/articles/). Mirrors the tokens of src/index.css's dark studio theme;
   the SPA stylesheet is hashed by Vite, so these pages carry their own small copy. */
:root {
  color-scheme: dark;
  --bg: #08090c;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f6;
  --text-2: #d3d4da;
  --muted: #9a9ca8;
  --accent: #ff6b3d;
  --grad-brand: linear-gradient(135deg, #ff6b3d 0%, #ff9640 55%, #ffd166 100%);
  --font-display: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --accent-proj: #ff6b3d;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% -10%, color-mix(in srgb, var(--accent-proj) 22%, transparent), transparent 70%),
    radial-gradient(700px 500px at 100% 10%, rgba(139, 92, 246, 0.14), transparent 70%);
}

/* Top bar (same look as the SPA) */
.topbar-wrap { position: sticky; top: 0; z-index: 50; padding: 16px 0 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 20px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(13, 15, 20, 0.72); backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.brand-mark { display: inline-flex; }
.brand-logo { width: 150px; height: auto; filter: invert(1) brightness(1.1); }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav > a, .nav-drop-btn {
  padding: 9px 14px; border-radius: 999px; color: var(--muted); font: 500 0.93rem var(--font-body);
  background: none; border: 0; cursor: pointer; transition: color 180ms, background 180ms;
}
.topnav > a:hover, .nav-drop-btn:hover, .nav-drop:focus-within .nav-drop-btn { color: var(--text); background: var(--surface-2); }
.topnav a.nav-cta { margin-left: 6px; color: #120a06; background: var(--grad-brand); font-weight: 700; }

.nav-drop { position: relative; }
.nav-drop-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; padding: 8px;
  display: grid; gap: 2px; border: 1px solid var(--line-strong); border-radius: 18px;
  background: rgba(16, 18, 24, 0.97); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 160ms, transform 160ms, visibility 160ms;
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { opacity: 1; visibility: visible; transform: none; }
.nav-drop-menu a { padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-size: 0.92rem; }
.nav-drop-menu a:hover { background: var(--surface-2); color: var(--text); }
.nav-drop-menu .nav-drop-all { border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; color: var(--accent); }

/* Breadcrumbs, chips, buttons */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 20px; color: var(--muted); font-size: 0.88rem; }
.crumbs a:hover { color: var(--text); }
.chip {
  display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.02em; color: var(--accent-proj); background: color-mix(in srgb, var(--accent-proj) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-proj) 30%, transparent);
}
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; }
.btn-primary { color: #120a06; background: var(--grad-brand); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Article */
.article-wrap { max-width: 820px; }
.article-head h1, .hub-head h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.08;
  font-size: clamp(2rem, 5vw, 3.1rem); margin: 14px 0 14px;
}
.lede { color: var(--text-2); font-size: 1.15rem; margin: 0 0 12px; }
.meta { color: var(--muted); font-size: 0.88rem; margin: 0; }
.hero { margin: 28px 0 8px; }
.hero img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; border: 1px solid var(--line); }
.prose { font-size: 1.07rem; color: var(--text-2); }
.prose h2 { font-family: var(--font-display); color: var(--text); font-size: 1.6rem; letter-spacing: -0.015em; line-height: 1.2; margin: 2.2em 0 0.6em; }
.prose h3 { color: var(--text); font-size: 1.18rem; margin: 1.6em 0 0.4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin: 0.35em 0; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent-proj); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent-proj); color: var(--text); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 10px; border: 1px solid var(--line-strong); text-align: left; }
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  margin: 44px 0 0; padding: 24px; border-radius: 22px; border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-proj) 16%, transparent), var(--surface));
}
.cta strong { font-family: var(--font-display); font-size: 1.25rem; }
.cta p { margin: 4px 0 0; color: var(--text-2); }

/* Cards / grids */
.related { margin: 64px 0 0; }
.related h2, .hub-section-head h2 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.015em; margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 20px;
  border: 1px solid var(--line); background: var(--surface); transition: transform 200ms, border-color 200ms;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.card img, .card-noimg { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.card-noimg { background: linear-gradient(135deg, color-mix(in srgb, var(--accent-proj) 30%, transparent), #12141a); }
.card-body { padding: 16px 18px 20px; }
.card h3 { font-size: 1.05rem; line-height: 1.3; margin: 10px 0 6px; color: var(--text); }
.card p { margin: 0; font-size: 0.9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card[hidden] { display: none; }
.hub-link { margin: 22px 0 0; }
.hub-link a, .hub-section-head a { color: var(--accent-proj); font-weight: 600; }

/* Hubs */
.hub-head { max-width: 760px; margin-bottom: 26px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.filters button {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: none;
  color: var(--muted); font: 500 0.88rem var(--font-body); cursor: pointer;
}
.filters button.on, .filters button:hover { color: var(--text); background: var(--surface-2); }
.hub-section { margin: 48px 0 0; }
.hub-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.footer { margin-top: 96px; padding: 36px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 18px; }
.footer a:hover { color: var(--text); }

@media (max-width: 640px) {
  .topbar-wrap { padding-top: 10px; }
  .topbar { padding: 8px 8px 8px 14px; border-radius: 22px; }
  .brand-logo { width: 112px; }
  .nav-hide-sm { display: none; }
  .topnav > a, .nav-drop-btn { padding: 8px 10px; font-size: 0.88rem; }
  .nav-drop-menu { right: -60px; min-width: 230px; }
  .crumbs { margin-top: 24px; }
  .prose { font-size: 1.02rem; }
  .cta { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .card, .nav-drop-menu { transition: none; } }
