How gender shapes the war system and vice versa