:root {
    --bg-color: #0A0A0A;
    --text-color: #E0E0E0;
    --text-white: #ffffff;
    --text-gray-400: #A0A0A0;
    --color-dark: #0A0A0A;
    --color-panel: #121212;
    --glass-bg: rgba(18, 18, 18, 0.6);
    --glass-border: rgba(0, 217, 255, 0.1);
    --glass-hover-border: rgba(0, 217, 255, 0.4);
    --glass-shadow: 0 10px 30px -10px rgba(0, 71, 171, 0.3);
    --terminal-bg: rgba(5, 5, 5, 0.8);
    --terminal-border: rgba(0, 217, 255, 0.2);
    --lang-btn-bg: rgba(18, 18, 18, 0.4);
    --lang-btn-color: #E0E0E0;
    --lang-btn-border: rgba(0, 217, 255, 0.2);
    --lang-btn-hover-bg: rgba(18, 18, 18, 0.6);
    --lang-options-bg: rgba(10, 10, 10, 0.95);
    --lang-options-border: rgba(255, 255, 255, 0.1);
    --lang-option-color: #A0A0A0;
    --footer-bg: #020504;
    --text-gradient-start: #ffffff;
    --text-gradient-end: #00D9FF;
    --grid-color: rgba(0, 217, 255, 0.1);
    --neon-dark: #00D9FF;
}

html.light {
    --bg-color: #F8FAFC; /* Slate-50 */
    --text-color: #334155; /* Slate-700 */
    --text-white: #0F172A; /* Slate-900 */
    --text-gray-400: #64748B; /* Slate-500 */
    --color-dark: #F1F5F9; /* Slate-100 */
    --color-panel: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 217, 255, 0.2);
    --glass-hover-border: rgba(0, 217, 255, 0.6);
    --glass-shadow: 0 10px 30px -10px rgba(0, 217, 255, 0.2);
    --terminal-bg: rgba(255, 255, 255, 0.9);
    --terminal-border: rgba(0, 217, 255, 0.4);
    --lang-btn-bg: rgba(255, 255, 255, 0.8);
    --lang-btn-color: #0F172A;
    --lang-btn-border: rgba(0, 217, 255, 0.3);
    --lang-btn-hover-bg: rgba(255, 255, 255, 1);
    --lang-options-bg: rgba(255, 255, 255, 0.98);
    --lang-options-border: rgba(0, 217, 255, 0.2);
    --lang-option-color: #475569; /* Slate-600 */
    --footer-bg: #E2E8F0; /* Slate-200 */
    --text-gradient-start: #0F172A;
    --text-gradient-end: #0088CC;
    --grid-color: rgba(0, 217, 255, 0.07);
    --neon-dark: #007699;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.grid-bg {
    background-size: 50px 50px;
    background-image:
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: perspective(1000px) rotateX(20deg) scale(1.2);
    transform-origin: top;
}

.grid-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 217, 255, 0.1), transparent);
    height: 200%;
    width: 100%;
    animation: grid-shimmer 4s linear infinite;
}

@keyframes grid-shimmer {
    0% {
        transform: translateY(-50%);
    }

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

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
    animation: orb-float 15s infinite alternate ease-in-out;
}

@keyframes orb-float {
    0% {
        transform: translate(-10%, -10%) scale(1);
    }

    50% {
        transform: translate(10%, 10%) scale(1.2);
    }

    100% {
        transform: translate(5%, -5%) scale(0.9);
    }
}

.mouse-glow {
    position: fixed;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease;
}

/* Mobile adjustment for mouse glow */
@media (max-width: 768px) {
    .mouse-glow {
        display: none;
    }
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: var(--glass-hover-border);
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow);
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-gradient-start) 0%, var(--text-gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.scanlines {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg,
            rgba(255, 0, 0, 0.02),
            rgba(0, 255, 0, 0.01),
            rgba(0, 0, 255, 0.02));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -2;
    top: 0;
    left: 0;
}

.glow-button {
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.glow-button:hover {
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.6);
}

/* Mobile Menu Animation */
#mobileMenu {
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

