@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@200;400;700&display=swap');

        :root {
            --electric-blue: #00f2ff;
            --crimson: #dc143c;
            --deep-obsidian: #0a0a0c;
            --glass: rgba(255, 255, 255, 0.03);

            --primary: #00f2ff;     /* Signature Electric blue */
            --secondary: #dc143c;   /* Signature Crimson Red */

            --primary-rgb: 0, 242, 255;
            --secondary-rgb: 220, 20, 60;
        }

        .card-hover:hover {
            box-shadow: 
                -10px -10px 30px -10px rgba(var(--primary-rgb), 0.25), 
                10px 10px 30px -10px rgba(var(--secondary-rgb), 0.25);
        }

        /* 1. Cyber-Sunset (Deep violet to fiery orange) */
        [data-theme="cyber-sunset"] { 
            --primary: #ff5f6d; --primary-rgb: 255, 95, 109;
            --secondary: #6a11cb; --secondary-rgb: 106, 17, 203;
        }

        /* 2. Acid-Neon (Sharp, energetic, and highly readable) */
        [data-theme="acid-neon"] { 
            --primary: #ccff00; --primary-rgb: 204, 255, 0;
            --secondary: #00f2ff; --secondary-rgb: 0, 242, 255;
        }

        /* 3. Midnight-Aurora (Cool, ethereal, and premium) */
        [data-theme="midnight-aurora"] { 
            --primary: #00d2ff; --primary-rgb: 0, 210, 255;
            --secondary: #9d50bb; --secondary-rgb: 157, 80, 187;
        }

        /* 4. Molten-Gold (Sophisticated, rich, and high contrast) */
        [data-theme="molten-gold"] { 
            --primary: #ffcc33; --primary-rgb: 255, 204, 51;
            --secondary: #ff6600; --secondary-rgb: 255, 102, 0;
        }

        /* 5. Deep-Ocean (Sophisticated, cool, and extremely easy on the eyes) */
        [data-theme="deep-ocean"] { 
            --primary: #008080; --primary-rgb: 0, 128, 128;
            --secondary: #40e0d0; --secondary-rgb: 64, 224, 208;
        }

        /* 6. Matrix-Vibe (Sharp, digital, high contrast, and very 'code-y') */
        [data-theme="matrix-vibe"] { 
            --primary: #00ff41; --primary-rgb: 0, 255, 65;
            --secondary: #333333; --secondary-rgb: 51, 51, 51;
        }

        body {
            background-color: var(--deep-obsidian);
            color: #ffffff;
            font-family: 'Inter', sans-serif;
            overflow-x: hidden;
            scroll-behavior: smooth;
        }

        body.modal-open {
            overflow: hidden;
        }

        h1, h2, h3, .font-heading {
            font-family: 'Space Grotesk', sans-serif;
        }

        .blue-gradient {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .bg-mesh {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            background-image: 
                radial-gradient(circle at 20% 30%, rgba(0, 242, 255, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(0, 119, 255, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 10% 90%, rgba(220, 20, 60, 0.02) 0%, transparent 30%);
        }

        /* --- Desktop Nav Styles --- */
        .nav-blur {
            backdrop-filter: blur(16px);
            background: rgba(10, 10, 12, 0.75);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .nav-link {
            position: relative;
            padding: 0.5rem 0.75rem;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            color: rgba(255, 255, 255, 0.6);
        }

        .nav-link:hover { color: #fff; }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: -2px; left: 50%;
            width: 0; height: 2px;
            background: var(--primary);
            transition: all 0.3s ease;
            transform: translateX(-50%);
            border-radius: 2px;
        }

        .nav-link:hover::after { width: 16px; bottom: 2px; }

        /* --- Mobile Nav Overlay --- */
        #mobile-nav {
            display: none;
            position: fixed; top: 0; left: 0;
            width: 100%; height: 100vh;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(10px);
            z-index: 9999999;
            opacity: 0;
            transition: opacity 0.4s ease;
            justify-content: center;
            align-items: center;
        }

        /* --- Mobile Nav Card --- */
        #mobile-nav {
            display: none;
            position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
            background: rgba(10, 10, 12, 0.95);
            backdrop-filter: blur(20px);
            z-index: 9999999;
            flex-direction: column;
            justify-content: center; align-items: center;
            gap: 40px; opacity: 0; transition: opacity 0.4s ease;
        }

        .mobile-links {
            display: flex;
            flex-direction: column; /* This is the "missing" link */
            align-items: center;
            gap: 30px;
        }

        .mobile-links a {
            color: rgba(255, 255, 255, 0.7);
            font-size: 1.5rem;
            font-weight: 600;
            text-transform: uppercase;
            text-decoration: none;
            letter-spacing: 0.1em;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }

        .mobile-links a:hover {
            color: var(--primary);
            /* The bloom effect - same variable logic as your buttons! */
            text-shadow: 0 0 20px rgba(var(--primary-rgb), 0.6);
            transform: scale(1.1);
        }

        .mobile-links a::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            width: 0;
            height: 3px;
            background: var(--primary);
            transition: width 0.3s ease;
            transform: translateX(-50%);
            border-radius: 2px;
        }

        .mobile-links a:hover::after {
            width: 30px; /* Small, refined underscore */
        }

        .mobile-socials {
            display: flex;
            gap: 30px;
            font-size: 1.5rem;
            color: rgba(255, 255, 255, 0.5);
            transition: color 0.3s ease;
        }

        .mobile-socials a:hover {
            color: var(--primary);
            /* The "Forbidden" glow effect */
            text-shadow: 0 0 15px rgba(var(--primary-rgb), 0.6);
            transform: translateY(-3px);
        }

        .close-btn {
            position: absolute; top: 30px; right: 30px;
            background: none; border: none; color: white; font-size: 2rem; cursor: pointer;
        }

        .close-btn {
            background: none; border: none;
            color: white; font-size: 1.5rem;
            cursor: pointer;
        }

        .btn-dynamic {
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 16px 40px;
            border-radius: 9999px;
            transition: all 0.3s ease;
        }

        .btn-dynamic:hover {
            border: 1px solid var(--primary);
            box-shadow: 0 0 15px rgba(var(--secondary-rgb), 0.35);
        }

        .social-icon {
            width: 3rem;       /* Equivalent to w-12 */
            height: 3rem;      /* Equivalent to h-12 */
            border-radius: 9999px;
            background: rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .social-icon:hover {
            background: var(--primary);
            color: var(--deep-obsidian);
            /* Soft bloom instead of harsh solid glow */
            box-shadow: 0 0 20px rgba(var(--secondary-rgb), 0.5);
        }

        .hero-shape {
            position: absolute;
            width: 400px;
            height: 400px;
            background: var(--primary);
            filter: blur(150px);
            opacity: 0.12;
            border-radius: 50%;
            z-index: -1;
            animation: float 10s infinite alternate;
        }

        @keyframes float {
            0% { transform: translate(0, 0); }
            100% { transform: translate(50px, 100px); }
        }

        ::selection {
            background: var(--primary);
            color: var(--deep-obsidian);
        }
        
        /* Card Styling with Dual Glow */
        .card-hover {
            position: relative;
            /* Required for the "snap to bottom" logic */
            display: flex;
            flex-direction: column;
            height: 100%; 
            
            transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.05);
            background: rgba(255, 255, 255, 0.02);
            z-index: 1;
            perspective: 1000px;
            transform-style: preserve-3d;
        }
        
        /* 50/50 Border */
        .card-hover::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            padding: 1px; 
            background: linear-gradient(135deg, var(--primary) 48%, var(--secondary) 52%);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        /* Card Hover Glow */
        .card-hover:hover {
            transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
            border-color: transparent;
            
            /* Using the RGB channels with alpha transparency (0.35) */
            box-shadow: 
                -10px -10px 30px -10px rgba(var(--primary-rgb), 0.35), 
                10px 10px 30px -10px rgba(var(--secondary-rgb), 0.35);
                
            background: rgba(255, 255, 255, 0.04);
        }

        .card-hover:hover::before {
            opacity: 1;
        }

        .btn-electric {
            background: var(--primary);
            color: var(--deep-obsidian);
            font-weight: 700;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        /* Button Electric Glow */
        .btn-electric:hover {
            /* 30px is a wide blur, keep opacity low (0.25) so it's a soft aura */
            box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.45);
            transform: translateY(-2px) scale(1.02);
        }

        .typing-container::after {
            content: '|';
            animation: blink 1s infinite;
            color: var(--secondary);
        }

        @keyframes blink {
            50% { opacity: 0; }
        }

        .logo-wordmark {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 600;
            display: flex;
            position: relative;
            padding: 4px 0;
            cursor: pointer;
            gap: 0px;
            transition: gap 0.7s cubic-bezier(0.16, 1, 0.3, 1);
            letter-spacing: -0.02em;
        }

        .logo-letter {
            display: inline-block;
            transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            color: rgba(255, 255, 255, 0.9);
            position: relative;
        }

        .logo-wordmark:hover {
            gap: 2px;
        }

        .logo-wordmark:hover .logo-letter {
            color: #ffffff;
            text-shadow: 0 0 1px rgba(255,255,255,0.3);
        }

        .logo-letter-b {
            color: var(--primary);
        }

        .logo-wordmark:hover .logo-letter:last-child {
            color: var(--secondary);
        }

        .logo-wordmark:hover .logo-letter::after {
            content: attr(data-letter);
            position: absolute;
            top: 0;
            left: 0;
            color: #00f2ff;
            opacity: 0;
            filter: blur(2px);
            animation: prismShine 1.5s infinite;
        }

        .logo-letter:nth-child(2)::after { animation-delay: 0.1s; }
        .logo-letter:nth-child(3)::after { animation-delay: 0.2s; }
        .logo-letter:nth-child(4)::after { animation-delay: 0.3s; }
        .logo-letter:nth-child(5)::after { animation-delay: 0.4s; }
        .logo-letter:nth-child(6)::after { animation-delay: 0.5s; }

        @keyframes prismShine {
            0% { opacity: 0; transform: translateX(-2px); }
            50% { opacity: 0.4; transform: translateX(0px); }
            100% { opacity: 0; transform: translateX(2px); }
        }

        .logo-wordmark::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 50%;
            width: 0;
            height: 1px;
            background: var(--electric-blue);
            transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
            transform: translateX(-50%);
            opacity: 0;
        }

        .logo-wordmark:hover::after {
            width: 100%;
            opacity: 1;
        }

        /* Custom Modal Styles */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(12x);
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s ease;
            padding: 20px;
        }

        .modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .modal-container {
            /* 1. Change background to be semi-transparent */
            background: rgba(13, 13, 15, 0.6); 
            
            /* 2. Add the blur effect to the container itself */
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px); /* For Safari support */

            width: 100%;
            max-width: 600px;
            border-radius: 24px;
            position: relative;
            transform: scale(0.9) translateY(20px);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            
            /* 3. Slightly boost the border visibility for the 'glass' edge */
            border: 1px solid rgba(255, 255, 255, 0.1); 
            z-index: 1;
            overflow: hidden;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
        }

        .modal-overlay.active .modal-container {
            transform: scale(1) translateY(0);
        }

        .modal-container::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            padding: 1.5px;
            background: linear-gradient(135deg, var(--primary) 0%, transparent 40%, transparent 60%, var(--secondary) 100%);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
        }

        .modal-header {
            padding: 24px 32px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-body {
            padding: 32px;
            max-height: 60vh;
            overflow-y: auto;
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.95rem;
            line-height: 1.6;
        }

        .close-modal {
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            transition: all 0.2s ease;
        }

        .close-modal:hover {
            background: var(--secondary);
            color: white;
            transform: rotate(90deg);
        }

        @keyframes rainbow {
            from { filter: hue-rotate(0deg); }
            to { filter: hue-rotate(360deg); }
        }

        /* Effect on project buttons */
        .project-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.3s ease;
            text-decoration: none !important;
            color: var(--primary);
            margin-top: auto; /* The magic fix for alignment */
            padding-top: 20px;
        }

        /* 2. Premium Hover: Subtle glow instead of white shift */
        .project-link:hover {
            color: var(--primary);
            text-shadow: 0 0 12px rgba(0, 242, 255, 0.4); /* Glow effect */
        }

        /* 3. The Arrow remains the focus for the color-shift */
        .project-link i {
            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            color: var(--primary);
        }

        .project-link:hover i {
            transform: translateX(8px);
            color: var(--secondary); /* Arrow still punches with Crimson */
        }

        .reveal {
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
        }

        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        @media (max-width: 640px) {
            .modal-container {
                width: 95%; /* Use more width on mobile */
                max-height: 80vh; /* Allow more height */
            }
        }

        /* Disco Mode */
        @keyframes disco {
            0% { background-color: #ff00ff; }
            25% { background-color: #00ffff; }
            50% { background-color: #ffff00; }
            75% { background-color: #ff0000; }
            100% { background-color: #ff00ff; }
        }
        .disco-active { animation: disco 0.5s infinite; }

        @keyframes slow-pulse {
            0% { background-color: #1a1a2e; }
            50% { background-color: #16213e; }
            100% { background-color: #1a1a2e; }
        }
        .pulse-active { animation: slow-pulse 2s infinite ease-in-out; }

        /* Invert Filter for Forbidden Console */
        .inverted-mode { filter: invert(1); }

        /* Base Item Style */
        .cmd-item {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            margin: 4px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid transparent;
            color: var(--secondary); /* Changed from #94a3b8 */
        }

        .cmd-item:hover {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--primary); /* Changed from electric blue */
            color: var(--primary);
        }

        .cmd-item.selected {
            background: var(--secondary) !important; /* Changed from #334155 */
            border: 1px solid var(--primary) !important;
            color: #000; /* Use black text for high contrast on the primary color */
        }

        .cmd-item::before {
            content: ">";
            margin-right: 12px;
            font-weight: bold;
            color: var(--primary); /* Now follows the theme */
        }

        /* Overlay for the full-screen visual effects */
        .effect-overlay {
            position: fixed;
            inset: 0;
            z-index: 9999;
            display: flex;
            justify-content: center;
            align-items: center;
            background: rgba(0,0,0,0.9);
        }

        .epic-overlay {
            position: fixed;
            inset: 0;
            z-index: 9999999;
            background: black;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        /* The goat image itself */
        .epic-goat {
            width: 90vw;
            height: 90vh;
            object-fit: contain;
            animation: zoomIn 3s ease-out forwards;
        }

        @keyframes zoomIn {
            0% { transform: scale(0.5); opacity: 0; filter: blur(20px); }
            20% { opacity: 1; filter: blur(0px); }
            100% { transform: scale(1.2); opacity: 1; }
        }

        @keyframes popIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

        /* Full screen overlay for cinematic effects */
        .cinematic-overlay {
            position: fixed;
            inset: 0;
            z-index: 9999999;
            display: flex;
            justify-content: center;
            align-items: center;
            background: transparent;
            pointer-events: none;
            overflow: hidden;
        }

        /* The expanding explosion circle */
        .big-explosion {
            width: 100vw;
            height: 100vw;
            background: radial-gradient(circle, #ff4400 0%, #ffaa00 20%, transparent 60%);
            border-radius: 50%;
            transform: scale(0);
            animation: blast 1.5s ease-out forwards;
        }

        @keyframes blast {
            0% { transform: scale(0); opacity: 1; }
            50% { transform: scale(2); opacity: 0.8; }
            100% { transform: scale(3); opacity: 0; }
        }

        @keyframes explode { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(5); opacity: 0; } }

        @keyframes pop-grow-spin {
                0% { transform: scale(0.1) rotate(0deg); opacity: 0; }
                50% { transform: scale(1.5) rotate(720deg); opacity: 1; } /* Spins twice while growing */
                100% { transform: scale(1) rotate(1080deg); opacity: 1; } /* Continues spinning */
            }

            .epic-emoji {
                font-size: 20vw;
                display: inline-block;
                animation: pop-grow-spin 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            }

            .epic-emoji-container {
                position: fixed !important; /* Force position */
                top: 0 !important;
                left: 0 !important;
                width: 100vw !important;
                height: 100vh !important;
                z-index: 99999999 !important; /* Super high index */
                background: rgba(0, 0, 0, 0.9) !important;
                display: flex !important;
                justify-content: center !important;
                align-items: center !important;
            }

            /* Ensure modal buttons look correct */
            .modal-container .theme-btn {
                background: rgba(255, 255, 255, 0.03);
                border: 1px solid var(--primary);
                color: var(--primary);
                padding: 12px;
                border-radius: 6px;
                cursor: pointer;
                transition: all 0.2s ease;
                width: 100%;
            }

            .modal-container .theme-btn:hover {
                background: var(--primary);
                color: black;
                box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
            }

            .konami-spin {
                transition: transform 0.5s ease-in-out;
                transform: rotate(360deg);
            }

        ::-webkit-scrollbar { width: 4px; }
        ::-webkit-scrollbar-track { background: #0a0a0c; }
        ::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--electric-blue); }