A horizontal nav that collapses behind a hamburger button on narrow screens.
Pseudocode
Structure
A <nav> with a logo, a <ul> of links, and a hamburger <button> that’s only meaningful below a breakpoint.
Style
Above the breakpoint, the link list is a row and the hamburger is hidden. Below it, the hamburger shows and the link list is hidden until toggled — then it drops down as a full-width panel.
Features
The hamburger toggles a class on the link list; CSS, scoped to the same breakpoint, decides what that class actually does.
Clicking a link closes the open menu too — otherwise it’s still open, invisibly, the next time the visitor opens it.
Basic responsive menu
Uses a @container query rather than @media, exactly like the breadcrumb note, so the collapse depends on the width of .menu-container rather than the browser window — the wrapper is pinned to 340px here purely so the collapsed state is always visible in this preview; in a real page, container-type would just live on whatever element actually wraps the nav.