I apply Ricardo’s principle of comparative advantage to a theory of factor substitutability in a model with a continuum of worker and job types. Highly skilled workers have a comparative advantage in complex jobs. The model satisfies the distance-dependent elasticity of substitution (DIDES) characteristic: substitutability between types declines with their skill distance. I analyze changes in relative wages due to human capital accumulation. The concept of a complexity dispersion parameter or compression elasticity is introduced. Empirical studies suggest its value to be equal to two: a 1 percent increase in the stock of human capital reduces the Mincerian return by 2 percent.