I can be proud to be American and a human at the same time. Saying “I love my family” doesn’t mean I don’t love other people too, and it doesn’t mean I think my family is somehow better than other human beings, it just means I love my family. Same logic applies here.
And what of the many atrocities committed by humanity?