﻿:root {
    --base-spacing: 2vw;
    --gold-gradient: linear-gradient(135deg, #c5a059 0%, #f7e0a1 50%, #8c6a2d 100%);
}

.recent-works-wrapper {
    position: relative;
    width: 100%;
    background-color: #000000;
    overflow: hidden;
    padding: 10vw 0;
    min-height: 150vh;
}

.matrix-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #000 0%, transparent 15%, transparent 85%, #000 100%), radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 40%, #000 95%);
    z-index: 5;
    pointer-events: none;
}

@keyframes heavy-flicker {
    0% {
        opacity: 0;
        filter: brightness(5) contrast(2);
    }
    5% {
        opacity: 0.8;
    }
    10% {
        opacity: 0.2;
    }
    15% {
        opacity: 1;
        filter: brightness(1.5);
    }
    25% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
    70% {
        opacity: 0.8;
    }
    85% {
        opacity: 1;
        filter: brightness(1.2);
    }
    100% {
        opacity: 1;
        filter: brightness(1);
    }
}

.flicker-active {
    animation: heavy-flicker var(--flicker-duration) ease-in-out forwards;
}

.jp-matrix {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    grid-auto-rows: 32px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.55;
    justify-items: center;
    align-items: center;
}

    .jp-matrix span {
        font-family: 'Source Code Pro', monospace;
        font-size: 16px;
        color: #0a0a0a;
        animation: gold-flicker 8s infinite ease-in-out;
    }

@keyframes gold-flicker {
    0%, 100% {
        color: #0a0a0a;
    }

    50% {
        color: #b89535;
        text-shadow: 0 0 5px rgba(184, 149, 53, 0.2);
    }
}

.content-overlay {
    position: relative;
    z-index: 10;
}

.tab-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 100%;
    margin: 0 auto 4vw auto;
}

.filter-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #bdbdbd;
    font-family: 'Source Code Pro', monospace;
    font-size: clamp(14px, 1.2vw, 22px);
    letter-spacing: 0.3vw;
    padding: 1vw;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    position: relative;
}

    .filter-btn::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 50%;
        width: 0;
        height: 3px;
        background: #b89535;
        transition: all 0.4s ease;
        transform: translateX(-50%);
        box-shadow: 0 0 15px rgba(184, 149, 53, 0.6);
    }

    .filter-btn:hover {
        color: #ffe9a4;
        transform: scale(1.15);
    }

    .filter-btn.active {
        color: #b89535;
        font-weight: 600;
        transform: scale(1.15);
        text-shadow: 0 0 20px rgba(184, 149, 53, 0.4);
    }

        .filter-btn.active::after {
            width: 60%;
        }

/* DESCRIPTION */
.description-container {
    min-height: 8vw;
    margin-bottom: 4vw;
    display: flex;
    justify-content: center;
}

.section-description {
    font-family: 'Source Code Pro', monospace;
    color: #d4d4d4;
    font-size: clamp(10px, 0.9vw, 16px);
    text-align: center;
    max-width: 60vw;
    letter-spacing: 0.15vw;
    line-height: 2;
    text-transform: uppercase;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 3vw;
    width: 90%;
    margin: 0 auto;
}

.work-item {
    position: relative;
    aspect-ratio: 1/1.3;
    overflow: hidden;
    background: #050505;
    transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

    .work-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: brightness(0.7) grayscale(0.5);
        transition: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .work-item:hover img {
        filter: brightness(0.9) grayscale(0);
    }

.work-badge {
    position: absolute;
    top: 1vw;
    right: 0vw;
    background: var(--gold-gradient);
    color: #000;
    font-family: 'Roboto';
    font-size: clamp(10px, 0.6vw, 12px);
    font-weight: 900;
    padding: 0.4vw 1vw;
    z-index: 12;
    letter-spacing: 0.1vw;
    text-transform: uppercase;
}

/* FOOTER CTA */
.footer-cta {
    margin-top: 10vh;
    text-align: center;
    padding-bottom: 5vw;
}

.btn-all-works {
    font-family: 'Source Code Pro';
    color: #b89535;
    text-decoration: none;
    font-size: clamp(12px, 0.7vw, 13px);
    letter-spacing: 2px;
    border: 1px solid rgba(184, 149, 53, 0.2);
    padding: 1.2vw 3.5vw;
    transition: 0.5s;
    display: inline-block;
    font-weight:700;
}

    .btn-all-works:hover {
        background: #b89535;
        color: white;
        transition: all ease-in-out 0.3s;
    }

@media (max-width: 768px) {


    .recent-works-wrapper {
        padding: 10vw 0;
        min-height: 150vh;
    }


    .jp-matrix {
        opacity: 0.65;
    }

        .jp-matrix span {
            font-size: 18px;
        }

    .tab-filters {
        display: flex;
        justify-content: flex-start; 
        align-items: center;
        width: 90%;
        max-width: 100%;
        margin: 0 auto 5vw auto;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch; 
        scrollbar-width: none; 
        -ms-overflow-style: none; 
    }

        .tab-filters::-webkit-scrollbar {
            display: none; 
        }

    .filter-btn {
        flex: 0 0 auto; 
        background: transparent;
        border: none;
        color: #bdbdbd;
        font-family: 'Source Code Pro', monospace;
        font-size: 3vw;
        letter-spacing: 0.3vw;
        padding: 1vw 4vw; 
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        text-transform: uppercase;
        position: relative;
        display: inline-block;
    }

    .description-container {
        margin: 8vw;
        display: flex;
    }

    .section-description {
        font-size: 2.5vw;
        max-width: 100vw;
        text-align:start;
    }

    .works-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(30vw, 1fr));
        gap: 3vw;
        width: 90%;
        margin: 0 auto;
    }


    /* FOOTER CTA */
    .footer-cta {
        margin-top: 5vh;
        padding-bottom: 0;
    }
}


@media (min-width: 768px) and (max-width: 1024px) {

    .recent-works-wrapper {
        padding: 10vw 0;
        min-height: 100vh;
    }

    .works-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(20vw, 1fr));
        gap: 3vw;
        width: 90%;
        margin: 0 auto;
    }

    .description-container {
        margin: 8vw 0;
        display: flex;
    }

    .section-description {
        font-size: 1.7vw;
        max-width: 100vw;
        text-align: start;
    }

}