/* ============================================
   MUSKAN KUMAR - PERSONAL BRAND PLATFORM
   Main Stylesheet - Design System & Base Styles
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-base: #0b0f1a;
    --bg-surface: #121826;
    --bg-elevated: #1a2235;
    --bg-overlay: rgba(11, 15, 26, 0.8);

    /* Accent Colors */
    --accent-primary: #4f8cff;
    --accent-secondary: #8b5cf6;
    --accent-highlight: #22d3ee;
    --accent-gradient: linear-gradient(135deg, #4f8cff 0%, #8b5cf6 100%);
    --accent-gradient-hover: linear-gradient(135deg, #6ba0ff 0%, #a78bfa 100%);

    /* Status Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0b0f1a;

    /* Border Colors */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-default: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.2);

    /* Glassmorphism */
    --glass-bg: rgba(18, 24, 38, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Glow Effects */
    --glow-primary: 0 0 20px rgba(79, 140, 255, 0.4);
    --glow-secondary: 0 0 20px rgba(139, 92, 246, 0.4);
    --glow-highlight: 0 0 20px rgba(34, 211, 238, 0.4);


    /* Fluid Spacing Scale - Adapts from mobile to desktop */
    --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.375rem);
    --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
    --space-md: clamp(0.75rem, 0.6rem + 0.75vw, 1rem);
    --space-lg: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    --space-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --space-2xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --space-3xl: clamp(2.5rem, 2rem + 3vw, 4rem);
    --space-4xl: clamp(3rem, 2.5rem + 4vw, 6rem);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Fluid Typography - Scales from mobile (320px) to desktop (1920px) */
    --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
    --text-sm: clamp(0.8rem, 0.75rem + 0.3vw, 0.875rem);
    --text-base: clamp(0.9rem, 0.85rem + 0.35vw, 1rem);
    --text-lg: clamp(1rem, 0.95rem + 0.4vw, 1.125rem);
    --text-xl: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    --text-2xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-3xl: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
    --text-4xl: clamp(1.75rem, 1.5rem + 1.5vw, 2.25rem);
    --text-5xl: clamp(2rem, 1.7rem + 2vw, 3rem);
    --text-6xl: clamp(2.5rem, 2rem + 3vw, 3.75rem);
    --text-7xl: clamp(3rem, 2.5rem + 3.5vw, 4.5rem);
    --text-8xl: clamp(3.5rem, 3rem + 4vw, 6rem);

    /* Line Heights */
    --leading-tight: 1.1;
    --leading-snug: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;

    /* Letter Spacing */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-Index Scale */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-cursor: 9999;
}

/* Light Mode Override */
[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-overlay: rgba(248, 250, 252, 0.9);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border-subtle: rgba(0, 0, 0, 0.05);
    --border-default: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.15);

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -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-base);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: var(--text-primary);
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

h1 {
    font-size: var(--text-6xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

@media (max-width: 768px) {
    h1 {
        font-size: var(--text-4xl);
    }

    h2 {
        font-size: var(--text-3xl);
    }

    h3 {
        font-size: var(--text-xl);
    }
}

p {
    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-highlight);
}

strong,
b {
    font-weight: 600;
}

code,
pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

code {
    background: var(--bg-surface);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
}

.container-narrow {
    max-width: 900px;
}

.container-wide {
    max-width: 1536px;
}

.section {
    padding: var(--space-4xl) 0;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

.section-lg {
    padding: var(--space-4xl) 0;
}

/* Flexbox */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

.gap-2xl {
    gap: var(--space-2xl);
}

/* Grid */
.grid {
    display: grid;
}

.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);
}

/* Responsive Grid - Mobile First */
@media (max-width: 480px) {

    /* All multi-column grids become single column on small mobile */
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 481px) and (max-width: 768px) {

    /* 3-col and 4-col become 2-col on large mobile/small tablet */
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    /* 4-col becomes 3-col on tablet landscape */
    .grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Text Alignment */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* ============================================
   GLASSMORPHISM UTILITIES
   ============================================ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-subtle {
    background: rgba(18, 24, 38, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
}

.glass-strong {
    background: rgba(18, 24, 38, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-default);
}

/* ============================================
   GRADIENT TEXT & BACKGROUNDS
   ============================================ */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(135deg,
            var(--accent-primary) 0%,
            var(--accent-secondary) 25%,
            var(--accent-highlight) 50%,
            var(--accent-secondary) 75%,
            var(--accent-primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s linear infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.gradient-bg {
    background: var(--accent-gradient);
}

.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: var(--accent-gradient);
    border-radius: inherit;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================
   GLOW EFFECTS
   ============================================ */
.glow-primary {
    box-shadow: var(--glow-primary);
}

.glow-secondary {
    box-shadow: var(--glow-secondary);
}

.glow-highlight {
    box-shadow: var(--glow-highlight);
}

.glow-text {
    text-shadow: 0 0 20px rgba(79, 140, 255, 0.5);
}

/* ============================================
   VISIBILITY & DISPLAY
   ============================================ */
.hidden {
    display: none;
}

.visible {
    visibility: visible;
}

.invisible {
    visibility: hidden;
}

.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-100 {
    opacity: 1;
}

/* ============================================
   SPACING UTILITIES
   ============================================ */
.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

.mt-2xl {
    margin-top: var(--space-2xl);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mb-2xl {
    margin-bottom: var(--space-2xl);
}

.py-sm {
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
}

.py-md {
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
}

.py-lg {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
}

.py-xl {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

.px-sm {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
}

.px-md {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

.px-lg {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.px-xl {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
}

/* ============================================
   BACKGROUND PATTERNS
   ============================================ */
.bg-noise {
    position: relative;
}

.bg-noise::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.bg-grid {
    background-image:
        linear-gradient(rgba(79, 140, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 140, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
    .md\:hidden {
        display: none;
    }

    .md\:flex {
        display: flex;
    }

    .md\:block {
        display: block;
    }

    .md\:text-center {
        text-align: center;
    }
}

@media (min-width: 769px) {
    .md\:show {
        display: block;
    }

    .mobile-only {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.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;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}