const burger = document.getElementById("burger");
const nav = document.getElementById("nav");
const topBtn = document.getElementById("topBtn");

burger.addEventListener("click", () => {
  nav.classList.toggle("open");
});

window.addEventListener("scroll", () => {
  topBtn.style.display = window.scrollY > 400 ? "block" : "none";
});

topBtn.addEventListener("click", () => {
  window.scrollTo({ top: 0, behavior: "smooth" });
});
