/* Base styles */
:root {
    --color-midnight-700: #0f2b4a;
    --color-mint-400: #a8e6cf;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #0f2b4a;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    z-index: 100;
    font-weight: 600;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 1rem;
}

/* Navbar */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background-color: rgba(15, 43, 74, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #a8e6cf;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Mobile nav */
.mobile-nav-link {
    position: relative;
}

/* Hero */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #f4faf7, transparent);
    pointer-events: none;
}

/* Scroll reveal animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-32px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(32px);
    }

    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Back to top */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #a8e6cf;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* Selection */
::selection {
    background: #a8e6cf;
    color: #0f2b4a;
}

/* Smooth image rendering */
img {
    -webkit-font-smoothing: antialiased;
}

/* Subtle pattern for sections */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(15, 43, 74, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
}

/* Form focus states */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(168, 230, 207, 0.3);
}

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

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

::-webkit-scrollbar-thumb {
    background: #aac0d6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7fa0c1;
}

/* Print styles */
@media print {
    #navbar,
    #back-to-top,
    .reveal-up,
    .reveal-left,
    .reveal-right {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
