/*
 * Srishti Bhalla Portfolio
 * Dark Theme - Apple/Netflix Inspired
 * 2026 Design Trends
 */

/* ========================================
   CSS Variables - Design Tokens
   ======================================== */
:root {
    /* Colors - Deep Dark Theme */
    --color-bg-primary: #000000;
    --color-bg-secondary: #0a0a0a;
    --color-bg-tertiary: #111111;
    --color-bg-elevated: #1a1a1a;
    --color-bg-card: #141414;

    /* Accent Colors - Refined */
    --color-accent: #6366f1;
    --color-accent-light: #818cf8;
    --color-accent-dark: #4f46e5;
    --color-accent-glow: rgba(99, 102, 241, 0.3);

    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-text-tertiary: rgba(255, 255, 255, 0.5);
    --color-text-muted: rgba(255, 255, 255, 0.3);

    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-dark: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.85) 50%, rgba(0,0,0,0.95) 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;

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

    /* Section Spacing */
    --spacing-section: clamp(1rem, 5vw, 4rem);

    /* 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-smooth: 600ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--color-accent-glow);

    /* Z-Index */
    --z-base: 0;
    --z-above: 10;
    --z-nav: 100;
    --z-modal: 1000;
    --z-cursor: 9999;
}

/* ========================================
   Light Mode Overrides
   ======================================== */
[data-theme="light"] {
    --color-bg-primary: #f8f8fa;
    --color-bg-secondary: #f0f0f4;
    --color-bg-tertiary: #e8e8ee;
    --color-bg-elevated: #ffffff;
    --color-bg-card: #ffffff;

    --color-accent: #4f46e5;
    --color-accent-light: #6366f1;
    --color-accent-dark: #3730a3;
    --color-accent-glow: rgba(79, 70, 229, 0.2);

    --color-text-primary: #1a1a2e;
    --color-text-secondary: rgba(26, 26, 46, 0.7);
    --color-text-tertiary: rgba(26, 26, 46, 0.5);
    --color-text-muted: rgba(26, 26, 46, 0.3);

    --gradient-card: linear-gradient(145deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0) 100%);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px var(--color-accent-glow);
}

/* --- Light mode component overrides --- */
[data-theme="light"] body {
    background-color: var(--color-bg-primary);
}

[data-theme="light"] ::selection {
    background-color: var(--color-accent);
    color: #fff;
}

