So, corner-shape can be animated. Notice the added sprinkle of color-contrast().
https://css-tricks.com/experimenting-with-scroll-driven-corner-shape-animations/
Just one example to illustrate the point... the article has several other ideas.
The progress() function is sorta like clamp() but returns 1 or 0. Combine it with calc() and you can get weird with it.

HTML Data Attributes Guide | CSS-Tricks
Everything you ever wanted to know about data attributes in HTML, CSS, and JavaScript.
CSS-Tricks
Using <details> for Menus and Dialogs is an Interesting Idea | CSS-Tricks
Using <details> for a menu may be an interesting idea, but perhaps not something to actually ship in production. See "More Details on <details>"
CSS-Tricks
Cascade Layers Guide | CSS-Tricks
This is your complete guide to CSS cascade layers, a CSS feature that allows us to define explicit contained layers of specificity.
CSS-Tricks