/* onworks blog — shared stylesheet.
 * Tokens mirror the landing page (/index.html) and app/globals.css,
 * so the three read as one product. This is a static site that
 * follows the OS preference, exactly like the landing page does. */

:root {
  color-scheme: light;

  --canvas: #fafafa;
  --surface: #ffffff;
  --elevated: #ffffff;

  --ink: #111827;
  --ink-muted: #565e6b;
  --ink-faint: #667085;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --on-accent: #ffffff;

  --border: rgb(16 24 40 / 0.08);
  --border-strong: rgb(16 24 40 / 0.16);
  --wash: rgb(16 24 40 / 0.03);

  --grid-line: 16 24 40;
  --grid-alpha: 0.5;

  --shadow-soft: 0 1px 2px 0 rgb(16 24 40 / 0.04),
    0 1px 3px 0 rgb(16 24 40 / 0.06);
  --shadow-lift: 0 8px 24px -12px rgb(16 24 40 / 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --canvas: #0b0d12;
    --surface: #14161c;
    --elevated: #21242c;

    --ink: #e8eaed;
    --ink-muted: #9aa1ac;
    --ink-faint: #868e9e;

    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --on-accent: #11141c;

    --border: rgb(255 255 255 / 0.12);
    --border-strong: rgb(255 255 255 / 0.24);
    --wash: rgb(255 255 255 / 0.04);

    --grid-line: 255 255 255;
    --grid-alpha: 0.32;

    --shadow-soft: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow-lift: 0 8px 24px -12px rgb(0 0 0 / 0.55);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    Helvetica,
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

:where(a, button):focus-visible {
  outline: 2px solid rgb(79 70 229 / 0.6);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :where(a, button):focus-visible {
    outline-color: rgb(129 140 248 / 0.6);
  }
}

/* ── Backdrop: same two blurred fields as the landing page ── */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop::before,
.backdrop::after {
  content: "";
  position: absolute;
  border-radius: 9999px;
  filter: blur(110px);
}

.backdrop::before {
  top: -180px;
  left: -140px;
  width: 520px;
  height: 520px;
  background: rgb(79 70 229 / 0.09);
}

.backdrop::after {
  right: -160px;
  bottom: -200px;
  width: 480px;
  height: 480px;
  background: rgb(79 70 229 / 0.06);
}

@media (prefers-color-scheme: dark) {
  .backdrop::before {
    background: rgb(129 140 248 / 0.08);
  }

  .backdrop::after {
    background: rgb(129 140 248 / 0.05);
  }
}

.backdrop-grid {
  position: absolute;
  inset: 0;
  display: none;
  background-image:
    linear-gradient(
      to right,
      rgb(var(--grid-line) / var(--grid-alpha)) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      rgb(var(--grid-line) / var(--grid-alpha)) 1px,
      transparent 1px
    );
  background-size: 44px 44px;
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(
    ellipse at 30% 40%,
    #000 0%,
    transparent 70%
  );
  mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%);
}

/* ── Page shell ── */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nav {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}

.logo-mark svg {
  width: 20px;
  height: 20px;
}

.logo-word {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--ink);
}

/* ── Article column ── */

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  flex: 1;
  padding: 24px 0 90px;
}

.index-hero {
  padding: 56px 0 44px;
  max-width: 720px;
}

.index-hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}

.leading {
  margin: 0;
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.8;
}

/* Post list */

.posts {
  max-width: 800px;
}

.post-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 72px;
  align-items: start;
}

