/**
 * Career Expert Institute - Design System Foundation
 * Centralized Design Tokens & Theme Orchestration
 */

:root {
    /* --- Modern Typography --- */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-accent: 'Outfit', sans-serif;

    /* --- Core Spacing System (Fluid & Consistent) --- */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4.5rem;

    /* --- High-Fidelity Shadows --- */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.16);
    --shadow-primary: 0 12px 32px rgba(59, 130, 246, 0.25);

    /* --- Animation Tokens --- */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* --- Default Light Theme (Luxury/Institutional) --- */
    --bg-main: #ffffff;
    --bg-surface: #f8fafc;
    --bg-surface-alt: #f1f5f9;
    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-border-alt: #cbd5e1;
}

/* --- Dark Theme Orchestration --- */
.dark {
    --bg-main: #020617;
    --bg-surface: #0f172a;
    --bg-surface-alt: #1e293b;
    --color-text: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-border: #1e293b;
    --color-border-alt: #334155;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* --- Dynamic Brand Injector (Managed by PHP/DB) --- */
:root {
    --color-primary: #3b82f6;
    --color-secondary: #1e40af;
    --color-accent: #f59e0b;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --radius-main: 1.5rem;
}

/* --- Core Global Layer --- */
* {
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

body {
    background-color: var(--bg-main);
    color: var(--color-text);
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- High-End Glassmorphism --- */
.glass {
    background: rgba(var(--bg-main-rgb), 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--color-border-rgb), 0.3);
}

/* Global "Maison" Atmosphere */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* --- Skeleton & Animation Infrastructure --- */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shimmer-effect {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
}