html, body {
  background-color: #F6F8FC;
}

body {
  font-family: "Lato", sans-serif;
  font-weight: 400;
  padding-top: 5rem;
  padding-left: 0;
  padding-right: 0;
  margin: 0;
  max-width: none;
  color: #212529;
  line-height: 1.75;
}

a {
  color: #6096B4;
  text-decoration: none;
}

a:hover {
  color: #4a7a94;
  text-decoration: none;
}

.navbar {
  opacity: 0.95;
}

.terminal-text {
  color: #4A7A94;
  margin-right: 1.5rem;
  padding-left: 0;
  display: inline-flex;
  align-items: center;
}

.terminal-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: #FFAAAA;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

.navbar .nav-item.active .nav-link {
  color: #4A7A94;
  font-weight: 500;
}

.blog-post-page {
  max-width: 980px;
  margin: 0 auto;
}

.blog-post-inner,
.wrap,
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
}

.blog-post-card {
  border: 0;
  box-shadow: 0 .125rem .5rem rgba(0, 0, 0, 0.08);
  background: #ffffff;
  border-radius: 15px;
}

.blog-post-card h1,
.blog-post-card h2,
.blog-post-card h3,
.blog-post-card h4 {
  scroll-margin-top: 90px;
}

.blog-post-card h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.blog-post-card h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #808D7C;
}

.blog-post-card h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #808D7C;
}

.blog-post-card hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid #dee2e6;
}

.blog-post-card blockquote {
  font-style: italic;
  color: #6c757d;
  border-left: 3px solid #d9e3d3;
  margin: 1rem 0;
  padding-left: 1rem;
}

.blog-post-card code,
.blog-post-card pre {
  font-family: "Courier New", Courier, monospace;
}

.blog-post-card pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
}

.blog-post-card nav.toc {
  border: 1px solid #dfe7db;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin: 1.5rem 0;
  background: #fbfdf9;
}

.blog-post-card nav.toc ul {
  margin-bottom: 0;
}

.blog-post-card .meta,
.blog-post-card .subtitle,
.blog-post-card footer {
  color: #6c757d;
}

.blog-post-card img {
  max-width: 100%;
  height: auto;
}

.blog-post-card .fig-wide img {
  border: 1px solid #e6e6e6;
  border-radius: 8px;
}

.blog-post-card .fig-wide figcaption {
  margin-top: 0.6rem;
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.45;
}

.blog-post-card .bibtex-card {
  margin: 2rem auto;
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #f8f9fa;
  overflow-x: auto;
}

.blog-post-card .bibtex-card pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.blog-post-card .copy-btn {
  float: right;
  padding: 0.2rem 0.5rem;
  font-size: 0.85rem;
  background: #6096B4;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.blog-post-card .copy-btn:hover {
  opacity: 0.85;
}

.poem-post {
  font-family: Georgia, "Times New Roman", Times, serif;
  color: #2d2d2d;
}

.poem-post h1 {
  letter-spacing: 0.02em;
}

.poem-post h2 {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.blog-footer {
  font-size: 0.78rem;
}

@media (max-width: 576px) {
  body {
    padding-top: 4.7rem;
  }

  .blog-post-card h1 {
    font-size: 1.85rem;
  }
}
