/* Custom styles that go beyond Tailwind utilities */

/* Navbar scroll effect */
#navbar.scrolled {
    background-color: rgba(13, 27, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(65, 90, 119, 0.5);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Burger animation */
#burger.active .bar:nth-child(1) {
    transform: rotate(45deg) translateY(6px);
}

#burger.active .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#burger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-6px);
}

/* Mobile link hover */
.mobile-link:hover {
    color: #778da9;
}

/* Smooth scroll offset for fixed navbar */
section[id] {
    scroll-margin-top: 80px;
}

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

::-webkit-scrollbar-track {
    background: #0d1b2a;
}

::-webkit-scrollbar-thumb {
    background: #415a77;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #778da9;
}

/* Selection color */
::selection {
    background-color: rgba(119, 141, 169, 0.3);
    color: #0d1b2a;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #778da9;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Object/PDF viewer fallback styling */
object[type="application/pdf"] {
    background: #1b263b;
}

/* Iframe styling */
iframe {
    background: #0d1b2a;
}

/* Subtle fade-in animation for sections on scroll */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #e0e1dd, #edeeef, #f7f8f8);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 8s ease infinite;
}

/* Hover underline animation for nav links */
.nav-link {
    position: relative;
}

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

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