<script>document.addEventListener('click',function (e){const a=e.target.closest('a[data-offset]');if (!a) return;const href=a.getAttribute('href') || '';if (!href.startsWith('#')) return;// same-page anchors only const target=document.querySelector(href);if (!target) return;e.preventDefault();// Read per-link offsets (supports desktop/mobile overrides) const base=parseInt(a.dataset.offset || '0',10) || 0;const mql=window.matchMedia('(max-width: 768px)');const mobile=parseInt(a.dataset.offsetMobile || '0',10) || 0;const offset=mql.matches && mobile ? mobile :base;const y=target.getBoundingClientRect().top+window.pageYOffset - offset;window.scrollTo({top:y,behavior:'smooth'})});</script>