/* assets/css/base.css */
:root {
    /* Color Palette - Light Mode */
    --brand-primary: #2563eb;
    --brand-hover: #1d4ed8;
    --brand-surface: #eff6ff;
    
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-rgb: 255, 255, 255;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-focus: rgba(37, 99, 235, 0.3);
    
    /* Typography */
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    /* Spacing & Structure */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --brand-primary: #3b82f6;
    --brand-hover: #60a5fa;
    --brand-surface: #1e3a8a;
    
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-rgb: 30, 41, 59;
    
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-light: #64748b;
    
    --border-color: #334155;
    --border-focus: rgba(59, 130, 246, 0.4);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Elegant Typography */
h1, h2, h3, h4, h5, h6 { 
    margin-top: 0; 
    line-height: 1.25; 
    color: var(--text-main); 
    font-weight: 700;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2rem; }
h3 { font-size: 1.25rem; }

a { 
    color: var(--brand-primary); 
    text-decoration: none; 
    transition: color var(--transition); 
}
a:hover { color: var(--brand-hover); }

img, svg { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.skip-link {
    position: absolute; top: -40px; left: 0;
    background: var(--brand-primary); color: white;
    padding: 12px 24px; z-index: 100; border-radius: 0 0 var(--radius-md) 0;
    font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}