Refactor CSS by adding variables and nesting rules