Equilibrium theory of liquid crystals: curvature elasticity in nematics and isotropic-nematic transition