Gravar-mail: Unified theory for light-induced halide segregation in mixed halide perovskites