/* Nav */
[data-theme="light"] .nav.scrolled {
    background-color: rgba(248, 248, 250, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .nav-link {
    color: var(--color-text-secondary);
}
[data-theme="light"] .nav-link:hover {
    color: var(--color-accent);
}
[data-theme="light"] .nav-toggle span {
    background: var(--color-text-primary);
}
[data-theme="light"] .nav-cta {
    color: #fff;
}

/* Mobile menu */
[data-theme="light"] .mobile-menu {
    background: rgba(248, 248, 250, 0.97);
}
[data-theme="light"] .mobile-link {
    color: var(--color-text-primary);
}

/* Hero */
[data-theme="light"] .hero-badge {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--color-accent);
}
[data-theme="light"] .hero-subtitle .highlight {
    color: var(--color-accent);
}
[data-theme="light"] .btn-secondary {
    border-color: rgba(26, 26, 46, 0.15);
    color: var(--color-text-primary);
}
[data-theme="light"] .btn-secondary:hover {
    background: rgba(79, 70, 229, 0.06);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Stat counters */
[data-theme="light"] .stat {
    border-color: rgba(0, 0, 0, 0.06);
}

/* Carousel cards */
[data-theme="light"] .project-card {
    background: var(--color-bg-card);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .project-card:hover {
    box-shadow: 0 16px 40px rgba(var(--card-accent), 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
    border-color: rgba(var(--card-accent), 0.25);
}
[data-theme="light"] .card-meta {
    border-color: rgba(0, 0, 0, 0.08);
}

/* Carousel arrows & progress */
[data-theme="light"] .carousel-arrow {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--color-text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .carousel-arrow:hover {
    background: #fff;
    border-color: var(--color-accent);
    color: var(--color-accent);
}
[data-theme="light"] .carousel-progress-track {
    background: rgba(0, 0, 0, 0.06);
}

/* Section headers */
[data-theme="light"] .section-label {
    color: var(--color-accent);
}

/* About section */
[data-theme="light"] .about-section {
    background: var(--color-bg-secondary);
}
[data-theme="light"] .skill-item {
    background: var(--color-bg-elevated);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .skill-icon {
    background: rgba(79, 70, 229, 0.06);
    color: var(--color-accent);
}
[data-theme="light"] .image-decoration {
    background: var(--gradient-primary);
    opacity: 0.15;
}

/* Testimonials */
[data-theme="light"] .testimonial-card {
    background: var(--color-bg-elevated);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .testimonial-card:hover {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.08);
}
[data-theme="light"] .quote-icon {
    color: var(--color-accent);
}
[data-theme="light"] .author-avatar {
    background: var(--gradient-primary);
    color: #fff;
}

/* Contact */
[data-theme="light"] .contact-section {
    background: var(--color-bg-secondary);
}
[data-theme="light"] .contact-email {
    color: var(--color-accent);
}
[data-theme="light"] .social-link {
    background: var(--color-bg-elevated);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--color-text-secondary);
}
[data-theme="light"] .social-link:hover {
    background: rgba(79, 70, 229, 0.08);
    border-color: var(--color-accent);
    color: var(--color-accent);
}
[data-theme="light"] .visual-ring {
    border-color: rgba(79, 70, 229, 0.1);
}

/* Footer */
[data-theme="light"] .footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .footer-links a {
    color: var(--color-text-secondary);
}
[data-theme="light"] .footer-links a:hover {
    color: var(--color-accent);
}
[data-theme="light"] .footer-bottom {
    border-color: rgba(0, 0, 0, 0.08);
}

/* Cursor - hide custom cursor in light mode for cleaner feel */
[data-theme="light"] .cursor-follower,
[data-theme="light"] .cursor-dot {
    display: none;
}

/* Gradient orbs — softer in light mode */
[data-theme="light"] .gradient-orb {
    opacity: 0.08 !important;
}

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.theme-toggle:hover {
    color: var(--color-accent);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.06);
}
.theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.theme-toggle:hover svg {
    transform: rotate(30deg);
}
/* Show/hide sun vs moon */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle {
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--color-text-secondary);
}
[data-theme="light"] .theme-toggle:hover {
    color: var(--color-accent);
    border-color: rgba(79, 70, 229, 0.3);
    background: rgba(79, 70, 229, 0.06);
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background-color: var(--color-accent);
    color: var(--color-text-primary);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   Custom Cursor
   ======================================== */
.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: var(--z-cursor);
    transition: transform 0.15s ease-out, width 0.2s, height 0.2s, border-color 0.2s;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--color-text-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: var(--z-cursor);
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
}

body:has(.btn:hover) .cursor-follower,
body:has(.nav-link:hover) .cursor-follower,
body:has(.project-card:hover) .cursor-follower {
    width: 60px;
    height: 60px;
    border-color: var(--color-accent);
}

@media (max-width: 768px) {
    .cursor-follower,
    .cursor-dot {
        display: none;
    }
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    padding: var(--space-lg) var(--space-xl);
    transition: background-color var(--transition-base), backdrop-filter var(--transition-base);
}

.nav.scrolled {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 0.75rem;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--color-text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-cta {
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    color: var(--color-text-primary);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.nav-cta {
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: var(--space-sm);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle.active span:first-child {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:last-child {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-container {
        display: flex;
        justify-content: space-between;
    }

    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .nav-toggle {
        display: flex;
    }
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-primary);
    z-index: calc(var(--z-nav) - 1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
}

.mobile-link {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    transition: color var(--transition-fast);
}

.mobile-link:hover {
    color: var(--color-accent);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: var(--space-5xl) var(--space-xl);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #d946ef 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }
    75% {
        transform: translate(-50px, -30px) scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s ease-out;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-greeting {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.6s ease-out both;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: var(--space-xl);
}

.title-line {
    display: block;
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.title-line:first-child {
    animation-delay: 0.1s;
}

.title-line-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation-delay: 0.2s;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.highlight {
    color: var(--color-accent-light);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-3xl);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover svg {
    transform: translate(3px, -3px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.stat-number::after {
    content: '';
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    animation: fadeIn 1s ease-out 1s both;
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, var(--color-text-muted), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .hero {
        padding: var(--space-4xl) var(--space-lg);
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--space-xl);
    }

    .scroll-indicator {
        display: none;
    }
}

/* ========================================
   Work Section - Netflix Style
   ======================================== */
.work-section {
    padding: var(--space-5xl) 0;
    background: var(--color-bg-secondary);
}

.section-header {
    max-width: 1400px;
    margin: 0 auto var(--space-3xl);
    padding: 0 var(--space-xl);
}

.section-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-md);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
}

/* Project Row */
.project-row {
    margin-bottom: var(--space-3xl);
}

.row-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* Carousel Wrapper - positions arrows over the carousel */
.carousel-wrapper {
    position: relative;
}

/* Large Overlay Carousel Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Show arrows on hover over the carousel wrapper */
.carousel-wrapper:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow--left {
    left: 20px;
}

.carousel-arrow--right {
    right: 20px;
}

/* Gradient glow ring on hover */
.carousel-arrow::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.carousel-arrow::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.85);
    z-index: -1;
    transition: background 0.4s ease;
}

.carousel-arrow:hover {
    border-color: transparent;
    color: #fff;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.4), 0 8px 32px rgba(0, 0, 0, 0.5);
}

.carousel-arrow:hover::before {
    opacity: 1;
}

.carousel-arrow:hover::after {
    background: rgba(99, 102, 241, 0.2);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
    transition: transform 0.1s ease;
}

/* Arrow icon animation on hover */
.carousel-arrow svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

.carousel-arrow--left:hover svg {
    transform: translateX(-4px);
}

.carousel-arrow--right:hover svg {
    transform: translateX(4px);
}

/* Disabled state */
.carousel-arrow.is-disabled {
    opacity: 0 !important;
    pointer-events: none;
    cursor: default;
}

/* Ripple effect on click */
@keyframes carousel-ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.carousel-arrow .ripple {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-accent-light);
    animation: carousel-ripple 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 1;
}

/* Edge fade gradients - hint that more content exists */
.carousel-wrapper::before,
.carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg-secondary), transparent);
}

.carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg-secondary), transparent);
}

