:root {
  --page-width: 58rem;
  --nav-width: 7rem;
  --content-width: 43rem;
  --text-size: 1.125rem;
  --small-gap: 0.45rem;
  --section-gap: 1.15rem;
}

html {
  font-family: "Times New Roman", Times, serif;
  line-height: 1.28;
}

body {
  margin: 2.5rem 0 0;
  padding: 0 1.25rem;
  max-width: var(--page-width);
}

#layout {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, var(--content-width));
  column-gap: 2.25rem;
  align-items: start;
}

.sidebar-nav {
  display: grid;
  gap: var(--small-gap);
  padding-top: 0.15rem;
}

.sidebar-nav a.active {
  font-weight: 700;
}

main {
  max-width: var(--content-width);
}

main h2 {
  margin-top: 0;
}

p,
li {
  font-size: var(--text-size);
}

.profile-picture {
  float: right;
  width: 10.25rem;
  height: 10.25rem;
  margin: 0 0 1.25rem 1.75rem;
  border-radius: 50%;
  object-fit: cover;
}

.paper,
.post-link {
  margin-bottom: var(--section-gap);
}

.paper p,
.post-link p {
  margin: 0;
}

.post-page img {
  max-width: 100%;
  height: auto;
}

.post-date {
  color: #555;
  font-size: 0.92em;
}

.award {
  color: #cc5500;
  font-weight: 700;
}

a:visited {
  color: linktext;
}

@media (max-width: 640px) {
  :root {
    --text-size: 1rem;
  }

  body {
    margin-top: 1.25rem;
    padding: 0 1rem;
  }

  #layout {
    display: block;
  }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0 0 1.5rem;
  }

  .profile-picture {
    width: 7.5rem;
    height: 7.5rem;
    margin-left: 1rem;
  }
}
