/* ========== CUSTOM STYLES ========== */

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

/* ========== HEADER ========== */
#site-header {
    background: rgba(254, 253, 248, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(6, 95, 70, 0.08);
}

#site-header.scrolled {
    background: rgba(254, 253, 248, 0.95);
    box-shadow: 0 1px 20px rgba(6, 95, 70, 0.08);
}

/* ========== HERO BLOBS ========== */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: blobFloat 20s ease-in-out infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(217, 249, 157, 0.25) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    animation-delay: -7s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(110, 231, 183, 0.2) 0%, transparent 70%);
    top: 40%;
    left: 40%;
    animation-delay: -14s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* ========== FLOATING CARDS ========== */
.floating-card {
    animation: floatCard 6s ease-in-out infinite;
}

.card-1 { animation-delay: 0s; }
.card-2 { animation-delay: -1.5s; }
.card-3 { animation-delay: -3s; }
.card-4 { animation-delay: -4.5s; }

@keyframes floatCard {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* ========== SCROLL REVEAL ========== */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-grid {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up {
    transform: translateY(30px);
}

.reveal-left {
    transform: translateX(-30px);
}

.reveal-right {
    transform: translateX(30px);
}

.reveal-grid {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Only apply scroll-reveal when JS is available and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up.is-visible,
    .reveal-left.is-visible,
    .reveal-right.is-visible,
    .reveal-grid.is-visible {
        opacity: 1;
        transform: none;
    }
}

/* Stagger children */
.reveal-grid > * {
    transition-delay: calc(var(--i, 0) * 0.1s);
}

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

.mobile-link {
    transition: opacity 0.2s ease;
}

/* ========== CARD HOVER ========== */
.floating-card {
    will-change: transform;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    .hero-blob {
        filter: blur(60px);
        opacity: 0.35;
    }
    .blob-1 { width: 300px; height: 300px; }
    .blob-2 { width: 250px; height: 250px; }
    .blob-3 { width: 180px; height: 180px; }

    #about .reveal-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}

/* ========== FOCUS STYLES ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========== PRINT ========== */
@media print {
    #site-header,
    .floating-card,
    .hero-blob {
        display: none;
    }
}
