A star’s distance from Earth affects its brightness