/* PJ's Bar — Custom Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background-color: #3d5a3d;
    color: #faf9f6;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #527552;
    outline-offset: 2px;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Navbar styles */
.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%;
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
}

/* Reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal.delay-1 { transition-delay: 0.1s; }
    .reveal.delay-2 { transition-delay: 0.2s; }
    .reveal.delay-3 { transition-delay: 0.3s; }
    .reveal.delay-4 { transition-delay: 0.4s; }
    .reveal.delay-5 { transition-delay: 0.5s; }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Image hover effects */
.rounded-lg.overflow-hidden {
    transition: transform 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: #9bb99b;
    border-radius: 4px;
}

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

/* Dark scrollbar for dark sections */
.bg-forest-950::-webkit-scrollbar-track {
    background: #111811;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #faf9f6 inset !important;
}
