/* This is an arbitrary CSS string added to the bundle */
/* Defaults */

:root {
  --font-family: system-ui, sans-serif;
  --font-family-monospace: monospace;
}

/* Theme colors */
:root {
  --color-gray-20: #9399b2;
  --color-gray-50: #7f849c;
  --color-gray-90: #6c7086;

  --color-maroon: #eba0ac;

  --color-subtext-1: #bac2de;

  --background-color: #1e1e2e;

  --text-color: #cdd6f4;
  --text-color-link: #a6e3a1;
  --text-color-link-active: #94e2d5;
  --text-color-link-visited: #b4befe;
  --text-color-tag: #f5e0dc;

  --syntax-tab-size: 2;
}

/* Global stylesheet */
* {
  box-sizing: border-box;
}

@view-transition {
  navigation: auto;
}

html,
body {
  padding: 0;
  margin: 0 auto;
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--background-color);
}
html {
  overflow-y: scroll;
}
body {
  max-width: 50em;
}

.site-title {
  color: #f5e0dc;
}

/* https://www.a11yproject.com/posts/how-to-hide-content/ */
.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Fluid images via https://www.zachleat.com/web/fluid-images/ */
img {
  max-width: 100%;
  box-shadow: 0 4px 6px 2px #11111b;
}
img[width][height] {
  height: auto;
}
img[src$=".svg"] {
  width: 100%;
  height: auto;
  max-width: none;
}
video,
iframe {
  width: 100%;
  height: auto;
}
iframe {
  aspect-ratio: 16/9;
}

p:last-child {
  margin-bottom: 0;
}
p {
  line-height: 1.5;
  font-size: 18px;
}

li {
  line-height: 1.5;
  font-size: 18px;
}

strong {
  color: #fab387;
}

blockquote {
  border-left: 4px solid #f9e2af;
  margin-left: 10px;
  padding-left: 10px;
  font-size: 18px;
}

.disclaimer {
  margin-top: 15px;
}

a[href] {
  color: var(--text-color-link);
}
a[href]:visited {
  color: var(--text-color-link-visited);
}
a[href]:hover,
a[href]:active {
  color: var(--text-color-link-active);
}

main,
footer {
  padding: 1rem;
  border-top: 1px dashed var(--color-gray-20);
  a {
    color: var(--text-color-link);
    cursor: pointer;
  }
}
footer {
  .icons {
    display: flex;
    align-items: center;
    gap: 5px;
    a {
      text-decoration: none;
    }
  }
}
main :first-child {
  margin-top: 0;
}

header {
  border-bottom: 1px dashed var(--color-gray-20);
}
header:after {
  content: "";
  display: table;
  clear: both;
}

.links-nextprev {
  display: flex;
  justify-content: space-between;
  gap: 0.5em 1em;
  list-style: "";
  border-top: 1px dashed var(--color-gray-20);
  padding: 1em 0;
}
.links-nextprev > * {
  flex-grow: 1;
}
.links-nextprev-next {
  text-align: right;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Atkinson Hyperlegible", sans-serif;
  background-color: #1e1e2e;
  color: #cdd6f4;
  border: 1px solid #313244;
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
}

th {
  background-color: #181825; /* mantle */
  color: #f5e0dc; /* rosewater */
  border-bottom: 1px solid #313244; /* surface0 */
}

tr:nth-child(even) {
  background-color: #313244; /* surface0 */
}

tr:nth-child(odd) {
  background-color: #1e1e2e; /* base */
}

tr:hover {
  background-color: #45475a; /* surface1 */
}

td {
  border-bottom: 1px solid #313244; /* surface0 */
}

pre,
code {
  font-family: var(--font-family-monospace);
  border-radius: 50%;
}
pre:not([class*="language-"]) {
  margin: 0.5em 0;
  line-height: 1.375; /* 22px /16 */
  -moz-tab-size: var(--syntax-tab-size);
  -o-tab-size: var(--syntax-tab-size);
  tab-size: var(--syntax-tab-size);
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  overflow-x: auto;
}
code {
  border-radius: 5px;
  background-color: #313244;
  color: var(--text-color);
  font-size: 14px;
}

/* Header */
header {
  display: flex;
  gap: 1em 0.5em;
  flex-wrap: wrap;
  align-items: center;
  padding: 1em;
}

.home-link {
  font-size: 1em; /* 16px /16 */
  font-weight: 700;
  margin-right: 2em;
}
.home-link:link:not(:hover) {
  text-decoration: none;
}

/* Nav */
.nav {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
  gap: 2px;
}

.nav-item {
  display: inline-block;
}

