Task specialization and its effects on research careers