:root {
  --bg-gray: rgba(175, 184, 193, 0.2);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
  max-width: 750px;
  font-family: sans-serif;
  line-height: 1.5;
  margin: auto;
  padding: 20px;
}

main {
  flex-grow: 1;
}

article {
  margin-block-end: 80px;
}

header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

header > a.home {
  color: black;
  font-size: 1.4em;
}

header > a.social > img {
  width: 24px;
  height: 24px;
}

footer {
  margin-top: 40px;
  font-size: 0.9em;
}

footer nav {
  display: flex;
  gap: 20px;
}

footer nav a {
  color: gray;
}

footer nav a:visited {
  color: gray;
}

footer nav a:hover {
  text-decoration: underline;
}

ul.posts {
  list-style-type: none;
  padding-left: 0;
}

ul.posts > li > h2, article > h1 {
  margin-bottom: 0;
}

ul.posts > li > time, article > time {
  display: block;
  margin-bottom: 30px;
}

time {
  color: gray;
}

h1, h2 {
  margin-block-start: 30px;
  margin-block-end: 10px;
}

h3 {
  margin-block-start: 30px;
  margin-block-end: 0px;
  color: rgb(71, 71, 71);
}

h4 {
  display: inline;
  color: rgb(71, 71, 71);
}

h4::after {
  content: ".";
}

h4 + p {
  display: inline;
  margin-left: 0.15em;
}

p {
  margin-block: 10px;
}

a {
  color: #2c61c5;
  text-decoration: none;
}

hr {
  border: none;
}

hr::before {
  content: '∗∗∗';
  display: block;
  text-align: center;
  letter-spacing: 0.25em;
  color: #222;
}

article a {
  text-decoration: underline;
}

.footnotes-sep {
  margin-top: 60px;
  height: 1px;
  background: darkgray;
}

.footnotes-sep hr::before {
  display: none;
}

.footnotes a {
  text-decoration: none;
  word-break: break-word;
}

.footnote-ref {
  position: relative;
  top: -0.1rem;
  font-size: 0.75rem;
  vertical-align: top;
}

a:visited {
  color: rgb(85, 26, 139);
}

a:hover {
  text-decoration: underline;
}

table, thead, th, tbody, tr, td {
  border: 1px solid #999;
  border-collapse: collapse;
}

th {
  background: var(--bg-gray);
}

th, td {
  padding: 4px 6px;
}

code {
  background: var(--bg-gray);
  border-radius: 6px;
  padding: 2.5px 4px;
}

img {
  max-width: 100%;
  height: auto;
}

article img {
  display: block;
}

article img, article table {
  margin: auto;
  max-width: 100%;
  height: auto;
  margin-block: 20px;
}

figure {
  margin-block: 20px;
  margin-inline: auto;
  text-align: center
}

figure.floating {
  float: right;
  margin: 0;
  margin-inline-start: 20px;
}

figure img {
  margin: 0 auto;
}

figure .rows {
  display: flex;
  justify-content: center;
  gap: 10px;
}

figure .rows > * {
  margin: 0
}

figure .rows > .page-frame {
  border: 1px solid #cecece;
  width: 0px;
  flex-basis: 0;
  flex-grow: 1;
  max-width: 240px;
}

figure figcaption {
  box-sizing: border-box;
  width: 0px;
  min-width: 100%;
  margin-top: 10px;
  font-style: italic;
}

pre {
  background: var(--bg-gray);
  white-space: pre-wrap;
  border-radius: 6px;
  padding: 10px;
}

pre > code {
  background: unset;
  padding: unset;
}

blockquote {
  color: #59636e;
  border-left: 2px solid;
  border-color: #8995a2;
  margin-inline-start: 15px;
  padding-inline-start: 15px;
}

.hljs-keyword, .hljs-type { color: #d73a49; }
.hljs-title { color: #4b69c6; }
.hljs-built_in { color: #16718d; }
.hljs-number, .hljs-meta { color: #b60157; }
.hljs-string { color: #298e0d; }

.typ-comment { color: #8a8a8a; }
.typ-escape { color: #1d6c76; }
.typ-strong { font-weight: bold; }
.typ-emph { font-style: italic; }
.typ-link { text-decoration: underline; }
.typ-raw { color: #818181; }
.typ-label { color: #1d6c76; }
.typ-ref { color: #1d6c76; }
.typ-heading { font-weight: bold; text-decoration: underline; }
.typ-marker { color: #8b41b1; }
.typ-term { font-weight: bold; }
.typ-math-delim { color: #298e0d; }
.typ-math-op { color: #1d6c76; }
.typ-key { color: #d73a49; }
.typ-num { color: #b60157; }
.typ-str { color: #298e0d; }
.typ-func { color: #4b69c6; }
.typ-pol { color: #8b41b1; }
