document.addEventListener('DOMContentLoaded', () => { const els = document.querySelectorAll('.reveal'); const io = new IntersectionObserver((entries)=>{ entries.forEach(entry=>{ if(entry.isIntersecting){ entry.target.classList.add('visible'); io.unobserve(entry.target); } }); }, {threshold:0.12}); els.forEach(el=>io.observe(el)); });