Crossover from a delocalized to localized atomic excitation in an atom–waveguide interface. (13th May 2021)