@font-face {
  font-family: "Times Newer Roman";
  src: local("Times Newer Roman Regular"), local("TimesNewerRoman-Regular"),
    url("/assets/fonts/times-newer-roman/TimesNewerRoman-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Times Newer Roman";
  src: local("Times Newer Roman Bold"), local("TimesNewerRoman-Bold"),
    url("/assets/fonts/times-newer-roman/TimesNewerRoman-Bold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-serif: "Times Newer Roman", "Times New Roman", Times, serif;
  --color-text: #111;
  --color-bg: #fafaf7;
  --content-width: 640px;
  --sidenote-width: 240px;
  --page-gutter: 1.25rem;
  --space-md: 0.75rem;
  --space-lg: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
}

body {
  font-family: var(--font-serif);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a[aria-current="page"] {
  font-weight: bold;
}

.page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-md) 0;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.entry-list {
  list-style: none;
  margin-top: 3rem;
}

.entry-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: 0.75rem;
}

.entry-list a,
.article-content a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.entry-list time,
.article-header time {
  color: #555;
  white-space: nowrap;
}

.article {
  padding: 3rem 0 5rem;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-header h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
}

.article-content > * + * {
  margin-top: 1.25rem;
}

.article-content h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
  line-height: 1.15;
}

.article-content ul,
.article-content ol {
  padding-left: 1.25rem;
}

.article-content img {
  display: block;
  width: 100%;
  height: auto;
}

.article-content pre {
  overflow-x: auto;
  padding: 1rem;
  background: #f3f0e8;
  font-size: 0.85rem;
  line-height: 1.5;
}

.article-content :not(pre) > code {
  font-size: 0.9em;
}

.article-content math[display="block"] {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-content .footnotes {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #bbb;
  font-size: 0.9rem;
}

@media (min-width: 960px) {
  .page {
    margin-left: calc((100vw - var(--content-width) - var(--sidenote-width)) / 2);
    margin-right: auto;
  }
}
