As the sun approaches the rim, light reflects around the edges like in your coffee cup when you tilt it just right. I have a nice .gif somewhere illustrating this very well understood phenomenon, but I am posting from my phone, so you'll have to weather the sea of google yourself of you want more information about how it works.