Regime shifts in a social-ecological system