:root {
  --bg: #ffffff;
  --text: #111;
  --links: #3076cb;
  --nav-opacity: 0.7;
  --border: rgba(0, 0, 0, 0.1);
  --btn-color: #6c757d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --text: #f3f4f6;
    --links: #60a5fa;
    --nav-opacity: 0.5;
    --border: rgba(255, 255, 255, 0.1);
  }
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  src: url("../fonts/JetBrainsMono-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
body {
  font-family: "JetBrains Mono", monospace;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
h1 {
  margin: 1rem 0 1rem;
  font-size: calc(1.3rem + 0.6vw);
  text-align: center;
}
h2 {
  margin: 3rem 0 0.5rem;
  font-size: calc(0.8rem + 0.6vw);
}
.post-title {
  text-align: start;
}
main a {
  color: var(--links);
  text-decoration: none;
}
main a:hover {
  opacity: 0.9;
}
nav a {
  color: var(--text);
  text-decoration: none;
}
nav a:hover {
  opacity: 0.8;
  color: var(--text);
}
.muted {
  opacity: 0.7;
  font-size: smaller;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.button {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.2rem;
  border: 1px solid currentColor;
  text-decoration: none;
  color: var(--btn-color);
  border-color: var(--btn-color);
  text-align: center;
}
.button:hover {
  color: #fff;
  background-color: var(--btn-color);
  border-color: var(--btn-color);
}
.custom-dd {
  border-left: 1px solid #dee2e6;
  margin-top: 0.5rem;
}
.custom-dd div {
  margin-left: 1rem;
}
.no-wrap {
  white-space: nowrap;
}
nav {
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.post-content {
  line-height: 1.8;
  overflow-wrap: break-word;
}
.post-content h1,
.post-content h2,
.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem !important;
}
.post-content p {
  margin-bottom: 1rem;
}
.post-content ul,
.post-content ol {
  padding-left: 2rem;
}
.post-content code {
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.9rem;
}
.post-content pre {
  padding: 1rem;
  overflow-x: auto;
  border-radius: 8px;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}
.post-content th,
.post-content td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid var(--border);
}

.post-content th {
  font-weight: 600;
}

.post-content tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.post-content img {
  max-width: 100%;
  height: auto;
}
.post-content figcaption {
  margin-bottom: 1rem;
  font-size: smaller;
}
.hero {
  display: flex;
  flex-direction: column-reverse;
  gap: 1rem;
}
.avatar {
  object-fit: cover;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .hero {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .avatar {
    margin-left: 1.5rem;
  }
}
#scroll-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;

  background: transparent;
  border: 1px solid currentColor;
  border-radius: 100%;

  width: 2rem;
  height: 2rem;

  cursor: pointer;

  display: none;
}
#scroll-top.show {
  display: block;
}
.post-video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
