/* --- PROJECTS SECTION ENGINE --- */


.project-section::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 150px; height: 100%;
    background: linear-gradient(to right, transparent, #050505);
    pointer-events: none; /* Allows clicking through the fade */
    z-index: 5;
}
.projects-section {
    padding: 50px 0 50px 0;
    overflow: hidden;
    position: relative;
}

.section-header {
    padding: 0 8%;
    margin-bottom: 60px;
}
/* 1. Standardized Title Scale for Laptop */
#projects .hero-title {
    font-size: clamp(2.2rem, 5vw, 4.2rem) !important; 
    line-height: 1.0;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.horizontal-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 8%;
    /* REMOVE scroll-behavior: smooth; if it feels laggy with JS */
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    * We handle the "speed" in JS, so we keep this set to auto for instant response */
    scroll-behavior: auto; 
    overscroll-behavior-x: contain; 
    -ms-overflow-style: none;
    scrollbar-width: none;/* Prevents the whole page from 'bouncing' on track ends */

}



/* Hide scrollbar but keep functionality */
.horizontal-scroll-wrapper::-webkit-scrollbar {
    display: none;
}


/* Ensure the track is ready for high-speed hardware acceleration */
.project-track {
    display: flex;
    gap: 40px;
    width: max-content;
    will-change: transform; /* Tells the browser to use the GPU */
}


/* --- THE PROJECT CARD --- */
.project-card {
    width: 450px;
    flex-shrink: 0;
    cursor: pointer;
}

.project-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #0a0a0a;
    overflow: hidden;
    border: 1px solid rgba(0, 71, 171, 0.2);
}

.base-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

/* THE STRUCTURAL OVERLAY (The Magic) */
.structural-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: rgba(0, 5, 15, 0.7);
    backdrop-filter: blur(5px);
    transition: opacity 0.5s ease;
}

.wireframe-svg {
    width: 70%;
    height: 70%;
    filter: drop-shadow(0 0 15px #00d4ff);
}

/* Hover States */
.project-card:hover .base-image {
    transform: scale(1.1);
    opacity: 0.3;
}

.project-card:hover .structural-overlay {
    opacity: 1;
}

/* Info Styling */
.project-info {
    margin-top: 25px;
}

.project-category {
    font-size: 10px;
    color: #00d4ff;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 900;
}

.project-info h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 8px 0;
}

.project-info p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 1.6;
}
.gallery-progress-container {
    width: 300px;
    height: 2px;
    background: rgba(0, 71, 171, 0.1);
    margin: 40px auto 0;
    position: relative;
    border-radius: 2px;
}

.gallery-progress-bar {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    width: 0%; /* Controlled by JS */
    background: #00d4ff;
    box-shadow: 0 0 10px #00d4ff;
    transition: width 0.1s ease-out;
}

/* Mobile Tweak */
@media (max-width: 768px) {
    .project-card { width: 300px; }
}