/* --- HIGH CONTRAST THEME OVERRIDES --- */
body.high-contrast {
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #ffffff;
    --text-dark: #000000;
    --text-muted: #111111;
    --neon-pink: #d00040; /* darker pink for higher contrast */
    --neon-cyan: #0070a0; /* darker blue for higher contrast */
    --glass-bg: #ffffff;
    --glass-border: #000000;
}

body.high-contrast .ambient-bg {
    background: #ffffff !important;
    animation: none !important;
}

body.high-contrast .noise-overlay,
body.high-contrast .crt-overlay,
body.high-contrast .crt-overlay::before,
body.high-contrast .visual-circle {
    display: none !important;
}

body.high-contrast .panel {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-top: 4px solid #ffffff !important;
}

body.high-contrast .panel-overlay {
    background: rgba(0, 0, 0, 0.95) !important;
}

body.high-contrast .panel-title {
    color: #ffffff !important;
    text-shadow: none !important;
}

body.high-contrast .panel-description {
    color: #ffffff !important;
    border-left: 5px solid #ffffff !important;
    background: #000000 !important;
    font-weight: bold;
}

body.high-contrast .glitch-text {
    text-shadow: none !important;
}

body.high-contrast .glitch-text::before,
body.high-contrast .glitch-text::after {
    display: none !important;
}

body.high-contrast .btn-primary {
    background: #000000 !important;
    color: #ffffff !important;
    border: 3px solid #000000 !important;
}

body.high-contrast .btn-secondary {
    background: #ffffff !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
    font-weight: bold;
}

body.high-contrast .btn-primary:hover,
body.high-contrast .btn-secondary:hover {
    background: #000000 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
}

body.high-contrast .contact-card {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast .form-input {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    color: #000000 !important;
}

body.high-contrast .form-input:focus {
    border-color: #000000 !important;
    box-shadow: none !important;
    outline: 3px solid #000000 !important;
}

body.high-contrast footer {
    background-color: #000000 !important;
    border-top: 5px solid #ffffff !important;
}

body.high-contrast footer p {
    color: #ffffff !important;
}

body.high-contrast .legal-link {
    color: #ffffff !important;
    font-weight: bold;
}

body.high-contrast .dock-menu {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast .dock-menu::before {
    display: none !important;
}

body.high-contrast .dock-btn {
    color: #000000 !important;
}

body.high-contrast .dock-btn.active,
body.high-contrast .dock-btn:hover {
    background: #000000 !important;
    color: #ffffff !important;
}

body.high-contrast .dock-divider {
    background-color: #000000 !important;
    opacity: 1 !important;
}

body.high-contrast .lang-btn {
    color: var(--text-dark) !important;
}

body.high-contrast .lang-btn::after {
    background-color: var(--text-dark) !important;
}

body.high-contrast .lang-separator {
    color: var(--text-dark) !important;
    opacity: 1 !important;
}

body.high-contrast .share-popover {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast .share-popover::after {
    border-color: #000000 transparent !important;
}

body.high-contrast .share-popover::before {
    border-color: #ffffff transparent !important;
}

body.high-contrast .share-popover-item {
    color: #000000 !important;
}

body.high-contrast .share-popover-item:hover {
    background: #000000 !important;
    color: #ffffff !important;
}


/* --- REDUCED MOTION OVERRIDES (User Preference & System Setting) --- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-delay: 0s !important;
        animation-duration: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0s !important;
        scroll-behavior: auto !important;
    }
    
    .ambient-bg {
        animation: none !important;
    }
    
    .noise-overlay {
        animation: none !important;
        opacity: 0.05 !important;
    }
    
    .crt-overlay::before {
        animation: none !important;
    }
    
    .glitch-text::before,
    .glitch-text::after {
        display: none !important;
    }
    
    .glitch-text {
        text-shadow: none !important;
    }
    
    .visual-circle {
        transform: translate(-50%, -50%) !important;
    }
    
    .visual-circle::before,
    .visual-circle::after {
        animation: none !important;
    }
    
    .scroll-indicator {
        animation: none !important;
    }
    
    .panel-video {
        display: none !important; /* Hide videos to stop motion completely */
    }
    
    .panel-img {
        opacity: 0.4 !important; /* Show fallback images instead */
    }
}

/* Explicit toggle for reduced motion via accessibility controls */
body.reduced-motion * {
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
}

body.reduced-motion .ambient-bg {
    animation: none !important;
}

body.reduced-motion .noise-overlay {
    animation: none !important;
    opacity: 0.05 !important;
}

body.reduced-motion .crt-overlay::before {
    animation: none !important;
}

body.reduced-motion .glitch-text::before,
body.reduced-motion .glitch-text::after {
    display: none !important;
}

body.reduced-motion .glitch-text {
    text-shadow: none !important;
}

body.reduced-motion .visual-circle {
    transform: translate(-50%, -50%) !important;
}

body.reduced-motion .visual-circle::before,
body.reduced-motion .visual-circle::after {
    animation: none !important;
}

body.reduced-motion .scroll-indicator {
    animation: none !important;
}

body.reduced-motion .panel-video {
    display: none !important;
}

body.reduced-motion .panel-img {
    opacity: 0.45 !important;
}

/* High-contrast overrides for navigation header */
body.high-contrast .main-header {
    background: #ffffff !important;
    border-bottom: 3px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast .main-header.scrolled {
    background: #ffffff !important;
    box-shadow: none !important;
}

body.high-contrast .logo-text,
body.high-contrast .logo-x,
body.high-contrast .nav-link {
    color: #000000 !important;
}

body.high-contrast .hamburger-line {
    background-color: #000000 !important;
}

body.high-contrast .logo-link:hover .logo-text,
body.high-contrast .nav-link:hover,
body.high-contrast .nav-link.active {
    color: #d00040 !important; /* High contrast neon-pink override */
    text-decoration: underline !important;
}

body.high-contrast .nav-link::after {
    display: none !important;
}

body.high-contrast .menu-toggle[aria-expanded="true"] .hamburger-line {
    background-color: #d00040 !important;
}

@media (max-width: 768px) {
    body.high-contrast .nav-menu {
        background: #ffffff !important;
        border: 3px solid #000000 !important;
    }
}

