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

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

body {
    overflow-x: hidden;
}

/* Scroll reveal base — content always visible by default, JS adds animated state */
.reveal-element {
    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);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-element.reveal-hidden {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(193, 105, 79, 0.1);
}

#navbar.scrolled .nav-link {
    color: #4b251d;
}

#navbar.scrolled .nav-link:hover {
    color: #c1694f;
}

#navbar.scrolled .menu-line {
    background-color: #4b251d;
}

#navbar.scrolled .mobile-link {
    color: #4b251d;
}

/* Mobile menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

body.menu-open {
    overflow: hidden;
}

/* Mobile menu line animation */
#mobile-menu.active .menu-line:first-child {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-menu.active .menu-line:last-child {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Subtle hover underline for nav links */
.nav-link {
    position: relative;
}

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

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

/* Input focus styles */
input:focus,
textarea:focus {
    border-color: #c1694f !important;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* Selection color */
::selection {
    background-color: rgba(193, 105, 79, 0.2);
    color: #4b251d;
}

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

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

::-webkit-scrollbar-thumb {
    background: #e5d7b4;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c1694f;
}
