better media queries and refactor