Electronic and Optical Properties of Low-Dimensional B2CN Nanomaterials from First Principles