/* ==========================================================================
   Blog styles — shared by /blog/index.html and /blog/posts/*.html
   Scoped and optimized to match the main CoreTally theme.
   ========================================================================== */

:root {
  --blog-ink:         #1C1E22;
  --blog-ink-muted:   #5B5F66;
  --blog-ink-faint:   #8A8E96;
  --blog-accent:      #0056b3;
  --blog-accent-soft: #EEF2FC;
  --blog-line:        #E4E2DC;
  --blog-max-width:   780px;
}

/* ---------- Post list (index page) ---------- */

.post-list {
  list-style: none;
  margin: 0;
  padding: 20px 0 60px;
}

.post-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--blog-line);
}

.post-item:first-child {
  padding-top: 0;
}

.post-date {
  display: block;
  font-size: 13px;
  color: var(--blog-ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.post-item-title {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 8px;
}

.post-item-title a {
  text-decoration: none;
  color: var(--blog-ink);
  background-image: linear-gradient(var(--blog-accent), var(--blog-accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 0.2s ease;
}

.post-item-title a:hover {
  background-size: 100% 2px;
  color: var(--blog-accent);
}

.post-excerpt {
  margin: 0;
  color: var(--blog-ink-muted);
  font-size: 16px;
}

.empty-state {
  padding: 60px 0;
  color: var(--blog-ink-muted);
  text-align: center;
}

/* ---------- Single post page ---------- */

.post-container {
  max-width: var(--blog-max-width);
  margin: 0 auto;
  padding: 0 15px;
}

.post-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--blog-line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--blog-ink-muted);
  text-decoration: none;
  margin-bottom: 20px;
}

.back-link:hover {
  color: var(--blog-accent);
  text-decoration: none;
}

.post-title {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: #0d1117;
}

.post-meta {
  font-size: 14px;
  color: var(--blog-ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-content {
  padding: 40px 0 100px;
  font-size: 17px;
  line-height: 1.8;
  color: #444;
}

.post-content p {
  margin: 0 0 22px;
}

.post-content h2 {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin: 44px 0 16px;
  color: #0d1117;
}

.post-content h3 {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 21px;
  font-weight: 700;
  margin: 36px 0 14px;
  color: #0d1117;
}

.post-content ul,
.post-content ol {
  margin: 0 0 22px;
  padding-left: 24px;
}

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

.post-content blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--blog-accent);
  color: var(--blog-ink-muted);
  font-style: italic;
}

.post-content code {
  background: var(--blog-accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--blog-accent);
}

.post-content pre {
  background: var(--blog-ink);
  color: #FBFAF7;
  padding: 18px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 22px;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

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

.post-content hr {
  border: none;
  border-top: 1px solid var(--blog-line);
  margin: 40px 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .post-list { padding: 20px 0 40px; }
  .post-item-title { font-size: 22px; }
  .post-title { font-size: 30px; }
  .post-header { padding: 30px 0 20px; }
  .post-content { font-size: 16px; padding: 30px 0 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .post-item-title a { transition: none; }
}
