/* MAIN PORTFOLIO STYLES - Extracted from index.html for better maintainability */

/* ===== CRITICAL ABOVE-THE-FOLD STYLES ===== */
:root {
    --primary-color: #00d4ff;
    --background-primary: #0a0a0f;
    --text-primary: #ffffff;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Smooth transitions for theme changes */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.parallax-section {
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    pointer-events: none;
}

.content-container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    overflow: auto;
    max-height: 100vh;
}

.content-container::-webkit-scrollbar {
    width: 8px;
}

.content-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.content-container::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 4px;
}

.content-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.7);
}

.content-box {
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

h1 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Anti-forensics Protection */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
}

.sensitive {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Ensure critical background images load immediately */
.bg-hero {
    background-image: url('./Image1.jpg') !important;
}

.bg-skills {
    background-image: url('./Image2.jpg') !important;
}

/* Icon and utility classes */
.cert-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 8px;
}

.hidden-field {
    position: absolute;
    left: -9999px;
    visibility: hidden;
    opacity: 0;
}

.behavior-tracker {
    display: none;
}

.button-loader {
    display: none;
}

/* ===== ADVANCED COLOR SYSTEM ===== */
:root {
    /* Professional Color Palette - Enhanced Vibrant Mode */
    --primary-color: #00d4ff;
    --primary-hover: #00b8e6;
    --primary-gradient: linear-gradient(135deg, #00d4ff 0%, #0099cc 50%, #006699 100%);

    /* Secondary Colors */
    --secondary-color: #a855f7;
    --secondary-hover: #9333ea;
    --secondary-gradient: linear-gradient(135deg, #a855f7 0%, #7c3aed 50%, #6d28d9 100%);

    /* Accent Colors */
    --accent-color: #10b981;
    --accent-hover: #059669;
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);

    /* Background Colors */
    --background-primary: #0a0a0f;
    --background-secondary: #0f0f16;
    --background-tertiary: #121218;
    --background-card: rgba(255, 255, 255, 0.08);
    --background-glass: rgba(255, 255, 255, 0.1);
    --background-glass-secondary: rgba(255, 255, 255, 0.05);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-accent: #00d4ff;

    /* Border Colors */
    --border-color: rgba(255, 255, 255, 0.15);
    --border-accent: rgba(0, 212, 255, 0.3);
    --divider-color: rgba(255, 255, 255, 0.08);

    /* Interactive States */
    --hover-bg: rgba(0, 212, 255, 0.1);
    --active-bg: rgba(0, 212, 255, 0.2);
    --focus-ring: 0 0 0 3px rgba(0, 212, 255, 0.3);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Shadows */
    --shadow-sm: 0 2px 15px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 35px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 70px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 35px 100px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 50px rgba(0, 212, 255, 0.2);
    --shadow-glow-secondary: 0 0 40px rgba(168, 85, 247, 0.15);
    --shadow-glow-accent: 0 0 45px rgba(16, 185, 129, 0.15);

    /* Transitions */
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
    --z-system: 1090;
}

/* Glass morphism base */
.glass {
    background: var(--background-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Modern scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Firefox scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-secondary);
}

/* Layout utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Performance optimizations */
.parallax-section, .content-container, .theme-toggle, .glass-clock {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.parallax-section:first-child .parallax-bg {
    background-image: url('./Image1.jpg');
}

/* LIGHT MODE COLOR OVERRIDES */
[data-theme="light"] {
    /* Light Mode Primary Colors */
    --primary-color: #0066ff;
    --primary-hover: #0052cc;
    --primary-gradient: linear-gradient(135deg, #0066ff 0%, #00d4ff 50%, #0099cc 100%);

    /* Light Mode Secondary */
    --secondary-color: #7c3aed;
    --secondary-hover: #6d28d9;
    --secondary-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);

    /* Light Mode Accent */
    --accent-color: #059669;
    --accent-hover: #047857;
    --accent-gradient: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);

    /* Light Mode Backgrounds */
    --background-primary: #ffffff;
    --background-secondary: #f8fafc;
    --background-tertiary: #f1f5f9;
    --background-card: rgba(255, 255, 255, 0.95);
    --background-glass: rgba(255, 255, 255, 0.8);
    --background-glass-secondary: rgba(255, 255, 255, 0.6);

    /* Light Mode Text */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-accent: #0066ff;

    /* Light Mode Borders */
    --border-color: rgba(0, 0, 0, 0.1);
    --border-accent: rgba(0, 102, 255, 0.3);
    --divider-color: rgba(0, 0, 0, 0.05);

    /* Light Mode Interactive States */
    --hover-bg: rgba(0, 102, 255, 0.05);
    --active-bg: rgba(0, 102, 255, 0.1);
    --focus-ring: 0 0 0 3px rgba(0, 102, 255, 0.2);

    /* Light Mode Shadows */
    --shadow-sm: 0 2px 15px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 35px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 70px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 35px 100px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 50px rgba(0, 102, 255, 0.15);
    --shadow-glow-secondary: 0 0 40px rgba(124, 58, 237, 0.1);
    --shadow-glow-accent: 0 0 45px rgba(5, 150, 105, 0.1);
}

/* ENHANCED SCROLL SYSTEM CSS FOR CONTENT INTERACTION */
.scroll-edge-indicator {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: rgba(70, 130, 180, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(70, 130, 180, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
    color: #4682b4;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 10000;
    pointer-events: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.scroll-edge-indicator.show {
    opacity: 1;
    transform: translateX(0);
}

.scroll-edge-indicator .icon {
    margin-right: 6px;
}

@media (max-width: 768px) {
    .scroll-edge-indicator {
        bottom: 60px;
        right: 10px;
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* Hide scrollbar for Chrome, Safari, Edge, and newer browsers */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.parallax-section::-webkit-scrollbar,
.content-card::-webkit-scrollbar,
div::-webkit-scrollbar,
section::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    background: transparent;
    display: none;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.parallax-section::-webkit-scrollbar-track,
.content-card::-webkit-scrollbar-track,
div::-webkit-scrollbar-track,
section::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.parallax-section::-webkit-scrollbar-thumb,
.content-card::-webkit-scrollbar-thumb,
div::-webkit-scrollbar-thumb,
section::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: transparent;
    border: none;
}

/* Hide scrollbar for Firefox */
html,
body,
.parallax-section,
.content-card,
div,
section,
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge Legacy */
}

/* Additional Edge specific fix */
html {
    -ms-overflow-style: none; /* IE and Edge Legacy */
    scrollbar-width: none; /* Firefox */
}

body {
    -ms-overflow-style: none; /* IE and Edge Legacy */
    scrollbar-width: none; /* Firefox */
}

/* Specific hiding for parallax sections */
.parallax-section {
    -ms-overflow-style: none; /* IE and Edge Legacy */
    scrollbar-width: none; /* Firefox */
}

/* Theme Toggle Button Styles */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    width: 60px;
    height: 60px;
    background: var(--background-glass);
    border: 2px solid var(--border-accent);
    border-radius: var(--radius-full);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-bounce);
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
    border-color: var(--primary-color);
    background: var(--hover-bg);
}

.theme-toggle:active {
    transform: scale(0.95) rotate(-5deg);
    transition: all var(--transition-fast);
}

/* Colorblind Filter Button Styles */
.colorblind-toggle {
    position: fixed;
    top: 2rem;
    right: 6rem;
    z-index: 10000;
    width: 60px;
    height: 60px;
    background: var(--background-glass);
    border: 2px solid var(--border-accent);
    border-radius: var(--radius-full);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-bounce);
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
}

.colorblind-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
    border-color: var(--secondary-color);
    background: var(--hover-bg);
}

