/* ═══════════════════════════════════════════════════════
   Prospect Card Radar — Shared Design System
   Single source of truth for tokens, nav, typography,
   forms, cards, buttons, and footer across all pages.
   ═══════════════════════════════════════════════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --background: #0a0a0b;
    --card: #141416;
    --card-hover: #1c1c1f;
    --popover: #141416;
    --muted: #1c1c1f;
    --muted-fg: #9ca3af;
    --border: #232326;
    --input: #1c1c1f;
    --ring: #f97316;
    --foreground: #f5f5f5;
    --primary: #f97316;
    --primary-hover: #ea580c;
    --primary-fg: #fff;
    --secondary: #1c1c1f;
    --secondary-fg: #f5f5f5;
    --accent: #1c1c1f;
    --accent-fg: #f5f5f5;
    --destructive: #ef4444;
    --success: #22c55e;
    --success-bg: rgba(34,197,94,0.1);
    --purple: #a855f7;
    --purple-bg: rgba(168,85,247,0.1);
    --blue: #3b82f6;
    --blue-bg: rgba(59,130,246,0.1);
    --amber: #f59e0b;
    --amber-bg: rgba(245,158,11,0.1);
    --stripe: rgba(255,255,255,0.02);
    --input-fill: #141416;
    --radius: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-sm: 0.25rem;
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

body.light-mode {
    --background: #fafafa;
    --card: #ffffff;
    --card-hover: #f5f5f5;
    --popover: #ffffff;
    --muted: #f5f5f5;
    --muted-fg: #6b7280;
    --border: #e5e7eb;
    --input: #f5f5f5;
    --foreground: #0a0a0b;
    --secondary: #f5f5f5;
    --secondary-fg: #0a0a0b;
    --accent: #f5f5f5;
    --accent-fg: #0a0a0b;
    --success-bg: rgba(34,197,94,0.08);
    --purple-bg: rgba(168,85,247,0.08);
    --blue-bg: rgba(59,130,246,0.08);
    --amber-bg: rgba(245,158,11,0.08);
    --stripe: rgba(0,0,0,0.02);
    --input-fill: #ffffff;
}

/* ═══ Typography ═══ */
body {
    font-family: var(--font-mono);
    background-color: var(--background); color: var(--foreground);
    line-height: 1.5; transition: background-color 0.2s, color 0.2s;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    letter-spacing: -0.01em;
    font-size: 0.875rem;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); }

/* ═══ Layout ═══ */
.container { max-width: 1200px; margin: 0 auto; padding: 12px; overflow-x: hidden; }

/* ═══ Header / Site Top ═══ */
.site-top {
    position: sticky; top: 0; z-index: 50;
    background: var(--background);
    max-width: 1200px; margin: 0 auto; padding: 0 12px;
}
.site-top.scrolled { box-shadow: none; }
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0 8px; gap: 10px;
}
.site-top.scrolled header { padding: 0; max-height: 0; overflow: hidden; }
.site-top.scrolled .logo-lockup { opacity: 0; max-height: 0; margin: 0; overflow: hidden; }
.scrolled-brand {
    display: none; font-size: 0.85rem; font-weight: 700; color: var(--foreground);
    white-space: nowrap; letter-spacing: -0.02em; font-family: var(--font-display);
    margin-right: 4px;
}
.scrolled-brand span { color: var(--primary); }
.site-top.scrolled .scrolled-brand { display: block; }
.logo-lockup { opacity: 1; max-height: 80px; display: flex; align-items: center; gap: 12px; }
.logo-icon { flex-shrink: 0; }
.header-content { flex: 1; min-width: 0; }
h1 { font-family: var(--font-display); font-size: clamp(1.3rem, 3.5vw, 1.85rem); font-weight: 700; letter-spacing: -0.03em; color: var(--foreground); line-height: 1.2; }
.brand-accent { color: var(--primary); }
.subtitle { font-family: var(--font-mono); font-size: clamp(0.65rem, 1.6vw, 0.8rem); color: var(--muted-fg); font-weight: 400; margin-top: 1px; }

/* ═══ Nav Icons ═══ */
.nav-icons { display: flex; margin-left: auto; flex-shrink: 0; gap: 6px; align-items: center; }
.nav-icon-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    background-color: var(--secondary); border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer; color: var(--foreground);
    transition: background-color 0.15s, border-color 0.15s; padding: 0; text-decoration: none; flex-shrink: 0;
}
.nav-icon-btn svg { width: 20px; height: 20px; }
.nav-icon-btn:hover { background-color: var(--accent); border-color: var(--muted-fg); }
.site-top.scrolled .nav-icon-btn { width: 32px; height: 32px; }
.site-top.scrolled .nav-icon-btn svg { width: 18px; height: 18px; }

