document.addEventListener('DOMContentLoaded', () => { // Smooth scroll for internal links document.querySelectorAll('a[href^="/"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); const targetPath = this.getAttribute('href'); // Optional: Add a subtle fade out/in transition document.body.style.opacity = '0'; setTimeout(() => { window.location.href = targetPath; }, 300); }); }); // Optional: Add hover effects or other interactive elements const buttons = document.querySelectorAll('.btn'); buttons.forEach(btn => { btn.addEventListener('mouseenter', function() { this.style.transform = 'scale(1.05)'; }); btn.addEventListener('mouseleave', function() { this.style.transform = 'scale(1)'; }); }); });