        .portfolio-section {
            padding: 120px 5% 50px;
            max-width: 1200px;
            margin: 0 auto;
            text-align: center;
        }

        .gallery-header {
            margin-bottom: 2rem;
            display: inline-block;
        }


        .gallery-header .underline {
            height: 4px;
            background: #00D8FF;
            width: 60%;
            margin: 10px auto 0;
            border-radius: 2px;
        }

        .category-filter {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 15px;
            margin: 0 auto 3.5rem auto;
            max-width: fit-content;
        }

        .filter-btn {
            position: relative;
            background: #49424D71;
            border: 1px solid rgba(255,255,255,0.05);
            color: white;
            padding: 0 25px;
            height: 3.5rem;
            border-radius: 100px;
            font-family: 'Bricolage Grotesque', sans-serif;
            box-shadow: 20px 20px 50px rgba(0, 0, 0, 0.5);
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
            backdrop-filter: blur(15px);
            transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
        }

                .filter-btn::before {
            content: "";
            position: absolute;
            inset: -1px; /* This controls the thickness of the blurred outline */
            border-radius: 100px; /* Slightly larger than the card's 15px to match the inset */
            
            background: linear-gradient(
                128deg,
                rgba(255, 255, 255, 0.80) 0%,
                rgba(255, 255, 255, 0.37) 33%,
                rgba(255, 255, 255, 0.00) 49%,
                rgba(255, 255, 255, 0.27) 66%,
                rgba(255, 255, 255, 0.53) 100%
            );

            filter: blur(2px);
            z-index: 1;

            /* THE FIX: This mask prevents the gradient from showing behind the card */
            -webkit-mask: 
                linear-gradient(#fff 0 0) content-box, 
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            padding: 1px; /* Match this to the "thickness" of your outline */
        }

        .filter-btn:not(.active):hover {
    transform: translateY(+0.2rem);
    box-shadow: 20px calc(20px - 0.5rem) 50px rgba(0, 0, 0, 0.5);
    background-color: #3d4042;
        }

        .filter-btn.active {
            background: #211821;
            box-shadow: inset 0px 10px 10px  rgba(0, 0, 0, 0.5);
            border: #333333 2px solid;
        }

        /* Prevent the blurred/gradient outline (::before) from showing on active buttons */
        .filter-btn.active::before {
            display: none !important;
        }


        @media screen and (max-width: 992px) {
                .filter-btn {
                            position: relative;
                            background: #49424D71;
                            border: 1px solid rgba(255,255,255,0.05);
                            color: white;
                            padding: 0 40px;
                            height: 6rem;
                            border-radius: 100px;
                            font-family: 'Bricolage Grotesque', sans-serif;
                            box-shadow: 20px 20px 50px rgba(0, 0, 0, 0.5);
                            font-weight: 500;
                            cursor: pointer;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            z-index: 1;
                            font-size: 2rem;
                            backdrop-filter: blur(15px);
                            transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
                            border: #33333300 2px solid;
                        }

                                .filter-btn::before {
                            content: "";
                            position: absolute;
                            inset: -1px; /* This controls the thickness of the blurred outline */
                            border-radius: 100px; /* Slightly larger than the card's 15px to match the inset */
                            
                            background: linear-gradient(
                                128deg,
                                rgba(255, 255, 255, 0.80) 0%,
                                rgba(255, 255, 255, 0.37) 33%,
                                rgba(255, 255, 255, 0.00) 49%,
                                rgba(255, 255, 255, 0.27) 66%,
                                rgba(255, 255, 255, 0.53) 100%
                            );

                            filter: blur(2px);
                            z-index: 1;

                            /* THE FIX: This mask prevents the gradient from showing behind the card */
                            -webkit-mask: 
                                linear-gradient(#fff 0 0) content-box, 
                                linear-gradient(#fff 0 0);
                            -webkit-mask-composite: xor;
                            mask-composite: exclude;
                            padding: 1px; /* Match this to the "thickness" of your outline */
                        }

                        .filter-btn:not(.active):hover {
                    transform: translateY(+0.2rem);
                    box-shadow: 20px calc(20px - 0.5rem) 50px rgba(0, 0, 0, 0.5);
                    background-color: #3d4042;
                        }

                        .filter-btn.active {
                            background: #211821;
                            box-shadow: inset 0px 15px 15px  rgba(0, 0, 0, 0.5);
                            border: #333333 2px solid;
                        }

                        /* Prevent the blurred/gradient outline (::before) from showing on active buttons */
                        .filter-btn.active::before {
                            display: none !important;
                        }
    }
}


        .masonry-grid {
            display: flex;
            gap: 25px;
            width: 100%;
        }

        .masonry-column {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        .gallery-item {
            position: relative;
            background: #342E3973;
            border-radius: 20px;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.3s cubic-bezier(.2,.9,.2,1), 
                        box-shadow 0.3s ease,
                        opacity 0.5s ease;
            transform: translateY(20px);
            opacity: 0;
        }

           .gallery-item::before {
            content: "";
            position: absolute;
            inset: 0px; /* This controls the thickness of the blurred outline */
            border-radius: 20px; /* Slightly larger than the card's 15px to match the inset */
            
            background: linear-gradient(
                128deg,
                rgba(255, 255, 255, 0.80) 0%,
                rgba(255, 255, 255, 0.37) 33%,
                rgba(255, 255, 255, 0.00) 49%,
                rgba(255, 255, 255, 0.27) 66%,
                rgba(255, 255, 255, 0.53) 100%
            );

            filter: blur(2px);
            z-index: 1;

            /* THE FIX: This mask prevents the gradient from showing behind the card */
            -webkit-mask: 
                linear-gradient(#fff 0 0) content-box, 
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            padding: 1px; /* Match this to the "thickness" of your outline */
        }

        .gallery-item.visible {
            transform: translateY(0);
            opacity: 1;
        }

        .gallery-item:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
        }

        .gallery-item img {
            width: 100%;
            height: auto;
            display: block;
            transition: filter 0.3s ease;
        }

        .item-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 25px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .gallery-item:hover .item-overlay { opacity: 1; }

        .item-title {
            color: white;
            font-weight: 700;
            font-size: 1.1rem;
            text-align: left;
            font-family: 'Bricolage Grotesque', sans-serif;
        }

        /* Lightbox - Fixed UI Overlay */
        #gallery-modal {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 10000;
            background: rgba(0, 0, 0, 0.632);
            backdrop-filter: blur(90px);
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        #gallery-modal.active { display: flex; opacity: 1; }

        .modal-content-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px;
            overflow: hidden; 
        }

        #modal-image {
            max-width: 83vw;
            max-height: 55vh;
            object-fit: contain;
            border-radius: 12px;
            box-shadow: 0 0 50px rgba(0,0,0,0.5);
            z-index: 10001;
            will-change: transform, opacity;
        }

        /* Animations for Arrow Navigation */
        @keyframes slideInRight {
            from { transform: translateX(50px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        @keyframes slideInLeft {
            from { transform: translateX(-50px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        .animate-right { animation: slideInRight 0.4s cubic-bezier(.2,.9,.2,1) forwards; }
        .animate-left { animation: slideInLeft 0.4s cubic-bezier(.2,.9,.2,1) forwards; }

        .modal-nav {
            position: fixed;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255,255,255,0.05);
            color: white;
            width: 60px;
            height: 60px;
            cursor: pointer;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            z-index: 10005;
        }

        @media screen and (max-width: 992px) {
        .modal-nav {
            position: fixed-bottom: 100px;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255,255,255,0.05);
            color: white;
            width: 200px;
            height: 200px;
            cursor: pointer;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            z-index: 10005;
        }
}


           .modal-nav::before {
            content: "";
            position: absolute;
            inset: 0px; /* This controls the thickness of the blurred outline */
            border-radius: 100px; /* Slightly larger than the card's 15px to match the inset */
            
            background: linear-gradient(
                128deg,
                rgba(255, 255, 255, 0.80) 0%,
                rgba(255, 255, 255, 0.37) 33%,
                rgba(255, 255, 255, 0.00) 49%,
                rgba(255, 255, 255, 0.27) 66%,
                rgba(255, 255, 255, 0.53) 100%
            );

            filter: blur(2px);
            z-index: 1;

            /* THE FIX: This mask prevents the gradient from showing behind the card */
            -webkit-mask: 
                linear-gradient(#fff 0 0) content-box, 
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            padding: 1px; /* Match this to the "thickness" of your outline */
        }

        .modal-nav:hover {
            transform: translateY(-50%) scale(1.1);
        }

        .prev-btn { left: 40px; }
        .next-btn { right: 40px; }

        .close-modal {
            position: fixed;
            top: 30px;
            right: 40px;
            background: rgba(255,255,255,0.05);
            width: 60px;
            height: 60px;
            border-radius: 50%;
            color: white;
            font-size: 30px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            z-index: 10006;
        }

                   .close-modal::before {
            content: "";
            position: absolute;
            inset: 0px; /* This controls the thickness of the blurred outline */
            border-radius: 100px; /* Slightly larger than the card's 15px to match the inset */
            
            background: linear-gradient(
                128deg,
                rgba(255, 255, 255, 0.80) 0%,
                rgba(255, 255, 255, 0.37) 33%,
                rgba(255, 255, 255, 0.00) 49%,
                rgba(255, 255, 255, 0.27) 66%,
                rgba(255, 255, 255, 0.53) 100%
            );

            filter: blur(2px);
            z-index: 1;

            /* THE FIX: This mask prevents the gradient from showing behind the card */
            -webkit-mask: 
                linear-gradient(#fff 0 0) content-box, 
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            padding: 1px; /* Match this to the "thickness" of your outline */
        }

     .close-modal:hover {
            transform: scale(1.1);
        }


        .modal-info {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            padding: 40px;
            display: flex;
            flex-direction: column;
            align-items: center;
            background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
            z-index: 10002;
            pointer-events: none;
            will-change: transform, opacity;
        }

        .modal-tags-container {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .modal-tag {
            background: #ffffff6f;
            color: #000000;
            padding: 4px 15px;
            border-radius: 20px;
            font-family: 'Bricolage Grotesque', sans-serif;
            font-weight: 800;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 1px;
        }


        .modal-caption {
            color: #fff;
            font-family: 'Bricolage Grotesque', sans-serif;
            font-size: 2.2rem;
            margin-bottom: 8px;
            text-shadow: 0 2px 10px rgba(0,0,0,0.5);
        }

        .modal-description {
            color: rgba(255, 255, 255, 0.75);
            font-family: 'Bricolage Grotesque', sans-serif;
            font-size: 1.05rem;
            max-width: 600px;
            text-align: center;
            line-height: 1.5;
        }

        @media screen and (max-width: 992px) {
            .portfolio-section { padding-top: 80px; }
            .masonry-grid { flex-direction: column; gap: 20px; }
            .modal-nav { width: 45px; height: 45px; }
            .prev-btn { left: 15px; }
            .next-btn { right: 15px; }
            .close-modal { top: 20px; right: 20px; width: 40px; height: 40px; }
            .modal-info { padding: 25px; }
            .modal-caption { font-size: 1.6rem; }
            .modal-description { font-size: 0.9rem; max-width: 85%; }
            #modal-image { max-width: 90vw; max-height: 50vh; }
        }