/* ========== Base & Utilities ========== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(94, 234, 212, 0.25);
    color: #fef7ed;
}

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

#navbar.scrolled {
    background: rgba(6, 13, 24, 0.92);
    backdrop-blur: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #5eead4;
    transition: width 0.3s ease;
}

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

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

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

.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ========== Floating Cards ========== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    animation-delay: 0s;
    animation-duration: 6s;
}

.floating-card:nth-child(2) {
    animation-delay: -1.5s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -3s;
    animation-duration: 5.5s;
}

.floating-card:nth-child(4) {
    animation-delay: -4.5s;
    animation-duration: 6.5s;
}

/* ========== Scroll Animations ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    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; }

/* ========== Keyframes ========== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

/* ========== Image Hover Effects ========== */
.rounded-2xl.overflow-hidden,
.rounded-3xl.overflow-hidden {
    position: relative;
}

.rounded-2xl.overflow-hidden::after,
.rounded-3xl.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 13, 24, 0.2) 0%, transparent 40%);
    pointer-events: none;
    border-radius: inherit;
}

/* ========== Form Focus Styles ========== */
input:focus,
textarea:focus {
    background: rgba(13, 27, 42, 0.8);
}

/* ========== Button Ripple ========== */
button {
    position: relative;
    overflow: hidden;
}

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

::-webkit-scrollbar-track {
    background: #060d18;
}

::-webkit-scrollbar-thumb {
    background: #1b3447;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2d4a5e;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}
