/**
* PERFORMANCE OPTIMIZATIONS
* CSS optimizations for better performance
* 2025/2026 Performance Best Practices
*/

/* ============================================
  WILL-CHANGE OPTIMIZATIONS
  ============================================ */
.animate-on-scroll,
.reveal-on-scroll,
.parallax-layer,
.particle,
.morphing-shape {
    will-change: transform, opacity;
}

.card-premium:hover,
.btn-premium:hover,
.project-card-animated:hover {
    will-change: transform, box-shadow;
}

/* ============================================
  GPU ACCELERATION
  ============================================ */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ============================================
  CONTAINMENT
  ============================================ */
.section-with-graphics,
.card-premium,
.project-card-animated {
    contain: layout style paint;
}

/* ============================================
  LAZY LOADING STYLES
  ============================================ */
img[loading="lazy"],
video[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded,
video[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================
  CONTENT VISIBILITY
  ============================================ */
.off-screen-content {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

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

/* ============================================
  PRINT STYLES
  ============================================ */
@media print {
    .particles-container,
    .morphing-shape,
    .abstract-graphic,
    .fab-premium,
    .mobile-menu {
        display: none !important;
    }

    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}


/* Focus styles for accessibility - Auto-added */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}
