/* Demat Facile — blog — additive styles on top of shared.css */

/* ── Nav BLOG pill ── */
.nav-brand .blog-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  margin-left: 6px;
  border-radius: 6px;
  background: var(--v-bg);
  color: var(--v1);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid #cffafe;
}

/* ── Blog hero ── */
.blog-hero {
  position: relative;
  padding: 96px 0 64px;
  overflow: hidden;
}
.blog-hero .wrap { position: relative; z-index: 1; }
.blog-hero h1 {
  font-size: clamp(40px, 5.5vw, 72px);
  letter-spacing: -2.2px;
  margin: 20px 0 16px;
  max-width: 820px;
}
.blog-hero .lede { max-width: 640px; }

/* ── Category filter bar ── */
.cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px 0 0;
  border-top: 1px solid var(--rule);
  margin-top: 48px;
}
.cat-bar a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: border-color .15s, color .15s, background .15s;
}
.cat-bar a:hover { border-color: var(--v1); color: var(--v1); }
.cat-bar a.active {
  background: var(--v-bg);
  border-color: #cffafe;
  color: var(--v1);
}

/* ── Article grid ── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 56px 0 96px;
}
@media (max-width: 960px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .article-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ── Article card ── */
.article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.article-card:hover {
  border-color: var(--v-soft);
  box-shadow: 0 18px 40px rgba(10, 10, 15, .06);
  transform: translateY(-2px);
}
.article-card .cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--v-bg) 0%, var(--paper-2) 100%);
  position: relative;
  overflow: hidden;
}
.article-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-card .cover.placeholder::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad);
  opacity: .08;
}
.article-card .body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.article-card .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted-2);
}
.article-card .meta .cat { color: var(--v1); }
.article-card .meta .sep { color: var(--rule); }
.article-card h3 {
  font-size: 22px;
  letter-spacing: -0.5px;
  line-height: 1.25;
}
.article-card:hover h3 { color: var(--v1); }
.article-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}
.article-card .byline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  margin-top: 8px;
}
.article-card .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: -0.3px;
  flex-shrink: 0;
  overflow: hidden;
}
.article-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-card .author-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ── Single article ── */
.article-header {
  padding: 72px 0 48px;
  position: relative;
  overflow: hidden;
}
.article-header .wrap { max-width: 820px; position: relative; z-index: 1; }
.article-header .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.article-header .meta .cat { color: var(--v1); }
.article-header .meta .sep { color: var(--rule); }
.article-header .meta .date,
.article-header .meta .read { color: var(--muted-2); }
.article-header h1 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.article-header .excerpt {
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 32px;
}
.article-header .byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0 0;
  border-top: 1px solid var(--rule);
}
.article-header .byline .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.5px;
  overflow: hidden;
}
.article-header .byline .avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-header .byline .name {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.article-header .byline .sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.article-cover {
  max-width: 1040px;
  margin: 0 auto 48px;
  padding: 0 40px;
}
@media (max-width: 640px) { .article-cover { padding: 0 24px; } }
.article-cover img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Prose — body of a single article */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 40px 96px;
}
@media (max-width: 640px) { .article-body { padding: 0 24px 64px; } }
.article-body > * + * { margin-top: 1.4em; }
.article-body h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.9px; margin-top: 2em; }
.article-body h3 { font-size: clamp(20px, 2.2vw, 24px); margin-top: 1.8em; }
.article-body p { font-size: 18px; line-height: 1.7; color: var(--ink-soft); }
.article-body a { color: var(--v1); border-bottom: 1px solid rgba(37, 99, 235, .25); transition: border-color .12s; }
.article-body a:hover { border-color: var(--v1); }
.article-body ul, .article-body ol { padding-left: 1.4em; color: var(--ink-soft); font-size: 18px; line-height: 1.7; }
.article-body li + li { margin-top: 0.5em; }
.article-body blockquote {
  padding: 16px 24px;
  border-left: 3px solid var(--v1);
  background: var(--v-bg);
  border-radius: 0 10px 10px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
}
.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 5px;
}
.article-body pre {
  background: var(--ink);
  color: #e8e8ef;
  padding: 22px 24px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.article-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.article-body img {
  border-radius: var(--radius);
  margin: 1.6em 0;
}

.article-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 40px 96px;
  border-top: 1px solid var(--rule);
}
@media (max-width: 640px) { .article-footer { padding: 40px 24px 64px; } }
.article-footer .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.article-footer .tag {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: border-color .15s, color .15s;
}
.article-footer .tag:hover { border-color: var(--v1); color: var(--v1); }
.article-footer .back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--v1);
  padding-top: 20px;
}
.article-footer .back:hover { color: var(--ink); }

/* ── Taxonomy / list header ── */
.tax-header {
  padding: 72px 0 32px;
}
.tax-header .eyebrow { margin-bottom: 16px; display: block; }
.tax-header h1 { font-size: clamp(36px, 5vw, 64px); letter-spacing: -2px; margin-bottom: 12px; }
.tax-header .lede { max-width: 620px; }

/* ── Empty state ── */
.empty {
  padding: 72px 0;
  text-align: center;
  color: var(--muted);
}

/* ── Pagination ── */
.pager {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 32px 0 96px;
}
.pager a, .pager span {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  transition: border-color .15s, color .15s;
}
.pager a:hover { border-color: var(--v1); color: var(--v1); }
.pager .current { background: var(--v-bg); border-color: #cffafe; color: var(--v1); }
