// Shared JavaScript across all pages document.addEventListener('DOMContentLoaded', () => { // Add animation classes to elements const animateElements = document.querySelectorAll('.fade-in'); animateElements.forEach((el, index) => { el.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' }); }); }); }); // Dynamic year for footer const yearSpan = document.querySelector('#current-year'); if (yearSpan) { yearSpan.textContent = new Date().getFullYear(); }