/* Blog styling for muradnabizade.com.
   Loaded AFTER styles.css — reuses the site's design tokens. Adds article
   typography and the post-listing cards. */

/* ---------- Listing page ---------- */

.blog-head { margin-bottom: 8px; }
.blog-head h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.02em; }

.post-list { display: flex; flex-direction: column; gap: 16px; margin: 26px 0; }

.post-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(20, 81, 78, 0.10);
  border-color: #d3e3e1;
  text-decoration: none;
}
.post-card h2 { font-size: 21px; margin: 0 0 8px; padding-left: 0; letter-spacing: -0.01em; }
.post-card h2::before { display: none; }
.post-card .post-meta { margin-bottom: 8px; }
.post-card p { color: var(--muted); margin: 0 0 12px; font-size: 15.5px; }
.post-card .read { font-weight: 600; font-size: 14px; color: var(--accent); }
.post-card:hover .read { text-decoration: underline; }

/* ---------- Post meta + tags (shared) ---------- */

.post-meta {
  color: var(--muted);
  font-size: 14px;
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  align-items: center;
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: 0.6; }

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.post-tags .tag {
  font-size: 12px;
  color: var(--accent-dark);
  background: #e6f0ef;
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
}

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

.post { max-width: 740px; margin: 0 auto; }

.post-header { margin-bottom: 26px; }
.post-header h1 {
  font-size: 33px;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 12px 0 14px;
}
@media (max-width: 560px) { .post-header h1 { font-size: 26px; } }

.post-body { font-size: 18px; line-height: 1.72; }
.post-body > p { margin: 0 0 20px; }
.post-body h2 { margin: 40px 0 14px; }
.post-body h3 { margin: 28px 0 10px; font-size: 19px; padding-left: 0; }
.post-body h3::before { display: none; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 24px; }
.post-body li { margin-bottom: 9px; }
.post-body li > strong:first-child { color: var(--text); }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post-body strong { color: var(--text); font-weight: 700; }
.post-body em { font-style: italic; }
.post-body hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }

/* inline code */
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: #eef0ed;
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
  word-break: break-word;
}

/* code blocks */
.post-body .codeblock { margin: 0 0 22px; border-radius: var(--radius); overflow: hidden; border: 1px solid #12201f; }
.post-body .codeblock .code-lang {
  background: #16221f;
  color: #7fb8ac;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-bottom: 1px solid #223330;
}
.post-body pre {
  background: #1d2b2a;
  color: #e8f0ef;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0;
  line-height: 1.55;
  font-size: 13.5px;
  -webkit-overflow-scrolling: touch;
}
.post-body pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; word-break: normal; }

/* end-of-post CTA */
.post-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 36px 0 8px;
}
.post-cta h3 { margin: 0 0 6px; padding-left: 0; }
.post-cta h3::before { display: none; }
.post-cta p { color: var(--muted); margin: 0 0 14px; font-size: 15.5px; }

/* author box */
.author-box {
  display: flex;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--border);
  margin-top: 36px;
  padding-top: 24px;
}
.author-box img {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.author-box .who { font-weight: 700; color: var(--text); }
.author-box p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }

.post-back { font-size: 14px; margin-bottom: 6px; }

/* ---------- Mermaid diagrams ---------- */

.post-figure { margin: 0 0 22px; }
.post-body pre.mermaid {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin: 0;
  text-align: center;
  overflow-x: auto;
  /* hide the raw definition text until Mermaid swaps in the SVG (no flash) */
  color: transparent;
  font-size: 0;
  line-height: 0;
}
.post-body pre.mermaid[data-processed] svg { max-width: 100%; height: auto; }
.post-figure figcaption {
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}
