/*
 * Design Tokens - Famoid Blogger Theme
 * All customizable values in one place
 */

:root {
    /* ==========================================================================
       Colors - Light Mode (Default)
       ========================================================================== */
    --color-bg: #ffffff;
    --color-bg-secondary: #f8f9fa;
    --color-bg-tertiary: #f1f3f4;

    --color-text: #1a1a1a;
    --color-text-secondary: #6b7280;
    --color-text-tertiary: #9ca3af;

    --color-accent: #0080ff;
    --color-accent-hover: #0066cc;
    --color-accent-light: #e6f3ff;

    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* ==========================================================================
       Typography
       ========================================================================== */

    /* Font Families */
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Font Sizes - Using modular scale (1.25 ratio) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 1.75;
    --leading-article: 1.8;  /* Optimized for long-form reading */

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Letter Spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;

    /* ==========================================================================
       Spacing
       ========================================================================== */
    --space-0: 0;
    --space-1: 0.25rem;      /* 4px */
    --space-2: 0.5rem;       /* 8px */
    --space-3: 0.75rem;      /* 12px */
    --space-4: 1rem;         /* 16px */
    --space-5: 1.25rem;      /* 20px */
    --space-6: 1.5rem;       /* 24px */
    --space-8: 2rem;         /* 32px */
    --space-10: 2.5rem;      /* 40px */
    --space-12: 3rem;        /* 48px */
    --space-16: 4rem;        /* 64px */
    --space-20: 5rem;        /* 80px */
    --space-24: 6rem;        /* 96px */

    /* ==========================================================================
       Layout
       ========================================================================== */

    /* Container widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;

    /* Content width - optimized for reading (65-75 characters) */
    --content-width: 720px;
    --content-width-wide: 1080px;

    /* Sidebar */
    --sidebar-width: 320px;

    /* ==========================================================================
       Breakpoints (for reference - use in media queries)
       ========================================================================== */
    /*
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    */

    /* ==========================================================================
       Effects
       ========================================================================== */

    /* Border Radius */
    --radius-none: 0;
    --radius-sm: 0.25rem;    /* 4px */
    --radius-md: 0.375rem;   /* 6px */
    --radius-lg: 0.5rem;     /* 8px */
    --radius-xl: 0.75rem;    /* 12px */
    --radius-2xl: 1rem;      /* 16px */
    --radius-full: 9999px;

    /* Shadows */
    --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.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-color: color 200ms ease, background-color 200ms ease, border-color 200ms ease;

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
}

/* ==========================================================================
   Dark Mode Colors
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        --color-bg: #0f0f0f;
        --color-bg-secondary: #1a1a1a;
        --color-bg-tertiary: #262626;

        --color-text: #f0f0f0;
        --color-text-secondary: #9ca3af;
        --color-text-tertiary: #6b7280;

        --color-accent: #4da6ff;
        --color-accent-hover: #80bfff;
        --color-accent-light: #0d3d66;

        --color-border: #2d2d2d;
        --color-border-light: #3d3d3d;

        --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.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    }
}

/* Manual dark mode override */
html[data-theme="dark"] {
    --color-bg: #0f0f0f;
    --color-bg-secondary: #1a1a1a;
    --color-bg-tertiary: #262626;

    --color-text: #f0f0f0;
    --color-text-secondary: #9ca3af;
    --color-text-tertiary: #6b7280;

    --color-accent: #60a5fa;
    --color-accent-hover: #93c5fd;
    --color-accent-light: #1e3a5f;

    --color-border: #2d2d2d;
    --color-border-light: #3d3d3d;

    --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.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

/* Manual light mode override */
html[data-theme="light"] {
    --color-bg: #ffffff;
    --color-bg-secondary: #f8f9fa;
    --color-bg-tertiary: #f1f3f4;

    --color-text: #1a1a1a;
    --color-text-secondary: #6b7280;
    --color-text-tertiary: #9ca3af;

    --color-accent: #0080ff;
    --color-accent-hover: #0066cc;
    --color-accent-light: #e6f3ff;

    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    --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.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
