:root {
  --display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --wordmark: "Baskervville", Baskerville, "Libre Baskerville", "Times New Roman", serif;
  --body: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --page: #f1ece6;
  --ink: #2e2e2e;
  --button: #ddd5cd;
  --faint: #ddd5cd;
  --accent: #660000;
  --rule: #c4b9ac;
  --content-width: 545px;
  --measure: 538px;
  --media-width: 512px;
}

body {
  margin: 10px;
  background-color: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 27px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
}

a {
  color: var(--ink);
}

a:visited {
  color: var(--ink);
}

.page {
  display: flex;
  align-items: flex-start;
}

.sidebar {
  width: 86px;
  flex: 0 0 86px;
}

.nav-toggle {
  display: none;
}

.nav-group + .nav-group {
  margin-top: 10px;
}

.sidebar a {
  display: block;
  width: 86px;
  height: 26px;
  box-sizing: border-box;
  padding-left: 5px;
  border-top: 1px solid var(--page);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-left: 1px solid var(--page);
  box-shadow: inset 1px 1px 0 0 var(--page);
  background-color: var(--button);
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  line-height: 23px;
  text-decoration: underline;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar a:visited {
  color: var(--ink);
}

.sidebar a.group-start {
  margin-top: 10px;
}

.nav-group .sidebar a.group-start,
.nav-group a.group-start {
  margin-top: 0;
}

.sidebar a.tight {
  letter-spacing: -0.4px;
}

.sidebar a:hover {
  background-color: var(--page);
}

.sidebar a.current {
  background-color: var(--ink);
  color: var(--page);
  text-decoration: none;
}

.nav-spacer {
  height: 26px;
}

.gutter {
  width: 32px;
  flex: 0 0 32px;
}

.content {
  width: 100%;
  max-width: var(--content-width);
  flex: 1 1 auto;
  min-width: 0;
}

.masthead {
  display: block;
  width: 100%;
  max-width: var(--media-width);
}

.masthead svg {
  display: block;
  width: 100%;
  height: auto;
}

.masthead text {
  fill: var(--faint);
  font-family: var(--wordmark);
  font-size: 46px;
  font-weight: 600;
}

.home-photo {
  display: block;
  width: 100%;
  max-width: var(--media-width);
  height: auto;
  aspect-ratio: 512 / 385;
  margin-top: 20px;
}

.announcements {
  margin-top: 19px;
}

.banner {
  width: 100%;
  max-width: var(--media-width);
  min-height: 31px;
  box-sizing: border-box;
  padding: 4px 4px 7px 4px;
  font-size: 16px;
  line-height: 24px;
}

.banner.gold {
  background-color: #ffcc33;
}

.banner.orange {
  background-color: #ff9922;
}

.page-title {
  margin: 24px 0 0 0;
  color: var(--accent);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.01em;
  line-height: 30px;
}

.intro {
  max-width: var(--measure);
  margin: 22px 0 0 0;
}

.essay-list {
  margin: 24px 0 0 0;
  padding: 0;
  list-style: none;
}

.intro + .essay-list {
  margin-top: 30px;
}

.essay-list li {
  min-height: 27px;
  margin-bottom: 7px;
  padding-left: 18px;
  background-image: url("../img/bullet.svg");
  background-repeat: no-repeat;
  background-position: 0 5px;
}

.index-list {
  margin: 24px 0 0 0;
  padding: 0;
  list-style: none;
}

.index-list li {
  min-height: 30px;
}

.plain-list {
  margin: 24px 0 0 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  margin-bottom: 7px;
}

.body-text {
  max-width: var(--measure);
  margin-top: 23px;
}

.body-text p {
  margin: 0 0 1lh 0;
}

.essay-body {
  max-width: var(--measure);
  margin-top: 23px;
}

.essay-body p {
  margin: 0 0 1lh 0;
}

.quote {
  margin-bottom: 1lh;
}

.quote .attribution {
  color: var(--ink);
  opacity: 0.65;
}

.question {
  margin: 0 0 4px 0;
  font-weight: 600;
}

.answer {
  margin: 0 0 1lh 0;
}

.notice {
  margin: 0 0 1lh 0;
  color: var(--ink);
  opacity: 0.65;
}

.bio-photo {
  float: left;
  width: 188px;
  height: auto;
  aspect-ratio: 188 / 250;
  margin: 24px 16px 0 0;
}

.bio-text {
  width: auto;
}

.rule {
  clear: both;
  width: 100%;
  max-width: var(--content-width);
  margin: 34px 0 0 0;
  border: none;
  border-top: 1px solid var(--rule);
}

.rule + .footer {
  margin-top: 12px;
}

.footer {
  margin-top: 57px;
  color: var(--faint);
  font-family: var(--display);
  font-size: 13px;
  line-height: 16px;
}

.footer a {
  color: var(--faint);
}

.book-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 26px 24px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
}

.book {
  width: 110px;
}

.book-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid var(--ink);
  background-color: var(--button);
  font-family: var(--display);
  font-size: 13px;
  line-height: 17px;
  text-align: center;
}

.book-note {
  margin-top: 7px;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
  opacity: 0.6;
}

.entries {
  max-width: var(--measure);
  margin: 24px 0 0 0;
  padding: 0;
  list-style: none;
  counter-reset: entry;
}

.entries li {
  margin-bottom: 1lh;
  counter-increment: entry;
}

.entry-title {
  margin: 0 0 2px 0;
  font-weight: 600;
}

.entry-title::before {
  content: counter(entry) ". ";
}

.entries p {
  margin: 0;
}

/* Narrow screens: the nav collapses behind a button in the top-left corner. */
@media (max-width: 700px) {
  body {
    margin: 12px;
  }

  .page {
    display: block;
  }

  .gutter,
  .nav-spacer {
    display: none;
  }

  .sidebar {
    position: relative;
    width: auto;
    z-index: 20;
    margin-bottom: 14px;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 34px;
    height: 34px;
    padding: 0 7px;
    box-sizing: border-box;
    border-top: 1px solid var(--page);
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    border-left: 1px solid var(--page);
    box-shadow: inset 1px 1px 0 0 var(--page);
    border-radius: 0;
    background-color: var(--button);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  .nav-toggle span {
    display: block;
    height: 1px;
    background-color: var(--ink);
  }

  .sidebar.open .nav-toggle {
    background-color: var(--ink);
  }

  .sidebar.open .nav-toggle span {
    background-color: var(--page);
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    z-index: 20;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100vw - 24px);
    max-height: 76vh;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--ink);
    background-color: var(--page);
    box-shadow: 3px 3px 0 0 rgba(46, 46, 46, 0.18);
  }

  .sidebar.open .nav-menu {
    display: block;
  }

  .nav-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .nav-group + .nav-group {
    margin-top: 6px;
  }

  .sidebar a {
    width: auto;
    height: auto;
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
    line-height: 30px;
  }

  .content {
    max-width: none;
  }

  .footer {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 21px;
    line-height: 27px;
  }

  .bio-photo {
    float: none;
    width: 150px;
    margin: 22px 0 4px 0;
  }

  .book-grid {
    gap: 22px 20px;
  }

  .book {
    width: calc(50% - 10px);
    max-width: 140px;
  }

  .book-cover {
    height: 140px;
  }
}