.nav-item a[href] {
  display: inline-block;
  padding: 4px 12px;
  background-color: #313244;
  border: 2px solid;
  border-color: #bac2de #1e1e2e #1e1e2e #bac2de;
  color: #cdd6f4;
  text-decoration: none;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-item a[href]:hover {
  background-color: #45475a;
  border-color: #cdd6f4 #181825 #181825 #cdd6f4;
}

.nav-item a[href]:active {
  border-color: #1e1e2e #bac2de #bac2de #1e1e2e;
  background-color: #585b70;
  padding: 5px 11px 3px 13px;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.nav a[href][aria-current="page"] {
  background-color: #89b4fa;
  color: #1e1e2e;
  border-color: #b4befe #313244 #313244 #b4befe;
  font-weight: bold;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.nav a[href][aria-current="page"]:hover {
  background-color: #74c7ec;
  border-color: #cdd6f4 #181825 #181825 #cdd6f4;
}

/* Dropdown */

.external-site-dropdown {
  position: relative;
  display: inline-block;
  margin-left: auto;
}

.dropdown-checkbox {
  display: none;
}

.dropdown-trigger {
  display: inline-block;
  padding: 4px 12px;
  background-color: #313244;
  border: 2px solid;
  border-color: #bac2de #1e1e2e #1e1e2e #bac2de;
  color: #cdd6f4;
  text-decoration: none;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: all 0.2s ease;
}

.dropdown-trigger:hover {
  background-color: #45475a;
  border-color: #cdd6f4 #181825 #181825 #cdd6f4;
}

.dropdown-trigger:focus {
  outline: 2px solid #89b4fa;
  outline-offset: 2px;
}

.dropdown-checkbox:checked + .dropdown-trigger {
  border-color: #1e1e2e #bac2de #bac2de #1e1e2e;
  background-color: #585b70;
  padding: 5px 11px 3px 13px;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.dropdown-arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.dropdown-checkbox:checked + .dropdown-trigger .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 150px;
  background-color: #313244;
  border: 1px solid #45475a;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.dropdown-checkbox:checked + .dropdown-trigger + .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  padding: 10px 15px;
  text-decoration: none;
  color: #cdd6f4;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.dropdown-menu a svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.dropdown-menu a:hover {
  background-color: #45475a;
}

.dropdown-menu a:focus {
  background-color: #585b70;
  outline: none;
}

.dropdown-menu a:first-child {
  border-radius: 4px 4px 0 0;
}

.dropdown-menu a:last-child {
  border-radius: 0 0 4px 4px;
}

/* Posts list */
.postlist {
  font-size: 18px;
  list-style: none;
  padding: 0;
  padding-left: 1.5rem;
}
.postlist-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  counter-increment: start-from -1;
  margin-bottom: 1em;
}
.postlist-item:before {
  display: inline-block;
  pointer-events: none;
  content: "" counter(start-from, decimal-leading-zero) ". ";
  line-height: 100%;
  text-align: right;
  margin-left: -1.5rem;
}
.postlist-date,
.postlist-item:before {
  font-size: 0.8125em; /* 13px /16 */
  color: var(--color-subtext-1);
}
.postlist-date {
  word-spacing: -0.5px;
}
.postlist-link {
  font-size: 1.1875em; /* 19px /16 */
  font-weight: 700;
  flex-basis: calc(100% - 1.5rem);
  padding-left: 0.25em;
  padding-right: 0.5em;
  text-underline-position: from-font;
  text-underline-offset: 0;
  text-decoration-thickness: 1px;
}
.postlist-item-active .postlist-link {
  font-weight: bold;
}

/* Tags */
.post-tag {
  color: var(--text-color-tag) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: capitalize;
  font-style: italic;
}
.postlist-item > .post-tag {
  align-self: center;
}

/* Tags list */
.post-metadata {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5em;
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-metadata time {
  margin-right: 1em;
}

/* Pagefind */

.pagefind-ui mark {
  background-color: #f9e2af !important;
  color: #1e1e2e !important;
  padding: 0 2px !important;
  border-radius: 3px !important;
}

/*
 * Code syntax highlighting
 */

code[class*="language-"],
pre[class*="language-"] {
  color: #cdd6f4;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
  background: #181825;
}

/* https://prismjs.com/tokens.html */

.token.keyword {
  color: #cba6f7;
}

.token.builtin {
  color: #f38ba8;
}

.token.class-name {
  color: #f9e2af;
}

.token.function {
  color: #89b4fa;
}

.token.boolean,
.token.number {
  color: #fab387;
}

.token.string,
.token.char {
  color: #a6e3a1;
}

.token.symbol {
  color: #f9e2af;
}

.token.regex {
  color: #f5c2e7;
}

.token.url {
  color: #a6e3a1;
}

.token.operator {
  color: #89dceb;
}

.token.variable {
  color: #cdd6f4;
}

.token.constant {
  color: #fab387;
}

.token.property {
  color: #89b4fa;
}

.token.punctuation {
  color: #9399b2;
}

.token.important {
  color: #cba6f7;
}

.token.comment {
  color: #9399b2;
}

.token.tag {
  color: #89b4fa;
}

.token.attr-name {
  color: #f9e2af;
}

.token.attr-value {
  color: #a6e3a1;
}

.token.namespace {
  color: #f9e2af;
}

.token.prolog,
.token.doctype {
  color: #cba6f7;
}

.token.cdata {
  color: #94e2d5;
}

.token.entity {
  color: #f38ba8;
}

.token.atrule {
  color: #cba6f7;
}

.token.selector {
  color: #89b4fa;
}

/* Diff */

.token.deleted {
  color: #f38ba8;
}

.token.inserted {
  color: #a6e3a1;
}

/* Other */

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