How family background shapes the relationship between human capital and fertility