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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(13, 148, 136, 0.15);
    color: inherit;
}

/* Scroll reveal — progressive enhancement, only active when JS runs */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        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);
    }
}

/* Fallback: ensure content is visible even without JS */
.reveal {
    opacity: 1;
    transform: none;
}

/* Scroll line animation */
@keyframes scroll-line {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(1); transform-origin: bottom; }
}

.animate-scroll-line {
    animation: scroll-line 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

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

/* Mobile menu transitions */
#mobile-menu.menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Subtle image loading placeholder */
img {
    background-color: rgb(245, 243, 240);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(13, 148, 136, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 148, 136, 0.4);
}
