/* ============================================
   Design System — Variables, Reset, Typography
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --bg-card: #0a0a0a;
    --bg-card-hover: #111111;
    --bg-glass: rgba(10, 10, 10, 0.8);

    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;

    --accent-red: #ff4444;
    --accent-blue: #4488ff;
    --accent-green: #44cc88;
    --accent-yellow: #ffaa44;
    --accent-silver: #8899aa;
    --accent-ice: #66bbdd;
    --accent-cyan: #22d3ee;

    /* Gradient accents */
    --gradient-primary: linear-gradient(135deg, #22d3ee, #4488ff);
    --gradient-warm: linear-gradient(135deg, #3b82f6, #22d3ee);
    --gradient-cool: linear-gradient(135deg, #3b82f6, #22d3ee);
    --gradient-neon: linear-gradient(135deg, #22d3ee, #4488ff, #66bbdd);

    /* Glow colors */
    --glow-cyan: rgba(34, 211, 238, 0.15);
    --glow-blue: rgba(68, 136, 255, 0.15);

    --border-color: #1e1e2e;
    --border-subtle: #16161e;
    --border-glow: rgba(34, 211, 238, 0.1);

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-red: 0 0 20px rgba(255, 68, 68, 0.15);
    --shadow-glow-blue: 0 0 20px rgba(68, 136, 255, 0.15);
    --shadow-glow-cyan: 0 0 20px rgba(34, 211, 238, 0.12);
    --shadow-glow-neon: 0 0 30px rgba(34, 211, 238, 0.08), 0 0 60px rgba(68, 136, 255, 0.05);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Layout */
    --nav-height: 0px;
    --max-width: 1200px;
    --content-width: 800px;

    /* Widget shell */
    --sidebar-width: 72px;
    --mobile-nav-height: 64px;
    --widget-radius: 20px;
    --widget-border: 1px solid rgba(255, 255, 255, 0.18);
    --widget-shadow: 0 8px 60px rgba(0, 0, 0, 0.6), 0 2px 20px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(0, 0, 0, 0.9);
    --glass-bg-strong: rgba(0, 0, 0, 0.95);
    --glass-blur: 24px;
    --sidebar-bg: rgba(0, 0, 0, 0.95);
}

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: #000000;
    min-height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* White dot grid */
    background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

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

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

code, pre {
    font-family: var(--font-mono);
}

code {
    background: var(--bg-tertiary);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
    margin-bottom: var(--space-lg);
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: var(--text-sm);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-md);
}

li {
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
}

blockquote {
    border-left: 3px solid var(--accent-blue);
    padding-left: var(--space-lg);
    margin: var(--space-lg) 0;
    color: var(--text-secondary);
    font-style: italic;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--space-2xl) 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-lg);
}

th, td {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    text-align: left;
}

th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

::selection {
    background: var(--accent-red);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