.carousel-wrapper.has-scroll-left::before {
    opacity: 1;
}

.carousel-wrapper.has-scroll-right::after {
    opacity: 1;
}

/* Progress bar under carousel */
.carousel-progress {
    max-width: 1400px;
    margin: var(--space-lg) auto 0;
    padding: 0 var(--space-xl);
}

.carousel-progress-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
    overflow: hidden;
}

.carousel-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 10%;
}

@media (max-width: 768px) {
    .carousel-arrow {
        width: 72px;
        height: 72px;
    }

    .carousel-arrow svg {
        width: 32px;
        height: 32px;
    }

    .carousel-arrow--left {
        left: 8px;
    }

    .carousel-arrow--right {
        right: 8px;
    }
}

/* Project Carousel */
.project-carousel {
    display: flex;
    gap: var(--space-xl);
    padding: 0 var(--space-xl);
    padding-bottom: var(--space-xl);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    scroll-padding-left: var(--space-xl);
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.project-carousel::-webkit-scrollbar {
    display: none;
}

.project-carousel:active {
    cursor: grabbing;
}

/* Project Cards */
.project-card {
    flex-shrink: 0;
    width: 480px;
    scroll-snap-align: start;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-bg-card);
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.project-card.featured {
    width: 560px;
}

.project-card.small {
    width: 400px;
}

.project-card {
    --card-accent: 99, 102, 241;
}
.project-card[data-project="blockers"] { --card-accent: 52, 211, 153; }
.project-card[data-project="payments"] { --card-accent: 96, 165, 250; }
.project-card[data-project="billable"] { --card-accent: 167, 139, 250; }
.project-card[data-project="conversion"] { --card-accent: 251, 191, 36; }
.project-card[data-project="somnu"] { --card-accent: 34, 211, 238; }

.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 24px 48px rgba(var(--card-accent), 0.15), 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(var(--card-accent), 0.35);
    z-index: 10;
}

