/* LINC Blog: index cards, filters and article pages */

/* ---------- Index ---------- */
.blog-toolbar { display: grid; gap: 18px; margin-bottom: 28px; }
.blog-search {
  width: 100%; max-width: 520px; font: inherit; padding: 14px 18px 14px 46px; border-radius: 99px;
  border: 1px solid #cdd5e1; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237e8fa4' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") 16px center / 20px no-repeat;
  transition: border-color .2s, box-shadow .2s;
}
.blog-search:focus { outline: none; border-color: var(--linc-blue); box-shadow: 0 0 0 3px rgb(66 96 230 / .2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip[hidden] { display: none; }
.blog-toolbar .lang-switch { justify-self: start; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--linc-border); background: #fff; font-size: .9375rem; font-weight: 500; color: #2d3748;
  transition: background .2s, border-color .2s, color .2s;
}
.chip span { font-size: .8125rem; color: var(--linc-muted); font-weight: 400; }
.chip:hover { border-color: #b9c4f4; }
.chip[aria-pressed="true"] { background: var(--linc-blue); border-color: var(--linc-blue); color: #fff; }
.chip[aria-pressed="true"] span { color: rgb(255 255 255 / .8); }
.blog-status { min-height: 1.5em; margin-bottom: 12px; color: var(--linc-muted); font-size: .9375rem; }
.blog-empty { padding: 48px 0; text-align: center; color: var(--linc-muted); }
.blog-more { display: flex; justify-content: center; margin-top: 40px; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; list-style: none; margin: 0; padding: 0; }
.post-card[hidden] { display: none; }
.post-card a {
  display: flex; flex-direction: column; height: 100%; border-radius: var(--radius-card); overflow: hidden;
  background: #fff; box-shadow: var(--shadow-card); color: var(--linc-ink); text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}
.post-card a:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgb(18 49 124 / .12); }
.post-card-media { aspect-ratio: 16 / 9; background: var(--linc-blue-light); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card a:hover .post-card-media img { transform: scale(1.03); }
.post-card-fallback { display: block; width: 100%; height: 100%; background: url("../assets/img/yourwai-bg.svg") center / 120% auto no-repeat, linear-gradient(135deg, var(--linc-blue-light), #f4ecfd); }
.post-card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 24px; flex: 1; }
.post-card-body .tag { align-self: flex-start; }
.post-card-body :is(h2, h3) { font-size: 1.1875rem; font-weight: 500; line-height: 1.35; }
.post-card-body p { color: #4a5568; font-size: .9375rem; line-height: 1.55; }
.post-card-meta { margin-top: auto; padding-top: 6px; font-size: .8125rem; color: var(--linc-muted); }

/* ---------- Article ---------- */
.post-narrow { max-width: 820px; }
.post-header { padding-block: clamp(40px, 6vw, 72px) 28px; background: linear-gradient(180deg, var(--linc-blue-light), #fff); }
.post-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; font-size: .9375rem; }
.post-back::before { content: "←"; transition: transform .2s; }
.post-back:hover::before { transform: translateX(-3px); }
.post-header h1 { margin-top: 16px; font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: var(--linc-blue-dark); }
.post-meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--linc-muted); font-size: .9375rem; }
.post-meta strong { color: var(--linc-ink); font-weight: 500; }
.post-cover { margin: 8px 0 36px; }
.post-cover img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 16px; box-shadow: var(--shadow-card); }
.post-body { margin: 0 0 40px; max-width: none; }
.post-body img { border-radius: 12px; margin-inline: auto; height: auto; }
.post-body blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--linc-orange); color: var(--linc-blue-text); font-style: italic; }
.post-body table { width: 100%; border-collapse: collapse; font-size: .9375rem; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--linc-border); padding: 10px 12px; text-align: left; vertical-align: top; }
.post-body th { background: var(--linc-gray-bg); font-weight: 500; }
.post-body .embed { margin: 1.5em 0; }
.post-body .embed-poster { background: linear-gradient(135deg, var(--linc-blue-dark), var(--linc-blue)); }
.post-body hr { border: 0; border-top: 1px solid var(--linc-border); margin: 2em 0; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 32px; padding: 0; }
.post-tags .tag { text-decoration: none; }
.post-tags .tag:hover { background: #d7defa; }
.post-author { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 24px; margin-bottom: clamp(48px, 7vw, 80px); border-radius: var(--radius-card); background: var(--linc-gray-bg); }
.post-author-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--linc-blue); color: #fff; font-family: var(--font-heading); font-weight: 700; }
img.post-author-avatar { object-fit: cover; background: var(--linc-blue-light); }
.post-author-name { font-family: var(--font-heading); font-weight: 500; font-size: 1.0625rem; }
.post-author p:not(.post-author-name) { margin-top: 4px; color: #4a5568; font-size: .9375rem; line-height: 1.6; }

@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * clamp(16px, 4vw, 32px)); padding: 2px clamp(16px, 4vw, 32px) 6px; scrollbar-width: none; }
  .chip { flex: none; }
}
