// Detect scrolling and toggle class based on scroll position
window.addEventListener('scroll', function() {
var masthead = document.getElementById('masthead');
if (window.scrollY >= 400) {
masthead.classList.add('show-header');
} else {
masthead.classList.remove('show-header');
}
});