/* ===== Performance Optimizations ===== */

/* Disable animations on reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Prevent memory leaks from animations */
.shape,
.floating-tech-icon,
.experience-badge {
    will-change: auto;
}

/* GPU acceleration for smooth performance */
.glass-card,
.modern-navbar,
.btn,
.floating-tech-icon {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Optimize images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Prevent layout thrashing */
* {
    box-sizing: border-box;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Fix overflow issues */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Optimize scrolling */
* {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto;
    }
}

/* Fix memory leaks from backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .glass-card,
    .modern-navbar {
        background: rgba(255, 255, 255, 0.95);
    }
}
