adaptive (local) thresholding
Giving every pixel its own black-or-white cutoff, based on the small patch of pixels around it, instead of one cutoff for the whole image.
Adaptive (local) thresholding gives every pixel its own threshold, computed from its own local neighborhood, instead of one fixed cutoff for the whole page: a pixel counts as ink only if it is darker than its own surrounding patch by some margin, not darker than a single number fixed for the whole image. This survives uneven lighting -- a shadow that sits at a uniform level everywhere stays background, because every pixel inside it is close to its own local average.
Examples
A phone photo with a shadowed corner still binarizes correctly under adaptive thresholding, because ink is compared only to the paper right around it, not to the whole page's brightness.
See also