:root {
  --primary-color: black;
  --background-color: white;
  --accent-color: blue;
  --accent-color2: #b000ff;
  --sidebar-width: 13rem;
  --border-style: solid 4px var(--primary-color);
  --font-sans: "Helvetica Neue", Helvetica, sans-serif;
  --font-serif: "Charter", "Iowan Old Style", "Georgia", "Times New Roman",
    Times, serif;
}

html {
  font-size: 16px;
  color: var(--primary-color);
  background-color: var(--background-color);
}
body {
  font-family: var(--font-sans);
  border: var(--border-style);
  display: flex;
  flex-direction: column;
}
main {
  padding: 5rem 1rem 4rem 1rem;
  max-width: 50rem;
}
h1 {
  font-size: 1.953rem;
  line-height: 2.3rem;
  letter-spacing: -0.01rem;
  margin-bottom: 3rem;
}
h2,
h3 {
  margin-top: 3rem;
}
p,
li {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.6rem;
}
p {
  margin: 1rem 0;
}
hr {
  border: none;
  height: 3rem;
}
.footnote {
  font-style: italic;
}
.nobullet {
  list-style-type: none;
  padding-left: 0;
}
.date {
  font-size: smaller;
  padding-right: 1rem;
}

/* Links */
a:link {
  color: var(--accent-color);
}
a:hover,
a:focus,
a:active,
a:visited:hover,
a:visited:focus,
a:visited:active {
  color: var(--primary-color);
}
a:visited {
  color: var(--accent-color2);
}

/* Nav */
nav {
  top: 0;
  margin: 0;
}
nav ul {
  display: flex;
  position: fixed;
  top: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  border-top: var(--border-style);
  border-right: var(--border-style);
  background-color: var(--background-color);
}
nav li {
  font-family: var(--font-sans);
  font-size: 1rem;
  list-style: none;
  border-right: var(--border-style);
  border-bottom: var(--border-style);
  width: 100%;
  padding: 0.5rem 1rem;
}

nav a {
  font-weight: bold;
}
nav a:link,
nav a:visited {
  text-decoration: none;
  color: var(--primary-color);
}
nav a:hover,
nav a:focus {
  text-decoration: underline;
}

/* Images */
img {
  margin-top: 2rem;
}
img + img {
  margin-top: 1rem;
}
img:last-of-type {
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  main {
    margin-left: var(--sidebar-width);
    padding: 4rem;
  }
  h1 {
    font-size: 3.052rem;
    line-height: 3.3rem;
  }
  p,
  li {
    font-size: 1.25rem;
    line-height: 2rem;
    letter-spacing: -0.005rem;
  }

  /* Nav */
  nav ul {
    display: inline;
    border-right: var(--border-style);
    border-bottom: var(--border-style);
    top: 0;
    width: var(--sidebar-width);
    height: 100%;
  }
  nav li {
    border-right: 0;
    padding: 1rem;
  }

  /* Images */
  img {
    margin-top: 3rem;
  }
  img:last-of-type {
    margin-bottom: 3rem;
  }
}

@media (min-width: 1679px) {
  :root {
    --sidebar-width: 20rem;
  }
  main {
    padding: 5rem;
    max-width: 52rem;
  }
  nav li {
    font-size: 1.5rem;
    padding: 1.5rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: white;
    --background-color: black;
    --accent-color: deepskyblue;
    --accent-color2: #b514ff;
  }
}
