:root {
  color-scheme: dark;

  /* Dark theme — Flathub-inspired (#1d1e26 family). */
  --bg: #1d1e26;
  --bg-secondary: #2a2c36;
  --bg-elevated: #313340;
  --bg-code: #16171d;
  --text: #e7e9ec;
  --text-secondary: #b8bbc6;
  --text-muted: #8e92a0;
  --accent: #38bdf8;                       /* sky-400, clean cobalt */
  --accent-hover: #7dd3fc;
  --accent-bc: #f59e0b;                    /* amber for bit-crafts highlight */
  --accent-gradient: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 100%);
  --border: #3a3d4c;
  --border-light: #2e303b;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  --font-heading: "Inter", "Segoe UI", -apple-system, sans-serif;
  --font-sans: system-ui, -apple-system, sans-serif;
  --content-width: 40rem;
  --header-width: 56rem;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(29, 30, 38, 0.78);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  position: sticky;
  top: 0;
  z-index: 10;
}

@supports not (backdrop-filter: blur(12px)) {
  .site-header {
    background: var(--bg);
  }
}

.site-header nav {
  max-width: var(--header-width);
  margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  display: flex;
  align-items: center;
}

.site-logo {
  height: 2.4rem;
  width: auto;
  transition: opacity 0.15s ease;
}

.site-title:hover .site-logo {
  opacity: 0.7;
}

.site-header ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.site-header ul a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 450;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
  position: relative;
  display: inline-block;
}

.site-header ul a:hover {
  color: var(--text);
}

.site-header ul a.is-active {
  color: var(--text);
  font-weight: 500;
}

.site-header ul a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.5rem;
  width: 1.4rem;
  height: 2px;
  border-radius: 1px;
  background: var(--accent-gradient);
}

/* ── Main container ── */
main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  flex: 1;
  width: 100%;
}

main.main--wide {
  max-width: var(--header-width);
}

/* ── Hero (home) ── */
.hero {
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .signature {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.hero-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 36rem;
  margin: 0 auto 3.25rem;
}

.hero-links {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.hero-cta {
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-heading);
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.12s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hero-cta:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.hero-cta--primary {
  background: var(--accent-gradient);
  color: #0f172a;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.hero-cta--primary:hover {
  color: #0f172a;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.5);
}

/* ── Featured projects strip (home) ── */
.featured-strip {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-light);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 1.1rem;
}

.featured-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 1.25rem 1.15rem;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: radial-gradient(ellipse at top right, rgba(34, 211, 238, 0.12), transparent 60%);
}

.featured-card--amber::before {
  background: radial-gradient(ellipse at top right, rgba(245, 158, 11, 0.14), transparent 60%);
}

.featured-card:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.featured-card--amber:hover {
  border-color: var(--accent-bc);
}

.featured-card:hover::before {
  opacity: 1;
}

.featured-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.featured-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-card__icon--mono {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.08));
  color: var(--accent-bc);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.4rem;
}

.featured-card__body {
  min-width: 0;
}

.featured-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.3rem;
  color: var(--text);
}

.featured-card--accent .featured-card__title {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.featured-card--amber .featured-card__title {
  color: var(--accent-bc);
}

.featured-card__tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 0.7rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.featured-card__pill {
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-mono);
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.featured-card__pill--status {
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.35);
}

.featured-card--amber .featured-card__pill--status {
  color: var(--accent-bc);
  border-color: rgba(245, 158, 11, 0.35);
}

.featured-card__arrow {
  font-size: 1.4rem;
  color: var(--text-muted);
  align-self: center;
  transition: transform 0.15s ease, color 0.15s ease;
}

.featured-card:hover .featured-card__arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.featured-card--amber:hover .featured-card__arrow {
  color: var(--accent-bc);
}

/* ── Projects index (reuses featured-card; wider grid) ── */
.projects-grid {
  grid-template-columns: repeat(auto-fill, minmax(20rem, 28rem));
  justify-content: start;
  margin-bottom: 2.5rem;
}

.projects-category-heading {
  margin-top: 2.25rem;
  margin-bottom: 0.4rem;
}

