/* =====================================================
   🚀 ULTRA COOL FEATURES STYLES
   Premium Portfolio Enhancements
   ===================================================== */

/* ==================== COMMAND BUTTON (Navbar) ==================== */
.command-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.command-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.command-btn i {
    font-size: 16px;
}

.command-shortcut {
    background: var(--bg-tertiary);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .command-shortcut {
        display: none;
    }

    .command-btn {
        padding: 8px 10px;
    }
}

/* ==================== COMMAND PALETTE ====================  */
.command-palette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 99990;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.command-palette-overlay.active {
    opacity: 1;
    visibility: visible;
}

.command-palette {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: 90%;
    max-width: 600px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 99991;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.command-palette.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.command-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
}

.command-header i {
    font-size: 20px;
    color: var(--text-muted);
}

.command-header input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
}

.command-header input::placeholder {
    color: var(--text-muted);
}

.command-header kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: inherit;
}

.command-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.command-item:hover,
.command-item.selected {
    background: var(--glass-bg);
}

.command-item.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
}

.command-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.command-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.command-item i.bi-arrow-return-left {
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.command-item:hover i.bi-arrow-return-left,
.command-item.selected i.bi-arrow-return-left {
    opacity: 1;
}

.command-footer {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 12px 20px;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-tertiary);
}

.command-footer span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.command-footer kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
}

/* ==================== CHATBOT WIDGET ==================== */
.chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle i {
    font-size: 24px;
    color: white;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 550px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.chatbot-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chatbot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
}

.chatbot-info {
    flex: 1;
}

.chatbot-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.chatbot-info span {
    font-size: 12px;
    opacity: 0.8;
}

.chatbot-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
}

.chat-message.user {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.bot .message-bubble {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--glass-border);
}

.chatbot-input-area input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chatbot-input-area input:focus {
    border-color: var(--accent-primary);
}

.chatbot-input-area button {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
}

.chatbot-input-area button:hover {
    transform: scale(1.05);
}

.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 16px;
}

