 * {
            font-family: 'Poppins', sans-serif;
        }
        
        :root {
            --primary-color: #ef4444;
            --primary-dark: #dc2626;
            --primary-light: #fca5a5;
            --bg-primary: #111827;
            --bg-secondary: #1f2937;
            --bg-tertiary: #374151;
            --text-primary: #ffffff;
            --text-secondary: #9ca3af;
            --text-muted: #6b7280;
            --border-color: rgba(255, 255, 255, 0.1);
            --glass-bg: rgba(17, 24, 39, 0.8);
        }

        [data-theme="light"] {
            --bg-primary: #f9fafb;
            --bg-secondary: #ffffff;
            --bg-tertiary: #f3f4f6;
            --text-primary: #111827;
            --text-secondary: #4b5563;
            --text-muted: #6b7280;
            --border-color: rgba(0, 0, 0, 0.1);
            --glass-bg: rgba(249, 250, 251, 0.8);
        }
        
        body {
            overflow-x: hidden;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        /* Custom Scrollbar */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: var(--bg-secondary); }
        ::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }
        
        /* Three.js Canvas */
        #threejs-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            opacity: 0.3;
        }
        
        /* Enhanced Preloader */
        .preloader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.6s ease;
        }
        
        .preloader-content {
            text-align: center;
            color: white;
        }
        
        .preloader-logo {
            font-size: 4rem;
            font-weight: bold;
            margin-bottom: 2rem;
            animation: pulse 2s infinite;
        }
        
        .loading-dots {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
            margin-top: 2rem;
        }
        
        .dot {
            width: 12px;
            height: 12px;
            background: white;
            border-radius: 50%;
            animation: bounce 1.4s infinite ease-in-out both;
        }
        
        .dot:nth-child(1) { animation-delay: -0.32s; }
        .dot:nth-child(2) { animation-delay: -0.16s; }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.05); opacity: 0.8; }
        }
        
        @keyframes bounce {
            0%, 80%, 100% { transform: scale(0); }
            40% { transform: scale(1); }
        }
        
        .progress-bar {
            width: 200px;
            height: 4px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 2px;
            overflow: hidden;
            margin: 2rem auto;
        }
        
        .progress-fill {
            height: 100%;
            background: white;
            width: 0%;
            animation: loading 3s ease-in-out forwards;
        }
        
        @keyframes loading {
            0% { width: 0%; }
            50% { width: 70%; }
            100% { width: 100%; }
        }
        
        /* Magic Cursor */
        .cursor {
            position: fixed;
            width: 20px;
            height: 20px;
            background: var(--primary-color);
            border-radius: 50%;
            pointer-events: none;
            z-index: 9999;
            transition: transform 0.15s ease;
            mix-blend-mode: difference;
        }
        
        /* Enhanced Animations - Slower and Smoother */
        .slide-in-left {
            transform: translateX(-80px);
            opacity: 0;
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .slide-in-right {
            transform: translateX(80px);
            opacity: 0;
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .slide-in-top {
            transform: translateY(-80px);
            opacity: 0;
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .slide-in-bottom {
            transform: translateY(80px);
            opacity: 0;
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .fade-in {
            opacity: 0;
            transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .scale-in {
            transform: scale(0.85);
            opacity: 0;
            transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        
        .animate-in {
            transform: translate(0) scale(1);
            opacity: 1;
        }
        
        /* Typing Animation */
        .typing-text {
            white-space: nowrap;
            border-right: 2px solid var(--primary-color);
            animation: blink-cursor 1s infinite;
            min-height: 1.2em;
            display: inline-block;
        }
        
        @keyframes blink-cursor {
            0%, 50% { border-color: var(--primary-color); }
            51%, 100% { border-color: transparent; }
        }
        
        /* Enhanced Skill Bars */
        .skill-card {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border: 1px solid var(--border-color);
            border-radius: 15px;
            padding: 1.5rem;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        [data-theme="light"] .skill-card {
            background: rgba(255, 255, 255, 0.8);
            border: 1px solid var(--border-color);
        }
        
        .skill-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
        }

        [data-theme="light"] .skill-card:hover {
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
        }
        
        .skill-icon {
            font-size: 3rem;
            background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 1rem;
            transition: all 0.4s ease;
        }
        
        .skill-progress {
            width: 0%;
            height: 8px;
            background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
            border-radius: 4px;
            transition: width 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        
        /* Enhanced Navigation */
        .nav-glass {
            background: var(--glass-bg);
            backdrop-filter: blur(20px);
            border: 1px solid var(--border-color);
            transition: all 0.6s ease;
            padding: 0.35rem .5rem;
        }
        
        .nav-item {
            position: relative;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .nav-item button {
            position: relative;
            padding: 0.875rem;
            border-radius: 50%;
            font-size: 1.125rem;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            background: transparent;
            border: 2px solid transparent;
        }
        
        .nav-item::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: -1;
            opacity: 0;
        }
        
        .nav-item:hover::before,
        .nav-item.active::before {
            width: 60px;
            height: 60px;
            opacity: 1;
        }

        .nav-item:hover button,
        .nav-item.active button {
            color: white;
            transform: scale(1.1);
        }

        .nav-item:hover {
            transform: translateY(-4px);
        }
        
        /* Service Cards */
        .service-card {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 2rem;
            text-align: center;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }
        
        [data-theme="light"] .service-card {
            background: rgba(255, 255, 255, 0.8);
        }
        
        .service-card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transform: rotate(45deg);
            transition: all 0.8s ease;
            opacity: 0;
        }
        
        .service-card:hover::before {
            opacity: 1;
            animation: shimmer 2s ease-in-out;
        }
        
        .service-card:hover {
            transform: translateY(-15px) scale(1.02);
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
        }

        [data-theme="light"] .service-card:hover {
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
        }
        
        @keyframes shimmer {
            0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
            100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
        }
        
        .service-icon {
            font-size: 3rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .service-card:hover .service-icon {
            transform: scale(1.3) rotateY(360deg);
        }
        
        /* Enhanced Settings Panel - Closed by Default */
        .settings-panel {
    transform: translate(-100%, -50%); /* X = closed left, Y = centered */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
        }
        
        .settings-panel.open {
    transform: translate(0, -50%); /* X = visible, Y = centered */
        }
        
        .settings-toggle {
                background: var(--glass-bg);
                backdrop-filter: blur(15px);
                border: 1px solid var(--border-color);
                transition: all 0.4s ease;
                color: var(--text-primary);
                box-shadow: 5px 0 20px rgba(0, 0, 0, 0.2);
                position: absolute;
                right: -50px; /* Changed from -12px to -50px */
                top: 50%;
                transform: translateY(-50%);
                padding: 12px;
                border-radius: 0 8px 8px 0;
        }
        .settings-panel.open .settings-toggle {
            right: -46px; /* Position when panel is open */
        }
        
        .cogwheel {
            animation: rotate 6s linear infinite;
            transition: all 0.4s ease;
        }
        
        .settings-toggle:hover .cogwheel {
            animation: rotate 1s linear infinite;
            color: var(--primary-color);
        }
        
        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        .color-btn {
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            border: 2px solid transparent;
        }
        
        .color-btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: all 0.4s ease;
        }
        
        .color-btn:hover::before {
            width: 100%;
            height: 100%;
        }
        
        .color-btn:hover {
            transform: scale(1.25);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .color-btn.active {
            transform: scale(1.1);
            border-color: var(--text-primary);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        }
        
        /* Counter Animation */
        .counter {
            font-size: 3rem;
            font-weight: bold;
            color: var(--primary-color);
            display: block;
        }
        
        /* Tooltip */
        .tooltip {
            position: absolute;
            bottom: -45px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--bg-tertiary);
            color: var(--text-primary);
            padding: 8px 12px;
            border-radius: 8px;
            opacity: 0;
            transition: opacity 0.3s ease;
            white-space: nowrap;
            font-size: 12px;
            pointer-events: none;
            border: 1px solid var(--border-color);
        }
        
        .nav-item:hover .tooltip {
            opacity: 1;
        }
        
        /* Glitch effect */
        .glitch:hover {
            animation: glitch 0.4s infinite;
        }
        
        @keyframes glitch {
            0% { transform: translate(0); }
            20% { transform: translate(-2px, 2px); }
            40% { transform: translate(-2px, -2px); }
            60% { transform: translate(2px, 2px); }
            80% { transform: translate(2px, -2px); }
            100% { transform: translate(0); }
        }
        
        /* Profile Image Styling - Enhanced Shape */
        .profile-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 25% 75% 70% 30% / 30% 30% 70% 70%;
            transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .profile-image:hover {
            border-radius: 50%;
            transform: rotate(5deg) scale(1.05);
        }

        .profile-container {
            border-radius: 25% 75% 70% 30% / 30% 30% 70% 70%;
            transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
            padding: 3px;
        }

        .profile-container:hover {
            border-radius: 50%;
        }

        .profile-inner {
            border-radius: 25% 75% 70% 30% / 30% 30% 70% 70%;
            transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            background: var(--bg-secondary);
            overflow: hidden;
        }

        .profile-container:hover .profile-inner {
            border-radius: 50%;
        }

        /* Theme Toggle Buttons */
        .theme-btn {
            background: var(--bg-tertiary);
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
            transition: all 0.4s ease;
        }

        .theme-btn.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        .theme-btn:hover {
            background: var(--primary-color);
            color: white;
            transform: translateY(-2px);
        }

        /* Settings Panel Text */
        .settings-panel h4 {
            color: var(--text-primary);
        }

        .settings-panel button {
            color: var(--text-primary);
        }

        /* Enhanced Buttons */
        .btn-primary {
            background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
            border: none;
            color: white;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .btn-primary:hover {
            background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
            transform: translateY(-3px);
            box-shadow: 0 15px 30px rgba(239, 68, 68, 0.4);
        }

        .btn-secondary {
            background: transparent;
            border: 2px solid var(--primary-color);
            color: var(--primary-color);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .btn-secondary:hover {
            background: var(--primary-color);
            color: white;
            transform: translateY(-3px);
            box-shadow: 0 15px 30px rgba(239, 68, 68, 0.4);
        }
        
        /* Responsive adjustments */
        @media (max-width: 768px) {
            .typing-text {
            white-space: nowrap;
            border-right: 2px solid var(--primary-color);
            animation: blink-cursor 1s infinite;
            min-height: 1.2em;
            display: inline-block;
        }
            .cursor { display: none !important; }
            .skill-icon { font-size: 2rem; }
            .preloader-logo { font-size: 2.5rem; }
            .nav-glass { padding: 0.5rem 1rem; }
            .nav-item button { font-size: 1rem; padding: 0.75rem; }
        }
