/* Mobile Performance Optimizations */

/* Disable heavy animations on mobile */
@media (max-width: 768px) {
    /* Disable parallax effects */
    .hero-content {
        transform: none !important;
    }
    
    /* Simplify video container for mobile */
    .portfolio-video-container {
        height: 60vh; /* Reduce height on mobile */
        background: #000;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure video items are visible */
    .portfolio-video-item {
        display: block !important;
        visibility: visible !important;
        opacity: 0;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .portfolio-video-item.active {
        opacity: 1 !important;
        z-index: 2 !important;
    }
    
    /* Ensure videos are visible */
    .portfolio-video {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        background: #000 !important;
        position: relative !important;
    }
    
    /* Mobile play button styling */
    .mobile-play-button {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 80px !important;
        height: 80px !important;
        background: rgba(99, 102, 241, 0.8) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: white !important;
        font-size: 2rem !important;
        cursor: pointer !important;
        z-index: 10 !important;
        border: 3px solid white !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-play-button:hover {
        background: rgba(99, 102, 241, 1) !important;
        transform: translate(-50%, -50%) scale(1.1) !important;
    }
    
    /* Disable cursor effects on mobile */
    .custom-cursor,
    .cursor-follower {
        display: none !important;
    }
    
    /* Reduce animation complexity */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
    
    /* Simplify hover effects */
    .portfolio-item:hover,
    .social-link:hover,
    .nav-link:hover {
        transform: none !important;
    }
    
    /* Reduce shadow complexity */
    .portfolio-item,
    .experience-item {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    /* Optimize text rendering */
    .hero-title,
    .project-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .project-description {
        font-size: 1rem !important;
    }
    
    /* Reduce padding and margins */
    .full-screen {
        padding: 2rem 0 !important;
        min-height: 80vh !important;
    }
    
    /* Simplify navigation dots */
    .nav-dots {
        right: 1rem !important;
        gap: 0.5rem !important;
    }
    
    .nav-dot {
        width: 8px !important;
        height: 8px !important;
    }
    
    /* Disable magnetic effects */
    .portfolio-item,
    .social-link,
    .nav-link {
        transform: none !important;
    }
}

/* Ultra-mobile optimizations */
@media (max-width: 480px) {
    .portfolio-video-container {
        height: 50vh;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .project-title {
        font-size: 1.5rem !important;
    }
    
    .video-overlay {
        padding: 2rem !important;
    }
    
    .full-screen {
        padding: 1rem 0 !important;
        min-height: 70vh !important;
    }
}

/* Performance optimizations for all devices */
.portfolio-video {
    will-change: transform, opacity;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Reduce repaints and reflows */
.portfolio-video-item {
    contain: layout style paint;
}

/* Optimize scroll performance */
body {
    scroll-behavior: auto; /* Disable smooth scroll on mobile */
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .portfolio-video {
        animation: none !important;
    }
}
