        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: black;
            min-height: 100vh;
            overflow-x: hidden;
            perspective: 1000px;
        }


        html body {
            perspective: none;
        }

        .perspective {
            perspective: 1000px;
        }

        .gallery-container {
            padding: 0.1rem;
            /* minimal padding */
            width: 100%;
            margin: 0 auto;

        }

        .header {
            position: relative;
            top: 50%;
            left: 50%;
            transform: translate(-50%, 10%);
            z-index: 0;
            pointer-events: none;
        }

        .header h1 {
            font-family: 'DotGothic16';
            font-style: normal;
            font-size: 10rem;
            color: rgba(255, 255, 255, 0.15);
            letter-spacing: 20px;
            white-space: nowrap;
            user-select: none;
            font-weight: 900;
            margin-top: 2%;
            margin-left: 1%;

        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-auto-rows: 300px;
            gap: 0;
            position: relative;
            width: 100%;

        }

        .gallery-item {
            position: relative;
            border-radius: 10px;
            overflow: hidden;
            cursor: pointer;
            box-shadow:
                0 10px 30px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.05);
            transition:
                transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                filter 0.8s ease,
                box-shadow 0.8s ease,
                z-index 0.8s ease;
            transform-origin: center;
            z-index: 1;

            transform-style: preserve-3d;
            will-change: transform, box-shadow, z-index;
        }

        .square {
            aspect-ratio: 1;
        }

        .horizontal {
            grid-column: span 2;
            aspect-ratio: 2/1;
        }

        .vertical {
            grid-row: span 2;
            aspect-ratio: 1/1.5;
        }

        .large {
            grid-column: span 2;
            grid-row: span 2;
            aspect-ratio: 1;
        }

        .gallery-item img,
        .gallery-item video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            line-height: 0;
            transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .gallery-item video {
            opacity: 1;
            /* Videos shouldn't start transparent like lazy-loaded images might */
        }

        .gallery-item img.loaded,
        .gallery-item video {
            opacity: 1;
        }

        .gallery-item:hover {
            transform: scale(1.08) rotate(0deg) translateZ(50px);
            filter: saturate(1.2) brightness(1.1);
            box-shadow:
                0 25px 60px rgba(0, 0, 0, 0.7),
                0 0 30px rgba(255, 121, 0, 0.5);
            z-index: 100;
        }

        .gallery-item:hover img,
        .gallery-item:hover video {
            transform: scale(1.05);
        }

        .gallery-item::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.31);
            pointer-events: none;
            transition: opacity 0.8s ease;
        }

        .gallery-item:hover::after {
            opacity: 0.3;
        }

        .gallery-item::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: rgba(0, 0, 0, 0);
            z-index: -1;
            border-radius: 12px;
            opacity: 0;
            transition: opacity 0.8s ease;
        }

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

        /* Controls */
        .controls {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 15px;
            z-index: 1000;
        }

        .control-btn {
            background: rgba(255, 119, 0, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 119, 0, 0.2);
            color: #ff7700;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1.2rem;

        }

        .control-btn:hover {
            background: rgba(255, 119, 0, 0.2);
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(255, 119, 0, 0.2);

        }

        /* Gooey effect container */
        .gooey-effect {
            filter: url(#gooey);
            position: relative;
            z-index: 1;

        }


        .mode-toggle {
            position: fixed;
            top: 30px;
            left: 30px;
            z-index: 10000;
            /* keep above everything */
        }

        .toggle-btn {
            background: rgba(255, 119, 0, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 119, 0, 0.2);
            color: #ff7700;
            padding: 12px 25px;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1rem;
            display: inline-flex;
            align-items: center;
            gap: 10px;

        }


        .toggle-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        }

        .content {
            height: 2500px;
            padding: 20px;
        }

        @keyframes floatBtn {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-5px);
            }
        }

        .footer {
            margin: 2rem auto;
            width: fit-content;
            padding: 0.6rem 1.5rem;
            font-size: 1rem;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 50px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
            color: #ff7700;
            font-weight: 700;
            display: inline-block;
            white-space: nowrap;
            text-align: center;
        }

        .loading-spinner {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 40px;
            height: 40px;
            border: 3px solid rgba(255, 119, 0, 0.3);
            border-radius: 50%;
            border-top-color: #ff7700;
            animation: spin 1s ease-in-out infinite;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .gallery-item.loading .loading-spinner {
            opacity: 1;
        }

        @keyframes spin {
            to {
                transform: translate(-50%, -50%) rotate(360deg);
            }
        }

        @media (max-width: 1200px) {
            .gallery-grid {
                grid-template-columns: repeat(3, 1fr);
            }

        }

        @media (max-width: 900px) {
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .header h1 {
                font-size: 3rem;
            }

            .header p {
                font-size: 1.1rem;
            }
        }

        @media (max-width: 768px) {
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0;
                width: 100%;
                padding: 0 15px;
            }

            .header h1 {
                font-size: 3rem;
                margin-top: 10%;
            }


        }

        @media (max-width: 600px) {
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
                grid-auto-rows: 200px;
                width: 100%;
            }

            h1 {
                margin: 75px 25px;
            }

            .floating-text {
                font-size: 5rem;
            }
        }

        @media (max-width: 412px) {
            .header h1 {
                margin-top: 20%;
            }
        }


        @media (max-width: 320px) {
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0;
                width: 100%;
            }

            .header h1 {
                font-size: 3.6rem;
                margin-top: 30%;
            }

        }

        .home-icon {
            width: 20px;
            /* adjust size */
            height: 20px;
            object-fit: contain;
            /* keep aspect ratio */
        }

        .toggle-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            /* space between image & text */
        }