  // Listen for scroll events to update button visibility and progress
    window.addEventListener("scroll", () => {
        toggleScrollButton();
        const scrollPercent = (window.scrollY / (document.documentElement.scrollHeight - window.innerHeight)) * 100;
        setProgress(scrollPercent);
    });

    // Smooth scroll to top when the button is clicked
    scrollToTopBtn.addEventListener("click", () => {
        window.scrollTo({
            top: 0,
            behavior: "smooth"
        });
    })