/* ============================================================
   BASE — Variables, Reset, Typography, Global Elements
   ============================================================ */

:root {
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;

    /* Accents */
    --accent-cyan: #2563eb;
    --accent-amber: #d97706;
    --accent-rose: #e11d48;
    --accent-emerald: #059669;
    --accent-violet: #7c3aed;

    /* Text */
    --text-primary: #111827;
    --text-secondary: #334155;
    --text-muted: #475569;

    /* Borders */
    --border: #e2e8f0;
    --border-subtle: rgba(0, 0, 0, 0.06);

    /* Glows — translated to subtle shadows for light theme */
    --glow-cyan: rgba(37, 99, 235, 0.08);
    --glow-rose: rgba(225, 29, 72, 0.06);
    --glow-violet: rgba(124, 58, 237, 0.06);
    --glow-amber: rgba(217, 119, 6, 0.06);
    --glow-emerald: rgba(5, 150, 105, 0.06);

    /* Glass — light glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);

    /* Spacing */
    --section-padding: clamp(4rem, 8vw, 8rem);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Noise texture overlay — disabled for light theme */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 1000;
}

/* Cursor glow orb — subtle blue for light theme */
#cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    will-change: left, top;
    transition: opacity 0.3s;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    font-family: 'JetBrains Mono', monospace;
    background: #f5f7f9;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent-amber);
    border: 1px solid #e2e8f0;
}

/* Color utility classes */
.text-cyan { color: var(--accent-cyan); }
.text-rose { color: var(--accent-rose); }
.text-violet { color: var(--accent-violet); }
.text-amber { color: var(--accent-amber); }
.text-emerald { color: var(--accent-emerald); }

.link-cyan {
    color: var(--accent-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.link-cyan:hover { opacity: 0.8; }

/* Gradient text shimmer */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet), var(--accent-rose), var(--accent-cyan));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Selection */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: var(--text-primary);
}

/* Scrollbar — light theme */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
