/* ===== PORTFOLIO PAGE STYLES ===== */

/* Portfolio Section */
.portfolio-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-subtitle {
    text-align: center;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--text-light);
    margin-top: -40px;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 600;
    line-height: 1.6;
    text-shadow: 0 0 4px rgba(0, 0, 0, 1),
        0 0 8px rgba(0, 0, 0, 1),
        0 0 12px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 0, 0, 0.6),
        0 2px 6px rgba(0, 0, 0, 0.9);
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.4);
}

/* Slideshow Container */
.slideshow-container {
    position: relative;
    max-width: 1200px;
    height: 700px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface-alpha-05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color-light);
    box-shadow: 0 20px 60px var(--shadow-color-medium);
    contain: layout style paint;
}

/* Slide Wrapper */
.slide-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Slides */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-dark);
    /* GPU acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.slide:not(.active) {
    will-change: opacity;
}

.slide.active {
    opacity: 1;
    z-index: 1;
    will-change: auto;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    /* GPU acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Slide Controls (Previous/Next Arrows) */
.slide-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    background: var(--surface-alpha-10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color-light);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    /* GPU acceleration */
    backface-visibility: hidden;
}

.slide-control:hover {
    background: var(--surface-alpha-15);
    border-color: var(--border-color-medium);
    box-shadow: 0 8px 30px var(--shadow-color-medium);
    transform: translateY(-50%) scale(1.1) translateZ(0);
}

.slide-control:active {
    transform: translateY(-50%) scale(0.95) translateZ(0);
}

.slide-control:hover,
.slide-control:active {
    will-change: transform, background, box-shadow;
}

.slide-control:not(:hover):not(:active) {
    will-change: auto;
}

.slide-control.prev {
    left: 20px;
}

.slide-control.next {
    right: 20px;
}

.slide-control svg {
    width: 24px;
    height: 24px;
}

/* Play/Pause Button */
.play-pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--surface-alpha-10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color-light);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    /* GPU acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.play-pause-btn:hover {
    background: var(--surface-alpha-15);
    border-color: var(--border-color-medium);
    box-shadow: 0 8px 30px var(--shadow-color-medium);
    transform: scale(1.1) translateZ(0);
}

.play-pause-btn:active {
    transform: scale(0.95) translateZ(0);
}

.play-pause-btn:hover,
.play-pause-btn:active {
    will-change: transform, background, box-shadow;
}

.play-pause-btn:not(:hover):not(:active) {
    will-change: auto;
}

.play-pause-btn svg {
    width: 20px;
    height: 20px;
}

/* GPU Acceleration Hints */
.slideshow-container {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Portfolio Grid Section */
.portfolio-grid-section {
    padding: 120px 20px 80px;
    min-height: auto;
}

.grid-section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 15px;
}

.grid-section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}




/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 1024px) {
    .slideshow-container {
        max-width: 900px;
        height: 600px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .portfolio-section {
        padding: 100px 20px 60px;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
        line-height: 1.5;
    }

    .slideshow-container {
        height: 500px;
        border-radius: 15px;
    }

    .slide-control {
        /* Touch-friendly size */
        width: 50px;
        height: 50px;
        /* Better visibility on mobile */
        background: var(--surface-alpha-15);
    }

    .slide-control.prev {
        left: 15px;
    }

    .slide-control.next {
        right: 15px;
    }

    .slide-control svg {
        width: 24px;
        height: 24px;
    }

    .play-pause-btn {
        /* Touch-friendly size */
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
        background: var(--surface-alpha-15);
    }

    .play-pause-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* Improve touch feedback */
    .slide-control:active,
    .play-pause-btn:active {
        transform: scale(0.95);
        background: var(--surface-alpha-10);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .portfolio-section {
        padding: 100px 15px 50px;
    }
    
    .slideshow-container {
        height: 400px;
        border-radius: 12px;
    }
    
    .slide-control {
        width: 44px;
        height: 44px;
    }
    
    .slide-control.prev {
        left: 10px;
    }

    .slide-control.next {
        right: 10px;
    }
    
    .slide-control svg {
        width: 20px;
        height: 20px;
    }
    
    .play-pause-btn {
        width: 44px;
        height: 44px;
        top: 10px;
        right: 10px;
    }
    
    .play-pause-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .slideshow-container {
        height: 350px;
    }
}

/* Add to @media (max-width: 768px) */
.portfolio-grid-section {
    padding: 100px 20px 60px;
}

.grid-section-title {
    font-size: 2rem;
}

.grid-section-subtitle {
    font-size: 1rem;
    margin-bottom: 40px;
}

/* Add to @media (max-width: 480px) */
.portfolio-grid-section {
    padding: 90px 15px 50px;
}

.grid-section-title {
    font-size: 1.75rem;
}

.portfolio-grid {
    border-radius: 12px;
}
