Reduction of Courant algebroids via graded manifolds