// Theme initialization document.addEventListener('DOMContentLoaded', () => { // Check for saved theme preference const savedTheme = localStorage.getItem('theme') || 'light'; document.documentElement.classList.add(savedTheme); // Initialize all feather icons feather.replace(); }); // Smooth scrolling for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); document.querySelector(this.getAttribute('href')).scrollIntoView({ behavior: 'smooth' }); }); });