Alkali-stable and solvent-stable negative resist