// Intersection Observer for animations document.addEventListener('DOMContentLoaded', () => { const animateElements = document.querySelectorAll('.animate-on-scroll'); const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add('animate-fade-in'); observer.unobserve(entry.target); } }); }, { threshold: 0.1 }); animateElements.forEach(el => observer.observe(el)); // Feather icons replacement feather.replace(); }); // 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' }); }); }); // Current year for footer document.getElementById('current-year').textContent = new Date().getFullYear();