/* Custom Styles */
body {
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

.header-logo {
  height: 64px; 
  width: auto;   
}


/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #DC2626;
}

/* Glitch effect for headings (optional enhancement) */
@keyframes glitch {
    0% {
        text-shadow: 2px 2px #DC2626, -2px -2px #EF4444;
    }
    25% {
        text-shadow: -2px -2px #DC2626, 2px 2px #EF4444;
    }
    50% {
        text-shadow: 2px -2px #DC2626, -2px 2px #EF4444;
    }
    75% {
        text-shadow: -2px 2px #DC2626, 2px -2px #EF4444;
    }
    100% {
        text-shadow: 2px 2px #DC2626, -2px -2px #EF4444;
    }
}

/* Pulse animation for operational status */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Binary text selection color */
::selection {
    background-color: #DC2626;
    color: #fff;
}

::-moz-selection {
    background-color: #DC2626;
    color: #fff;
}

/* Prevent flash on page load */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile menu styles (if needed) */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem !important;
    }
}

/* Form input focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #DC2626 !important;
}

/* Button hover effects */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Card hover effects */
.hover\:border-red-500\/50:hover {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.2);
}

/* Gradient text animation (optional) */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Loading animation for binary canvas */
@keyframes loading {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.3;
    }
}

/* Light theme override */
:root {
    --mx-bg: #f4f7fb;
    --mx-surface: #ffffff;
    --mx-surface-alt: #eef3f9;
    --mx-text: #0f172a;
    --mx-text-soft: #334155;
    --mx-text-muted: #64748b;
    --mx-border: #cbd5e1;
    --mx-accent: #0f766e;
    --mx-accent-strong: #115e59;
}

body {
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%) !important;
    color: var(--mx-text) !important;
}

nav {
    background: rgba(255, 255, 255, 0.9) !important;
    border-bottom-color: var(--mx-border) !important;
}

#services {
    background: var(--mx-surface-alt) !important;
}

#about,
#contact,
footer {
    background: var(--mx-surface) !important;
}

canvas#binaryCanvas,
#staticBinary,
#servicesBinary,
#aboutBinary,
#contactBinary {
    opacity: 0.06 !important;
}

.text-neutral-100,
.text-neutral-200,
.text-neutral-300 {
    color: var(--mx-text) !important;
}

.text-neutral-400,
.text-neutral-500 {
    color: var(--mx-text-soft) !important;
}

.text-neutral-600,
.text-neutral-700 {
    color: #475569 !important;
}

.bg-black,
.bg-neutral-950,
.bg-neutral-900 {
    background-color: var(--mx-surface) !important;
}

[class*="bg-black/"],
[class*="bg-neutral-950/"],
[class*="bg-neutral-900/"] {
    background-color: #f8fafc !important;
}

.border-neutral-800,
.border-neutral-700 {
    border-color: var(--mx-border) !important;
}

[class*="text-red-"] {
    color: var(--mx-accent) !important;
}

[class*="border-red-"] {
    border-color: #99d7d2 !important;
}

[class*="bg-red-"] {
    background-color: rgba(15, 118, 110, 0.12) !important;
}

button.bg-red-600,
a.bg-red-600 {
    background-color: var(--mx-accent) !important;
    color: #ffffff !important;
    border-color: var(--mx-accent) !important;
}

button.bg-red-600:hover,
a.bg-red-600:hover {
    background-color: var(--mx-accent-strong) !important;
}

.hover\:bg-red-700:hover {
    background-color: var(--mx-accent-strong) !important;
}

.hover\:bg-neutral-900:hover {
    background-color: #e2e8f0 !important;
    color: var(--mx-text) !important;
}

img {
    filter: saturate(0.95);
}

/* Mobile navigation */
.mobile-nav-toggle,
.mobile-nav-panel {
    display: none;
}

@media (max-width: 767px) {
    .header-logo {
        height: 52px;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        color: var(--mx-text);
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid var(--mx-border);
    }

    .mobile-nav-toggle:hover {
        transform: none;
        box-shadow: none;
        background: #ffffff;
    }

    .mobile-nav-toggle:focus-visible {
        outline: 2px solid var(--mx-accent);
        outline-offset: 2px;
    }

    .mobile-nav-panel {
        display: block;
        width: 100%;
        margin-top: 0.85rem;
        padding: 0;
        border: 1px solid var(--mx-border);
        background: rgba(255, 255, 255, 0.97);
        overflow: hidden;
    }

    .mobile-nav-panel[hidden] {
        display: none;
    }

    .mobile-nav-link,
    .mobile-nav-subtoggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.95rem 1rem;
        font-size: 0.92rem;
        line-height: 1.4;
        color: var(--mx-text);
        background: transparent;
        border-bottom: 1px solid var(--mx-border);
        text-align: left;
    }

    .mobile-nav-link:last-child {
        border-bottom: none;
    }

    .mobile-nav-subtoggle {
        border: 0;
        border-bottom: 1px solid var(--mx-border);
    }

    .mobile-nav-submenu {
        border-bottom: 1px solid var(--mx-border);
        background: var(--mx-surface-alt);
    }

    .mobile-nav-submenu[hidden] {
        display: none;
    }

    .mobile-nav-sublink {
        display: block;
        padding: 0.85rem 1rem 0.85rem 1.75rem;
        font-size: 0.88rem;
        color: var(--mx-text-soft);
        border-top: 1px solid rgba(203, 213, 225, 0.75);
    }

    .mobile-nav-panel a:hover,
    .mobile-nav-panel button:hover {
        background: #f8fafc;
        color: var(--mx-accent-strong);
        transform: none;
        box-shadow: none;
    }

    .mobile-nav-action {
        justify-content: center;
        font-weight: 600;
        color: #ffffff !important;
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.92), rgba(153, 27, 27, 0.90));
        border-bottom: none;
        border-color: rgba(248, 113, 113, 0.42);
    }

    .mobile-nav-panel .mobile-nav-action,
    .mobile-nav-panel a.mobile-nav-action {
        color: #ffffff !important;
    }

    .mobile-nav-action:hover {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.96), rgba(185, 28, 28, 0.92)) !important;
        color: #ffffff !important;
    }
}
