So, why is it that there is so little depth of field when photographing portraits when photographing mountains and nearby fences is relatively easier?
The formula for Depth of field (at least one of them anyway) is:
where N if the f number, f is the focal length, c is the circle of confusion and s is the distance the camera is focused. Note that in the formula, depth of field varies as the square of the subject distance. That means that if we have 2 feet in front of the subject distance of 10 feet, we'd not have one foot if we were shooting at five feet, we'd have six inches, one quarter - so moving in close hugely affects depth of field. Changing focal length of lenses complicates things, but this explains the typical depth of field scale on an old fashioned prime lens - with almost no useable depth at near focus, and fairly decent depth at the longer distances.