/* ============================================================
   frontforge — writing index and article pages
   Loaded by /writing and each article, on top of styles.css.
   ============================================================ */

/* ─────────────── Index ─────────────── */

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

.post-item { border-top: 1px solid var(--line-soft); }
.post-item:last-child { border-bottom: 1px solid var(--line-soft); }

.post-link {
  display: block; padding: 30px 0; color: inherit; text-decoration: none;
  transition: background .2s;
}
.post-link:hover { text-decoration: none; }
.post-link:hover .post-title { color: var(--ember-2); }

.post-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline;
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 10px;
}
.post-tag { color: var(--ember-2); font-weight: 700; }

.post-title {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.2; margin: 0 0 .5rem;
  color: var(--text); transition: color .2s;
}
.post-excerpt { color: var(--text-muted); margin: 0; font-size: 1rem; max-width: 70ch; }

.post-more {
  display: inline-block; margin-top: 12px;
  font-size: .9rem; font-weight: 600; color: var(--ember-2);
}

/* ─────────────── Article ─────────────── */

.article { max-width: 720px; }
.article-head { margin-bottom: 2.4rem; }
.article-title {
  font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 700;
  letter-spacing: -.035em; line-height: 1.08; margin: 0 0 .6rem;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  font-size: .82rem; color: var(--text-dim); margin: 0;
}
.article-lede {
  font-size: clamp(1.1rem, 1.9vw, 1.32rem); color: var(--text-muted);
  margin: 1.6rem 0 0; line-height: 1.6;
}

.article-body { font-size: 1.04rem; }
.article-body p { color: var(--text-muted); margin: 0 0 1.3rem; }
.article-body h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 2.8rem 0 .9rem;
  padding-top: 1.8rem; border-top: 1px solid var(--line-soft);
}
.article-body h3 { font-size: 1.12rem; margin: 2rem 0 .6rem; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body a { color: var(--ember-2); text-decoration: underline; text-underline-offset: 3px; }

.article-body ul { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.article-body ul li {
  position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--text-muted);
}
.article-body ul li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ember); box-shadow: 0 0 8px rgba(255, 122, 24, .7);
}

.article-body blockquote {
  margin: 0 0 1.4rem; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--ember);
  color: var(--text); font-size: 1.08rem;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 5px; padding: 2px 6px; color: var(--text);
  overflow-wrap: anywhere;
}
.article-body pre {
  background: var(--bg-alt); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 16px 18px; overflow-x: auto;
  margin: 0 0 1.4rem;
}
.article-body pre code {
  background: none; border: none; padding: 0; white-space: pre;
  font-size: .85rem; color: var(--text-muted);
}

/* Closing call to action */
.article-end {
  margin-top: 3.5rem; padding: 28px 30px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line-soft);
  border-left: 3px solid var(--ember);
}
.article-end h2 { margin: 0 0 .5rem; padding: 0; border: none; font-size: 1.25rem; }
.article-end p { color: var(--text-muted); margin-bottom: 1.2rem; }

.article-nav { margin-top: 2.4rem; font-size: .95rem; }

@media (max-width: 480px) {
  .article-end { padding: 22px 22px; }
}
