:root {
  --color-gray-1: #333;
  --color-gray-2: #555;
  --color-gray-3: #ccc;
  --background-color: #f4f4f4;
  --text-color: var(--color-gray-1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-gray-1: #eee;
    --color-gray-2: #bbb;
    --color-gray-3: #444;
    --background-color: #15202b;
  }
}

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

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
  padding: 0;
}

html,
body {
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
}

body {
  padding: 1em;
  max-width: 40em;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

main a[href^="http"]::after {
  font-size: 0.75em;
  vertical-align: top;
  content: " ↗";
}

header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--color-gray-3);
  padding-bottom: 1em;
}

header a {
  text-decoration: none;
}

header .logo {
  text-transform: uppercase;
  font-weight: 700;
}

header .nav {
  display: flex;
  list-style: none;
  gap: 1em;
}

header .nav a[href][aria-current="page"] {
  text-decoration: underline 2px;
}

footer {
  border-top: 2px solid var(--color-gray-3);
  padding-top: 1em;
}

footer .social {
  display: flex;
  list-style: none;
  justify-content: center;
  gap: 2em;
}

main {
  padding: 1em 0;
}

.post {
  padding-bottom: 1em;
}

.post ul,
.post ol {
  padding-inline-start: 40px;
}

.post-neighbors {
  list-style: none;
  border-top: 2px solid var(--color-gray-3);
  padding-top: 1em;
}

.post-date {
  color: var(--color-gray-2);
}

.header-anchor {
  text-decoration: none;
}

.header-anchor:hover::after {
  color: var(--color-gray-2);
  font-weight: normal;
  content: " #";
}

.post-list {
  list-style: none;
}

.post-list li time {
  display: inline-block;
  text-align: end;
  padding-right: 1em;
  width: 7.5em;
  color: var(--color-gray-2);
}

table td,
table th {
  padding: 0.5em;
  border: 2px dotted var(--color-gray-3);
}

table {
  inline-size: 100%;
  border-collapse: collapse;
}

table tr:first-child th {
  border-top: 0;
}
table tr:last-child td {
  border-bottom: 0;
}
table tr td:first-child,
table tr th:first-child {
  border-left: 0;
}
table tr td:last-child,
table tr th:last-child {
  border-right: 0;
}
/* Theme copied from https://github.com/PrismJS/prism-themes/blob/447479fc7b2be2051fe27e561aceed7cc87a589f/themes/prism-material-dark.css */
code[class*="language-"],
pre[class*="language-"] {
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  color: #eee;
  background: #2f2f2f;
  font-family: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
    "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
    "Fira Mono", "Droid Sans Mono", "Courier New", monospace;
  font-size: 1em;
  line-height: 1.5em;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

:not(pre) > code[class*="language-"] {
  white-space: normal;
  border-radius: 0.2em;
  padding: 0.1em;
}

pre[class*="language-"] {
  overflow: auto;
  position: relative;
  margin: 0.5em 0;
  padding: 1em;
}

.token.attr-value,
.token.attribute {
  color: #a5e844;
}

.token.cdata,
.token.attr-name,
.token.builtin,
.token.class {
  color: #ffcb6b;
}

.token.comment,
.token.doctype,
.token.prolog {
  color: #919191;
}

.token.class-name,
.token.hexcode,
.token.regex {
  color: #f2ff00;
}

.token.atrule,
.token.boolean,
.token.constant,
.token.function,
.token.id,
.token.important,
.token.keyword,
.token.symbol {
  color: #c792ea;
}

.token.id,
.token.important {
  font-weight: bold;
}

.token.operator,
.token.punctuation {
  color: #89ddff;
}

.token.pseudo-class,
.token.pseudo-element,
.token.string {
  color: #a5e844;
}

.token.char,
.token.property {
  color: #80cbc4;
}

.token.number,
.token.unit {
  color: #fd9170;
}

.token.entity,
.token.selector,
.token.tag,
.token.url,
.token.variable {
  color: #ff6666;
}

.token.deleted:not(.prefix) {
  background-color: hsl(350deg 75% 60% / 35%);
}

.token.inserted:not(.prefix) {
  background-color: hsl(120deg 75% 60% / 35%);
}

.token.prefix.unchanged,
.token.prefix.inserted,
.token.prefix.deleted {
  -webkit-user-select: none;
  user-select: none;
}