Maximized sp3 bonding in carbon nitride phases