making the intro responsive and centered with JavaScript