/* Articles: list page and article page. Loaded after style.css and pages.css. */

main.page.wide { max-width: 1100px; }

/* ---------- Shared bits ---------- */
.art-meta { margin: 0 0 6px; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.art-excerpt { margin: 0; color: var(--muted); font-size: 0.97rem; line-height: 1.55; }
.art-empty { margin: 40px 0; color: var(--muted); font-size: 1.05rem; }

/* ---------- Featured article ---------- */
.art-feature {
  display: grid; margin-top: 32px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  color: var(--ink); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.art-feature:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(20, 33, 61, .12); }
.art-feature-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--accent), var(--ink)); overflow: hidden; }
.art-feature-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-feature-text { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 22px 22px 26px; }
.art-feature-title { margin: 0 0 8px; font-size: clamp(1.45rem, 3.2vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.art-pill {
  display: inline-block; margin-bottom: 8px; padding: 3px 12px; border-radius: 999px;
  background: var(--accent); color: #0f1626; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.art-more { margin-top: 14px; font-weight: 800; border-bottom: 2px solid var(--accent); padding-bottom: 1px; }
.art-feature:hover .art-more { border-bottom-color: var(--ink); }
@media (min-width: 820px) {
  .art-feature:not(.no-image) { grid-template-columns: 1.35fr 1fr; }
  .art-feature:not(.no-image) .art-feature-img { aspect-ratio: auto; min-height: 340px; }
  .art-feature-text { padding: 36px 36px 40px; }
}
/* Featured without an image: a text panel with room to breathe */
.art-feature.no-image { background: var(--accent-soft); border-color: transparent; }
.art-feature.no-image .art-feature-text { padding: 36px 26px 40px; max-width: 820px; }
.art-feature.no-image .art-feature-title { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.art-feature.no-image .art-excerpt { font-size: 1.1rem; max-width: 60ch; }
@media (min-width: 820px) { .art-feature.no-image .art-feature-text { padding: 48px 48px 52px; } }

/* ---------- Grid ---------- */
.art-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 28px 24px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .art-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .art-grid { grid-template-columns: repeat(3, 1fr); } }
.art-grid > li { display: flex; }

.art-card {
  display: flex; flex-direction: column; width: 100%; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  color: var(--ink); text-decoration: none;
  transition: transform .15s ease;
}
.art-card:hover { transform: translateY(-2px); }
.art-thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--accent), var(--ink)); overflow: hidden; }
.art-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 20px; }
.art-title { margin: 0 0 8px; font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.art-card .art-excerpt {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.art-card:hover .art-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* No feature image: bigger title and longer summary, so it holds its own next to image cards */
.art-card.no-image { background: var(--card); position: relative; }
.art-card.no-image .art-body { padding-top: 20px; }
.art-card.no-image .art-title { font-size: 1.3rem; }
.art-card.no-image .art-excerpt { -webkit-line-clamp: 6; }

/* ---------- Pagination ---------- */
.art-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; margin: 44px 0 0; }
.art-pager-count { color: var(--muted); font-size: 0.9rem; font-weight: 600; }

/* ---------- Article page ---------- */
.art-preview {
  margin: 0 0 20px; padding: 10px 16px; border-radius: 12px;
  background: #ffe9a8; color: #4a3600; font-weight: 600; font-size: 0.95rem;
}
.art-back { display: block; max-width: 720px; margin: 0 auto 22px; color: var(--muted); font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.art-back:hover { color: var(--ink); }
.art-head { max-width: 720px; margin: 0 auto 28px; }
.art-head h1 { margin: 0 0 14px; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; }
.art-head .lead { margin: 0; font-size: 1.2rem; }
.art-hero { margin: 0 0 40px; border-radius: 20px; overflow: hidden; background: var(--accent-soft); }
.art-hero img { width: 100%; max-height: 560px; object-fit: cover; display: block; }

.art-text { max-width: 720px; margin: 0 auto; font-size: 1.08rem; line-height: 1.75; }
.art-text > :first-child { margin-top: 0; }
.art-text p { margin: 0 0 1.2em; }
.art-text h2 { margin: 2em 0 .5em; font-size: 1.55rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.art-text h3 { margin: 1.8em 0 .4em; font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.art-text h4 { margin: 1.6em 0 .4em; font-size: 1.05rem; font-weight: 800; }
.art-text a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.art-text a:hover { text-decoration-color: var(--ink); }
.art-text ul, .art-text ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.art-text li { margin: 0 0 .4em; }
.art-text blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); color: var(--muted); font-size: 1.15rem; }
.art-text blockquote p:last-child { margin-bottom: 0; }
.art-text hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line); }
.art-text code { padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); font-size: .92em; }
.art-text pre { margin: 0 0 1.4em; padding: 16px 18px; overflow-x: auto; background: var(--accent-soft); border-radius: 12px; line-height: 1.5; }
.art-text pre code { padding: 0; background: none; }
.art-text img { max-width: 100%; height: auto; border-radius: 14px; display: block; }
.art-text figure { margin: 1.8em 0; }
.art-text figcaption { margin-top: 8px; color: var(--muted); font-size: .9rem; text-align: center; }

.art-foot { max-width: 720px; margin: 56px auto 0; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.art-lang { margin: 0; color: var(--muted); }
.art-lang a { color: var(--ink); font-weight: 600; }

@media (prefers-color-scheme: dark) {
  .art-feature:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, .4); }
  .art-pill { color: #0f1626; }
}
@media (prefers-reduced-motion: reduce) {
  .art-feature, .art-card { transition: none; }
  .art-feature:hover, .art-card:hover { transform: none; }
}