#mobileMenu.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Language Dropdown Styles */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
    min-height: 44px;
    min-width: 44px;
    border-radius: 9999px;
    border: 1px solid var(--lang-btn-border);
    background: var(--lang-btn-bg);
    color: var(--lang-btn-color);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: rgba(0, 217, 255, 0.5);
    background: var(--lang-btn-hover-bg);
}

.lang-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--lang-options-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--lang-options-border);
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    min-width: 160px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.lang-dropdown.active .lang-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    width: 100%;
    text-align: left;
    color: var(--lang-option-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.lang-option:hover {
    background: rgba(0, 217, 255, 0.1);
    color: var(--neon-dark);
}

.lang-option.active {
    color: var(--neon-dark);
    background: rgba(0, 217, 255, 0.05);
}

.flag-icon {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

/* Glitch Hover Effect */
.glitch-hover {
    position: relative;
    overflow: hidden;
}

.glitch-hover img {
    transition: transform 0.5s ease;
}

.glitch-hover:hover img {
    transform: scale(1.05);
    filter: contrast(1.2) brightness(1.1);
}

.glitch-hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 217, 255, 0.1) 3px,
            transparent 3px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glitch-hover:hover::after {
    opacity: 1;
    animation: scanline 0.2s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }

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

/* Terminal Styles */
.terminal-window {
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    font-family: 'Space Grotesk', monospace;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    display: flex;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-content {
    padding: 20px;
    height: 300px;
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.terminal-content::-webkit-scrollbar {
    display: none;
}

.terminal-line {
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(-10px);
    animation: terminalLineIn 0.3s forwards;
}

.terminal-prompt {
    color: #00D9FF;
    margin-right: 8px;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #00D9FF;
    margin-left: 4px;
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes terminalLineIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ===== GLOBAL RESPONSIVE: Scroll offset for sticky navbar ===== */
section[id] {
    scroll-margin-top: 80px;
}

/* ===== SMALL MOBILE (≤ 480px) ===== */
@media (max-width: 480px) {
    section {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    #contact h2 {
        font-size: 2rem !important;
    }

    .glow-orb {
        width: 200px !important;
        height: 200px !important;
    }

    /* About stats row */
    #about .flex.items-center.gap-12 {
        gap: 2rem;
    }

    /* Project image height */
    .glitch-hover {
        height: 200px !important;
    }

    /* Footer grid single column */
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* CTA button text */
    #contact button {
        font-size: 1rem !important;
        padding: 1rem 2rem !important;
    }
}

/* ===== MOBILE (≤ 768px) ===== */
@media (max-width: 768px) {
    section {
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }

    h1 {
        font-size: 2.75rem !important;
        line-height: 1.2 !important;
    }

    h3 {
        font-size: 1.75rem !important;
    }

    #contact h2 {
        font-size: 2.5rem !important;
    }

    .terminal-window {
        max-height: 250px;
    }

    .terminal-content {
        height: 180px;
    }

    /* Contain glow orbs to prevent horizontal overflow */
    .glow-orb {
        width: 300px !important;
        height: 300px !important;
    }

    /* Center project titles on mobile */
    #projects .flex.flex-col.md\:flex-row.justify-between {
        align-items: flex-start !important;
        text-align: left;
    }

    /* Adapt project image height */
    .glitch-hover {
        height: 220px !important;
    }

    /* Footer grid: 2 columns */
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    /* Footer bottom bar */
    footer .pt-8 {
        text-align: center;
    }

    footer .flex.gap-8 {
        justify-content: center;
    }
}

/* ===== TABLET PORTRAIT (769px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    #home {
        align-items: flex-start !important;
        padding-top: 110px !important;
    }

    #home h1 {
        font-size: 3rem !important;
        line-height: 1.1 !important;
    }

    #home p {
        margin-bottom: 2rem !important;
    }

    h3 {
        font-size: 2.25rem !important;
    }

    #contact h2 {
        font-size: 3rem !important;
    }

    .terminal-window {
        max-width: 500px !important;
    }

    /* Footer: 2x2 grid */
    footer .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2.5rem !important;
    }

    /* Tech cards: 2 columns */
    #technologies .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ===== TABLET LANDSCAPE (1025px - 1280px) ===== */
