document.addEventListener('DOMContentLoaded', function() { // Add animations to sections const sections = document.querySelectorAll('section'); sections.forEach((section, index) => { section.classList.add('fade-in'); section.style.animationDelay = `${index * 0.1}s`; }); // Smooth scroll for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function(e) { e.preventDefault(); document.querySelector(this.getAttribute('href')).scrollIntoView({ behavior: 'smooth' }); }); }); // Parallax effect for hero section const hero = document.querySelector('.hero-section'); if (hero) { window.addEventListener('scroll', function() { const scrollPosition = window.pageYOffset; hero.style.backgroundPositionY = scrollPosition * 0.5 + 'px'; }); } });