Structure and property relationships of amorphous CNx: a joint experimental and theoretical study