/**
 * SUPERMIX DESIGN SYSTEM
 * Ultra-Premium Developer Blog Platform
 * Inspired by: Vercel, Linear, Stripe, GitHub
 */

/* ============================================
   DESIGN TOKENS
   ============================================ */

:root {
    /* Ultra-Premium Future Tech Palette */
    --bg-primary: #0A0F1C;
    --bg-secondary: #0D1117;
    --bg-tertiary: #161b22;
    --bg-elevated: #1f242d;

    /* Neon Accents */
    --accent-primary: #00f3ff;    /* Cyber Blue */
    --accent-secondary: #00ff9d;  /* Tech Green */
    --accent-tertiary: #bd00ff;   /* Neon Violet */
    --accent-warning: #ffbd2e;
    --accent-danger: #ff5f56;

    /* Text Colors */
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #57606a;
    --text-dim: #30363d;
    --text-inverse: #0A0F1C;

    --border-soft: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-strong: rgba(255, 255, 255, 0.25);

    /* Glassmorphism System */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 16px;
    --glass-glow: rgba(0, 243, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(0, 243, 255, 0.15) 0%, transparent 70%);
    --gradient-mesh: radial-gradient(at 0% 0%, rgba(0, 243, 255, 0.1) 0, transparent 50%),
                     radial-gradient(at 100% 0%, rgba(189, 0, 255, 0.1) 0, transparent 50%);

    /* 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), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(0, 243, 255, 0.2);

    /* Spacing Scale (8px base) */
    --space-xs: 0.5rem; /* 8px */
    --space-sm: 0.75rem; /* 12px */
    --space-md: 1rem; /* 16px */
    --space-lg: 1.5rem; /* 24px */
    --space-xl: 2rem; /* 32px */
    --space-2xl: 3rem; /* 48px */
    --space-3xl: 4rem; /* 64px */
    --space-4xl: 6rem; /* 96px */

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 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);

    /* Z-index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-popover: 500;
    --z-tooltip: 600;
}

/* Light Theme */
/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #f0f2f5;
    --bg-elevated: #ffffff;

    --text-primary: #0A0F1C;
    --text-secondary: #57606a;
    --text-muted: #8b949e;
    --text-dim: #94a3b8;

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-glow: rgba(0, 243, 255, 0.05);
}

/* Light Theme Title Override */
[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

:root {
    /* Font Families */
    --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-code: "JetBrains Mono", "Fira Code", "Roboto Mono", monospace;

    /* Font Sizes - 1.25 Scale 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 */
    --text-7xl: 4.5rem; /* 72px */

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition:
        background-color var(--transition-base),
        color var(--transition-base);
    overflow-x: hidden;
}

/* Typography Elements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--text-5xl);
}
h2 {
    font-size: var(--text-4xl);
}
h3 {
    font-size: var(--text-3xl);
}
h4 {
    font-size: var(--text-2xl);
}
h5 {
    font-size: var(--text-xl);
}
h6 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-glow);
}

code {
    font-family: var(--font-code);
    font-size: 0.9em;
    background: var(--bg-tertiary);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
}

pre {
    background: var(--bg-tertiary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-soft);
}

pre code {
    background: none;
    padding: 0;
    border: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   LAYOUT SYSTEM
   ============================================ */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: 768px;
}

.container-wide {
    max-width: 1536px;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}
.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}
.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}
.grid-cols-12 {
    grid-template-columns: repeat(12, 1fr);
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--space-sm);
}
.gap-md {
    gap: var(--space-md);
}
.gap-lg {
    gap: var(--space-lg);
}
.gap-xl {
    gap: var(--space-xl);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Large Laptops */
@media (max-width: 1280px) {
    .grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets & Small Laptops */
@media (max-width: 1024px) {
    :root {
        --text-7xl: 3.5rem;
        --text-6xl: 3rem;
        --text-5xl: 2.5rem;
    }

    .grid-cols-3, 
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets Portrait & Large Mobiles */
@media (max-width: 768px) {
    :root {
        --text-7xl: 2.5rem;
        --text-6xl: 2rem;
        --text-5xl: 1.875rem;
        --space-4xl: 4rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Small Mobiles */
@media (max-width: 480px) {
    :root {
        --space-lg: 1rem;
        --space-xl: 1.5rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Spacing */
.mt-auto {
    margin-top: auto;
}
.mb-auto {
    margin-bottom: auto;
}
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Text Alignment */
.text-center {
    text-align: center;
}
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}

/* Colors */
.text-primary {
    color: var(--text-primary);
}
.text-secondary {
    color: var(--text-secondary);
}
.text-muted {
    color: var(--text-muted);
}
.text-accent {
    color: var(--accent-primary);
}

/* Background */
.bg-primary {
    background-color: var(--bg-primary);
}
.bg-secondary {
    background-color: var(--bg-secondary);
}
.bg-tertiary {
    background-color: var(--bg-tertiary);
}

/* Visibility */
.hidden {
    display: none;
}
.visible {
    display: block;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}
.overflow-auto {
    overflow: auto;
}
