In that case you need to have everything rendered server side and perhaps get creative with the usage of forms firing off events that can be intercepted by the server and then return a new page.
Certain things like Nav menu drop downs and folding text can’t be done with native CSS and HTML.