/* Theme */
:root {
  --accent: #9c0000;
  --accent-hover: #000;
  --accent-muted: #c9a3a3;
  --text-muted: #666;
}

/* Layout */
body {
  font-family: "Times New Roman", Times, serif;
  line-height: 1.3;
  color: #000;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
}

main {
  max-width: 600px;
  width: 100%;
  padding: 0px 10px 1.5rem;
  box-sizing: border-box;
}

nav {
  width: 100%;
  max-width: 600px;
  padding: 20px 10px;
  box-sizing: border-box;
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

nav ul li {
  margin: 0;
}

/* Typography */
h1 {
  font-weight: normal;
  font-size: 32px;
  text-align: center;
}

h2 {
  font-weight: normal;
  font-size: 24px;
  text-align: center;
}

h3 {
  font-weight: normal;
  font-size: 20px;
}

main > h1 + p {
  text-align: center;
}

article header {
  text-align: center;
}

time {
  font-family: Georgia, serif;
  font-style: italic;
}

main > article > header,
.post > header {
  text-align: left;
}

main > article > header {
  padding-bottom: 0.75em;
  border-bottom: 1px solid #000;
}

main > article > header h1,
.post > header h2 {
  font-family: Georgia, serif;
  text-align: left;
}

main > article > header h1 {
  font-weight: bold;
  font-size: 180%;
  line-height: 1.45;
  font-style: italic;
  margin-top: 1ex;
  margin-bottom: 0.25rem;
}

main > article > header p {
  font-family: Georgia, serif;
  text-align: left;
  margin: 0;
}

.post > header h2 {
  font-weight: bold;
  font-size: 100%;
  line-height: 1.25;
  font-style: normal;
  margin-top: 2em;
  margin-bottom: 0.25rem;
}

pre,
code,
kbd,
samp {
  font-family: "Times New Roman", Times, serif;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: underline;
}

a:hover {
  color: var(--accent-hover);
}

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

/* Figures */
main figure {
  margin: 20px auto;
  text-align: center;
  display: block;
}

main figure img {
  max-width: 70%;
  height: auto;
  display: block;
  margin: 0 auto;
}

main figure figcaption {
  font-style: italic;
  font-size: .9em;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 20px;
  margin-left: 0;
}

/* Book grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 20px;
  padding: 20px;
}

.book {
  text-align: center;
}

.book img,
.book .book-cover {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

/* Pagination */
.pagination {
  margin-top: 40px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--accent-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  width: 100%;
}

hr {
  border: 0;
  border-top: 1.5px solid #000;
  margin: 2rem 0;
}

/* Footnotes */
sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup {
  top: -.5em;
}

.footnote-definition {
  padding-left: 0;
  margin-bottom: 0.75rem;
  font-size: 0.9em;
  line-height: 1.45;
}

.footnote-definition:first-of-type {
  margin-top: 0;
  padding-top: 0;
}

.footnote-definition:last-of-type {
  margin-bottom: 0;
}

.footnote-definition sup.footnote-definition-label {
  font-size: 100%;
  position: unset;
  top: unset;
}

.footnote-definition sup.footnote-definition-label::after {
  content: ".";
}

.footnote-definition p {
  display: inline;
}

/* Content layout */
.content-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
}

.blog-content {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 160px);
}

.pagination-sidebar {
  flex-shrink: 0;
  width: 120px;
  position: sticky;
  top: 20px;
  margin-left: auto;
}

/* Mobile */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  main {
    padding: 0 15px;
  }

  nav {
    padding: 10px 0;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 18px;
  }
}
