Controlling synthesis of Ti–O/Ti–N gradient films by PIII