@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

/* ========== Base Reset & Layout ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
  color: #3d3f41;
  background-color: #ffffff;
  padding: 0 20px;
}

/* ========== Container ========== */
.blog-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 0 60px;
}

/* ========== Navigation ========== */
.blog-nav {
  padding: 30px 0 10px;
  max-width: 780px;
  margin: 0 auto;
}

.blog-nav a {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 16px;
  color: #8A76B5;
  text-decoration: none;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.blog-nav a:hover {
  color: #7F9eb2;
}

/* ========== Blog Listing Page ========== */
.blog-header {
  margin-bottom: 50px;
}

.blog-header h1 {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 38px;
  font-weight: 600;
  color: #3d3f41;
  margin-bottom: 8px;
}

.blog-header .subtitle {
  font-size: 18px;
  color: #888;
  font-style: italic;
}

.blog-list {
  list-style: none;
  padding: 0;
}

.blog-list li {
  border-top: 1px solid #eee;
}

.blog-list li:last-child {
  border-bottom: 1px solid #eee;
}

.blog-list a {
  display: block;
  padding: 28px 0;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.blog-list a:hover {
  background-color: #fafafa;
}

.blog-list .post-date {
  font-size: 16px;
  color: #4A6FA5;
  margin-bottom: 4px;
}

.blog-list .post-title {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: #3d3f41;
  margin-bottom: 4px;
  line-height: 1.4;
}

.blog-list a:hover .post-title {
  color: #8A76B5;
}

.blog-list .post-author {
  font-size: 16px;
  color: #999;
}

.blog-list .post-tag {
  display: inline-block;
  background: #889fbb;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 13px;
  margin-right: 6px;
  vertical-align: middle;
}

/* ========== Blog Post Page ========== */
.post-header {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}

.post-header h1 {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 36px;
  font-weight: 600;
  color: #3d3f41;
  line-height: 1.3;
  margin-bottom: 14px;
}

.post-meta {
  font-size: 16px;
  color: #888;
}

.post-meta a {
  color: #8A76B5;
  text-decoration: none;
}

.post-meta a:hover {
  color: #7F9eb2;
}

.post-meta .post-date {
  color: #4A6FA5;
}

/* ========== Article Content ========== */
.post-content {
  line-height: 1.85;
}

.post-content p {
  margin-bottom: 18px;
  font-size: 17px;
}

.post-content h2 {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 25px;
  font-weight: 600;
  color: #3d3f41;
  margin-top: 45px;
  margin-bottom: 18px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

.post-content h3 {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  color: #3d3f41;
  margin-top: 32px;
  margin-bottom: 12px;
}

.post-content a {
  color: #8A76B5;
  text-decoration: none;
  border-bottom: 1px solid rgba(138, 118, 181, 0.3);
  transition: border-color 0.2s;
}

.post-content a:hover {
  color: #7F9eb2;
  border-bottom-color: #7F9eb2;
}

.post-content ul,
.post-content ol {
  margin-bottom: 18px;
  padding-left: 28px;
}

.post-content li {
  margin-bottom: 8px;
  font-size: 17px;
}

.post-content strong {
  font-weight: 600;
  font-size: 17px;
}

.post-content em {
  font-style: italic;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 24px 0;
}

.post-content figure {
  margin: 30px 0;
  text-align: center;
}

.post-content figure img {
  margin-bottom: 8px;
}

.post-content figcaption {
  font-size: 14px;
  color: #888;
  font-style: italic;
}

/* Code blocks */
.post-content code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 14px;
  background: #f6f6f6;
  padding: 2px 6px;
  border-radius: 3px;
  color: #c84860;
}

.post-content pre {
  background: #f6f6f6;
  border-radius: 6px;
  padding: 20px 24px;
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid #eee;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #3d3f41;
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 16px;
}

.post-content table th {
  background: #f6f6f6;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
}

.post-content table td {
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
}

.post-content table tr:nth-child(even) {
  background: #fafafa;
}

/* Blockquote */
.post-content blockquote {
  border-left: 3px solid #8A76B5;
  margin: 24px 0;
  padding: 12px 20px;
  color: #666;
  font-style: italic;
  background: #fafafa;
  border-radius: 0 4px 4px 0;
}

/* Footnotes */
.post-content .footnote {
  font-size: 14px;
  color: #888;
  vertical-align: super;
}

/* ========== Post Footer ========== */
.post-footer {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.post-footer .citation-block {
  background: #f9f9f9;
  border-radius: 6px;
  padding: 20px 24px;
  margin-top: 16px;
  font-size: 14px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  line-height: 1.6;
  color: #555;
  overflow-x: auto;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  font-size: 16px;
}

.post-nav a {
  color: #8A76B5;
  text-decoration: none;
}

.post-nav a:hover {
  color: #7F9eb2;
}

.post-nav .prev-post {
  text-align: left;
}

.post-nav .next-post {
  text-align: right;
}

/* ========== Footer ========== */
.blog-footer {
  max-width: 780px;
  margin: 40px auto 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
  font-size: 13px;
  color: #55585d8b;
}

.blog-footer a {
  color: #55585d8b;
  font-size: 13px;
}

/* ========== Responsive ========== */
@media (max-width: 600px) {
  .blog-header h1 {
    font-size: 30px;
  }

  .post-header h1 {
    font-size: 28px;
  }

  .blog-list .post-title {
    font-size: 19px;
  }

  .post-content h2 {
    font-size: 22px;
  }

  .post-content h3 {
    font-size: 19px;
  }
}