.group-title {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

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

.post-row {
  position: relative;
  display: block;
  padding: 26px 56px 26px 0;
  border-bottom: 1px solid var(--border);
}

.post-row::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 0;
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  transform: translate(-8px, 4px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

@media (hover: hover) {
  .post-row:hover h2 {
    color: var(--accent);
  }

  .post-row:hover::after {
    opacity: 1;
    transform: translate(0, 4px);
  }
}

.post-date {
  display: block;
  margin-top: 13px;
  white-space: nowrap;
  color: var(--ink-faint);
  font-size: 13px;
}

.post-row h2 {
  margin: 0 0 9px;
  font-size: 20px;
  line-height: 1.28;
  letter-spacing: -0.025em;
  transition: color 0.18s ease;
}

.post-row p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* ── Article page ── */

.article {
  max-width: 820px;
  margin: 0 auto;
  padding-top: 40px;
}

.article-header .eyebrow {
  margin-bottom: 4px;
}

.article h1 {
  margin: 12px 0 14px;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.byline {
  color: var(--ink-faint);
  font-size: 13.5px;
}

.byline a {
  color: var(--accent);
  font-weight: 600;
}

.byline a:hover {
  text-decoration: underline;
}

.content {
  margin-top: 34px;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
}

.content p {
  margin: 1em 0;
}

.content h2 {
  margin: 2.2em 0 0.7em;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.content h3 {
  margin: 1.8em 0 0.5em;
  font-size: 18.5px;
  color: var(--accent);
}

.content ul,
.content ol {
  padding-left: 1.4em;
  margin: 1em 0;
}

.content li {
  margin: 0.45em 0;
}

.content strong {
  font-weight: 650;
}

.content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

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

.content code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--wash);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.4em;
}

.content pre {
  overflow: auto;
  background: var(--wash);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
}

.content pre code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: inherit;
}

/* First element of the piece should not sit under the article header's rhythm */
.content > :first-child {
  margin-top: 0;
}

.content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--wash);
  color: var(--ink-muted);
}

.content blockquote p {
  margin: 0.6em 0;
}

.content hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--border);
}

/* ── Skip link ── */

.skip {
  position: fixed;
  top: 12px;
  left: 50%;
  translate: -50% 0;
  z-index: 20;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  /* Hidden until keyboard focus */
  opacity: 0;
  pointer-events: none;
}

.skip:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

/* The "In one sentence" callout and example dialogues */

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 1.6em 0;
}

