Resilience: A Dynamic Perspective