/*
  ⠀⠀⠀⣤⣤⣤⣤⠀⠀⠀⠀⠀⠀
⠀⣤⣿⣿⣿⣤⠛⣿⣿⣿⠛⠛⠀⠀⠀
⣤⣿⠛⠛⠛⣿⠀⠀⠛⠛⣤⣤⠀⠀⠀
⣿⠛⠀⠀⠀⣿⠀⠀⣤⠛⠀⠀⠛⣤⠀
⠀⣿⠛⠀⠀⣿⣤⣿⠀⠀⠀⠀⣿⣿⠀
⠀⣤⣿⣤⣤⣿⠀⠀⣿⣤⠛⠛⣤⠀⠀
⠀⠀⣤⠛⠛⠛⣤⣿⣿⣿⣿⣿⠀⠀⠀
  ⠀⠀⠀⠛⠀⠛
*/

@font-face {
  font-family: "Iosevka Slab Extended";
  src: url("fonts/iosevka-slab-extended-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #ffffff;
  --muted: #808080;
  --max: 80ch;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: "Iosevka Slab Extended", "Iosevka Slab", ui-monospace,
    "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 17px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  font-synthesis: none;
}

body {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 5vw, 2.5rem) 4rem;
  overflow-wrap: break-word;
}

.sep {
  color: var(--muted);
}

a {
  color: var(--fg);
  text-decoration: none;
}

a:hover {
  color: var(--bg);
  background: var(--fg);
  text-decoration: none;
}

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin: 0 0 3rem;
}

.bar .site {
  margin: 0;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--fg);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.site {
  margin: 0 0 3rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--fg);
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-weight: 400;
  line-height: 1.25;
}

h1 {
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin: 2.5rem 0 0.75rem;
}

p {
  margin: 0 0 1.1rem;
}

.meta {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  margin: 0 0 2.25rem;
}

.meta p {
  margin: 0;
}

.meta p + p {
  margin-top: 0.2rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin: 0.25rem 0;
}

strong {
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-style: double;
}

em {
  font-style: normal;
  text-decoration: underline;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 2px solid var(--muted);
  color: var(--muted);
}

blockquote p {
  margin: 0;
}

code,
pre {
  font-family: inherit;
}

code {
  background: var(--fg);
  color: var(--bg);
  padding: 0.1em 0.3em;
}

pre {
  background: var(--bg);
  border-left: 2px solid var(--muted);
  padding: 0.8rem 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 2.75rem 0 0.5rem;
}

.references {
  list-style: none;
  padding: 0;
}

.references li {
  margin: 0.25rem 0;
}

.backlinks {
  list-style: none;
  padding: 0;
}

.backlinks li {
  display: inline;
}

.backlinks li + li::before {
  content: " · ";
  color: var(--muted);
}

.count {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.site a:hover,
.socials a:hover {
  color: var(--bg);
  background: var(--fg);
  text-decoration: none;
}

.tree,
.tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tree ul {
  border-left: 1px solid var(--muted);
}

.tree > li {
  padding-left: 0;
}

.tree > li::before {
  content: none;
}

.tree ul > li {
  position: relative;
  padding: 0.15rem 0 0.15rem 1.5rem;
}

.tree ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9em;
  width: 1.5rem;
  border-top: 1px solid var(--muted);
}

.tree ul > li:last-child::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 0.9em;
  bottom: 0;
  width: 1px;
  background: var(--bg);
}

.tree-root,
.tree .branch {
  color: var(--fg);
}

.tree .id {
  color: var(--muted);
  font-size: 0.85rem;
}

.tree .id a {
  color: var(--muted);
  text-decoration: none;
}

.tree .title a {
  color: var(--fg);
  text-decoration: none;
}

.tree a:hover {
  color: var(--bg);
  background: var(--fg);
  text-decoration: none;
}

hr {
  border: 0;
  border-top: 1px solid var(--muted);
  margin: 2.5rem 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--muted);
  font-weight: 400;
  text-align: left;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

@media (max-width: 40rem) {
  .bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .socials {
    gap: 0.35rem;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
