Cortical and subcortical mechanisms of stress adaptation and pathology