/* ═══ Theme Toggle ═══ */
.theme-icon { transition: transform 0.3s, opacity 0.2s; }
body.light-mode .sun-icon { display: none; }
body.light-mode .moon-icon { display: block; }
.sun-icon { display: block; }
.moon-icon { display: none; }
.nav-icon-btn:hover .theme-icon { transform: rotate(15deg); }

/* ═══ Section Nav Tabs ═══ */
.section-nav {
    border-bottom: 1px solid var(--border);
    padding: 8px 0; margin-bottom: 12px;
    display: flex; align-items: center; gap: 4px;
    flex-wrap: nowrap; position: relative;
}
/* Hamburger button — hidden on desktop, shown on mobile */
.nav-hamburger {
    display: none; width: 36px; height: 36px; align-items: center; justify-content: center;
    background: var(--secondary); border: 1px solid var(--border); border-radius: var(--radius);
    cursor: pointer; color: var(--foreground); padding: 0; flex-shrink: 0;
    transition: background-color 0.15s;
}
.nav-hamburger svg { width: 20px; height: 20px; }
.nav-hamburger:hover { background: var(--accent); }
.nav-hamburger.open { background: var(--accent); border-color: var(--muted-fg); }
/* Nav links wrapper */
.nav-links {
    display: flex; align-items: center; gap: 4px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; flex: 1;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links > a, .section-nav > a {
    padding: 6px 14px; border-radius: var(--radius); font-size: 0.8125rem;
    font-weight: 500; color: var(--muted-fg); text-decoration: none;
    white-space: nowrap; transition: all .15s; border: 1px solid transparent;
    font-family: var(--font-display);
}
.nav-links > a:hover, .section-nav > a:hover { color: var(--foreground); background: var(--muted); }
.nav-links > a.active, .section-nav > a.active { color: var(--primary); background: rgba(249,115,22,.08); border-color: rgba(249,115,22,.2); }

/* ═══ Forms / Inputs / Selects ═══ */
input[type="text"], select {
    width: 100%; padding: 0 12px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background-color: var(--input-fill); color: var(--foreground);
    font-size: 0.8125rem; font-family: var(--font-mono);
    transition: border-color 0.15s; height: 36px;
}
input[type="text"]::placeholder { color: var(--muted-fg); }
input[type="text"]:focus, select:focus {
    outline: none; border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(249,115,22,0.2);
}
select {
    cursor: pointer; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}

/* ═══ Section Module (shared card wrapper) ═══ */
.section-module {
    background-color: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); margin-bottom: 20px; overflow: hidden;
}
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px;
    background-color: var(--muted); border-bottom: 1px solid var(--border);
}
.section-header-left { display: flex; align-items: flex-start; gap: 8px; }
.section-header-text { display: flex; flex-direction: column; gap: 2px; }
.section-body { padding: 12px; }

/* ═══ Buttons / CTAs ═══ */
.cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius);
    text-decoration: none; font-weight: 600; font-size: 0.8rem;
    transition: all .15s; border: none; cursor: pointer;
    font-family: var(--font-display);
}
.cta-primary { background: var(--primary); color: var(--primary-fg); }
.cta-primary:hover { background: var(--primary-hover); }
.cta-secondary { background: var(--secondary); color: var(--foreground); border: 1px solid var(--border); }
.cta-secondary:hover { background: var(--card-hover); border-color: var(--muted-fg); }
.cta-blue { background: var(--blue); color: #fff; }
.cta-blue:hover { opacity: 0.9; }
.cta svg { flex-shrink: 0; width: 16px; height: 16px; }

/* ═══ Player Headshots ═══ */
.player-headshot {
    width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
    background: var(--muted); flex-shrink: 0; border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; font-size: 0.875rem; font-weight: 700; color: var(--muted-fg);
}
.player-headshot img { width: 100%; height: 100%; object-fit: cover; }

/* ═══ Footer ═══ */
.footer { text-align: center; padding: 24px 0 32px; color: var(--muted-fg); font-size: 0.75rem; font-family: var(--font-mono); }
.footer a { color: var(--primary); text-decoration: none; }

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-fg); }

/* ═══ Responsive Shared ═══ */
@media (max-width: 768px) {
    .nav-icon-btn { width: 34px; height: 34px; }
    .nav-icon-btn svg { width: 18px; height: 18px; }
    /* Hamburger menu on mobile */
    .nav-hamburger { display: flex; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; gap: 2px; padding: 8px;
        background: var(--card); border: 1px solid var(--border);
        border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,0.2);
        z-index: 100; overflow: visible;
    }
    .nav-links.open { display: flex; }
    .nav-links > a { padding: 10px 14px; font-size: 0.85rem; width: 100%; border-radius: var(--radius); }
    .section-nav > a { padding: 5px 10px; font-size: 0.75rem; }
}
@media (max-width: 480px) {
    .section-nav > a { padding: 4px 8px; font-size: 0.7rem; }
    .player-headshot { width: 44px; height: 44px; }
}
