* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 20px;
  line-height: 1.5;
}

a {
  color: #1b4fb8;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: #123885;
}

.site {
  max-width: 980px;
  margin: 0 auto;
  padding: 138px 24px 80px;
}

.header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.1;
}

nav {
  display: flex;
  gap: 20px;
  font-weight: 700;
}

nav a[aria-current="page"] {
  color: #111;
  text-decoration: none;
}

.page {
  max-width: 850px;
}

p {
  margin: 0 0 36px;
}

.list-section {
  margin-top: 70px;
}

.list-section p {
  margin-bottom: 4px;
}

ol {
  margin: 0;
  padding-left: 28px;
}

h2 {
  margin: 0 0 28px;
  font-size: 38px;
  line-height: 1.1;
}

.contact {
  margin-top: 40px;
}

.contact p {
  margin-bottom: 18px;
}

.x-link {
  display: inline-block;
  width: 36px;
  height: 36px;
  color: #111;
  opacity: 0.36;
}

.x-link:hover {
  color: #111;
  opacity: 0.72;
}

.x-link svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.subpage {
  max-width: 760px;
}

.subpage h2 {
  margin-bottom: 28px;
  font-size: 38px;
  font-style: normal;
}

.post-list {
  padding-left: 28px;
}

.note-entry {
  max-width: 760px;
}

.note-date {
  margin-bottom: 4px;
}

.note-entry a {
  overflow-wrap: anywhere;
}

.bookshelf-page {
  max-width: 980px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 24px 18px;
  align-items: end;
}

.book-grid img {
  display: block;
  width: 100%;
  max-width: 145px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 720px) {
  body {
    font-size: 19px;
  }

  .site {
    padding-top: 64px;
  }

  .header {
    display: block;
  }

  h1 {
    margin-bottom: 20px;
    font-size: 34px;
  }

  nav {
    justify-content: flex-start;
  }

  .x-link {
    width: 32px;
    height: 32px;
  }

  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 18px 14px;
  }
}
