Gender segregation in education and the labour market