/* Blog: index list and article pages */

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.post-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.post-card h2 {
  font-size: 1.4rem;
  margin-top: 0.2rem;
}

.post-card p {
  color: var(--muted);
}

.post-card-more {
  margin-top: auto;
  color: var(--accent);
  font-weight: 700;
}

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.breadcrumbs {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.post-header,
.post-body {
  position: relative;
  z-index: 1;
  max-width: 72ch;
  margin: 0 auto;
}

.post-header {
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.6rem;
}

.post-header h1 {
  max-width: none;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.08;
}

.post-body {
  font-size: 1.06rem;
  line-height: 1.7;
}

.post-body h2 {
  margin-top: 2.6rem;
  scroll-margin-top: 6rem;
}

.post-body h3 {
  font-size: 1.2rem;
  line-height: 1.25;
  margin-top: 1.8rem;
  scroll-margin-top: 6rem;
}

.post-body ol,
.post-body ul {
  padding-left: 1.4rem;
  margin: 0 0 1rem;
}

.post-body li {
  margin-bottom: 0.45rem;
}

.post-body a {
  color: var(--accent);
}

.post-lede {
  font-size: 1.18rem;
  color: var(--navy-soft);
}

.post-body code,
.post-body kbd {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(99, 89, 233, 0.08);
  color: var(--navy);
}

.post-body kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: #fff;
}

.post-body pre {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  padding: 1rem 1.2rem;
  margin: 0 0 1rem;
  border-radius: 14px;
  background: var(--navy);
}

.post-body pre code {
  padding: 0;
  background: none;
  color: #eef1ff;
  font-size: 0.88rem;
  line-height: 1.6;
}

.callout,
.post-toc {
  position: relative;
  z-index: 1;
  padding: 1.1rem 1.3rem;
  margin: 1.4rem 0;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--blue-soft);
}

.post-toc {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.callout p:last-child,
.post-toc ol {
  margin-bottom: 0;
}

.callout-title {
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.post-toc li {
  margin-bottom: 0.2rem;
}

.post-figure {
  position: relative;
  z-index: 1;
  margin: 1.6rem 0;
}

.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.post-figure figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.table-wrap {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  margin: 0 0 1rem;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.post-body th,
.post-body td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

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

.post-body tbody th {
  color: var(--navy-soft);
  font-weight: 700;
}

@media (max-width: 640px) {
  .post-body {
    font-size: 1rem;
  }
}
