removed media queries in css in favor of matchMedia api to eliminate code duplication