Which office is primarily responsible for directly advising the president on foreign policy and national security matters?