Text this: Coulomb engineering of the bandgap and excitons in two-dimensional materials