document.addEventListener('DOMContentLoaded', () => {
    const sidebar = document.getElementById('sidebar');
    const menuButton = document.getElementById('mobileMenuButton');

    if (sidebar && menuButton) {
        menuButton.addEventListener('click', () => {
            sidebar.classList.toggle('is-open');
        });
    }

    document.addEventListener('keydown', event => {
        if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'k') {
            event.preventDefault();
            const search = document.querySelector('.global-search input');
            if (search) search.focus();
        }
    });
});
