{ if (tl.reversed()) { tl.play(); } else { tl.reverse(); } }); // Animate project cards on scroll const projectCards = document.querySelectorAll(".project-card"); const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add("visible"); observer.unobserve(entry.target); } }); }, { threshold: 0.1 }); projectCards.forEach(card => { observer.observe(card); });