I'll note again that Afghanistan was in civil war when we invaded. The Quetta Shura Taliban not only want to defeat a foreign invader, but regaining what control of the country they previously had (tenuous though it was). On the other hand, for HiG expelling the foreign invader is arguably their primary goal. Point being is that motivations and goals vary from group to group. I think looking at Afghanistan solely from the perspective of "insurgency" misses the underlying and long-standing civil conflict that predates the US intervention.
Bookmarks