@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap");

:root {
  --space-xs: 0.8rem;
  --space-sm: 1rem;
  --space-md: 1.25rem;
  --space-lg: 1.5625rem;
  --space-xl: 1.953125rem;
  --space-2xl: 2.44140625rem;
  --space-3xl: 3.0517578125rem;
  --space-4xl: 3.814697265625rem;
}

html {
  scroll-behavior: smooth;
}

.site-body {
  background-color: white;
  color: black;
  font-family:
    "JetBrains Mono", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
    Consolas, "Courier New", monospace;
  background-image: radial-gradient(circle, #e5e7eb 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0;
}

.site-container {
  width: 100%;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
  padding-bottom: var(--space-xl);
  flex: 1;
}

.site-header {
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.site-header hr {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-top-width: 2px;
  border-color: black;
}

.site-nav {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
  text-align: center;
  font-size: 1.125rem;
  line-height: 1.5;
}

.nav-menu {
  display: flex;
  gap: var(--space-sm);
  list-style-type: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.nav-menu li {
  display: flex;
}

.nav-link {
  color: black;
  text-decoration: none;
}

.nav-link:hover {
  color: #4b5563;
}

.social-links {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid black;
}

.social-link {
  color: black;
}

.social-link:hover {
  color: #4b5563;
}

.main-content {
  color: #374151;
  line-height: 1.75;
}

.main-content a,
.blog-post-link {
  color: black;
  text-decoration: underline;
}

.main-content a:hover,
.blog-post-link:hover {
  text-decoration: none;
}

.main-content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.111;
  margin: 0 0 var(--space-xl);
}

.main-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.333;
  margin: var(--space-xl) 0 var(--space-sm);
}

.main-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.333;
  margin: var(--space-lg) 0 var(--space-xs);
}

.main-content p {
  margin: var(--space-md) 0;
}

.main-content ul {
  list-style: none;
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
}

.main-content ul li {
  position: relative;
  margin: var(--space-xs) 0;
}

.main-content ul li::before {
  content: "⊙";
  position: absolute;
  left: -1.625em;
  color: #6b7280;
  font-weight: bold;
}

.main-content ol {
  margin: 1.25em 0;
  padding-left: 1.625em;
}

.main-content li {
  margin: 0.5em 0;
}

.main-content blockquote {
  font-weight: 500;
  font-style: italic;
  color: #374151;
  border-left: 0.25rem solid #d1d5db;
  margin: 1.6em 0;
  padding-left: 1em;
}

.ascii-header {
  text-align: center;
  margin-bottom: 1rem;
  overflow-x: auto;
  width: 100%;
}

.ascii-header pre {
  font-size: 0.8rem;
  line-height: 1.1;
  margin-left: auto;
  margin-right: auto;
  font-family:
    "JetBrains Mono", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
    Consolas, "Courier New", monospace;
  white-space: pre;
  overflow-x: visible;
  display: inline-block;
  min-width: max-content;
}

.blog-listing {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-listing p {
  margin: 0;
  padding: 0.5rem 0;
}

.blog-post-date {
  display: inline;
  color: black;
  font-size: 1rem;
  line-height: 1.5;
}

.figure-block {
  margin: 2rem 0;
  text-align: center;
}

.figure-block img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.figure-caption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
}

.highlight {
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  margin: 1.5rem 0;
  overflow-x: auto;
  background-color: #fafafa;
}

.highlight .chroma {
  border: none;
  margin: 0;
  background: transparent;
}

.highlight .chroma pre,
.chroma pre {
  font-family:
    "JetBrains Mono", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
    Consolas, "Courier New", monospace;
}

.highlight .line,
.chroma .line {
  margin-left: 0.75rem;
}

.highlight .line:first-child,
.chroma .line:first-child {
  margin-top: 0.75rem;
}

.highlight .line:last-child,
.chroma .line:last-child {
  margin-bottom: 0.75rem;
}

.chroma .cl,
.chroma span[style*="display:flex"] {
  display: block;
  min-width: 100%;
  box-sizing: border-box;
  padding: 0.1rem 0;
}

.chroma .lnt,
.chroma .ln {
  margin-right: 1rem;
}

.chroma .hl {
  background-color: rgba(255, 255, 0, 0.1);
  padding: 0.2rem 0;
  margin: 0.1rem 0;
}

code:not(.chroma code) {
  background-color: #f3f4f6;
  color: #2563eb;
  padding-left: 0.375rem;
  padding-right: 0.375rem;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25;
  font-weight: 500;
  border: 1px solid #d1d5db;
  font-family:
    "JetBrains Mono", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
    Consolas, "Courier New", monospace;
}

.error-button {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background-color: black;
  color: white;
  text-decoration: none;
  border-radius: 0.25rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 2px solid black;
}

.error-button:hover {
  background-color: white;
  color: black;
}

@media (max-width: 768px) {
  .site-body {
    font-family:
      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
      Arial, sans-serif;
  }

  .ascii-header pre,
  code,
  .highlight .chroma pre,
  .chroma pre {
    font-family:
      "JetBrains Mono", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
      Consolas, "Courier New", monospace;
  }

  .ascii-header {
    display: none;
  }

  .site-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  .site-header {
    padding-top: 0.5rem;
  }

  .site-header hr {
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .site-nav {
    font-size: 1.25rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .nav-menu {
    gap: 1.25rem;
  }

  .main-content {
    font-size: 1rem;
    line-height: 1.5;
    padding: 0;
  }

  .main-content p {
    margin: 1em 0;
  }

  .main-content h1 {
    margin: 0 0 1.5rem;
  }

  .main-content h2 {
    margin: 1.5rem 0 0.75rem;
  }

  .main-content h3 {
    margin: 1.25rem 0 0.5rem;
  }

  .main-content ul,
  .main-content ol {
    margin: 1em 0;
  }

  .main-content li {
    margin: 0.25em 0;
  }

  .main-content blockquote {
    margin: 1.25em 0;
  }

  .main-content * {
    max-width: 100%;
    box-sizing: border-box;
  }

  .blog-listing {
    gap: 0.5rem;
  }

  .blog-listing p {
    padding: 0.25rem 0;
  }

  .highlight {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .highlight .chroma pre,
  .chroma pre {
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
  }

  .highlight .line,
  .chroma .line {
    margin: 0 1rem;
    white-space: pre;
  }

  .highlight .line:first-child,
  .chroma .line:first-child {
    margin-top: 0.75rem;
  }

  .highlight .line:last-child,
  .chroma .line:last-child {
    margin-bottom: 0.75rem;
  }

  .figure-block {
    margin: 1.5rem 0;
  }

  .figure-block img {
    max-width: calc(100vw - 1.5rem);
    height: auto;
  }

  .social-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
