/* ===== Base & Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Default state for reveal elements — visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Animated state applied via JS */
.reveal.animate-in {
    opacity: 0;
    transform: translateY(30px);
}

/* ===== Navbar Scroll State ===== */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.98);
    box-shadow: 0 1px 0 rgba(168, 230, 207, 0.1);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* ===== Custom Selection ===== */
::selection {
    background: #A8E6CF;
    color: #0D1B2A;
}

/* ===== Subtle Image Hover ===== */
.group:hover img {
    transform: scale(1.03);
}

img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #A8E6CF;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ===== Smooth Scroll Offset for Fixed Nav ===== */
section[id] {
    scroll-margin-top: 80px;
}
