/* Base styles and custom utilities */
:root {
    --color-midnight-900: #040B18;
    --color-midnight-950: #020610;
    --color-mint-400: #34D399;
    --color-mint-500: #10B981;
    --color-mint-600: #059669;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Scroll reveal animations — progressive enhancement via JS */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(2, 6, 16, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}

/* Nav link hover underline */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-mint-400);
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
}

/* Button focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--color-mint-400);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background: rgba(52, 211, 153, 0.25);
    color: var(--color-midnight-900);
}

/* Image loading placeholder */
img {
    background-color: var(--color-midnight-900);
}

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

::-webkit-scrollbar-track {
    background: var(--color-midnight-950);
}

::-webkit-scrollbar-thumb {
    background: rgba(52, 211, 153, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 211, 153, 0.5);
}

/* Success message for contact form */
.success-message {
    animation: slideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle pattern overlay for hero */
.hero-pattern {
    background-image: radial-gradient(rgba(52, 211, 153, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}
