/* ===================================================================
 * INFINITE SCROLL PROJECTS SECTION
 * Purple gradient background + Black obsidian cards
 * ===================================================================
 */

.projects-infinite {
    position: relative;
    padding: 120px 0 100px;
    background: linear-gradient(135deg, #4a1d96 0%, #000000 50%, #5a2cc5 100%);
    overflow: hidden;
}

/* Subtle Noise Texture Overlay */
.projects-infinite::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

.projects-infinite-container {
    position: relative;
    z-index: 2;
    max-width: 100%;
}

/* Section Header */
.projects-infinite .section-header {
    text-align: center;
    margin-bottom: 80px;
    padding: 0 24px;
}

.projects-infinite .section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.projects-infinite .section-title {
    font-size: 56px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 16px;
    line-height: 1.1;
}

.projects-infinite .section-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Infinite Scroll Wrapper */
.infinite-scroll-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 24px 0;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* Infinite Scroll Track */
.infinite-scroll-track {
    display: flex;
    gap: 32px;
    animation: scrollLeft 60s linear infinite;
    will-change: transform;
}

/* Pause on Hover */
.infinite-scroll-wrapper:hover .infinite-scroll-track {
    animation-play-state: paused;
}

/* Scroll Animation Keyframes */
@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Project Card - Black Obsidian */
.project-card {
    position: relative;
    flex: 0 0 420px;
    width: 420px;
    background: rgba(10, 10, 12, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    border-color: rgba(122, 76, 255, 0.4);
}

/* Project Image */
.project-card .project-image {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: #000;
}

.project-card .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

/* Category Badge */
.project-category {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    background: rgba(122, 76, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* Project Info */
.project-info {
    padding: 28px 24px 24px;
}

.project-title {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 12px;
    line-height: 1.3;
}

.project-description {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Project Link */
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: rgba(122, 76, 255, 0.2);
    border-color: #7A4CFF;
    transform: translateX(4px);
}

.project-link i {
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(4px);
}

/* Scroll Hint */
.scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 60px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.scroll-hint i {
    font-size: 18px;
    animation: mouseFloat 2s ease-in-out infinite;
}

@keyframes mouseFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .projects-infinite {
        padding: 80px 0 60px;
    }
    .projects-infinite .section-title {
        font-size: 44px;
    }
    .projects-infinite .section-subtitle {
        font-size: 16px;
    }
    .project-card {
        flex: 0 0 360px;
        width: 360px;
    }
    .project-card .project-image {
        height: 220px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .projects-infinite {
        padding: 60px 0 40px;
    }
    .projects-infinite .section-header {
        margin-bottom: 50px;
    }
    .projects-infinite .section-title {
        font-size: 36px;
    }
    .projects-infinite .section-subtitle {
        font-size: 15px;
        padding: 0 16px;
    }
    .infinite-scroll-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        mask-image: none;
        -webkit-mask-image: none;
        padding: 16px 24px;
        scrollbar-width: none;
    }
    .infinite-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }
    .infinite-scroll-track {
        animation: none;
        gap: 20px;
    }
    .project-card {
        flex: 0 0 320px;
        width: 320px;
        scroll-snap-align: start;
    }
    .project-card .project-image {
        height: 200px;
    }
    .project-title {
        font-size: 20px;
    }
    .project-description {
        font-size: 13px;
    }
    .scroll-hint {
        margin-top: 40px;
        font-size: 13px;
    }
    .scroll-hint span {
        display: none;
    }
}

@media (max-width: 480px) {
    .projects-infinite .section-title {
        font-size: 28px;
    }
    .project-card {
        flex: 0 0 280px;
        width: 280px;
    }
    .project-card .project-image {
        height: 180px;
    }
    .project-info {
        padding: 20px 18px 18px;
    }
}