.project-section-intro {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  max-width: 42rem;
}

/* ── Recent posts on home ── */
.home-content {
  padding-top: 3rem;
  border-top: 1px solid var(--border-light);
}

.recent-heading {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ── Page title (list/single static pages) ── */
.page-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  line-height: 1.25;
}

/* ── 404 page ── */
.not-found {
  text-align: center;
  padding: 4rem 0 3rem;
}

.not-found__code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.04em;
}

.not-found__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.not-found__lead {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0 0 2rem;
}

.not-found__links {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ── Section hero (list pages + static pages like /about/) ── */
.section-hero {
  margin: 0.5rem 0 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-light);
}

.section-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.65rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-hero__lead {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 42rem;
  margin: 0 0 1rem;
}

.section-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.section-hero__pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  letter-spacing: 0.02em;
}

.section-hero__pill--link {
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.section-hero__pill--link:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
}

.static-page .section-hero {
  margin-bottom: 1.75rem;
}

.static-page .article-content {
  max-width: var(--content-width);
}

/* ── Section content (about, author) ── */
.section-content {
  line-height: 1.85;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.section-content p {
  margin-bottom: 1.25rem;
}

.section-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
}

.section-content a:hover {
  text-decoration-color: var(--accent);
}

/* ── Blog post list (card grid) ── */
.post-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 1.1rem;
}

.post-item {
  position: relative;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-secondary);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.post-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--bg-elevated);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.post-item a {
  color: var(--text);
  display: block;
  padding: 0;
  text-decoration: none;
}

.post-item__body {
  padding: 1.05rem 1.15rem 1.15rem;
}

.post-item--has-cover .post-item__body {
  padding-top: 0.95rem;
}

.post-item a:hover .post-title {
  color: var(--accent);
}

.post-cover {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-light);
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.post-item:hover .post-cover img {
  transform: scale(1.04);
}

.post-ribbon {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-gradient);
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.4);
}

.post-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  transition: color 0.15s ease;
  color: var(--text);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.post-meta time {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.post-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.post-badge--updated {
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.35);
}

.post-description {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-top: 0.6rem;
}

/* ── Article (single post) ── */
.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.article-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.article-header .post-meta {
  font-size: 0.85rem;
}

.article-content {
  line-height: 1.85;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.article-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.5rem;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.25rem 1.25rem;
}

.article-content li {
  margin-bottom: 0.35rem;
}

.article-content .highlight {
  position: relative;
  margin: 1.75rem -1rem;
  border-radius: 8px;
  background: var(--bg-code);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.article-content .highlight pre {
  margin: 0;
  padding: 1.1rem 1.25rem;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
}

.article-content .highlight pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 1em;
  color: inherit;
}

.article-content .highlight pre code[data-lang]:not([data-lang=""])::before {
  content: attr(data-lang);
  position: absolute;
  top: 0.55rem;
  right: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  pointer-events: none;
}

/* Bare <pre> (no Chroma highlight wrapper, e.g. indented code) */
.article-content pre {
  background: var(--bg-code);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  margin: 1.75rem -1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: var(--bg-code);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  color: var(--text);
}

.article-content pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: 1em;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-secondary);
  padding: 0.9rem 1.15rem 0.9rem 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 1.75rem 0;
  border-radius: 0 8px 8px 0;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.75rem 0;
  border: 1px solid var(--border-light);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  display: block;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 2.5rem 0;
}

.article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin: 2rem 0;
  font-size: 0.88rem;
  font-family: var(--font-mono);
}

.article-content thead {
  background: var(--bg-secondary);
}

.article-content th {
  color: var(--text);
  font-weight: 600;
  text-align: left;
  padding: 0.65rem 1rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
  border-bottom: 2px solid var(--border);
}

.article-content td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
}

.article-content tbody tr:last-child td {
  border-bottom: none;
}

.article-content tbody tr:hover td {
  background: var(--bg-secondary);
}

.article-content td code,
.article-content th code {
  font-size: 0.9em;
  background: none;
  border: none;
  padding: 0;
}

