That is my
JustAbox project
The lid is smaller than the box interior to leave a 1/16" gap so the lid can open easily. I used thin washers (1/16") over the hinge pins to keep the gap around the lid even.
The hinge pins are brass rod. The lid in this case is 1/2" thick, so for a flush fit, the hinge holes are centered on the lids thickness (1/4" down) and the same 1/4" down on the box sides.
The back of the lid has a 1/4" radius round along the rear top edge over so the top edge won't contact the back of the box when opened. The pin hole is also 1/4" forward from the rear of the lid.
To compensate for the 1/16" gap around the lid, the pin hole is forward from the back inside of the box by 1/4" + 1/16" (5/16" total)
When the lid is fully open, it will tilt back slightly from vertical to contact the box back.
For a box of this size, locating the holes is fairly critical so it sits evenly.
I've made other boxes where the from of the lid overlaps the from of the box which is easier to fit well.