.card-image {
    position: relative;
    height: 360px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

.project-card.featured .card-image {
    height: 400px;
}

.project-card.small .card-image {
    height: 280px;
}

/* Card Image Variations — vibrant themed gradients */
.card-image.blockers {
    background: linear-gradient(135deg, #312e81 0%, #6366f1 45%, #818cf8 100%);
    padding: 1.25rem 1.25rem 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.card-image.blockers img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: top center;
    border-radius: 8px 8px 0 0;
    max-height: 100%;
    filter: none;
}

.card-image.payments {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 45%, #60a5fa 100%);
}

.card-image.billable {
    background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 45%, #a78bfa 100%);
}

.card-image.conversion {
    background: linear-gradient(135deg, #78350f 0%, #d97706 45%, #fbbf24 100%);
}

.card-image.somnu {
    background: linear-gradient(135deg, #164e63 0%, #0891b2 45%, #22d3ee 100%);
}

.card-image.sketchbook {
    background: linear-gradient(135deg, #701a75 0%, #c026d3 45%, #e879f9 100%);
}

.card-image.about {
    background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 45%, #f87171 100%);
}

.card-gradient {
    display: none;
}

.card-content {
    padding: var(--space-lg) var(--space-xl) var(--space-xl);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-category {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    transition: color 0.3s ease;
}

.project-card:hover .card-category {
    color: rgba(var(--card-accent), 1);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--color-text-primary);
}

.project-card.small .card-title {
    font-size: 1.15rem;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

.project-card.small .card-desc {
    font-size: 0.8rem;
    margin-bottom: 0;
}

.card-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
    transition: border-color 0.3s ease;
}

.project-card:hover .card-meta {
    border-color: rgba(var(--card-accent), 0.3);
    color: var(--color-text-secondary);
}

/* Card Preview Overlay */
.card-preview {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-card:hover .card-preview {
    opacity: 1;
}

.preview-text {
    font-size: 1rem;
    font-weight: 500;
}

.card-preview svg {
    width: 60px;
    height: 60px;
    color: var(--color-text-primary);
    transition: transform var(--transition-base);
}

.project-card:hover .card-preview svg {
    transform: scale(1.1);
}

/* Card with actual image */
.card-image img,
.card-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    filter: brightness(0.85) saturate(0.95);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s ease;
}

.project-card:hover .card-image img,
.project-card:hover .card-image video {
    transform: scale(1.03);
    filter: brightness(1.05) saturate(1.05);
}

@media (max-width: 768px) {
    .project-card,
    .project-card.featured,
    .project-card.small {
        width: 85vw;
    }

    .card-image,
    .project-card.featured .card-image,
    .project-card.small .card-image {
        height: 260px;
    }
}

/* ========================================
   About Section
   ======================================== */
.about-section {
    padding: var(--space-5xl) var(--space-xl);
    background: var(--color-bg-primary);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-4xl);
    align-items: center;
}

.about-image {
    position: relative;
}

.image-frame {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-bg-tertiary) 0%, var(--color-bg-elevated) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.initials {
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.image-decoration {
    position: absolute;
    inset: -20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    z-index: -1;
}

.about-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-xl);
}

.about-text {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.about-text strong {
    color: var(--color-text-primary);
}

/* Skills Section */
.skills-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.skills-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.skill-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.skill-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.skill-icon svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
}

.skill-name {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.about-cta {
    margin-top: var(--space-2xl);
}

@media (max-width: 968px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about-image {
        max-width: 300px;
        margin: 0 auto;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Testimonials Section
   ======================================== */
.testimonials-section {
    padding: var(--space-5xl) var(--space-xl);
    background: var(--color-bg-secondary);
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
}

.testimonials-container .section-label,
.testimonials-container .section-title {
    text-align: center;
}

.testimonials-container .section-title {
    margin-bottom: var(--space-3xl);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.testimonial-card {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    transition: transform var(--transition-base), border-color var(--transition-base);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.quote-icon {
    width: 32px;
    height: 32px;
    color: var(--color-accent);
    opacity: 0.5;
    margin-bottom: var(--space-lg);
}

.testimonial-content p {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--color-text-primary);
}

.author-role {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
    padding: var(--space-5xl) var(--space-xl);
    background: var(--color-bg-primary);
    position: relative;
    overflow: hidden;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.contact-content .section-label {
    margin-bottom: var(--space-md);
}

.contact-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-xl);
}

.contact-text {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2xl);
    transition: opacity var(--transition-fast);
}

.contact-email:hover {
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-text-secondary);
    transition: all var(--transition-base);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.social-link:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-primary);
    transform: translateY(-3px);
}

/* Contact Visual */
.contact-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: ringPulse 4s ease-in-out infinite;
}

.ring-1 {
    width: 300px;
    height: 300px;
    animation-delay: 0s;
}

.ring-2 {
    width: 200px;
    height: 200px;
    animation-delay: -1.3s;
}

.ring-3 {
    width: 100px;
    height: 100px;
    animation-delay: -2.6s;
}

@keyframes ringPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

.visual-text {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .contact-visual {
        height: 250px;
    }
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
    background: var(--color-bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-xl);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.footer-brand p {
    font-size: 0.88rem;
    color: var(--color-text-tertiary);
    margin-top: var(--space-xs);
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-xl);
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========================================
   Project Modal
   ======================================== */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    background: var(--color-bg-card);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-slow);
}

.project-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-text-primary);
    z-index: 10;
    transition: background var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-body {
    padding: var(--space-3xl);
    overflow-y: auto;
    max-height: 90vh;
}

