Proof of concept
Markdown → remark/rehype → Mermaid rendered to inline SVG at build time (headless Chromium). The browser never downloads Mermaid.
- Diagrams exist in the static HTML → SEO-visible, no layout shift.
- Theme switching via CSS custom properties baked into the SVG at build time → one diagram, both themes, no duplication, no re-render.
- Source view is a native
<details>element → zero JS. - Only client script on the whole site: the ~10-line theme toggle.
Start here: TCP handshake lab note