PaperStatistical mechanical theory for nonuniform fluids: Properties of the hard-sphere system and a perturbation theory for nonuniform simple fluids