Superconducting nanowires: quantum confinement and spatially dependent Hartree–Fock potential