/* Russell Research Lab — shared site styles.
 * Per-page <style> blocks handle layout-specific rules; this file
 * handles tokens, typography, nav, page header, fade-in system, footer. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #06080f;
  --bg-secondary: #0b0f1a;
  --bg-card: #0f1424;
  --bg-card-hover: #141a30;
  --accent: #2d5fce;
  --accent-light: #4b7ff5;
  --accent-subtle: #1a2d5a;
  --text-primary: #e8ecf4;
  --text-secondary: #8a94a8;
  --text-muted: #505a6e;
  --border: #1a2035;
  --border-light: #253050;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg-primary); color: var(--text-primary); line-height: 1.7; overflow-x: hidden; }
::selection { background: var(--accent); color: white; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-subtle); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── NAV ────────────────────────────────────────────── */
.nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); background: rgba(6,8,15,0.92); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.nav-inner { width: 100%; max-width: var(--max-width); padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; color: var(--text-primary); }
.nav-logo img { width: 36px; height: 36px; }
.nav-logo-text { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.nav-logo-text span { color: var(--accent-light); }
.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.88rem; font-weight: 400; padding: 0.5rem 1rem; border-radius: 6px; transition: all 0.25s ease; }
.nav-links a:hover { color: var(--text-primary); background: rgba(45,95,206,0.1); }
.nav-links a.active { color: var(--text-primary); background: rgba(45,95,206,0.12); }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

/* ── PAGE HEADER ────────────────────────────────────── */
.page-header { padding: calc(var(--nav-height) + 4rem) 2rem 4rem; background: var(--bg-secondary); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.page-header::before { content: ''; position: absolute; top: -30%; right: -5%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(45,95,206,0.08) 0%, transparent 70%); }
.page-header-inner { max-width: var(--max-width); margin: 0 auto; position: relative; z-index: 1; }
.section-label { font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent-light); font-weight: 500; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem; }
.section-label::before { content: ''; width: 24px; height: 1px; background: var(--accent); }
.page-title { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 600; line-height: 1.1; margin-bottom: 1.25rem; }
.page-subtitle { color: var(--text-secondary); font-size: 1.05rem; max-width: 620px; line-height: 1.8; }

/* ── LAYOUT + BUTTONS ───────────────────────────────── */
.main { max-width: var(--max-width); margin: 0 auto; padding: 5rem 2rem; }
.btn { display: inline-block; padding: 0.75rem 1.75rem; border-radius: 8px; font-size: 0.9rem; font-weight: 500; text-decoration: none; transition: all 0.25s ease; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--border-light); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-light); transform: translateY(-2px); }

/* ── FOOTER ─────────────────────────────────────────── */
.footer { padding: 2.5rem 2rem; text-align: center; border-top: 1px solid var(--border); margin-top: 5rem; }
.footer-text { font-size: 0.82rem; color: var(--text-muted); }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-top: 0.75rem; }
.footer-links a { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-light); }

/* ── FADE-IN / STAGGER ──────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(28px); transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ── MEDIA: nav collapse ────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-links.show { display: flex; flex-direction: column; position: fixed; top: var(--nav-height); left: 0; right: 0; background: rgba(6,8,15,0.97); padding: 1rem; border-bottom: 1px solid var(--border); }
}
