@font-face {
  font-family: "EB Garamond";
  src: url('EBGaramond12-Regular.otf');
}

@font-face {
  font-family: "EB Garamond SC";
  src: url('EBGaramondSC12-Regular.otf');
}

html {
  background-color: white;
  padding-right: 10vw;
}

html::after {
  content: '';
}

body {
  background-color: #fbfffb88;
  box-sizing: border-box;
  box-shadow: 0 0 3em #f3f3f3;
  color: #433;
  display: block;
  font-family: "EB Garamond", serif;
  font-size: 1.2em;
  line-height: 1.6;
  max-width: 46em;
  min-height: 100vh;
  margin: 0 auto;
  padding: 2em 4em 4em;
  position: relative;
}

::selection {
  background-color: #b33;
  color: #fff;
}

abbr {
  font-family: "EB Garamond SC", serif;
  font-variant: small-caps;
  font-size: 1.15em;
  line-height: 1em;
  text-transform: lowercase;
}

nav {
  left: 100%;
  font-size: 0.8em;
  max-width: 40em;
  position: absolute;
  margin-top: 0.5em;
}

nav ul {
  list-style: none;
  margin: 0.25em 0;
  padding-left: 1em;
}

nav ul li {
  opacity: 0.4;
  transition: opacity 0.3s;
}

nav ul li:hover {
  opacity: 0.8;
}

h1 {
  color: #b33;
  font-size: 2.5em;
  font-weight: normal;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 5rem 0 2rem -0.2rem;
}

h2 {
  color: #544;
  font-weight: normal;
  font-size: 1.65em;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 4rem 0 1rem -0.2rem;
}

ul {
  list-style: circle;
  padding-left: 0;
}

a {
  color: #111;
  outline: 0;
  border-bottom: 1px solid #0002;
  margin-bottom: -1px;
  text-decoration: none;
  transition-duration: 0.5s;
  transition-property: border-color;
}

a:hover, a:focus {
  border-color: #655;
}

@media (max-width: 60em) {
  html {
    padding-right: 3em;
  }

  body {
    hyphens: auto;
    -webkit-hyphens: auto;
    padding: 0.5em 2em;
  }

  h1, h2 {
    hyphens: none;
    -webkit-hyphens: none;
  }

  nav {
    font-size: 1rem;
    position: static;
  }

  nav ul {
    padding: 0.25em 0 0;
  }

  nav li {
    display: inline;
    padding-right: 0.5em;
  }
}