.suggestion-chip {
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-chip:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== VISITOR COUNTER ==================== */
.visitor-counter {
    position: fixed;
    bottom: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    font-size: 13px;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.visitor-counter i {
    color: var(--accent-primary);
}

.counter-number {
    font-weight: 600;
    color: var(--text-primary);
}

.live-pulse {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* ==================== KEYBOARD HINT ==================== */
.keyboard-hint {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s ease;
}

.keyboard-hint.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.keyboard-hint kbd {
    background: var(--accent-primary);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

/* ==================== CONFETTI CURSOR TRAIL ==================== */
.cursor-trail,
.confetti-cursor-particle {
    pointer-events: none;
    mix-blend-mode: normal;
    transition: opacity 0.1s linear;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .chatbot-window {
        width: calc(100vw - 32px);
        right: -8px;
    }

    .command-palette {
        top: 10%;
        width: 95%;
    }

    .keyboard-hint {
        display: none;
    }

    .visitor-counter {
        bottom: 100px;
        left: 16px;
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* ==================== SCRAMBLE TEXT ==================== */
.scramble-char {
    color: var(--accent-primary);
}

/* ==================== GLOW EFFECTS ==================== */
.glow-text {
    text-shadow: 0 0 10px var(--accent-primary),
        0 0 20px var(--accent-primary),
        0 0 40px var(--accent-primary);
}

/* ==================== SCROLL INDICATOR ANIMATION ==================== */
.scroll-indicator-advanced {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.scroll-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--glass-border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.scroll-dot.active {
    background: var(--accent-primary);
    transform: scale(1.3);
    box-shadow: 0 0 15px var(--accent-primary);
}

/* ==================== FLOATING TECH ICONS ==================== */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.floating-icon {
    position: absolute;
    font-size: 24px;
    color: var(--text-muted);
    opacity: 0.1;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
    }
}

/* ==================== MAGNETIC EFFECT ENHANCEMENT ==================== */
.magnetic-active {
    transition: transform 0.1s ease-out !important;
}

/* ==================== GLASSMORPHISM CARDS ==================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

/* ==================== NEON BORDERS ==================== */
.neon-border {
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            #6366f1, #8b5cf6, #ec4899, #f472b6,
            #6366f1, #8b5cf6, #ec4899, #f472b6);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    animation: neonGlow 3s linear infinite;
    filter: blur(10px);
    opacity: 0.5;
}

@keyframes neonGlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ==================== BACK TO TOP PROGRESS RING ==================== */
#backToTop {
    --progress: 0%;
    position: relative;
}

#backToTop::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: conic-gradient(var(--accent-primary) var(--progress),
            transparent var(--progress));
    z-index: -1;
}

/* ==================== SMOOTH SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-secondary), var(--accent-tertiary));
}

/* ==================== LOADING SKELETON ==================== */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-tertiary) 25%,
            var(--bg-secondary) 50%,
            var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ==================== RIPPLE EFFECT ==================== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==================== TEXT SELECTION ==================== */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* ==================== FOCUS STATES ==================== */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ==================== ANIMATED UNDERLINE ==================== */
.animated-underline {
    position: relative;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

/* ==================== 3D HOVER EFFECT ==================== */
.hover-3d {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.hover-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) translateZ(10px);
}

/* ==================== GRADIENT ANIMATION ==================== */
.animated-gradient {
    background: linear-gradient(-45deg, #6366f1, #8b5cf6, #ec4899, #f472b6);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ==================== LIGHT THEME ADJUSTMENTS ==================== */
[data-theme="light"] .toast-notification {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .command-palette {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .chatbot-window {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

/* ==================== THEME CUSTOMIZER ==================== */
.theme-customizer {
    position: fixed;
    left: 24px;
    bottom: 100px;
    z-index: 9998;
}

.theme-customizer-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-customizer-toggle i {
    font-size: 20px;
    color: var(--accent-primary);
    transition: all 0.3s ease;
}

.theme-customizer-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.theme-customizer-toggle:hover i {
    transform: rotate(15deg);
}

.theme-customizer-toggle.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
}

.theme-customizer-toggle.active i {
    color: white;
}

.toggle-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    animation: ringPulse 2s infinite;
    opacity: 0;
}

.theme-customizer-toggle:hover .toggle-ring {
    opacity: 1;
}

@keyframes ringPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.theme-customizer-panel {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 320px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.theme-customizer-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.panel-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.panel-header h4 i {
    font-size: 18px;
}

.panel-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: white;
}

.panel-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.panel-content {
    padding: 20px;
}

.panel-description {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-align: center;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.theme-option {
    position: relative;
    background: var(--bg-tertiary);
    border: 2px solid var(--glass-border);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.theme-option:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.theme-option.active {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg,
            rgba(var(--accent-primary-rgb), 0.1),
            rgba(var(--accent-secondary-rgb), 0.1));
}

.theme-option.active .check-icon {
    opacity: 1;
    transform: scale(1);
}

.theme-preview {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
}

.preview-color {
    flex: 1;
    transition: all 0.3s ease;
}

.theme-option:hover .preview-color:first-child {
    transform: translateX(-2px);
}

.theme-option:hover .preview-color:last-child {
    transform: translateX(2px);
}

.theme-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    text-align: center;
}

.check-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--accent-primary);
    font-size: 16px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.panel-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-tertiary);
    text-align: center;
}

.save-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.save-indicator i {
    color: #22c55e;
}

/* Theme Customizer Responsive */
@media (max-width: 768px) {
    .theme-customizer {
        left: 16px;
        bottom: 170px;
    }

    .theme-customizer-panel {
        width: 280px;
        left: -8px;
    }

    .theme-customizer-toggle {
        width: 44px;
        height: 44px;
    }

    .theme-customizer-toggle i {
        font-size: 18px;
    }

    .theme-grid {
        gap: 8px;
    }

    .theme-option {
        padding: 10px;
    }

    .theme-preview {
        height: 26px;
    }

    .theme-name {
        font-size: 11px;
    }
}

/* Light Theme Adjustments for Customizer */
[data-theme="light"] .theme-customizer-panel {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .theme-customizer-toggle {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ==================== TIME GREETING WIDGET ==================== */
.time-greeting-widget {
    position: fixed;
    top: 100px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    z-index: 100;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.greeting-icon {
    font-size: 20px;
}

.greeting-content {
    display: flex;
    flex-direction: column;
}

.greeting-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.current-time {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

/* ==================== SCROLL SECTION INDICATOR ==================== */
.scroll-section-indicator {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
}

.section-dot {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.section-dot .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--glass-border);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.section-dot:hover .dot,
.section-dot.active .dot {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-primary);
    transform: scale(1.2);
}

.section-label {
    position: absolute;
    right: 30px;
    background: var(--bg-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid var(--glass-border);
}

.section-dot:hover .section-label {
    opacity: 1;
    transform: translateX(0);
}

/* ==================== FOCUS MODE ==================== */
.focus-mode .navbar,
.focus-mode .visitor-counter,
.focus-mode .time-greeting-widget,
.focus-mode .scroll-section-indicator,
.focus-mode .theme-customizer,
.focus-mode .footer,
.focus-mode .back-to-top {
    opacity: 0.1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.focus-mode section:not(:hover) {
    opacity: 0.3;
}

.focus-mode section:hover {
    opacity: 1;
}

/* ==================== READING TIME BADGE ==================== */
.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.reading-time-badge i {
    color: var(--accent-primary);
}

/* ==================== SCROLL PERCENTAGE CIRCLE ==================== */
.scroll-percentage {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 50px;
    height: 50px;
    z-index: 9998;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    pointer-events: none;
}

.scroll-percentage.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-percentage svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.scroll-percentage .circle-bg {
    fill: none;
    stroke: var(--glass-border);
    stroke-width: 3;
}

.scroll-percentage .circle {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 0.1s ease;
}

.scroll-percentage .percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

/* ==================== ANIMATED BLOB BACKGROUND ==================== */
.animated-blob {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.animated-blob svg {
    position: absolute;
    top: -20%;
    right: -20%;
    width: 80%;
    height: 80%;
    filter: blur(60px);
}

/* ==================== COMPREHENSIVE RESPONSIVE STYLES ==================== */

/* ========== Large Tablets & Small Laptops (max-width: 1024px) ========== */
@media (max-width: 1024px) {
    .command-palette {
        width: 90%;
        max-width: 500px;
    }

    .chatbot-window {
        width: 350px;
    }

    .theme-customizer-panel {
        width: 300px;
    }

    .visitor-counter {
        padding: 8px 14px;
        font-size: 12px;
    }

    .keyboard-hint {
        font-size: 12px;
        padding: 10px 16px;
    }

    .time-greeting-widget {
        padding: 10px 16px;
    }

    .scroll-section-indicator {
        right: 16px;
        gap: 12px;
    }

    .section-dot .dot {
        width: 10px;
        height: 10px;
    }
}

/* ========== Tablets & Large Phones (max-width: 768px) ========== */
@media (max-width: 768px) {

    /* Command Palette - Full width on mobile */
    .command-palette {
        top: 5%;
        width: 95%;
        max-width: none;
        left: 50%;
        transform: translateX(-50%) scale(0.95);
        border-radius: 16px;
    }

    .command-palette.active {
        transform: translateX(-50%) scale(1);
    }

    .command-header {
        padding: 14px 16px;
    }

    .command-header input {
        font-size: 15px;
    }

    .command-list {
        max-height: 50vh;
        padding: 6px;
    }

    .command-item {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .command-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .command-name {
        font-size: 14px;
    }

    .command-footer {
        padding: 10px 16px;
        gap: 16px;
    }

    .command-footer span {
        font-size: 11px;
    }

    /* Chatbot Widget - Full width bottom sheet style */
    .chatbot-widget {
        bottom: 16px;
        right: 16px;
    }

    .chatbot-toggle {
        width: 52px;
        height: 52px;
    }

    .chatbot-toggle i {
        font-size: 20px;
    }

    .chatbot-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .chatbot-window {
        width: calc(100vw - 32px);
        max-height: 70vh;
        right: -8px;
        bottom: 70px;
        border-radius: 16px;
    }

    .chatbot-header {
        padding: 12px 14px;
    }

    .chatbot-avatar {
        width: 40px;
        height: 40px;
    }

    .chatbot-info h4 {
        font-size: 14px;
    }

    .chatbot-info span {
        font-size: 11px;
    }

    .chatbot-close {
        width: 28px;
        height: 28px;
    }

    .chatbot-messages {
        max-height: 200px;
        padding: 12px;
        gap: 10px;
    }

    .message-bubble {
        padding: 10px 14px;
        font-size: 13px;
        max-width: 85%;
    }

    .chatbot-input-area {
        padding: 10px 12px;
        gap: 8px;
    }

    .chatbot-input-area input {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 10px;
    }

    .chatbot-input-area button {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .chatbot-suggestions {
        padding: 8px 12px 12px;
        gap: 6px;
    }

    .suggestion-chip {
        padding: 6px 12px;
        font-size: 11px;
    }

    /* Visitor Counter */
    .visitor-counter {
        bottom: 85px;
        left: 16px;
        padding: 8px 12px;
        font-size: 11px;
        border-radius: 24px;
        gap: 6px;
    }

    .counter-number {
        font-size: 13px;
    }

    .live-pulse {
        width: 6px;
        height: 6px;
    }

    /* Theme Customizer */
    .theme-customizer {
        left: 16px;
        bottom: 140px;
    }

    .theme-customizer-toggle {
        width: 44px;
        height: 44px;
    }

    .theme-customizer-toggle i {
        font-size: 18px;
    }

    .theme-customizer-panel {
        width: 280px;
        left: 0;
        bottom: 55px;
        border-radius: 16px;
    }

    .panel-header {
        padding: 14px 16px;
    }

    .panel-header h4 {
        font-size: 14px;
        gap: 8px;
    }

    .panel-content {
        padding: 16px;
    }

    .panel-description {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .theme-grid {
        gap: 8px;
    }

    .theme-option {
        padding: 10px;
        border-radius: 12px;
    }

    .theme-preview {
        height: 28px;
        margin-bottom: 8px;
    }

    .theme-name {
        font-size: 10px;
    }

    .check-icon {
        font-size: 14px;
        top: 6px;
        right: 6px;
    }

    .panel-footer {
        padding: 10px 16px;
    }

    .save-indicator {
        font-size: 11px;
    }

    /* Time Greeting Widget */
    .time-greeting-widget {
        top: auto;
        bottom: 200px;
        right: 16px;
        padding: 8px 14px;
        border-radius: 30px;
        gap: 8px;
    }

    .greeting-icon {
        font-size: 16px;
    }

    .greeting-text {
        font-size: 10px;
    }

    .current-time {
        font-size: 12px;
    }

    /* Scroll Section Indicator - Hidden on mobile */
    .scroll-section-indicator {
        display: none;
    }

    /* Scroll Percentage Circle */
    .scroll-percentage {
        bottom: 200px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .scroll-percentage .percentage {
        font-size: 8px;
    }

    /* Reading Time Badge */
    .reading-time-badge {
        font-size: 11px;
        padding: 6px 12px;
        border-radius: 16px;
        margin-top: 16px;
    }

    /* Keyboard Hint - Hidden on mobile */
    .keyboard-hint {
        display: none;
    }

    /* Toast Notifications */
    .toast-notification {
        width: 90%;
        max-width: 350px;
        padding: 14px 20px;
        font-size: 13px;
        bottom: 80px;
        border-radius: 12px;
    }

    /* Cursor Effects - Disabled on touch devices */
    .cursor-follower,
    .cursor-dot,
    .cursor-trail,
    .confetti-cursor-particle {
        display: none !important;
    }

    /* Particle Canvas - Reduced opacity on mobile */
    #particleCanvas {
        opacity: 0.3 !important;
    }

    /* Focus Mode adjustments */
    .focus-mode .chatbot-widget,
    .focus-mode .theme-customizer {
        opacity: 0.1;
    }
}

/* ========== Small Phones (max-width: 480px) ========== */
@media (max-width: 480px) {

    /* Command Palette */
    .command-palette {
        top: 2%;
        width: 98%;
        border-radius: 14px;
    }

    .command-header {
        padding: 12px 14px;
        gap: 10px;
    }

    .command-header input {
        font-size: 14px;
    }

    .command-header kbd {
        padding: 3px 6px;
        font-size: 10px;
    }

    .command-list {
        max-height: 45vh;
        padding: 4px;
    }

    .command-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .command-icon {
        width: 26px;
        height: 26px;
        font-size: 14px;
        border-radius: 6px;
    }

    .command-name {
        font-size: 13px;
    }

    .command-footer {
        padding: 8px 12px;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .command-footer span {
        font-size: 10px;
        gap: 4px;
    }

    .command-footer kbd {
        padding: 2px 5px;
        font-size: 9px;
    }

    /* Chatbot Widget */
    .chatbot-widget {
        bottom: 12px;
        right: 12px;
    }

    .chatbot-toggle {
        width: 48px;
        height: 48px;
    }

    .chatbot-toggle i {
        font-size: 18px;
    }

    .chatbot-window {
        width: calc(100vw - 24px);
        max-height: 65vh;
        right: -6px;
        bottom: 60px;
    }

    .chatbot-messages {
        max-height: 180px;
        padding: 10px;
    }

    .message-bubble {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 12px;
    }

    .chatbot-suggestions {
        flex-wrap: wrap;
    }

    .suggestion-chip {
        padding: 5px 10px;
        font-size: 10px;
    }

    /* Visitor Counter */
    .visitor-counter {
        bottom: 75px;
        left: 12px;
        padding: 6px 10px;
        font-size: 10px;
    }

    /* Theme Customizer */
    .theme-customizer {
        left: 12px;
        bottom: 130px;
    }

    .theme-customizer-toggle {
        width: 40px;
        height: 40px;
    }

    .theme-customizer-panel {
        width: calc(100vw - 40px);
        left: 0;
        bottom: 50px;
    }

    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .theme-option {
        padding: 8px;
    }

    .theme-preview {
        height: 24px;
    }

    .theme-name {
        font-size: 9px;
    }

    /* Time Greeting Widget */
    .time-greeting-widget {
        bottom: 180px;
        right: 12px;
        padding: 6px 12px;
        gap: 6px;
    }

    .greeting-icon {
        font-size: 14px;
    }

    .greeting-text {
        font-size: 9px;
    }

    .current-time {
        font-size: 11px;
    }

    /* Scroll Percentage */
    .scroll-percentage {
        bottom: 180px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    /* Toast Notifications */
    .toast-notification {
        width: 95%;
        padding: 12px 16px;
        font-size: 12px;
        bottom: 70px;
    }

    /* Particle Canvas - Further reduced on small phones */
    #particleCanvas {
        opacity: 0.2 !important;
    }
}

/* ========== Extra Small Phones (max-width: 360px) ========== */
@media (max-width: 360px) {
    .command-palette {
        top: 0;
        width: 100%;
        border-radius: 0 0 14px 14px;
    }

    .chatbot-window {
        width: calc(100vw - 16px);
        right: -4px;
    }

    .theme-customizer-panel {
        width: calc(100vw - 24px);
    }

    .visitor-counter {
        font-size: 9px;
        padding: 5px 8px;
    }

    .time-greeting-widget {
        padding: 5px 10px;
    }
}

/* ========== Landscape Mode on Mobile ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .command-palette {
        top: 2%;
        max-height: 90vh;
    }

    .command-list {
        max-height: 40vh;
    }

    .chatbot-window {
        max-height: 80vh;
        bottom: 60px;
    }

    .chatbot-messages {
        max-height: 150px;
    }

    .theme-customizer-panel {
        bottom: 50px;
        max-height: 80vh;
        overflow-y: auto;
    }

    .time-greeting-widget {
        display: none;
    }

    .scroll-percentage {
        bottom: 70px;
    }
}

/* ========== Reduced Motion Preference ========== */
@media (prefers-reduced-motion: reduce) {

    .cursor-trail,
    .confetti-cursor-particle,
    .cursor-follower,
    .cursor-dot {
        display: none !important;
    }

    #particleCanvas {
        display: none !important;
    }

    .animated-blob svg {
        animation: none !important;
    }

    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== Print Styles ========== */
@media print {

    .chatbot-widget,
    .theme-customizer,
    .visitor-counter,
    .time-greeting-widget,
    .scroll-percentage,
    .scroll-section-indicator,
    .command-palette-overlay,
    .command-palette,
    #particleCanvas,
    .cursor-follower,
    .cursor-dot {
        display: none !important;
    }
}

/* ==================== LIGHT THEME FOR ALL FEATURES ==================== */
[data-theme="light"] .time-greeting-widget {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .section-label {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .visitor-counter {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .chatbot-window {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .command-palette {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .toast-notification {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* ==================== CERTIFICATES MARQUEE ==================== */
.certificates-section {
    padding: 100px 0;
    overflow: hidden;
    position: relative;
    background: var(--bg-primary); /* Ensure background is set if needed, or rely on body */
}

.certificate-marquee-wrapper {
    position: relative;
    width: 100%;
    padding: 20px 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.certificate-marquee {
    display: flex;
    overflow: hidden;
    width: 100%;
    position: relative;
}

.certificate-track {
    display: flex;
    gap: 30px;
    width: max-content;
    padding: 10px 0;
    flex-wrap: nowrap;
    will-change: transform;
    /* Animation is handled by JavaScript for reliability */
}

.certificate-card {
    position: relative;
    width: 320px;
    flex-shrink: 0;
    padding: 24px;
    background: var(--glass-bg, rgba(23, 23, 23, 0.6));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: default;
    /* Premium Look Default */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.certificate-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-primary, #6366f1);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.cert-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-primary, #6366f1);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    transition: all 0.3s ease;
}

.certificate-card:hover .cert-icon {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

.cert-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.cert-issuer {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted, #9ca3af);
    font-weight: 700;
}

.cert-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin: 4px 0;
    line-height: 1.3;
}

.cert-date {
    font-size: 13px;
    color: var(--text-secondary, #d1d5db);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.cert-date::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-secondary, #8b5cf6);
}

.cert-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 45%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 55%,
        transparent 100%
    );
    transform: translateX(-100%) skewX(-20deg);
    transition: transform 0.6s;
    pointer-events: none;
    z-index: 1;
}

.certificate-card:hover .cert-shine {
    transform: translateX(100%) skewX(-20deg);
    transition-duration: 1s;
}

/* Mobile Responsiveness for Marquee */
@media (max-width: 768px) {
    .certificates-section {
        padding: 60px 0;
    }

    .certificate-card {
        width: 260px;
        padding: 20px;
    }
    
    .certificate-track {
        animation-duration: 20s;
        gap: 20px;
    }
}

/* ==================== AI CHATBOT ENHANCEMENTS ==================== */
.chatbot-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.loading-msg .message-bubble {
    background: var(--bg-tertiary);
}
