/* Typography overrides inspired by Jepsen analyses */

/* Base text */
html {
  font-size: 16px;
}

body {
  color: #111111;
  text-align: left;
  hyphens: none;
  line-height: 1.2;
  font-size: 20px;
  max-width: 900px;
  padding: 0 1rem;
  margin: 0 auto;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

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

/* Links */
article a {
  color: #2a5db0;
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .12em;
  transition: color .15s ease, text-decoration-color .15s ease;
}

article a:hover {
  color: #1c3e7f;
  border-bottom: none;
  text-decoration-color: #1c3e7f;
}

/* Headings */
article header h1,
article h1 {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 .75rem 0;
  letter-spacing: .005em;
}

article h2 {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 2.8vw, 1.8rem);
  line-height: 1.35;
  margin: 1.6rem 0 .65rem 0;
}

article h3 {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.25rem, 2.2vw, 1.4rem);
  line-height: 1.4;
  margin: 1.2rem 0 .45rem 0;
}

/* Paragraphs and lists */
.post-text,
.post-text p,
.post-text li {
  text-align: justify !important;
  hyphens: auto !important;
  -webkit-hyphens: auto !important;
  -ms-hyphens: auto !important;
}

.post-text li {
  line-height: 1.2;
}

.post-text p {
  margin: 0 0 .9em 0;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.post-text ul,
.post-text ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem 0;
}

.post-text li + li {
  margin-top: .2rem;
}

/* Blockquotes */
.post-text blockquote {
  background: transparent !important;
  border-left: 3px solid #d0d0d0 !important;
  padding: .25rem 1rem !important;
  margin: 1.25rem 0 !important;
  color: #333333;
}

/* Code */
.post-text :not(pre) > code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  font-size: .95em !important;
  background: #f7f7f7 !important;
  border-radius: 3px !important;
  padding: .1em .3em !important;
}

.post-text pre code,
.post-text .highlight pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  font-size: 14px !important;
  line-height: 1.5;
  background: #fbfbfb;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: .8rem 1rem !important;
}

/* Images and figures */
.post-text figure {
  border: none !important;
  padding: 0;
}

.post-text img {
  display: block;
  margin: 1rem auto;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.post-text figcaption {
  text-align: center;
  font-size: .9rem;
  color: #555555;
  border-top: none !important;
  padding-top: .25rem;
}

/* Tables */
.post-text table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.post-text th,
.post-text td {
  border: 1px solid #e1e1e1;
}

/* Horizontal rule */
.post-text hr {
  border: none !important;
  border-top: 1px solid #e1e1e1 !important;
  margin: 2rem auto !important;
  max-width: 50%;
}

/* Metadata and footer */
.post-metadata {
  font-size: .9rem;
  color: #666666;
}

.post-footer {
  color: #444444;
}

/* Footnotes */
.footnotes {
  font-size: .95em;
  color: #333333;
}

.footnotes hr {
  display: none;
}

