      closeNav()
        }

        // Restore folder open/closed states
        folderStates.forEach(({ id, isOpen }) => {
            const folder = Array.from(document.querySelectorAll(".folder"))
                .find(folder => folder.querySelector("span").textContent.trim() === id);

            if (folder) {
                const folderContents = folder.querySelector(".folder-contents");
                if (isOpen) {
                    folder.classList.add("open");
                    folderContents.