Amir takes stunning hat-trick