/* ── Related reading ── */
.related-posts {
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.related-posts__title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
}

.related-posts__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem;
  padding: 0;
}

.related-posts__item {
  margin: 0;
}

.related-posts__item a {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.related-posts__item a:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateY(-2px);
  color: var(--text);
}

.related-posts__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.related-posts__heading {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  transition: color 0.15s ease;
}

.related-posts__item a:hover .related-posts__heading {
  color: var(--accent);
}

.related-posts__excerpt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Article footer ── */
.article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.article-nav a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.article-nav a:hover {
  color: var(--accent);
}

.article-nav .nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.25rem;
}

.article-nav .nav-title {
  font-weight: 500;
  color: var(--text);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  background: var(--bg);
}

.footer-grid {
  max-width: var(--header-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-light);
}

.footer-col__title {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.86rem;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: var(--header-width);
  margin: 1.5rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom .signature {
  font-style: italic;
}

/* ── Book list ── */
.book-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.book-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-secondary);
}

.book-card a {
  color: var(--text);
}

.book-card a:hover .book-title {
  color: var(--accent);
}

.book-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  transition: color 0.15s ease;
}

.book-subtitle {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.book-description {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.book-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.book-status {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.book-status--en-cours {
  color: var(--accent);
}

.book-status--publie {
  color: var(--accent);
}

.book-status--a-venir {
  color: var(--text-muted);
}

.book-status--gratuit {
  color: var(--accent);
}

/* ── Project list ── */
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.project-card {
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-secondary);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--bg-elevated);
}

.project-card--muted {
  border-style: dashed;
  background: transparent;
}

.project-name {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
}

.project-status {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-status--stable {
  color: var(--accent);
}

.project-status--beta {
  color: var(--text-secondary);
}

.project-status--alpha {
  color: var(--text-muted);
}

.project-language,
.project-category {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-name a {
  color: inherit;
  text-decoration: none;
}

.project-name a:hover {
  color: var(--accent);
}

.project-lede {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0.5rem 0 1rem;
}

.project-page .project-meta {
  margin-bottom: 2rem;
}

.project-link {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
}

.project-link:hover {
  text-decoration-color: var(--accent);
}

/* ── Tags ── */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Home cards ── */
.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.home-card {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text);
  transition: border-color 0.15s ease;
}

.home-card:hover {
  border-color: var(--accent);
  color: var(--text);
}

.home-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.home-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.home-more {
  margin-top: 1rem;
  font-size: 0.88rem;
}

/* ── Pinned post ── */
.pinned-post {
  display: block;
  padding: 1.5rem;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pinned-post:hover {
  background: var(--bg-code);
  color: var(--text);
}

.pinned-post .post-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.pinned-post .post-description {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.pinned-post .post-meta {
  font-size: 0.8rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .site-header nav {
    padding: 0.75rem 1.25rem;
  }

  .site-logo {
    height: 2rem;
  }

  .site-header ul {
    gap: 1.25rem;
  }

  .site-header ul a {
    font-size: 0.82rem;
  }

  main {
    padding: 2.5rem 1.25rem 3rem;
  }

  .hero {
    padding: 2rem 0 2.5rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-links {
    gap: 0.5rem;
  }

  .hero-cta {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
  }

  .featured-strip {
    padding-top: 2rem;
  }

  .featured-card {
    grid-template-columns: 56px 1fr;
    gap: 0.85rem;
    padding: 1rem;
  }

  .featured-card__icon {
    width: 56px;
    height: 56px;
  }

  .featured-card__arrow {
    grid-column: 2;
    justify-self: end;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .article-header h1 {
    font-size: 1.6rem;
  }

  .article-content pre,
  .article-content .highlight {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    border-radius: 0;
    border-right: none;
  }

  .post-title {
    font-size: 1.05rem;
  }

  .post-list {
    grid-template-columns: 1fr;
  }

  .article-nav {
    flex-direction: column;
    gap: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
}

@media (max-width: 420px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 420px) {
  .site-header nav {
    flex-direction: column;
    gap: 0.6rem;
  }
}
