/* ====== SHARED DESIGN TOKENS ====== */
/* Single source of truth for all CSS custom properties */

:root {
    /* Layered Blue-Charcoal — visible depth between surfaces */
    --bg-deep: #0a0c14;
    --bg-primary: #10131c;
    --bg-elevated: #1a1e2a;
    --bg-card: rgba(26, 30, 42, 0.72);
    --bg-glass: rgba(16, 19, 28, 0.88);

    /* Text Hierarchy */
    --text-primary: #f0f2f5;
    --text-secondary: #8b93a8;
    --text-muted: #7b8399;

    /* Accent — Warm Copper (hue ~22°, sat ~40%) */
    --accent: #c49070;
    --accent-dim: #a87c5e;
    --accent-glow: rgba(196, 144, 112, 0.12);
    --accent-subtle: rgba(196, 144, 112, 0.06);

    /* Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Typography */
    --font-display: 'Sora', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

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

    /* Layout */
    --nav-height: 80px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-enter: cubic-bezier(0, 0, 0.2, 1);

    /* Motion Hierarchy */
    --duration-micro: 0.2s;
    --duration-standard: 0.35s;
    --duration-emphasis: 0.5s;
    --duration-entrance: 0.8s;

    /* Hover Lifts */
    --lift-subtle: -2px;
    --lift-micro: -1px;

    /* Hover Shadows */
    --shadow-hover-card: 0 8px 30px rgba(0, 0, 0, 0.18);
    --shadow-glow-accent: 0 0 20px var(--accent-glow);

    /* Reveal Animation */
    --reveal-stagger: 0.1s;

    /* Preloader offset (set to 0.9s via JS when preloader is active) */
    --entrance-offset: 0s;
}

/* ====== LIGHT THEME ====== */
[data-theme="light"] {
    --bg-deep: #f2f4f7;
    --bg-primary: #f9fafb;
    --bg-elevated: #e8eaf0;
    --bg-card: rgba(249, 250, 251, 0.9);
    --bg-glass: rgba(242, 244, 247, 0.92);

    --text-primary: #161a2b;
    --text-secondary: #49536a;
    --text-muted: #5a6678;

    --accent: #7a5636;
    --accent-dim: #6b4d33;
    --accent-glow: rgba(122, 86, 54, 0.14);
    --accent-subtle: rgba(122, 86, 54, 0.08);

    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
}

/* ====== SHARED UTILITIES ====== */
/* These rules are used by both style.css and project-styles.css */

/* Screen-reader only — visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: 1rem 2rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--accent);
    color: var(--bg-deep);
    font-weight: 700;
    z-index: 10000;
}

/* Shared button base — used by both style.css and project-styles.css */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 1rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: transform var(--duration-standard) var(--ease-smooth),
                background var(--duration-standard) var(--ease-smooth),
                color var(--duration-standard) var(--ease-smooth),
                border-color var(--duration-standard) var(--ease-smooth),
                box-shadow var(--duration-standard) var(--ease-smooth);
}

.btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

[data-theme="light"] .btn-primary {
    color: #ffffff;
}

/* Font Awesome font-display override — prevent invisible text */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-weight: 400;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.woff2') format('woff2');
}