@media (min-width: 1025px) and (max-width: 1280px) {
    #home {
        align-items: flex-start !important;
        padding-top: 110px !important;
    }

    #home h1 {
        font-size: 3.5rem !important;
        line-height: 1.1 !important;
    }

    #home p {
        margin-bottom: 2rem !important;
    }

    .terminal-window {
        max-width: 450px !important;
    }

    /* Footer: 4 columns */
    footer .grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Infinite Carousel */
.carousel-track {
    animation: scroll-right 25s linear infinite;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.carousel-track:hover {
    animation-play-state: paused;
    opacity: 1;
}

@keyframes scroll-right {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.carousel-container::before,
.carousel-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(2, 5, 4, 0.8), transparent);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(2, 5, 4, 0.8), transparent);
}

@media (max-width: 768px) {

    .carousel-container::before,
    .carousel-container::after {
        width: 60px;
    }
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--lang-btn-border);
    background: var(--lang-btn-bg);
    color: var(--lang-btn-color);
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    border-color: rgba(0, 217, 255, 0.5);
    background: var(--lang-btn-hover-bg);
    transform: scale(1.05);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

.theme-toggle-btn i {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* In dark mode (default) */
html:not(.light) .theme-toggle-btn .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}
html:not(.light) .theme-toggle-btn .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
    position: absolute;
}

/* In light mode */
html.light .theme-toggle-btn .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
    position: absolute;
}
html.light .theme-toggle-btn .moon-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Custom Overrides for Light Mode Layout (Tailwind Utility Overrides) */
html.light body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

html.light .glow-orb {
    opacity: 0.12;
}

html.light footer {
    background-color: var(--footer-bg) !important;
}

html.light .text-white {
    color: #0F172A !important;
}

html.light .text-gray-400 {
    color: #475569 !important;
}

html.light .bg-dark\/30 {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

html.light .bg-dark\/50 {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

html.light .bg-dark\/60 {
    background-color: rgba(255, 255, 255, 0.6) !important;
}

html.light .bg-dark\/80 {
    background-color: rgba(255, 255, 255, 0.8) !important;
}

html.light .border-white\/5 {
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html.light .border-white\/10 {
    border-color: rgba(15, 23, 42, 0.12) !important;
}

html.light .border-white\/20 {
    border-color: rgba(15, 23, 42, 0.2) !important;
}

html.light .bg-white\/5 {
    background-color: rgba(15, 23, 42, 0.05) !important;
}

html.light .bg-panel\/30 {
    background-color: rgba(241, 245, 249, 0.6) !important;
}

html.light .hover\:bg-white\/10:hover {
    background-color: rgba(15, 23, 42, 0.08) !important;
}

html.light .hover\:text-white:hover {
    color: #0F172A !important;
}

/* Ensure images with white accents look premium in light mode */
html.light img[src*="logo"] {
    filter: brightness(0.1) contrast(1.5) drop-shadow(0 0 1px rgba(0, 0, 0, 0.3));
}

html.light #mouseGlow {
    background: radial-gradient(circle, rgba(0, 136, 204, 0.28) 0%, transparent 70%);
}

html.light .terminal-window {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15);
}

html.light .terminal-window .terminal-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

html.light .terminal-window .terminal-line {
    color: rgba(255, 255, 255, 0.85);
}

html.light .terminal-window .terminal-line.text-gray-500 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* =========================================================================
   Screen Reader Accessibility Utility
   ========================================================================= */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border-width: 0 !important;
}

.focus\:not-sr-only:focus {
    position: fixed !important;
    width: auto !important;
    height: auto !important;
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* =========================================================================
   Header Navbar Contrast & Readability Enhancements
   ========================================================================= */
#navbar {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, py 0.3s ease !important;
}

