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

* {
  margin: 0;
}

body {
  line-height: 1.5;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url("/fonts/jetbrains-mono/JetBrainsMono-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono/JetBrainsMono-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  src: url("/fonts/jetbrains-mono/JetBrainsMono-BoldItalic.woff2") format("woff2");
}
:root {
  --bg: #F6F5F7;
  --surface: #EAE7EC;
  --rule: #D8D3DC;
  --fg: #2A2530;
  --heading: #17131B;
  --muted: #655D6C;
  --link: #A1225C;
  --accent: #C2457E;
  --syn-keyword: #A1225C;
  --syn-variable: #2E5C99;
  --syn-type: #6A45A6;
  --syn-string: #2F7058;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181314;
    --surface: #241C1D;
    --rule: #3A2E30;
    --fg: #E2D8D9;
    --heading: #F8F0F1;
    --muted: #A69899;
    --link: #FF8EA3;
    --accent: #DE5A76;
    --syn-keyword: #FF8EA3;
    --syn-variable: #93B7EC;
    --syn-type: #C7A9F0;
    --syn-string: #9CCFB4;
    color-scheme: dark;
  }
}
html {
  font-size: 106.25%;
}
@media (min-width: 1600px) {
  html {
    font-size: 112.5%;
  }
}

body {
  padding: 1.25rem;
  background: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", monospace;
  font-feature-settings: "liga" 1, "calt" 1;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis-style: none;
}
@media print {
  body {
    color: #000;
    background: #fff;
  }
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
a:hover {
  text-decoration-color: currentColor;
}
a.no-underline {
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 1.728rem;
}

h2 {
  font-size: 1.2rem;
}

h3, h4, h5, h6 {
  font-size: 1rem;
}

strong, b {
  color: var(--heading);
}

code, kbd, samp, pre {
  font-family: "JetBrains Mono", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", monospace;
  font-size: 0.875em;
}

:not(pre) > code {
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

pre {
  overflow-x: auto;
  line-height: 1.6;
  background: var(--surface);
  padding: 1rem 1.15rem;
  border-radius: 6px;
}
pre code {
  font-size: inherit;
}

blockquote {
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

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

li + li {
  margin-top: 0.35em;
}

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

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

table {
  border-collapse: collapse;
  font-size: 0.9em;
  display: block;
  overflow-x: auto;
}
table th, table td {
  text-align: left;
  padding: 0.4em 0.8em;
  border-bottom: 1px solid var(--rule);
}
table th {
  color: var(--heading);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.833rem;
  line-height: 1.8;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.footer.footer {
  margin-top: 2rem;
}
@media (max-width: 600px) {
  .footer {
    display: block;
  }
  .footer__pages {
    margin-bottom: 1.25rem;
  }
}
.footer a {
  color: inherit;
  text-decoration: none;
}
.footer a:hover {
  color: var(--link);
  text-decoration: underline;
}
.footer__pages {
  display: flex;
  gap: 2rem;
  order: 1;
}
@media print {
  .footer__pages {
    display: none;
  }
}

.back_link {
  text-decoration: none;
  font-size: 0.833rem;
  color: var(--muted);
}
.back_link:hover {
  color: var(--link);
}
@media print {
  .back_link {
    display: none;
  }
}

dl dt {
  font-weight: bold;
  float: left;
  margin-right: 4px;
}
dl dt:after {
  content: ":";
}

sup {
  vertical-align: top;
  font-size: 0.7em;
  line-height: 1;
}

input {
  border-radius: 6px;
  border: 1px solid var(--rule);
  padding: 0.3rem 0.6rem;
  margin-right: 4px;
  line-height: 1.5;
}
input[type=email] {
  background: var(--surface);
  color: var(--fg);
}
input[type=submit] {
  background: var(--link);
  border-color: var(--link);
  color: var(--bg);
  cursor: pointer;
}
input[type=submit]:hover {
  filter: brightness(1.1);
}

main > * {
  margin-top: 0;
}
main > * + * {
  margin-top: 1rem;
}

.sitewrapper {
  margin: 0 auto;
  max-width: 60rem;
}
.sitewrapper > * {
  margin-top: 0;
}
.sitewrapper > * + * {
  margin-top: 1rem;
}
.sitewrapper--page {
  max-width: 38rem;
}

.skip-link {
  position: absolute;
  top: 0;
  transform: translateY(-100%);
}

.skip-link:focus {
  transform: translateY(0);
}

.footnotes {
  font-size: 0.833rem;
  padding-top: 1rem;
  color: var(--muted);
}

.hidden {
  display: none;
}

img.zoomable {
  cursor: zoom-in;
}

.lightbox {
  max-width: none;
  max-height: none;
  width: 100vw;
  height: 100dvh;
  padding: 1rem;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}
.lightbox[open] {
  display: grid;
  place-items: center;
}
.lightbox::backdrop {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--rule);
}
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] img {
    animation: lightbox-in 0.18s ease-out;
  }
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}
.index {
  margin: 3rem 0 0;
}
.index__column > * {
  margin-top: 0;
}
.index__column > * + * {
  margin-top: 0.9rem;
}
.index__column > h1 {
  font-size: 0.833rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0.25rem;
}
.index__column .index__title {
  color: inherit;
  text-decoration: none;
}
.index__column .index__title:hover {
  color: var(--link);
}
.index__column .index__empty {
  color: var(--muted);
  font-size: 0.833rem;
}
.index__column .article > * {
  margin-top: 0;
}
.index__column .article > * + * {
  margin-top: 0.15rem;
}
@media (max-width: 60rem) {
  .index {
    max-width: 38rem;
  }
  .index > * {
    margin-top: 0;
  }
  .index > * + * {
    margin-top: 2.5rem;
  }
}
@media (min-width: 60rem) {
  .index {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 2.5rem;
    align-items: start;
  }
}
.index__more {
  text-decoration: none;
  display: inline-block;
  font-size: 0.833rem;
  color: var(--muted);
}
.index__more:hover {
  color: var(--link);
}
@media print {
  .index__more {
    display: none;
  }
}

.hero {
  margin-top: 3rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.hero > svg {
  flex: none;
  width: 96px;
  height: 96px;
}
.hero > svg path {
  stroke: var(--accent) !important;
}
.hero > svg::selection {
  background: none;
}
.hero__text > * {
  margin-top: 0;
}
.hero__text > * + * {
  margin-top: 0.35rem;
}
.hero__heading {
  font-size: clamp(1.2rem, 5.4vw, 2.074rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero__subheading {
  font-size: 1.2rem;
  color: var(--muted);
}
@media (max-width: 600px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  .hero > svg {
    width: 64px;
    height: 64px;
  }
  .hero__subheading {
    font-size: 1rem;
  }
}

.article > * {
  margin-top: 0;
}
.article > * + * {
  margin-top: 1.1rem;
}
.article > header > * {
  margin-top: 0;
}
.article > header > * + * {
  margin-top: 0.4rem;
}
.article__heading {
  font-weight: bold;
  line-height: 1.4;
  display: inline-block;
  color: var(--heading);
  text-decoration: none;
}
.article__heading:hover {
  color: var(--link);
  text-decoration: underline;
}
.article__heading + br {
  display: none;
}
.article__byline {
  color: var(--muted);
  font-size: 0.833rem;
  font-style: normal;
  display: block;
  line-height: 1.4;
  margin-top: 0;
}
.article__byline a {
  color: inherit;
}
.article > h2 {
  margin-top: 2.4rem;
}
.article > h3, .article > h4 {
  margin-top: 1.8rem;
}
.article > h2 + *, .article > h3 + *, .article > h4 + * {
  margin-top: 0.6rem;
}
.article img {
  border-radius: 6px;
  border: 1px solid var(--rule);
}
.article > p:has(> img:only-child) {
  margin-top: 1.75rem;
}
.article > p:has(> img:only-child) + p:has(> em:only-child) {
  margin-top: 0.6rem;
  font-size: 0.833rem;
  line-height: 1.7;
  color: var(--muted);
}
.article > p:has(> img:only-child) + p:has(> em:only-child) em {
  font-style: normal;
}
.article__homescreen_image {
  width: 100%;
  max-width: 480px;
}

main > .article + .article {
  margin-top: 2.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}

main > .article > header h2 {
  margin-top: 0;
}
main > .article > header h2 a {
  color: var(--heading);
  text-decoration: none;
}
main > .article > header h2 a:hover {
  color: var(--link);
  text-decoration: underline;
}

.section__header > * {
  margin-top: 0;
}
.section__header > * + * {
  margin-top: 0.5rem;
}
.section__description {
  color: var(--muted);
}
.section__empty {
  color: var(--muted);
}

.page > * {
  margin-top: 0;
}
.page > * + * {
  margin-top: 0.5rem;
}

.project__description > * {
  margin-top: 0;
}
.project__description > * + * {
  margin-top: 0.5rem;
}

pre[class*=language-] .keyword, pre[class*=language-] .modifier {
  color: var(--syn-keyword);
}
pre[class*=language-] .variable {
  color: var(--syn-variable);
}
pre[class*=language-] .type, pre[class*=language-] .entity {
  color: var(--syn-type);
}
pre[class*=language-] .string {
  color: var(--syn-string);
}
pre[class*=language-] .comment {
  color: var(--muted);
  font-style: italic;
}
