/* ─── Reset & Base ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: #89dbb9;
    color: #1e3a5f;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #89dbb9;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4ec49a;
}

/* ─── Navbar ─── */
#navbar {
    backdrop-filter: blur(0px);
    transition: background 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(30, 58, 95, 0.06);
}

/* ─── Hero Animations ─── */
.hero-content {
    opacity: 0;
    transform: translateY(40px);
    animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Scroll Line Animation ─── */
.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ─── Section Reveal ─── */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Service Cards ─── */
.service-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* ─── 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; }

/* ─── Mobile Menu Icon Animation ─── */
#menuBtn.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active #bar2 {
    opacity: 0;
}
#menuBtn.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 6px;
}

/* ─── Image Hover ─── */
.service-card img,
#experience img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── About Images ─── */
.about-images {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-images.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ─── Button Focus ─── */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid #4ec49a;
    outline-offset: 2px;
}

/* ─── Responsive ─── */
@media (max-width: 767px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content h1 span.block {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-content h1 {
        font-size: 4rem;
    }
}