/* Dark Mode - Opaque Navbar Backgrounds */
#navbar.bg-dark\/30,
#navbar.md\:bg-dark\/30 {
    background-color: rgba(2, 5, 4, 0.6) !important;
}
#navbar.bg-dark\/50,
#navbar.md\:bg-dark\/50 {
    background-color: rgba(2, 5, 4, 0.75) !important;
}
#navbar.bg-dark\/60,
#navbar.md\:bg-dark\/60 {
    background-color: rgba(2, 5, 4, 0.85) !important;
}
#navbar.bg-dark\/80,
#navbar.md\:bg-dark\/80 {
    background-color: rgba(2, 5, 4, 0.92) !important;
}

/* Dark Mode - Menu Links Default Contrast */
#navbar a:not(.glow-button),
#navbar .lang-btn {
    color: #e2e8f0 !important; /* Brighter gray for default state */
    font-weight: 500;
}

#navbar a:not(.glow-button):hover,
#navbar .lang-btn:hover {
    color: #00D9FF !important; /* Premium neon cyan hover */
}

/* Active links in dark mode */
#navbar a:not(.glow-button).text-neon,
#mobileMenu a.text-neon {
    color: #00D9FF !important;
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.3);
}

/* Glow button hover text contrast fix in dark mode */
#navbar .glow-button:hover,
#mobileMenu .glow-button:hover {
    color: var(--color-dark) !important;
    text-shadow: none !important;
}

/* Light Mode - Opaque Navbar Backgrounds */
html.light #navbar.bg-dark\/30,
html.light #navbar.md\:bg-dark\/30 {
    background-color: rgba(255, 255, 255, 0.7) !important;
}
html.light #navbar.bg-dark\/50,
html.light #navbar.md\:bg-dark\/50 {
    background-color: rgba(255, 255, 255, 0.85) !important;
}
html.light #navbar.bg-dark\/60,
html.light #navbar.md\:bg-dark\/60 {
    background-color: rgba(255, 255, 255, 0.9) !important;
}
html.light #navbar.bg-dark\/80,
html.light #navbar.md\:bg-dark\/80 {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

/* Light Mode - Menu Links Default Contrast */
html.light #navbar a:not(.glow-button),
html.light #navbar .lang-btn {
    color: #0F172A !important; /* Slate-900 for high contrast */
    font-weight: 600;
}

html.light #navbar a:not(.glow-button):hover,
html.light #navbar .lang-btn:hover {
    color: #0088CC !important; /* Premium dark blue-cyan for hover */
}

/* Active links in light mode */
html.light #navbar a:not(.glow-button).text-neon,
html.light #mobileMenu a.text-neon {
    color: #0088CC !important;
    text-shadow: none !important;
}

/* Glow button hover text contrast fix in light mode */
html.light #navbar .glow-button:hover,
html.light #mobileMenu .glow-button:hover {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* Light Mode Controls Contrast */
html.light #menuBtn,
html.light #mobileThemeToggleBtn {
    color: #0F172A !important;
}

/* Light Mode Active link borders & Hover button backgrounds */
html.light .border-neon {
    border-color: #0088CC !important;
}
html.light .border-neon\/50 {
    border-color: rgba(0, 136, 204, 0.5) !important;
}
html.light .hover\:bg-neon:hover {
    background-color: #0088CC !important;
    color: #FFFFFF !important;
}

/* SweetAlert2 AutoNovations Custom Theme Override */
.autonovations-swal-popup {
    background: var(--color-panel) !important;
    border: 2px solid #00D9FF !important;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.4) !important;
    border-radius: 1rem !important; /* 16px */
    font-family: 'Space Grotesk', sans-serif !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 90% !important;
    max-width: 512px !important;
}

html.light .autonovations-swal-popup {
    border-color: #0088CC !important;
    box-shadow: 0 0 30px rgba(0, 136, 204, 0.3) !important;
}

/* Telemetry Banner & Interactive Terminal & Filters styling */
.filter-btn, .course-filter-btn {
    border-color: var(--border, rgba(255, 255, 255, 0.1));
    color: var(--text-gray-400);
    background-color: transparent;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

.filter-btn:hover, .course-filter-btn:hover {
    border-color: rgba(0, 217, 255, 0.5);
    color: var(--text-white);
}

.filter-btn.active, .course-filter-btn.active {
    border-color: #00D9FF !important;
    color: #00D9FF !important;
    background-color: rgba(0, 217, 255, 0.08) !important;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.15);
}

