Text this: Phase stability and electronic structure of CsPbBr3 perovskites under rare-earth doping and hydrostatic pressure.