Ecological constraints and evolutionary trade-offs shape nitrogen fixation across habitats | Synapse