Self-doped nontoxic red-emitting Mg–N-embedded carbon dots for imaging, Cu(II) sensing and fluorescent ink