/* MadX — research/blog pages (loaded only on /blog/*) */

/* Post list (blog index) */

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

.post-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid #e2e5ea;
}

.post-list li:last-child { border-bottom: none; }

.post-list time {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--accent-2);
  letter-spacing: 0.03em;
}

.post-list h2 {
  margin: 0.25rem 0 0.4rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

.post-list h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-list h2 a:hover,
.post-list h2 a:focus { color: var(--accent-2); text-decoration: underline; }

.post-list p {
  margin: 0;
  color: #4a4f5a;
  font-size: 0.97rem;
}

/* Post page */

.post-back { margin: 0 0 1.5rem; }

.post-back a {
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.9rem;
}

.post-back a:hover,
.post-back a:focus { text-decoration: underline; }

.post h1 { margin-bottom: 0.75rem; }

.post-byline {
  color: #6b7180;
  font-size: 0.9rem;
  margin: 0 0 2.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e2e5ea;
}

.post-byline time {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}

.post-topics .topic {
  display: inline-block;
  border: 1px solid #d3d8e0;
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  font-size: 0.8rem;
  margin-right: 0.35rem;
  color: var(--accent-2);
}

.post p, .post li { font-size: 1.02rem; }

.post img { max-width: 100%; height: auto; border-radius: 8px; }

.post blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: rgba(72, 177, 223, 0.07);
  border-radius: 0 6px 6px 0;
  color: #3d424d;
}

.post table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.5rem 0;
  display: block;
  overflow-x: auto;
}

.post th, .post td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e2e5ea;
}

.post th {
  color: var(--accent-2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Code — inline and fenced (Prism classes emitted at build time) */

.post code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.post :not(pre) > code {
  background: rgba(23, 27, 38, 0.07);
  border: 1px solid #e2e5ea;
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.post pre {
  background: var(--navy);
  color: var(--ink);
  border: 1px solid rgba(72, 177, 223, 0.25);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.55;
  font-size: 0.88rem;
}

/* Prism token colors — dark theme matched to site palette */

.token.comment, .token.prolog, .token.cdata { color: #7d8595; }
.token.punctuation { color: #a3aab8; }
.token.property, .token.tag, .token.constant, .token.symbol { color: #6fc3e8; }
.token.boolean, .token.number { color: #e8a262; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin { color: #8fd08f; }
.token.operator, .token.entity, .token.url { color: #a3aab8; }
.token.atrule, .token.attr-value, .token.keyword { color: #48b1df; }
.token.function, .token.class-name { color: #d9b8f0; }
.token.regex, .token.important, .token.variable { color: #e8c862; }
.token.important, .token.bold { font-weight: 600; }
.token.italic { font-style: italic; }

/* Prev/next footer */

.post-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e5ea;
}

.post-nav {
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.92rem;
  max-width: 45%;
}

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

.post-nav:hover,
.post-nav:focus { text-decoration: underline; }
