import './index.css'; // Intersection Observer for Reveal Animations const observerOptions = { threshold: 0.1, rootMargin: '0px 0px -50px 0px' }; const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add('opacity-100', 'translate-y-0'); entry.target.classList.remove('opacity-0', 'translate-y-10'); observer.unobserve(entry.target); } }); }, observerOptions); // Initialize animations on sections and cards document.addEventListener('DOMContentLoaded', () => { const animateElements = document.querySelectorAll('section, .glass'); animateElements.forEach(el => { el.classList.add('transition-all', 'duration-1000', 'opacity-0', 'translate-y-10'); observer.observe(el); }); // Header scroll effect const header = document.querySelector('header'); window.addEventListener('scroll', () => { if (window.scrollY > 50) { header?.classList.add('py-2', 'bg-bg/80'); header?.classList.remove('py-0', 'bg-transparent'); } else { header?.classList.remove('py-2', 'bg-bg/80'); header?.classList.add('py-0', 'bg-transparent'); } }); });