/* ========================================
   Animations & Utilities
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glow effect on hover */
.glow-on-hover {
    position: relative;
}

.glow-on-hover::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    filter: blur(15px);
    transition: opacity var(--transition-base);
}

.glow-on-hover:hover::before {
    opacity: 0.5;
}

/* Noise texture overlay */
.noise-overlay {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9998;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .cursor-follower,
    .cursor-dot {
        display: none;
    }
}

/* ========================================
   Image Lazy Loading & Shimmer
   ======================================== */

/* Shimmer container — applied to image wrappers */
.img-shimmer {
    position: relative;
    overflow: hidden;
    background: var(--color-bg-tertiary, #111);
    border-radius: inherit;
}

.img-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 40%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 60%,
        transparent 100%
    );
    animation: shimmer 2s ease-in-out infinite;
    pointer-events: none;
}

.img-shimmer.loaded {
    background: transparent;
    transition: background 0.3s ease;
}

.img-shimmer.loaded::after {
    animation: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Light mode shimmer */
[data-theme="light"] .img-shimmer {
    background: #e8e8ee;
}

[data-theme="light"] .img-shimmer::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 40%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 0.4) 60%,
        transparent 100%
    );
}

/* Images and videos fade in when loaded */
img.lazy-img,
video.lazy-media {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.lazy-img.loaded,
video.lazy-media.loaded {
    opacity: 1;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

:focus:not(:focus-visible) {
    outline: none;
}
