Carbon-rich materials with three-dimensional ordering at the angstrom level