/* Listing and post pages. The tokens (--green, --muted, ...) and the nav
   and footer come from the homepage's styles.css; the listing rules are
   blog.html's, so the cards look the same on both sites. */

.hero { padding: 9rem 3rem 4rem; }
.hero-inner { max-width: 1180px; margin: 0 auto; }
.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.6rem, 5vw, 4.5rem); font-weight: 900;
  line-height: 1.08; max-width: 720px; margin-bottom: 1.6rem;
}
.hero p { color: var(--muted); font-size: 1rem; line-height: 1.75; max-width: 560px; }

.blog-sec { padding: 2rem 3rem 9rem; }
.blog-inner { max-width: 1180px; margin: 0 auto; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.blog-card {
  border: 1.5px solid var(--border); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.2s; text-decoration: none; color: inherit;
}
.blog-card:hover { border-color: var(--green); }
.blog-card-img {
  height: 200px; background: var(--surface); overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 2rem; flex: 1; display: flex; flex-direction: column; }
.blog-date { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.7rem; }
.blog-card h3 {
  font-family: 'Orbitron', sans-serif; font-size: 0.95rem;
  line-height: 1.45; margin-bottom: 1rem; color: var(--text);
}
.blog-card p {
  color: var(--muted); font-size: 0.85rem; line-height: 1.7; flex: 1; margin-bottom: 1.5rem;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-read {
  color: var(--green); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.04em; text-decoration: none;
}
.blog-card:hover .blog-read, a.blog-read:hover { text-decoration: underline; }

/* ─── POST ─────────────────────────────────────────── */
.post { max-width: 760px; margin: 0 auto; padding: 8rem 1.5rem 7rem; }
.post-back { color: var(--green); font-size: 0.85rem; text-decoration: none; }
.post-back:hover { text-decoration: underline; }
.post h1 {
  font-family: 'Orbitron', sans-serif; font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2; margin: 1.6rem 0 1rem;
}
.post-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 2rem; }
.post-hero {
  width: 100%; border-radius: var(--r); border: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.post-body { line-height: 1.8; font-size: 1rem; }
.post-body > * + * { margin-top: 1.1rem; }
.post-body h2, .post-body h3, .post-body h4 {
  font-family: 'Orbitron', sans-serif; line-height: 1.35; margin-top: 2.4rem;
}
.post-body h2 { font-size: 1.35rem; }
.post-body h3 { font-size: 1.1rem; }
.post-body h4 { font-size: 0.95rem; }
.post-body a { color: var(--green); }
.post-body img { max-width: 100%; height: auto; border-radius: var(--r); }
.post-body ul, .post-body ol { padding-left: 1.5rem; }
.post-body li + li { margin-top: 0.4rem; }
.post-body blockquote {
  border-left: 3px solid var(--green); padding-left: 1.2rem; color: var(--muted);
}
.post-body hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em;
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  padding: 0.1em 0.35em;
}
.post-body pre {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 1rem 1.2rem; overflow-x: auto;
}
.post-body pre code { background: none; border: 0; padding: 0; }
.post-body table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 0.5rem 0.8rem; text-align: left; }
.post-tags { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-tag {
  font-size: 0.75rem; color: var(--green); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.2rem 0.75rem;
}

@media (max-width: 960px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .hero, .blog-sec { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
}
