Bonding regimes of nitrogen in amorphous carbon