Why is the outline of a crescent moon brighter? Some quick googling has given me the answer to whether seeing part of the moon that receives no sunlight is an optical illusion or not: it isn't. Earthshine lights the moon enough for the human eye to notice.

However, it seems clear to me that the outline of the unlit part of the crescent moon is brighter than the surface. I was riding my bike home yesterday on a clear winter night, and became confused on why that could be. What mechanism is responsible for making the edge brighter than the dark part of the moon? Or is it my brain trying to make a circle?

Here's an example of what I mean.
In the image you are now refering to the only significant brightness difference is between the mare and the "highlands".

The retina enhances edges. So you'll see edges enhanced, even if they aren't.

By image processing edges can also be enhanced to make contours clearer. This is not the case for the referred image.

To better assess, which part of the perception is real, and which is illusion, here the illusion part: