And I'm made with nothing but CSS and HTML! Yay!
The trick is in the CSS3 :target selector. See the source to find out what kind of dark sourcery & magic is being used :)
This won't work in browsers that don't understand the :target selector, rgba() colors or position: fixed. So IE8 or older for :target and rgba() and most of the mobile browsers for their lack of position: fixed support are out. It also breaks on small screen sizes. Since the lightbox itself has a tendency to appear outside the viewport because of the negative margins to position the box in the center of the screen.
I'm also using the pointer-events property to disable clicks on the overlay when the lightbox is hidden for extra fancyness. This probably won't work in most browsers.
These are all things you can work around using a few lines of javascript. But thats not what I'm showing off here :)