:root {
            --primary: #6490d7;
            --primary-dark: #4b73b5;
            --primary-light: #e8f0fe;
            --accent: #ff7597;
            --accent-dark: #e05376;
            --accent-yellow: #ffd166;
            --bg-base: #f0f5fc;
            --text-dark: #2b3a55;
            --text-muted: #62728d;
            --white: #ffffff;
            --card-shadow: 0 4px 20px rgba(100, 144, 215, 0.12);
            --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        }

        html { scroll-behavior: smooth; }

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

        body {
            font-family: var(--font-main);
            background-color: var(--bg-base);
            color: var(--text-dark);
            line-height: 1.5;
            position: relative;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            text-rendering: optimizeSpeed;
        }

        #pattern-bg {
            position: fixed;
            top: 0; left: 0;
            width: 100vw; height: 100vh;
            z-index: -1;
            pointer-events: none;
            opacity: 0.18;
            transform: translateZ(0);
        }

        h1, h2, h3, h4 {
            font-family: var(--font-main);
            font-weight: 800;
            letter-spacing: -0.02em;
        }

        /* HEADER */
        header {
            position: sticky;
            top: 0;
            z-index: 1000;
            max-width: 1150px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.97);
            border-radius: 0 0 20px 20px;
            box-shadow: 0 4px 16px rgba(100, 144, 215, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.8);
            border-top: none;
            contain: layout style;
        }

        nav {
            padding: 0.75rem 1.75rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.7rem;
            font-weight: 800;
            color: var(--primary);
            text-decoration: none;
        }

        .nav-links {
            display: flex;
            list-style: none;
            gap: 1.5rem;
            align-items: center;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--text-dark);
            font-weight: 700;
            font-size: 0.95rem;
            transition: color 0.15s ease;
        }

        .nav-links a:hover, .nav-links a.active { color: var(--primary); }

        .nav-btn-support {
            background: var(--accent);
            color: var(--white) !important;
            padding: 0.45rem 1.1rem;
            border-radius: 20px;
            font-weight: 800;
            text-decoration: none;
            font-size: 0.9rem;
            transition: transform 0.2s ease, background-color 0.2s ease;
            display: inline-block;
            box-shadow: 0 4px 12px rgba(255, 117, 151, 0.3);
        }

        .nav-btn-support:hover {
            background: var(--accent-dark);
            transform: translateY(-2px);
        }

        .main-container {
            max-width: 1150px;
            margin: 2rem auto;
            padding: 2.5rem;
            background: var(--white);
            border-radius: 24px;
            box-shadow: var(--card-shadow);
            border: 1px solid rgba(255, 255, 255, 0.8);
            contain: layout style paint;
        }

        /* PAGE HEADER */
        .page-header {
            text-align: center;
            padding-bottom: 2rem;
            border-bottom: 2px solid var(--primary-light);
        }

        .page-title {
            font-size: 3rem;
            line-height: 1.12;
            margin-bottom: 0.5rem;
        }

        .page-desc {
            color: var(--text-muted);
            font-size: 1.1rem;
            font-weight: 600;
            max-width: 65ch;
            margin: 0 auto;
        }

        /* FILTER CONTROLS */
        .filter-bar {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin: 2rem 0 2.5rem 0;
        }

        .filter-btn {
            background: var(--bg-base);
            color: var(--text-dark);
            border: 2px solid var(--primary-light);
            padding: 0.55rem 1.25rem;
            border-radius: 20px;
            font-weight: 700;
            font-size: 0.9rem;
            cursor: pointer;
            transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
            transform: translateZ(0);
        }

        .filter-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            transform: translateY(-1px) translateZ(0);
        }

        .filter-btn.active {
            background: var(--primary);
            border-color: var(--primary);
            color: var(--white);
            box-shadow: 0 4px 12px rgba(100, 144, 215, 0.25);
        }

        /* GALLERY GRID */
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5rem;
        }

        .gallery-grid[data-active-filter="cg"] .gallery-card:not([data-category="cg"]),
        .gallery-grid[data-active-filter="expressions"] .gallery-card:not([data-category="expressions"]),
        .gallery-grid[data-active-filter="ui"] .gallery-card:not([data-category="ui"]),
        .gallery-grid[data-active-filter="concept"] .gallery-card:not([data-category="concept"]) {
            display: none !important;
        }

        .gallery-card {
            background: var(--bg-base);
            border: 2px solid var(--primary-light);
            border-radius: 18px;
            overflow: hidden;
            transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1), border-color 0.2s ease;
            display: flex;
            flex-direction: column;
            cursor: pointer;
            contain: layout paint style;
            transform: translateZ(0);
            backface-visibility: hidden;
        }

        .gallery-card:hover {
            transform: translateY(-4px) translateZ(0);
            box-shadow: 0 8px 24px rgba(100, 144, 215, 0.18);
            border-color: var(--primary);
        }

        .gallery-thumb-wrapper {
            position: relative;
            width: 100%;
            height: 240px;
            background: var(--primary-light);
            overflow: hidden;
            transform: translateZ(0);
        }

        .gallery-thumb {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
            display: block;
            transform: translateZ(0);
            backface-visibility: hidden;
        }

        .gallery-card:hover .gallery-thumb {
            transform: scale(1.06) translateZ(0);
        }

        .gallery-badge {
            position: absolute;
            top: 0.8rem;
            left: 0.8rem;
            z-index: 10;
            pointer-events: none;
            background: rgba(255, 255, 255, 0.95);
            color: var(--primary-dark);
            font-weight: 800;
            font-size: 0.75rem;
            padding: 0.25rem 0.65rem;
            border-radius: 10px;
            border: 1px solid var(--primary-light);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.06);
        }

        .gallery-badge.badge-accent {
            color: var(--accent-dark);
            border-color: rgba(255, 117, 151, 0.3);
        }

        .gallery-info {
            padding: 1.2rem;
            display: flex;
            flex-direction: column;
            flex-grow: 1;
        }

        .gallery-title {
            font-size: 1.15rem;
            color: var(--text-dark);
            margin-bottom: 0.35rem;
        }

        .gallery-caption {
            font-size: 0.88rem;
            color: var(--text-muted);
            line-height: 1.5;
        }

        /* LIGHTBOX OVERLAY (HIGH-PERFORMANCE GPU SLIDER) */
        .lightbox-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.94);
            z-index: 2000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.5rem;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            transform: translateZ(0);
            will-change: opacity;
        }

        .lightbox-overlay.is-open {
            opacity: 1;
            pointer-events: auto;
        }

        .lightbox-container {
            background: var(--white);
            border-radius: 20px;
            max-width: 920px;
            width: 100%;
            max-height: 92vh;
            overflow: hidden;
            box-shadow: 0 20px 50px rgba(0,0,0,0.5);
            display: flex;
            flex-direction: column;
            position: relative;
            transform: scale(0.96) translateZ(0);
            transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            will-change: transform;
        }

        .lightbox-overlay.is-open .lightbox-container {
            transform: scale(1) translateZ(0);
        }

        .lightbox-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.5);
            color: var(--white);
            border: none;
            font-size: 1.2rem;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 30;
            transition: background 0.15s ease, transform 0.15s ease;
        }

        .lightbox-close:hover {
            background: var(--accent);
            transform: scale(1.08);
        }

        .lightbox-media {
            position: relative;
            background: #0b1120;
            height: 60vh;
            min-height: 320px;
            overflow: hidden;
            user-select: none;
            touch-action: pan-y;
            contain: strict;
        }

        .lightbox-img-viewport {
            position: relative;
            width: 100%;
            height: 100%;
        }

        /* Dual-Buffer Slide Strategy */
        .lightbox-img {
            position: absolute;
            inset: 0;
            max-width: 100%;
            max-height: 100%;
            margin: auto;
            object-fit: contain;
            padding: 1rem;
            border-radius: 6px;
            opacity: 0;
            pointer-events: none;
            will-change: transform, opacity;
            transform: translate3d(0, 0, 0);
            transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1), opacity 0.22s cubic-bezier(0.2, 0, 0, 1);
        }

        .lightbox-img.active {
            opacity: 1;
            transform: translate3d(0, 0, 0);
            pointer-events: auto;
        }

        .lightbox-img.exit-left { transform: translate3d(-50px, 0, 0); opacity: 0; }
        .lightbox-img.exit-right { transform: translate3d(50px, 0, 0); opacity: 0; }
        .lightbox-img.enter-right { transform: translate3d(50px, 0, 0); opacity: 0; }
        .lightbox-img.enter-left { transform: translate3d(-50px, 0, 0); opacity: 0; }

        .lightbox-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%) translateZ(0);
            background: rgba(255, 255, 255, 0.9);
            color: var(--text-dark);
            border: none;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            font-size: 1.2rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 20;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
            transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
        }

        .lightbox-nav-btn:hover {
            background: var(--primary);
            color: var(--white);
            transform: translateY(-50%) scale(1.08) translateZ(0);
        }

        .lightbox-nav-btn.prev { left: 1rem; }
        .lightbox-nav-btn.next { right: 1rem; }

        .lightbox-details {
            padding: 1.25rem 1.5rem;
            background: var(--white);
            contain: content;
        }

        .lightbox-meta-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.3rem;
        }

        .lightbox-tag {
            font-size: 0.75rem;
            font-weight: 800;
            color: var(--accent);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .lightbox-counter {
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-muted);
            background: var(--primary-light);
            padding: 0.2rem 0.6rem;
            border-radius: 12px;
        }

        .lightbox-modal-title {
            font-size: 1.35rem;
            color: var(--text-dark);
            margin-bottom: 0.3rem;
        }

        .lightbox-modal-desc {
            font-size: 0.92rem;
            color: var(--text-muted);
            line-height: 1.5;
        }

        /* BUTTONS & SUPPORT SECTION */
        .btn-primary {
            background: var(--primary);
            color: var(--white);
            padding: 0.85rem 1.75rem;
            border-radius: 30px;
            text-decoration: none;
            font-weight: 800;
            font-size: 1.05rem;
            box-shadow: 0 4px 12px rgba(100, 144, 215, 0.25);
            transition: transform 0.2s ease, background-color 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

        .btn-secondary {
            background: var(--bg-base);
            color: var(--text-dark);
            border: 2px solid var(--primary-light);
            padding: 0.85rem 1.5rem;
            border-radius: 30px;
            text-decoration: none;
            font-weight: 800;
            font-size: 1rem;
            transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        }

        .btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

        .section-title {
            font-size: 2.2rem;
            color: var(--primary);
            margin-bottom: 0.3rem;
        }

        .section-desc {
            color: var(--text-muted);
            font-size: 1.05rem;
            font-weight: 600;
        }

        .support-section {
            padding-top: 3.5rem;
            scroll-margin-top: 80px;
        }

        .support-box {
            background: linear-gradient(135deg, var(--primary-light) 0%, #fff0f5 100%);
            border-radius: 20px;
            padding: 2rem 2rem 1.2rem 2rem;
            border: 2px solid rgba(100, 144, 215, 0.2);
            text-align: center;
        }

        .support-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.25rem;
            margin-top: 1.5rem;
        }

        .support-card {
            background: var(--white);
            border-radius: 16px;
            padding: 1.5rem;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            border: 1.5px solid var(--primary-light);
        }

        .support-card-title {
            font-size: 1.2rem;
            color: var(--text-dark);
            margin-bottom: 0.4rem;
        }

        .support-card-desc {
            font-size: 0.88rem;
            color: var(--text-muted);
            margin-bottom: 1.2rem;
        }

        /* MINIMALIST COMPACT SOCIAL ICONS */
        .support-socials {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 1.25rem;
            margin-top: 0.85rem;
            padding: 0;
        }

        .social-icon-btn {
            background: none;
            border: none;
            box-shadow: none;
            padding: 2px;
            color: var(--text-dark);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            transition: color 0.15s ease, transform 0.15s ease;
        }

        .social-icon-btn:hover {
            color: var(--primary);
            transform: translateY(-1px);
        }

        footer {
            text-align: center;
            padding: 2rem;
            color: var(--text-muted);
            font-weight: 600;
            font-size: 0.9rem;
        }

        @media (max-width: 960px) {
            header { border-radius: 0; }
            .main-container { padding: 1.5rem; margin: 1rem; }
            .gallery-grid { grid-template-columns: repeat(2, 1fr); }
            .support-grid { grid-template-columns: 1fr; }
            .nav-links { display: none; }
        }

        @media (max-width: 560px) {
            .gallery-grid { grid-template-columns: 1fr; }
            .page-title { font-size: 2.3rem; }
            .lightbox-container { max-height: 95vh; }
            .lightbox-media { height: 50vh; }
            .lightbox-nav-btn { width: 38px; height: 38px; font-size: 1rem; }
            .lightbox-nav-btn.prev { left: 0.5rem; }
            .lightbox-nav-btn.next { right: 0.5rem; }
        }
