tAttribute('class', currentTheme);
        if (currentTheme === 'light-mode') {
            toggleSwitch.checked = true;
        }
    }

    function switchTheme(e) {
        if (e.target.checked) {
            document.documentElement.setAttribute('class', 'light-mode');
            localStorage.setItem('theme', 'light-mode');
        } else {
            document.documentElement.setAttribute('class', '');
            localStorage.setItem('theme', 'dark-mode');
        }
    }

    toggleS