ompleteList.contains(event.target)) {
            autocompleteList.style.display = "none";
        }
    });

    // Adjust width on window resize
    adjustAutocompleteWidth();
    window.addEventListener("resize", adjustAutocompleteWidth);
}

// Initialize search functionality
document.addEventListener("DOMContentLoaded", () => {
    initializeSearchBar("search-container", ".navbar-output");
});

</script>

<script>
document.addEventListener('DOMContentLoaded', function () {
    const md = window.markdown