Interplay between nitrogen deposition and grazing causes habitat degradation