
                    // ----------- Theme Toggle -----------
                    const toggleBtn = document.getElementById('themeToggle');
                    const body = document.body;

                    // Load saved preference
                    const savedTheme = localStorage.getItem('theme');
                    if (savedTheme) body.setAttribute('data-bs-theme', savedTheme);

                    function updateButtonText() {
                        const current = body.getAttribute('data-bs-theme');
                        if (current === 'dark') {
                        toggleBtn.innerHTML = '<i class="fas fa-sun"></i> <div>Light Mode</div>';
                        } else {
                        toggleBtn.innerHTML = '<i class="fas fa-moon"></i> <div>DarkDark Mode</div>';
                        }
                    }

                    toggleBtn.addEventListener('click', () => {
                        const current = body.getAttribute('data-bs-theme');
                        const newTheme = current === 'dark' ? 'light' : 'dark';
                        body.setAttribute('data-bs-theme', newTheme);
                        localStorage.setItem('theme', newTheme);
                        updateButtonText();
                    });

                    updateButtonText();