/* blog/post.css: Overrides and enhancements for blog post styling */

/* Container and layout */
body.post .container, .post-content {
  max-width: 750px;
  margin: auto;
  padding: 2rem 1rem;
}

/* Table of Contents styling */
.table-of-contents {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 2rem;
}
.table-of-contents h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}
.table-of-contents ul {
  list-style: none;
  padding: 0;
}
.table-of-contents li {
  margin-bottom: 0.5rem;
}
.table-of-contents a {
  text-decoration: none;
  color: #00b0cc;
}
.table-of-contents a:hover {
  text-decoration: underline;
}

/* Increase spacing between sections */
.post-content section {
  margin-bottom: 3rem;
  scroll-margin-top: 240px;
}

/* Typography */
.post-content h1 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.post-content h2 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.post-content h3 {
  font-size: 1.2rem;
  margin-top: 1.2rem;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}
.post-content p {
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  text-align: justify;
}

/* Links */
.post-content a {
  color: #00b0cc;
  text-decoration: underline;
  transition: color 0.2s ease;
}
.post-content a:hover {
  color: #008fa3;
}

/* Lists */
.post-content ul,
.post-content ol {
  margin: 1rem 0 1rem 1.5rem;
  text-align: justify;
}
.post-content ul ul,
.post-content ol ul {
  margin-left: 1.5rem;
  text-align: justify;
}

/* Blockquotes */
.post-content blockquote {
  border-left: 4px solid #ccc;
  padding-left: 1rem;
  color: #666;
  font-style: italic;
  margin: 1.5rem 0;
  background-color: #f9f9f9;
}

/* Code blocks and inline code */
.post-content code {
  background-color: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}
.post-content pre code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  background-color: #f5f5f5;
}

/* Figures and captions */
.post-content figure {
  margin: 2rem 0;
  text-align: center;
}
.post-content figure img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.post-content figcaption {
  font-size: 0.875rem;
  color: #555;
  margin-top: 0.5rem;
}

/* Post metadata and tags */
.post-meta {
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.post-tags {
  margin-top: 2rem;
  border-top: 1px solid #eee;
  padding-top: 1rem;
}
.post-tags span {
  display: inline-block;
  background-color: #e0f7fa;
  color: #00796b;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.875rem;
  margin-right: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .post-content {
    padding: 1.5rem 1rem;
  }
  .post-content h1 { font-size: 1.75rem; }
  .post-content h2 { font-size: 1.5rem; }
  .post-content h3 { font-size: 1.125rem; }
  .post-content p { font-size: 0.9rem; margin-bottom: 0.8rem; line-height: 1.5; }
  .table-of-contents ul { padding-left: 1rem; }
  .table-of-contents li { margin-bottom: 0.5rem; }
}
