:root {
  color-scheme: dark;
  --bg: #091833;
  --surface: #0d0d15;
  --fg: #0abdc6;
  --muted: #0a94a1;
  --heading: #ea00d9;
  --accent: #ff007a;
  --link: #00bfff;
  --rule: #133e7c;
  --code: #5ff4fa;
  --code-border: #711c91;
  --quote-border: #8c1bff;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0 auto;
  max-width: 72rem;
  padding: 1.5rem 1.25rem 3rem;
  font: 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

a {
  color: var(--link);
  text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

header.site {
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid;
  border-image: linear-gradient(90deg, var(--accent), var(--heading), var(--fg)) 1;
  font: 600 1.25rem/1.4 var(--mono);
}

header.site a {
  color: var(--accent);
  text-decoration: none;
  text-shadow: 0 0 0.5rem color-mix(in srgb, var(--accent) 60%, transparent);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

.layout > main {
  min-width: 0;
  max-width: 44rem;
}

nav.side {
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}

@media (min-width: 56rem) {
  .layout {
    grid-template-columns: 17rem minmax(0, 1fr);
    grid-template-areas: "side main";
  }

  .layout > main {
    grid-area: main;
  }

  nav.side {
    grid-area: side;
    align-self: start;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 0 1rem 0 0;
    border-top: 0;
    border-right: 1px solid var(--rule);
    scrollbar-color: var(--rule) transparent;
  }
}

nav.side h2 {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: none;
}

nav.side section + section {
  margin-top: 1.5rem;
}

nav.side ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

nav.side summary {
  display: flex;
  align-items: baseline;
  padding: 0.3rem 0.5rem;
  color: var(--heading);
  cursor: pointer;
  font-family: var(--mono);
  list-style: none;
}

nav.side summary::-webkit-details-marker {
  display: none;
}

nav.side summary::after {
  content: "+";
  color: var(--muted);
}

nav.side details[open] summary::after {
  content: "−";
}

nav.side summary .count {
  margin-left: auto;
  margin-right: 0.75rem;
}

.count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8em;
}

nav.side details ul {
  margin: 0.25rem 0 0.5rem 0.75rem;
  padding-left: 0.5rem;
  border-left: 1px solid var(--rule);
}

nav.side details a {
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  line-height: 1.35;
  text-decoration: none;
}

nav.side details time {
  display: inline-block;
  min-width: 2.25rem;
  font-size: 0.75rem;
}

nav.side a[aria-current="page"] {
  color: var(--bg);
  background: var(--fg);
}

nav.side a[aria-current="page"] time,
nav.side a[aria-current="page"] .count {
  color: inherit;
}

ul.tags,
ul.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.post-tags {
  margin: 0.75rem 0 1.5rem;
}

a.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--heading) 60%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--heading) 12%, transparent);
  color: var(--fg);
  font: 0.75rem/1.6 var(--mono);
  text-decoration: none;
}

a.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

a.tag[aria-current="page"] {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

ul.tags.all a.tag {
  font-size: 0.875rem;
}

nav.side a.more {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--mono);
  color: var(--heading);
  text-shadow: 0 0 0.6rem color-mix(in srgb, var(--heading) 35%, transparent);
}

h1 {
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem);
  line-height: 1.25;
  margin: 0 0 0.25rem;
}

h2 {
  margin-top: 2rem;
}

h1 a,
h2 a {
  color: inherit;
  text-decoration: none;
}

.meta,
.labels,
.note,
time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.875rem;
}

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

ul.posts li {
  margin: 0.4rem 0;
}

ul.posts time {
  display: inline-block;
  min-width: 10rem;
}

li::marker {
  color: var(--accent);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--code);
}

pre {
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--code-border);
  border-radius: 4px;
}

pre code {
  color: inherit;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--rule);
}

.post-body [style^="color"],
.post-body [style*=" color"],
.post-body [style*=";color"] {
  color: inherit !important;
}

.post-body [style*="background"] {
  background-color: transparent !important;
}

.post-body img,
.post-body iframe,
.post-body object,
.post-body embed,
.post-body video {
  max-width: 100%;
  height: auto;
}

.post-body pre {
  overflow-x: auto;
}

.post-body table {
  display: block;
  overflow-x: auto;
}

.comments {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.comment {
  margin: 1.25rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
}

.comment .meta {
  margin: 0 0 0.25rem;
}

nav.pager {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 2.5rem;
  font-family: var(--mono);
  font-size: 0.9375rem;
}

footer.site {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.875rem;
}
