/* ============================================================
   SKILLPILL — BLOG styles (listing + article)
   Reuses the Swiss B&W tokens from base.css. No new colors.
   ============================================================ */

/* ---------- Blog index (listing) ---------- */
.bl-index-head {
  max-width: 760px;
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.bl-index-head h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 16px;
}
.bl-index-head p {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- Card grid (listing + related) ---------- */
.bl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 96px;
}
.bl-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease;
}
.bl-card:hover { background: var(--bg); }
.bl-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 26px 30px;
  flex: 1;
}
/* Card cover thumbnail (16:9) */
.bl-card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.bl-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.bl-card--has-thumb:hover .bl-card-thumb img { transform: scale(1.03); }
.bl-card h3 {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.bl-card:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.bl-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}
.bl-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-card-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.bl-card--all { justify-content: center; }
.bl-card--all h3 { font-size: 18px; }

.bl-tag, .bl-card-tags .bl-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  background: var(--accent);
  padding: 3px 7px;
}

/* ---------- Article ---------- */
.bl-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0 64px;
}
.bl-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 32px;
}
.bl-breadcrumb a { color: var(--muted); text-decoration: none; }
.bl-breadcrumb a:hover { color: var(--text); text-decoration: underline; }
.bl-breadcrumb [aria-current] { color: var(--text); }

.bl-post-head { margin-bottom: 32px; }

/* Article cover image */
.bl-cover {
  margin: 0 0 40px;
  border: 1px solid var(--border);
  background: var(--bg);
  aspect-ratio: 1200 / 630;
  overflow: hidden;
}
.bl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.bl-post-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 18px;
}
.bl-dek {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 22px;
}
.bl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--text);
}
.bl-author { color: var(--text); font-weight: 500; }
.bl-dot { opacity: 0.5; }

/* Body typography */
.bl-body { font-size: 17px; line-height: 1.7; color: var(--text); }
.bl-body > * + * { margin-top: 22px; }
.bl-body .bl-lead { font-size: 20px; line-height: 1.55; }
.bl-body h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 48px;
  padding-top: 8px;
}
.bl-body h3 { font-size: 20px; font-weight: 700; margin-top: 32px; }
.bl-body p { color: var(--text); }
.bl-body a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bl-body ul, .bl-body ol { padding-left: 24px; }
.bl-body li { margin-top: 10px; line-height: 1.6; }
.bl-body strong { font-weight: 700; }
.bl-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
}
.bl-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  color: var(--muted);
  font-size: 18px;
}

/* Article table */
.bl-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid var(--border);
}
.bl-table th, .bl-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
}
.bl-table th { background: var(--bg); font-weight: 700; }
.bl-table tr:last-child td { border-bottom: none; }
.bl-table th:last-child, .bl-table td:last-child { border-right: none; }

/* In-article CTA */
.bl-cta {
  margin: 56px 0 0;
  padding: 32px 30px;
  background: var(--text);
  color: #fff;
  text-align: center;
}
.bl-cta h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 12px; }
.bl-cta p { color: rgba(255,255,255,0.75); font-size: 15px; line-height: 1.5; max-width: 48ch; margin: 0 auto 22px; }

/* Author card */
.bl-post-foot { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.bl-author-name { font-weight: 700; margin-bottom: 6px; }
.bl-author-card p { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Related */
.bl-related { max-width: 1100px; margin: 0 auto; }
.bl-related h2 { font-size: 22px; font-weight: 700; margin-bottom: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .bl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .bl-index-head { padding: 36px 0 28px; margin-bottom: 32px; }
  .bl-index-head p { font-size: 16px; }
  .bl-grid { grid-template-columns: 1fr; margin-bottom: 56px; }
  .bl-card { padding: 22px 20px 24px; }
  .bl-card h3 { font-size: 19px; }
  .bl-post { padding: 24px 0 48px; }
  .bl-post-head h1 { font-size: clamp(1.75rem, 8vw, 2.25rem); }
  .bl-dek { font-size: 16px; }
  .bl-body { font-size: 16px; }
  .bl-body .bl-lead { font-size: 18px; }
  .bl-body h2 { font-size: 22px; margin-top: 36px; }
  .bl-cta { padding: 26px 20px; }
  .bl-cta h3 { font-size: 20px; }
}