.colorblind-toggle:active {
    transform: scale(0.95) rotate(-5deg);
    transition: all var(--transition-fast);
}

.colorblind-toggle.active {
    border-color: var(--accent-color);
    background: rgba(139, 69, 255, 0.3);
    box-shadow: 
        var(--shadow-glow), 
        0 0 20px rgba(139, 69, 255, 0.4),
        inset 0 0 20px rgba(139, 69, 255, 0.1);
}

.colorblind-toggle.active svg {
    color: var(--accent-color);
    filter: drop-shadow(0 0 8px rgba(139, 69, 255, 0.6));
}

.toggle-icon {
    position: relative;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sun-icon,
.moon-icon {
    position: absolute;
    width: 28px;
    height: 28px;
    color: var(--text-accent);
    transition: all var(--transition-spring);
}

/* Default state (dark mode) - show sun icon */
.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0.5);
}

/* Light mode - show moon icon */
[data-theme="light"] .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
}

[data-theme="light"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Add glow effect to theme toggle in light mode */
[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    box-shadow: 
        var(--shadow-glow), 
        0 0 20px rgba(0, 212, 255, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .theme-toggle svg {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.4));
}

/* Colorblind toggle icon styles */
.colorblind-toggle .toggle-icon svg {
    width: 28px;
    height: 28px;
    color: var(--text-accent);
    transition: all var(--transition-spring);
}

/* Responsive theme toggle */
@media (max-width: 768px) {
    .theme-toggle {
        top: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }

    .toggle-icon {
        width: 24px;
        height: 24px;
    }

    .sun-icon,
    .moon-icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .toggle-icon {
        width: 20px;
        height: 20px;
    }

    .sun-icon,
    .moon-icon {
        width: 20px;
        height: 20px;
    }
}

/* Glassmorphic Date/Time Clock Widget - OPTIMIZED FOR MINIMAL INTRUSION */
.glass-clock {
    position: fixed;
    bottom: 8px;
    right: 12px;
    z-index: 999;

    /* Glassmorphism Design - More Transparent */
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

    /* Enhanced Sizing for Longer Location Text */
    padding: 8px 12px;
    width: 230px; /* Optimized width to prevent overflow */
    height: 65px; /* Fixed height for 3 lines */
    max-height: 65px; /* Prevent growing beyond 3 lines */
    font-size: 11px;
    font-weight: 500;
    font-family: 'Inter', 'Roboto', sans-serif;
    color: rgba(255, 255, 255, 0.8);
    text-align: center; /* Center align the text */
    overflow: hidden; /* Prevent scrolling */
    user-select: none;
    
    /* Text layout for multi-line display */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.4;

    /* Smooth Animations */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

/* Subtle hover effect (for debugging purposes) */
.glass-clock:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

/* Light mode clock styling */
[data-theme="light"] .glass-clock {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .glass-clock:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
}

/* Mobile optimization */
@media (max-width: 768px) {
    .glass-clock {
        /* MOBILE: Move to top-left corner */
        top: 10px;
        left: 10px;
        bottom: auto;
        right: auto;
        padding: 6px 10px;
        width: 200px; /* Adjusted width for mobile */
        height: 60px; /* Slightly smaller height for mobile */
        font-size: 10px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .glass-clock {
        /* SMALL MOBILE: Top-left with safe area support */
        top: max(8px, env(safe-area-inset-top, 8px));
        left: max(8px, env(safe-area-inset-left, 8px));
        bottom: auto;
        right: auto;
        padding: 4px 8px;
        width: 180px; /* Smaller width for very small screens */
        height: 55px; /* Compact height for small screens */
        font-size: 9px;
        border-radius: 6px;
    }
}

/* Clock text elements */
.glass-clock .time {
    display: block; /* Stack time on its own line */
    margin: 0 0 2px 0;
    font-weight: 600;
    font-size: 12px; /* Slightly larger for time */
}

.glass-clock .location {
    display: block; /* Stack location on its own line */
    font-weight: 400;
    opacity: 0.9;
    margin: 2px 0 0 0;
    line-height: 1.3;
    word-wrap: break-word;
}

/* Clock data display separator */
.glass-clock .separator {
    margin: 0 4px;
    opacity: 0.6;
    font-weight: 300;
    display: none; /* Hide separator in multi-line layout */
}

/* Responsive behavior for clock elements */
@media (max-width: 320px) {
    .glass-clock {
        /* TINY MOBILE: Ultra-compact top-left positioning */
        top: max(6px, env(safe-area-inset-top, 6px));
        left: max(6px, env(safe-area-inset-left, 6px));
        bottom: auto;
        right: auto;
        width: 160px; /* Even smaller width for tiny screens */
        height: 50px;
        padding: 3px 6px;
        font-size: 8px;
    }
    
    .glass-clock .time {
        font-size: 9px; /* Proportionally smaller time text */
    }
    
    .glass-clock .location {
        font-size: 8px;
        line-height: 1.2;
    }
}

/* ===== CRITICAL CSS FIXES FOR IMAGE POSITIONING ISSUES ===== */
.parallax-section {
    /* Ensure no blank spaces or gaps */
    background: #121212; /* Fallback color */
}

.parallax-bg {
    /* Force proper positioning regardless of content */
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
    /* Prevent any gaps or displacement */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

/* Fix for webkit browsers */
@supports (-webkit-appearance: none) {
    .parallax-bg {
        -webkit-background-size: cover !important;
        background-size: cover !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
    }
}

/* Fix for Firefox */
@-moz-document url-prefix() {
    .parallax-bg {
        background-attachment: scroll !important;
    }
}

/* ===== COLORBLIND ACCESSIBILITY FILTERS ===== */

/* Base transition for smooth filter changes */
html {
    transition: filter 0.3s ease-in-out;
}

/* Protanopia Filter (Red-Blind) - Enhanced for better visibility */
[data-colorblind="protanopia"] {
    filter: 
        contrast(1.2) 
        brightness(1.1) 
        sepia(0.15) 
        hue-rotate(15deg)
        saturate(1.1);
}

[data-colorblind="protanopia"] .primary-color,
[data-colorblind="protanopia"] .accent-color,
[data-colorblind="protanopia"] .btn-primary {
    filter: hue-rotate(40deg) saturate(1.3) brightness(1.1);
}

/* Add visual indicator for protanopia */
[data-colorblind="protanopia"]::before {
    content: "🔴 Red-Blind Filter Active";
    position: fixed;
    top: 6rem;
    right: 2rem;
    background: rgba(255, 165, 0, 0.95);
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInOut 4s ease-in-out;
}

/* Deuteranopia Filter (Green-Blind) - Enhanced for better visibility */
[data-colorblind="deuteranopia"] {
    filter: 
        contrast(1.25) 
        brightness(1.08) 
        sepia(0.2) 
        hue-rotate(-15deg)
        saturate(1.2);
}

[data-colorblind="deuteranopia"] .secondary-color,
[data-colorblind="deuteranopia"] .success-color,
[data-colorblind="deuteranopia"] .btn-success {
    filter: hue-rotate(-30deg) saturate(1.4) brightness(1.2);
}

/* Add visual indicator for deuteranopia */
[data-colorblind="deuteranopia"]::before {
    content: "🟢 Green-Blind Filter Active";
    position: fixed;
    top: 6rem;
    right: 2rem;
    background: rgba(0, 191, 255, 0.95);
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInOut 4s ease-in-out;
}

/* Tritanopia Filter (Blue-Blind) - Enhanced for better visibility */
[data-colorblind="tritanopia"] {
    filter: 
        contrast(1.3) 
        brightness(1.15) 
        sepia(0.1) 
        hue-rotate(200deg)
        saturate(1.3);
}

[data-colorblind="tritanopia"] .primary-color,
[data-colorblind="tritanopia"] .info-color,
[data-colorblind="tritanopia"] .btn-info {
    filter: hue-rotate(220deg) saturate(1.5) brightness(1.3);
}

/* Add visual indicator for tritanopia */
[data-colorblind="tritanopia"]::before {
    content: "🔵 Blue-Blind Filter Active";
    position: fixed;
    top: 6rem;
    right: 2rem;
    background: rgba(255, 255, 0, 0.95);
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInOut 4s ease-in-out;
}

/* Fade in/out animation for filter indicators */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px) scale(0.8); }
    15% { opacity: 1; transform: translateY(0) scale(1); }
    85% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-10px) scale(0.8); }
}

/* Enhanced text contrast for all colorblind filters */
[data-colorblind] .text-primary,
[data-colorblind] .text-secondary,
[data-colorblind] h1, [data-colorblind] h2, [data-colorblind] h3,
[data-colorblind] .nav-dot {
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Enhanced button visibility for colorblind users */
[data-colorblind] .btn,
[data-colorblind] .theme-toggle,
[data-colorblind] .colorblind-toggle {
    border-width: 3px;
    box-shadow: 
        var(--shadow-glow), 
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Improved focus indicators for accessibility */
[data-colorblind] *:focus {
    outline: 3px solid #ffff00 !important;
    outline-offset: 2px;
}

/* Responsive adjustments for colorblind filters */
@media (max-width: 768px) {
    .colorblind-toggle {
        top: 1.5rem;
        right: 5rem;
        width: 50px;
        height: 50px;
    }
    
    .theme-toggle {
        right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .colorblind-toggle {
        right: 4rem;
        width: 45px;
        height: 45px;
    }
    
    .colorblind-toggle svg {
        width: 20px;
        height: 20px;
    }
}
