@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #000;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --accent: #c792ea;
  --content-width: 700px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.72;
}

main,
footer {
  width: min(100% - 3rem, var(--content-width));
  margin-inline: auto;
}

main {
  padding-block: 5rem 3rem;
}

.intro {
  margin-bottom: 4rem;
}

.profile-image {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  image-rendering: pixelated;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.65rem, 4vw, 2rem);
  line-height: 1.3;
  font-weight: 700;
}

h2 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 700;
}

h2::before {
  content: "> ";
  color: var(--muted);
}

.meta,
time,
footer {
  color: var(--muted);
}

.intro .meta {
  margin-bottom: 1rem;
}

.prompt {
  margin-bottom: 0.75rem;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.prompt-user {
  color: var(--text);
}

.prompt-host {
  color: var(--text);
}

.prompt-path {
  color: var(--text);
}

.prompt-symbol {
  color: var(--muted);
}

.prompt-mark {
  margin-left: 0.35rem;
  color: var(--muted);
}

.prompt-command {
  color: var(--text);
  font-weight: 400;
}

.intro nav {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

section {
  margin-bottom: 3rem;
}

.home section {
  margin-bottom: 2.5rem;
}

.home section > h2 {
  font-size: 1.1875rem;
}

.home .meta,
.home time,
.home .now-list dt,
.home .item-description,
.home .post-list p {
  font-size: 1rem;
}

a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  text-decoration: none;
  transition: border-color 120ms ease;
}

a:hover {
  border-bottom-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-bottom-color: currentColor;
}

.plain-list,
.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li + li,
.post-list li + li {
  margin-top: 0.85rem;
}

.item-title,
.item-description {
  display: block;
}

a.item-title {
  display: inline-block;
}

.item-title {
  font-weight: 700;
}

.item-description {
  color: var(--muted);
}

.project-link {
  margin-top: 1.25rem !important;
}

.now-list {
  margin: 0;
}

.now-list div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
}

.now-list div + div {
  margin-top: 0.35rem;
}

.now-list dt {
  color: var(--muted);
}

.now-list dd {
  margin: 0;
}

.post-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
}

.post-list p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

article header {
  margin-bottom: 3rem;
}

article {
  max-width: 660px;
  margin-inline: auto;
  font-size: 1.125rem;
  line-height: 1.8;
}

article h1 {
  margin-bottom: 0.75rem;
}

article h2 {
  margin-top: 2.5rem;
}

article p {
  margin-bottom: 1.5rem;
}

article figure {
  margin: 2.5rem 0;
}

article figure img {
  display: block;
  width: 100%;
  height: auto;
}

article figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.875rem;
}

article pre {
  margin: 2rem 0;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid #222;
  border-radius: 4px;
  background: #111;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
}

code {
  color: var(--accent);
  font: inherit;
}

pre code {
  color: inherit;
}

article ul {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

article li + li {
  margin-top: 0.4rem;
}

article blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

article blockquote p {
  margin: 0;
}

article table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.5;
}

article th,
article td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #222;
  text-align: left;
  vertical-align: top;
}

article th {
  color: var(--muted);
  font-weight: 600;
}

.breadcrumb {
  margin-bottom: 3rem;
  font-size: 0.875rem;
  font-weight: 400;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb [aria-current="page"] {
  color: var(--muted);
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: start;
  max-width: 660px;
  margin: 4rem auto 0;
  font-size: 0.875rem;
}

.post-navigation .next {
  text-align: right;
}

footer {
  padding-block: 0 3rem;
  font-size: 0.875rem;
}

.error-page {
  min-height: 100vh;
  padding-top: clamp(5rem, 18vh, 10rem);
}

.shell-output p {
  margin-bottom: 0.5rem;
}

.shell-output .prompt {
  margin-bottom: 1.5rem;
}

.error-label {
  font-weight: 700;
}

.return-command {
  margin-top: 3rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 540px) {
  main,
  footer {
    width: 100%;
    margin-inline: 0;
    padding-inline: 1.25rem;
  }

  main {
    padding-top: 3rem;
  }

  .post-list li {
    display: block;
  }

  .post-list time {
    display: block;
    margin-bottom: 0.15rem;
  }

  .post-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .post-navigation .writing-index {
    order: 3;
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
