you could try the 'checkbox hack'! I use it in my gallery so that a lightbox with the image appears (though i'm not sure if a lightbox is different than a modal?), maybe that'd be somewhat up your alley? though I reckon there are easier-to-code/easier-to-understand javascript snippets somewhere...
With what I did, I used an iframe approach. The grid is on a different page, and you trigger a modal when you click on it. There are some specifications for it to look nice tho- you gotta put the images within figures and set their size to be 100%, so it adapts to the different grid squares. And then there's the JS code stuff. I still wanna make a post on it
utdr is SOOOO good genuinely some of the best storytelling in indie gaming and all of the characters are really endearing
deltarune is sooo good!! theres only 2 chapters rn but the story is still very compelling. i highly recomend it
My trains (uh) My trains (yeah)
I GOT SMALL ONES. TINY LITTLE TRAINS
I COME DOWN HERE JUST TO GET AWAYYYYY