html {
  font-size: 100%;
}

body {
  color: var(--color-grey);

  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

  background: var(--color-bg);

  min-height: 100vh;

  display: flex;
  flex-direction: column;

}

header, main, footer {
  padding: 0 4rem;
}

header, section {
  margin-top: 3rem;
}

h1, h2, h3 {
  font-weight: bold;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.75;
}

h2 {
  font-size: 2rem;
  margin: 2rem 0;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.75;
  margin-bottom: 0.3rem;
}

section div {
  margin-bottom: 1rem;
}

a {
  box-shadow: inset 0 0 0 0 rgba(0,0,0,0.05);
  margin: 0 -.25rem;
  padding: 0 .25rem;
  transition: color .3s ease-in-out, box-shadow .3s ease-in-out;
}

a:hover,
a:focus {
  box-shadow: inset 300px 0 0 0 rgba(0,0,0,0.05);
}

.red {
  color: var(--color-red);
}

/* NAME */
.name span {
  color: inherit;
  transition: color 2s ease;
}

.blue:hover,
.blue:focus {
  color: var(--color-blue);
  transition: all 0.2s ease;
}

.red:hover,
.red:focus {
  color: var(--color-red);
  transition: all 0.2s ease;
}

.purple:hover,
.purple:focus {
  color: var(--color-purple);
  transition: all 0.2s ease;
}

.contacts {
  display: flex;
  align-items: center;
}

.contacts a {
  margin: 0.2rem 1rem 0.2rem 0;
}

footer {
  margin: 2rem 0 3rem 0;
}

/* RESPONSIVE */
@media screen and (max-width: 520px) {
  h1 {
    line-height: 1;
  }

  .contacts a {
    margin-top: 1rem;
  }
}

@media screen and (max-width: 400px) {
  header,
  main,
  footer {
    padding: 0 3rem;
  }
}