.callout .k {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.callout p {
  margin: 0.35em 0;
}

/* Dialogue bubbles: the speaker becomes a small chip, so a
   beginner can see at a glance who is holding the floor. */

.example {
  background: var(--wash);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 1.6em 0;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.75;
}

.example p {
  margin: 0.55em 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.example .who {
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 650;
  font-size: 12.5px;
  line-height: 1;
  border-radius: 7px;
  padding: 5px 9px;
  flex-shrink: 0;
  margin-top: 3px;
  min-width: 2.6em;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 15px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  vertical-align: top;
}

th {
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── In-article mini TOC (chips row under the byline) ── */

.toc {
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toc a {
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.toc a:hover {
  color: var(--accent);
  border-color: var(--border-strong);
}

/* In-article anchors land a little clear of the page top */
.content [id] {
  scroll-margin-top: 18px;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ── Article nav: prev / next ── */

.post-nav {
  margin-top: 60px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.post-nav a {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-nav a:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.post-nav .dir {
  display: block;
  color: var(--ink-faint);
  font-size: 12.5px;
  margin-bottom: 6px;
}

.post-nav .t {
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.5;
}

/* ── Footer ── */

.bottom {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: var(--ink-faint);
  font-size: 13px;
}

.icp {
  transition: color 0.2s ease;
}

.icp:hover {
  color: var(--ink-muted);
}

/* ── Mobile ── */

@media (max-width: 640px) {
  .nav,
  .wrap,
  .bottom {
    width: calc(100% - 40px);
  }

  .nav {
    height: 68px;
    gap: 14px;
  }

  .nav-links {
    gap: 14px;
  }

  .index-hero {
    padding: 36px 0 30px;
  }

  .post-columns {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .post-row {
    padding: 22px 44px 22px 0;
  }

  .bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════
   Blog index — card layout
   Scoped to the index page so article pages stay untouched.
   ══════════════════════════════════════════════════════════ */

.index-page .index-main {
  flex: 1;
}

/* Nav */

[hidden] {
  display: none !important;
}

.index-page .index-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--canvas) 84%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.nav-inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Hero */

.index-hero2 {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(
      720px 360px at 76% -8%,
      color-mix(in srgb, var(--accent) 10%, transparent),
      transparent 72%
    ),
    var(--canvas);
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgb(var(--grid-line) / 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(var(--grid-line) / 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 10%, transparent 96%);
}

.hero-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 52%, var(--canvas));
}

.hero-inner {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 430px;
  padding: 86px 0 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.hero-eyebrow .sep {
  color: var(--ink-faint);
  opacity: 0.4;
}

.hero-title {
  margin: 20px 0 0;
  font-family:
    "Noto Serif CJK SC",
    "Source Han Serif SC",
    "Songti SC",
    STSong,
    SimSun,
    Georgia,
    serif;
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.title-amp {
  margin-left: 0.06em;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  vertical-align: 0.1em;
}

.title-accent {
  margin-left: 0.04em;
  color: var(--accent);
}

.hero-lead {
  max-width: 540px;
  margin: 22px 0 0;
  color: var(--ink-muted);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  margin-top: 32px;
  padding: 13px 22px 13px 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 13.5px;
  font-weight: 500;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.hero-cta span {
  font-size: 15px;
  transition: transform 0.25s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.hero-cta:hover span {
  transform: translateY(3px);
}

.hero-stats {
  position: absolute;
  right: 4px;
  bottom: 80px;
  padding: 4px 0 4px 24px;
  border-left: 1px solid var(--border-strong);
}

.stat-num {
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
}

.stat-num::after {
  content: "篇";
  margin-left: 6px;
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.stat-label {
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-since {
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 11px;
}

/* Article shell + filters */

.index-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 88px;
  scroll-margin-top: 84px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-muted);
  font: inherit;
  font-size: 12px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.chip.is-active {
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
  box-shadow: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 280px;
  max-width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink-faint);
  transition: border-color 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.search-box input::placeholder {
  color: var(--ink-faint);
  opacity: 0.8;
}

.search-clear {
  display: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.search-clear.is-visible {
  display: block;
}

/* Featured area */

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 12px;
}

.feature-grid.is-solo {
  grid-template-columns: 1fr;
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #0a0d14;
  color: #fff;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  animation: card-in 0.5s ease backwards;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -22px rgb(0 0 0 / 0.5);
}

.feature-card .visual {
  transition: transform 0.7s ease;
}

.feature-card:hover .visual {
  transform: scale(1.05);
}

.visual-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgb(7 10 17 / 0.96) 6%,
    rgb(7 10 17 / 0.62) 44%,
    transparent 88%
  );
}

.feature-body {
  position: relative;
  z-index: 2;
  padding: 32px;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 11px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.06);
  color: #cbd5e1;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.feature-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 3px rgb(96 165 250 / 0.18);
}

.feature-body h2 {
  margin: 0;
  font-size: clamp(21px, 2.6vw, 31px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.025em;
  transition: color 0.2s ease;
}

.feature-card:hover h2 {
  color: #bfdbfe;
}

.feature-body > p {
  max-width: 520px;
  margin: 12px 0 0;
  color: #aab6c9;
  font-size: 13.5px;
  line-height: 1.8;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / 0.12);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #93a1b5;
  font-size: 11.5px;
}

.meta .sep {
  color: #475569;
}

.round-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 50%;
  font-size: 15px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.feature-card:hover .round-arrow {
  border-color: #60a5fa;
  background: #3b82f6;
  transform: translate(2px, -2px);
}

.secondary-col {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.secondary-col:empty {
  display: none;
}

/* Small + more cards */

.mini-card {
  display: flex;
  gap: 16px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  animation: card-in 0.5s ease backwards;
}

.mini-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: var(--shadow-lift);
}

.mini-thumb {
  position: relative;
  flex-shrink: 0;
  width: 38%;
  min-height: 168px;
  overflow: hidden;
  border-radius: 12px;
}

.mini-thumb .visual,
.more-thumb .visual {
  transition: transform 0.7s ease;
}

.mini-card:hover .visual,
.more-card:hover .visual {
  transform: scale(1.08);
}

.mini-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 6px 8px 6px 2px;
}

.mini-cat {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.mini-cat .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.mini-body h3,
.more-body h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.mini-body h3 {
  font-size: 16.5px;
  line-height: 1.4;
}

.mini-card:hover h3,
.more-card:hover h3 {
  color: var(--accent);
}

.clamp2 {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mini-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--ink-faint);
  font-size: 11px;
}

.arrow {
  color: var(--ink-faint);
  transition:
    transform 0.25s ease,
    color 0.25s ease;
}

.mini-card:hover .arrow,
.more-card:hover .arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.more-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 140px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  animation: card-in 0.5s ease backwards;
}

.more-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: var(--shadow-lift);
}

.more-thumb {
  position: relative;
  flex-shrink: 0;
  width: 33%;
  height: 120px;
  overflow: hidden;
  border-radius: 12px;
}

.more-body {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.more-cat {
  color: var(--accent);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.more-body h3 {
  margin-top: 8px;
  font-size: 15.5px;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.more-meta {
  margin-top: 11px;
  color: var(--ink-faint);
  font-size: 11px;
}

.more-card > .arrow {
  display: none;
}

/* States */

.empty-state {
  padding: 80px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--wash);
  color: var(--ink-faint);
  font-size: 14px;
  text-align: center;
}

.load-wrap {
  margin-top: 32px;
  text-align: center;
}

.load-btn {
  padding: 12px 30px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.load-btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--ink);
}

.nojs-list {
  margin: 24px 0 0;
  padding-left: 1.2em;
  color: var(--ink-muted);
  line-height: 2;
}

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

/* Footer */

.index-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0;
}

.footer-word {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.footer-dot {
  color: var(--accent);
}

.footer-brand p {
  margin: 6px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: var(--ink-muted);
  font-size: 13px;
}

.footer-links a {
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-copy {
  color: var(--ink-faint);
  font-size: 12px;
}

.footer-copy .icp {
  transition: color 0.2s ease;
}

.footer-copy .icp:hover {
  color: var(--ink-muted);
}

/* ── Card visuals (pure CSS thumbnails) ── */

.visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0e1420;
}

.visual::before,
.visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.visual::before {
  background-image:
    linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle at 50% 38%, #000, transparent 78%);
  mask-image: radial-gradient(circle at 50% 38%, #000, transparent 78%);
}

.visual::after {
  background: radial-gradient(110% 85% at 78% 0%, rgb(255 255 255 / 0.07), transparent 62%);
}

.visual-wave {
  background:
    radial-gradient(
      circle at 72% 20%,
      rgb(30 58 138 / 0.85),
      rgb(30 58 138 / 0) 58%
    ),
    linear-gradient(140deg, #16213e, #0a0f1c 72%);
}

.visual-code {
  background:
    radial-gradient(
      circle at 70% 18%,
      rgb(51 65 85 / 0.85),
      rgb(51 65 85 / 0) 56%
    ),
    linear-gradient(140deg, #1c2637, #0a0f18 72%);
}

.visual-code-blocks {
  background:
    radial-gradient(
      circle at 70% 18%,
      rgb(67 56 202 / 0.75),
      rgb(67 56 202 / 0) 56%
    ),
    linear-gradient(140deg, #1b1b39, #080b16 72%);
}

.visual-code-wave {
  background:
    radial-gradient(
      circle at 70% 18%,
      rgb(29 78 216 / 0.75),
      rgb(29 78 216 / 0) 56%
    ),
    linear-gradient(140deg, #14213d, #080d18 72%);
}

.visual-code-network {
  background:
    radial-gradient(
      circle at 70% 18%,
      rgb(14 116 144 / 0.7),
      rgb(14 116 144 / 0) 56%
    ),
    linear-gradient(140deg, #102b38, #071015 72%);
}

.visual-code-nature {
  background:
    radial-gradient(
      circle at 70% 18%,
      rgb(6 95 70 / 0.7),
      rgb(6 95 70 / 0) 56%
    ),
    linear-gradient(140deg, #10312b, #08120f 72%);
}

.visual-architecture {
  background:
    radial-gradient(
      circle at 72% 20%,
      rgb(76 29 149 / 0.85),
      rgb(76 29 149 / 0) 58%
    ),
    linear-gradient(140deg, #241d3e, #0d0b16 72%);
}

.visual-blocks {
  background:
    radial-gradient(
      circle at 74% 18%,
      rgb(55 48 163 / 0.85),
      rgb(55 48 163 / 0) 58%
    ),
    linear-gradient(140deg, #1b1a3b, #0a0916 72%);
}

.visual-nature {
  background:
    radial-gradient(
      circle at 72% 18%,
      rgb(6 95 70 / 0.85),
      rgb(6 95 70 / 0) 58%
    ),
    linear-gradient(140deg, #10312b, #08120f 72%);
}

.visual-network {
  background:
    radial-gradient(
      circle at 72% 18%,
      rgb(29 78 216 / 0.85),
      rgb(29 78 216 / 0) 56%
    ),
    linear-gradient(140deg, #14213d, #080d18 72%);
}

.visual-wave .w {
  position: absolute;
  left: -30%;
  width: 160%;
  height: 150px;
  border-radius: 50%;
  transform: rotate(-14deg);
}

.visual-wave .w1 {
  top: 22%;
  border-top: 2px solid rgb(96 165 250 / 0.55);
}

.visual-wave .w2 {
  top: 38%;
  border-top: 1px solid rgb(147 197 253 / 0.28);
}

.visual-wave .w3 {
  top: 55%;
  border-top: 1px solid rgb(96 165 250 / 0.38);
}

.visual-code .code-card {
  position: absolute;
  inset: 18px 22px;
  overflow: hidden;
  transform: rotate(-4deg);
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 10px;
  background: rgb(8 12 20 / 0.62);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
  color: rgb(191 219 254 / 0.82);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.9;
}

.code-card .dots {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.code-card .dots i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.code-card .dots i:nth-child(1) {
  background: #f87171;
}

.code-card .dots i:nth-child(2) {
  background: #facc15;
}

.code-card .dots i:nth-child(3) {
  background: #4ade80;
}

.code-card p {
  margin: 0;
  padding: 0 14px;
}

.code-card p:first-of-type {
  margin-top: 10px;
}

.code-card .c-purple {
  color: #c4b5fd;
}

.code-card .c-green {
  color: #6ee7b7;
}

.visual-architecture,
.visual-blocks,
.visual-nature,
.visual-network {
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-architecture .diamond {
  position: absolute;
  transform: rotate(45deg);
  border: 1px solid rgb(255 255 255 / 0.22);
  background: rgb(255 255 255 / 0.04);
}

.visual-architecture .d1 {
  width: 148px;
  height: 148px;
}

.visual-architecture .d2 {
  width: 94px;
  height: 94px;
  border-color: rgb(196 181 253 / 0.3);
  background: rgb(196 181 253 / 0.1);
}

.visual-blocks {
  gap: 10px;
}

.visual-blocks i {
  width: 36px;
  height: 36px;
  transform: rotate(45deg);
  border: 1px solid rgb(165 180 252 / 0.3);
  background: rgb(99 102 241 / 0.16);
}

.visual-blocks i:nth-child(2) {
  background: rgb(99 102 241 / 0.24);
}

.visual-blocks i:nth-child(3) {
  background: rgb(99 102 241 / 0.32);
}

.visual-blocks i:nth-child(4) {
  background: rgb(99 102 241 / 0.4);
}

.visual-nature .leaf {
  position: absolute;
  border: 1px solid rgb(110 231 183 / 0.3);
  border-radius: 100% 0;
  background: rgb(16 185 129 / 0.08);
}

.visual-nature .l1 {
  width: 76px;
  height: 120px;
  transform: rotate(-35deg);
}

.visual-nature .l2 {
  width: 58px;
  height: 98px;
  transform: rotate(35deg);
}

.visual-network .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgb(147 197 253 / 0.24);
}

.visual-network .r1 {
  width: 84px;
  height: 84px;
  box-shadow: 0 0 24px rgb(96 165 250 / 0.35);
}

.visual-network .r2 {
  width: 142px;
  height: 142px;
  border-color: rgb(147 197 253 / 0.16);
}

.visual-network .r3 {
  width: 200px;
  height: 200px;
  border-color: rgb(147 197 253 / 0.09);
}

.visual-network .core {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #93c5fd;
  box-shadow: 0 0 18px rgb(96 165 250 / 0.6);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.secondary-col .mini-card:nth-child(2),
.more-grid .more-card:nth-child(2n) {
  animation-delay: 0.06s;
}

.more-grid .more-card:nth-child(3n) {
  animation-delay: 0.1s;
}

/* ── Index responsive ── */

@media (max-width: 880px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid.is-solo {
    grid-template-columns: 1fr;
  }

  .secondary-col {
    grid-template-rows: none;
    grid-auto-rows: 1fr;
  }

  .hero-stats {
    display: none;
  }

  .more-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 640px) {
  .more-card > .arrow {
    display: block;
    padding-right: 6px;
  }
}

@media (max-width: 640px) {
  .nav-inner,
  .index-shell,
  .hero-inner,
  .footer-inner {
    width: calc(100% - 40px);
  }

  .hero-inner {
    min-height: 0;
    padding: 52px 0 44px;
  }

  .hero-title {
    font-size: clamp(40px, 11vw, 54px);
  }

  .index-page:not(.blog-page) .filters {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }

  .index-page:not(.blog-page) .chips {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .index-page:not(.blog-page) .chips::-webkit-scrollbar {
    display: none;
  }

  .index-page:not(.blog-page) .chip {
    flex: 0 0 auto;
  }

  .view-all-more {
    display: none;
  }

  .index-page:not(.blog-page) .filters .view-all {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .blog-page .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .feature-card {
    min-height: 340px;
  }

  .feature-body {
    padding: 22px;
  }

  .mini-thumb {
    min-height: 150px;
  }

  .more-card {
    min-height: 0;
  }

  .more-thumb {
    height: 120px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.blog-main {
  flex: 1;
}

.blog-hero {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 58px 0 8px;
}

.blog-hero h1 {
  margin: 22px 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.blog-hero p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

.blog-shell {
  padding-top: 26px;
  scroll-margin-top: 84px;
}

.blog-grid {
  margin-top: 0;
}

.index-page .filters .view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-color: var(--border-strong);
  background: var(--surface);
  font-size: 12.5px;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.content h4 {
  margin: 1.6em 0 0.5em;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}

.content pre {
  position: relative;
}

.content details {
  margin: 1.5em 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.content details > summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.6;
}

.content details > summary code {
  color: inherit;
}

.content details[open] > summary {
  margin-bottom: 12px;
}

.content details pre {
  margin: 10px 0 0;
}

.content .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-muted);
  font: inherit;
  font-size: 11.5px;
  line-height: 1.4;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.content pre:hover .copy-btn,
.content .copy-btn:focus-visible {
  opacity: 1;
}

.content .copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.content .mermaid {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  overflow-x: auto;
}

.content .mermaid svg {
  max-width: 100%;
  height: auto;
}

.content .mermaid[data-processed="error"] {
  color: #dc2626;
  font: 14px/1.6 sans-serif;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .blog-hero,
  .blog-shell {
    width: calc(100% - 40px);
  }

  .blog-hero {
    padding-top: 40px;
  }

  .content .copy-btn {
    opacity: 1;
  }
}