/* Light Mode Overrides for Filters */
html.light .filter-btn, html.light .course-filter-btn {
    border-color: rgba(15, 23, 42, 0.15);
    color: #475569;
}

html.light .filter-btn:hover, html.light .course-filter-btn:hover {
    border-color: rgba(0, 136, 204, 0.6);
    color: #0F172A;
}

html.light .filter-btn.active, html.light .course-filter-btn.active {
    border-color: #0088CC !important;
    color: #0088CC !important;
    background-color: rgba(0, 136, 204, 0.08) !important;
    box-shadow: none !important;
}

/* Interactive Terminal Input styles */
.terminal-window input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: var(--text-white) !important;
    font-family: inherit;
    font-size: inherit;
    width: 100%;
}

html.light .terminal-window input {
    color: #ffffff !important; /* Keep console text white for high readability inside dark console window */
}

/* Telemetry Banner styles */
#liveTelemetry {
    transition: all 0.3s ease;
}

html.light #liveTelemetry {
    background-color: rgba(0, 136, 204, 0.05) !important;
    border-color: rgba(0, 136, 204, 0.25) !important;
    color: #0088CC !important;
}

html.light #liveTelemetry span {
    color: #475569 !important;
}

html.light #liveTelemetry .text-neon {
    color: #0088CC !important;
}

/* Swiper / Grid Card animations for filters */
.tech-card, .glass-panel {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.35s ease, scale 0.35s ease !important;
}

.card-hidden {
    opacity: 0 !important;
    transform: scale(0.9) translateY(20px) !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Custom dynamic neon contrast color overrides */
.text-neon {
    color: var(--neon-dark) !important;
}
.hover\:text-neon:hover {
    color: var(--neon-dark) !important;
}
.group:hover .group-hover\:text-neon {
    color: var(--neon-dark) !important;
}

/* ===== ACCESSIBILITY: Focus outlines for keyboard navigation ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.lang-btn:focus-visible,
.theme-toggle-btn:focus-visible {
    outline: 2px solid var(--neon-dark) !important;
    outline-offset: 4px;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5) !important;
}

html.light a:focus-visible,
html.light button:focus-visible,
html.light input:focus-visible,
html.light textarea:focus-visible,
html.light .lang-btn:focus-visible,
html.light .theme-toggle-btn:focus-visible {
    box-shadow: 0 0 10px rgba(0, 136, 204, 0.4) !important;
}

/* ===== LIGHT MODE: Color contrast accessibility overrides ===== */
html.light .bg-neon {
    background-color: #007699 !important; /* Accessible dark cian for text readability */
}

html.light .bg-neon.text-dark {
    color: #ffffff !important; /* High contrast text on cyan background */
}

html.light .hover\:bg-neon:hover {
    background-color: #005f7a !important;
    color: #ffffff !important;
}

html.light .glow-button {
    box-shadow: 0 0 15px rgba(0, 118, 153, 0.2) !important;
}

html.light .glow-button:hover {
    box-shadow: 0 0 25px rgba(0, 118, 153, 0.4) !important;
}

html.light footer .text-gray-400,
html.light footer a.text-gray-400 {
    color: #475569 !important; /* High contrast Slate-600 on light footer background */
}

html.light footer a.text-gray-400:hover {
    color: #0088CC !important;
}

/* ===== RESPONSIVE DESIGN: Academy Mobile Carousel Scroll fatigue fix ===== */
@media (max-width: 768px) {
    #courses .grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 1.5rem !important;
        padding: 1rem 0.5rem 2rem 0.5rem !important;
        scrollbar-width: none; /* Hide scrollbar for Firefox */
    }
    #courses .grid::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome/Safari */
    }
    #courses .course-card {
        flex: 0 0 85% !important; /* Mobile cards take 85% width for visual swipe indication */
        scroll-snap-align: center !important;
        height: auto !important;
    }
}