/**
 * djust Theme System
 *
 * Shared theme variables and base styles for all pages.
 * Provides dark/light mode with CSS variables.
 */

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================
   DESIGN TOKENS
   ============================================ */

:root {
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   DARK THEME (Default)
   ============================================ */

:root,
[data-theme="dark"] {
    /* Background Colors */
    --color-bg: #0a0a0a;
    --color-bg-elevated: #111111;
    --color-bg-overlay: rgba(17, 17, 17, 0.95);

    /* Border Colors */
    --color-border: rgba(255, 255, 255, 0.06);
    --color-border-hover: rgba(255, 255, 255, 0.12);

    /* Text Colors */
    --color-text: #f5f5f5;
    --color-text-muted: #b4b4b4;
    --color-text-subtle: #808080;

    /* Brand Colors */
    --color-accent: #3b82f6;
    --color-accent-hover: #2563eb;
    --color-accent-muted: rgba(59, 130, 246, 0.1);

    /* Semantic Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* ============================================
   LIGHT THEME
   ============================================ */

[data-theme="light"] {
    /* Background Colors */
    --color-bg: #ffffff;
    --color-bg-elevated: #f9fafb;
    --color-bg-overlay: rgba(249, 250, 251, 0.95);

    /* Border Colors */
    --color-border: rgba(0, 0, 0, 0.08);
    --color-border-hover: rgba(0, 0, 0, 0.15);

    /* Text Colors */
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --color-text-subtle: #64748b;

    /* Brand Colors */
    --color-accent: #3b82f6;
    --color-accent-hover: #2563eb;
    --color-accent-muted: rgba(59, 130, 246, 0.1);

    /* Semantic Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    transition: background-color var(--transition-base);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding-top: 60px;
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    color: var(--color-text-muted);
    line-height: 1.75;
}

code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}
