Nanomechanics of order reconstruction in nematic liquid crystals