:root {
  /*--bg: #0d0d0d;*/
  --bg: #141414;
  --fg: #e4e4e4;
  --accent: #5be982;
  --muted: #888;
  --mono: "JetBrains Mono", "Fira Code", monospace;
  font-size: 17px;
}

body {
  margin: 0 auto;
  max-width: 860px;
  padding: 2rem;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  line-height: 1.55;
}

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

a:hover {
  text-decoration: underline;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.site-title {
  display: inline-flex;
  align-items: center;
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: -0.5px;
}

.site-title-text {
  white-space: nowrap;
  clip-path: inset(0 14ch 0 0);
  animation: typing 0.9s steps(14, end) 0.2s forwards;
}

.site-title-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--accent);
  margin-left: 3px;
  transform: translateX(-14ch);
  animation:
    caret-move 0.9s steps(14, end) 0.2s forwards,
    caret-blink 0.7s step-end 5 1.1s forwards;
}

@keyframes typing {
  from {
    clip-path: inset(0 14ch 0 0);
  }
  to {
    clip-path: inset(0 0ch 0 0);
  }
}

@keyframes caret-move {
  from {
    transform: translateX(-14ch);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes caret-blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

nav a {
  margin-left: 1rem;
  color: var(--fg);
}

h1,
h2,
h3 {
  font-weight: bold;
  margin-bottom: 1rem;
}

.date {
  color: var(--muted);
  margin-bottom: 2rem;
  display: block;
}

.post-body code {
  background: #1f1f1f;
  padding: 8px 8px;
  border-radius: 7px;
  color: var(--accent);
}

pre code {
  background: #1a1a1a;
  padding: 1rem;
  display: block;
  border-radius: 7px;
  overflow-x: auto;
  color: var(--accent);
}

pre {
  background-color: transparent;
}

.post-list li {
  list-style: none;
  margin-bottom: 0.7rem;
}
