/* PORTFOLIO SECTION - "THE INFINITE GALLERY" */
.portfolio-section {
    position: relative;
    padding: 200px 0;
    background-color: #000;
    overflow: hidden;
    z-index: 7;
    margin-top: -50px;
    clip-path: polygon(0 150px, 100% 0, 100% 100%, 0 100%);
}

.portfolio-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.portfolio-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--color-cyan);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
}

.portfolio-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: transparent;
    -webkit-text-stroke: 2px #fff;
    text-transform: uppercase;
    line-height: 1;
}

.portfolio-title span {
    color: #fff;
    -webkit-text-stroke: 0;
}

/* THE SCROLL TRACKS */
.gallery-track {
    display: flex;
    gap: 30px;
    width: max-content;
    padding: 20px 0;
    will-change: transform;
}

/* Skew Effect Wrapper */
.gallery-wrapper {
    transform: skewY(-4deg);
    transform-origin: center;
    margin: 30px 0;
}

.track-1 {
    animation: marqueeLeft 80s linear infinite;
}

.track-2 {
    animation: marqueeLeft 90s linear infinite reverse;
}

.track-3 {
    animation: marqueeLeft 100s linear infinite;
}

.gallery-wrapper:hover .gallery-track {
    animation-play-state: paused;
}

@keyframes marqueeLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Images */
.pf-item {
    position: relative;
    width: 350px;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: grayscale(100%) brightness(0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    /* Clickable */
}

.pf-item:hover {
    transform: scale(1.1);
    filter: grayscale(0%) brightness(1.1);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    z-index: 10;
    border-color: #fff;
}

.pf-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay Info */
.pf-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.pf-item:hover .pf-overlay {
    opacity: 1;
    transform: translateY(0);
}

.pf-id {
    color: var(--color-cyan);
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

/* LIGHTBOX MODAL */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-modal.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    animation: zoomIn 0.3s ease;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: transform 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    transform: rotate(90deg);
    color: var(--color-cyan);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pf-item {
        width: 250px;
        height: 180px;
    }

    .portfolio-title {
        font-size: 3rem;
        -webkit-text-stroke: 1px #fff;
    }

    .gallery-wrapper {
        transform: skewY(0);
    }
}