/* ============================================
   GreaseZerks — Custom Styles
   Midnight Blue + Mint Editorial Design
   ============================================ */

/* --- Custom Properties --- */
:root {
    --color-midnight-950: #0a1929;
    --color-midnight-900: #102a43;
    --color-midnight-800: #243b53;
    --color-mint-light: #a7f3d0;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
}

/* --- Base Reset & Typography --- */
*, *::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;
}

/* --- Selection Color --- */
::selection {
    background-color: rgba(167, 243, 208, 0.3);
    color: #a7f3d0;
}

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

::-webkit-scrollbar-track {
    background: var(--color-midnight-950);
}

::-webkit-scrollbar-thumb {
    background: var(--color-midnight-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-mint-light);
}

/* --- Focus Styles --- */
:focus-visible {
    outline: 2px solid var(--color-mint-light);
    outline-offset: 2px;
}

/* --- Menu Tab Buttons --- */
.menu-tab {
    background: transparent;
    color: var(--color-midnight-400);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-tab.active {
    background: var(--color-mint-light);
    color: var(--color-midnight-950);
}

.menu-tab:not(.active):hover {
    color: var(--color-mint-light);
}

/* --- Mobile Menu Animation --- */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Menu Button Animation --- */
.menu-line {
    display: block;
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* --- Navbar Transition --- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(10, 25, 41, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(167, 243, 208, 0.1);
}

/* --- Smooth Scroll Offset for Anchors --- */
[id] {
    scroll-margin-top: 5rem;
}

/* --- Hover Lift for Cards --- */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .group:hover .group-hover\:scale-105 {
        transform: none;
    }
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 3rem;
    }
    
    #about h2,
    #menu h2,
    #experience h2,
    #visit h2 {
        font-size: 2.5rem;
    }
    
    .menu-tab {
        padding: 0.6rem 1.2rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.5rem;
    }
    
    #hero h1 br {
        display: none;
    }
    
    #hero h1 span {
        display: block;
        margin-top: 0.25rem;
    }
}
