/* ── Theme Variables ── */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #f1f3f5;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --text-muted: #adb5bd;
    --text-inverse: #ffffff;
    --border: #e5e7eb;
    --border-light: #f1f3f5;
    --border-focus: #004999;
    --accent: #004999;
    --accent-light: rgba(0, 73, 153, 0.08);
    --accent-medium: rgba(0, 73, 153, 0.15);
    --accent-text: #004999;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --scrollbar-track: #f1f3f5;
    --scrollbar-thumb: #d1d5db;
    --modal-backdrop: rgba(0,0,0,0.3);
    --particle-color: rgba(0, 73, 153, 0.04);
}

[data-theme="dark"] {
    --bg-primary: #0b0c10;
    --bg-secondary: #1e1e20;
    --bg-tertiary: #27272a;
    --bg-card: #1e1e20;
    --bg-elevated: #27272a;
    --bg-input: #0b0c10;
    --bg-hover: #27272a;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --text-muted: #52525b;
    --text-inverse: #1f2937;
    --border: rgba(255,255,255,0.1);
    --border-light: rgba(255,255,255,0.05);
    --border-focus: #004999;
    --accent: #004999;
    --accent-light: rgba(0, 73, 153, 0.1);
    --accent-medium: rgba(0, 73, 153, 0.2);
    --accent-text: #60a5fa;
    --shadow-sm: 4px 4px 10px rgba(0,0,0,0.4);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.5);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.5);
    --scrollbar-track: #0f111a;
    --scrollbar-thumb: #1e2136;
    --modal-backdrop: rgba(0,0,0,0.6);
    --particle-color: rgba(0, 73, 153, 0.06);
}

/* ── Base ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.5;
}

[data-theme="dark"] #bg-canvas {
    opacity: 1;
}

/* ── Font Classes ── */
.font-geist { font-family: 'Geist', sans-serif !important; }
.font-roboto { font-family: 'Roboto', sans-serif !important; }
.font-montserrat { font-family: 'Montserrat', sans-serif !important; }
.font-poppins { font-family: 'Poppins', sans-serif !important; }
.font-playfair { font-family: 'Playfair Display', serif !important; }
.font-instrument-serif { font-family: 'Instrument Serif', serif !important; }
.font-merriweather { font-family: 'Merriweather', serif !important; }
.font-bricolage { font-family: 'Bricolage Grotesque', sans-serif !important; }
.font-jakarta { font-family: 'Plus Jakarta Sans', sans-serif !important; }
.font-manrope { font-family: 'Manrope', sans-serif !important; }
.font-space-grotesk { font-family: 'Space Grotesk', sans-serif !important; }
.font-work-sans { font-family: 'Work Sans', sans-serif !important; }
.font-pt-serif { font-family: 'PT Serif', serif !important; }
.font-geist-mono { font-family: 'Geist Mono', monospace !important; }
.font-space-mono { font-family: 'Space Mono', monospace !important; }
.font-quicksand { font-family: 'Quicksand', sans-serif !important; }
.font-nunito { font-family: 'Nunito', sans-serif !important; }
.font-newsreader { font-family: 'Newsreader', serif !important; }
.font-google-sans-flex { font-family: 'Google Sans Flex', sans-serif !important; }
.font-oswald { font-family: 'Oswald', sans-serif !important; }
.font-dm-sans { font-family: 'DM Sans', sans-serif !important; }
.font-cormorant { font-family: 'Cormorant Garamond', serif !important; }

/* ── Override Helpers ── */
html, body { overflow: auto !important; overflow-x: hidden !important; height: auto !important; min-height: 100% !important; scroll-behavior: auto !important; opacity: 1 !important; visibility: visible !important; }
body, .wrapper, main, #__next, #app, .page, .content { opacity: 1 !important; visibility: visible !important; transform: none !important; }
.loader, .preloader, .loading, [class*="loader"], [class*="preloader"] { display: none !important; opacity: 0 !important; }
.word-inner, .char, .line, [data-aos], [data-scroll], .hero-text span, .hero-fade, [class*="hero"] span { opacity: 1 !important; transform: none !important; visibility: visible !important; }
.translate-y-full, .translate-x-full, .-translate-y-full, .-translate-x-full, .translate-y-1\/2, .-translate-y-1\/2, .translate-y-\[100\%\], .translate-y-\[110\%\] { transform: none !important; }
.opacity-0, [class*="opacity-0"] { opacity: 1 !important; }
.scale-0, .scale-50, .scale-75 { transform: none !important; }
html.lenis, html.lenis-smooth, body.lenis, body.lenis-smooth, .lenis-wrapper, .lenis-content, [data-lenis-prevent], [data-scroll-container] { overflow: visible !important; height: auto !important; }
body.flex.items-center, body.flex.justify-center { align-items: flex-start !important; min-height: 100vh; height: auto !important; }
main, #__next, #__nuxt, #app, .main-content { overflow: visible !important; height: auto !important; }

/* ── Theme Toggle ── */
.theme-toggle {
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}
.theme-toggle:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
}
.theme-toggle img {
    width: 18px;
    height: 18px;
    transition: transform 0.3s;
}
.theme-toggle:hover img {
    transform: rotate(15deg);
}

/* ── Transition helper ── */
* {
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
