/* ============================================
   Daniel's Speed and Performance
   Custom Styles
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(77, 217, 177, 0.2);
    color: #d5f5e8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: rgba(77, 217, 177, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(77, 217, 177, 0.5);
}

/* ============================================
   Animations
   ============================================ */

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

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scroll indicator line */
@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

.scroll-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, transparent, #4dd9b1, transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

/* ============================================
   Navbar
   ============================================ */

#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(77, 217, 177, 0.1);
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s 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 */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================
   Service Cards
   ============================================ */

.service-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, background-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    background: rgba(10, 22, 40, 0.6);
}

/* ============================================
   Gallery Images
   ============================================ */

.overflow-hidden {
    position: relative;
}

.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.overflow-hidden:hover::after {
    opacity: 1;
}

/* ============================================
   Form
   ============================================ */

select option {
    background: #091322;
    color: #d5f5e8;
}

input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 1px rgba(77, 217, 177, 0.3);
}

/* ============================================
   Responsive
   ============================================ */

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