document.addEventListener('DOMContentLoaded', () => { const mobileToggle = document.querySelector('.mobile-toggle'); const navLinks = document.querySelector('.nav-links'); if (mobileToggle) { mobileToggle.addEventListener('click', () => { navLinks.classList.toggle('active'); }); } // Smooth scroll for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); const target = document.querySelector(this.getAttribute('href')); if (target) { target.scrollIntoView({ behavior: 'smooth' }); // Close mobile menu on click if (navLinks.classList.contains('active')) { navLinks.classList.remove('active'); } } }); }); });