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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #0a1628;
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ===== Scroll Reveal ===== */
.reveal-on-scroll {
    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);
}

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-fade-up {
        animation: none;
        opacity: 1;
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ===== Navbar ===== */
#navbar {
    color: #0a1628;
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

#navbar.dark-nav {
    color: #ffffff;
}

#navbar.dark-nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    color: #0a1628;
}

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

#mobile-menu.open #menu-line-1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu.open #menu-line-2 {
    opacity: 0;
}

#mobile-menu.open #menu-line-3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* ===== Form Styles ===== */
input:focus, textarea:focus {
    outline: none;
}

input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

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

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

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

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

/* ===== Utility ===== */
.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* ===== Image lazy loading shimmer ===== */
img {
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}
