Physics-driven discovery and bandgap engineering of hybrid perovskites