*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Navbar scroll effect */
.nav-scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-scrolled .text-midnight-800 {
    color: #ffffff !important;
}

.nav-scrolled .text-midnight-500 {
    color: rgba(255, 255, 255, 0.6) !important;
}

.nav-scrolled .text-midnight-600 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.nav-scrolled .text-midnight-700 {
    color: #ffffff !important;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: #0f2035;
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 90;
    cursor: pointer;
    text-decoration: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #142c48;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Mobile menu */
#mobileMenu a {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#mobileMenu a:last-child {
    border-bottom: none;
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* Scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

/* No-reveal fallback: ensure content is visible without JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Selection color */
::selection {
    background: rgba(74, 222, 128, 0.3);
    color: #0a1628;
}
