The duality of electron localization and covalency in lanthanide and actinide metallocenes