/* ── FONTS ── */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dm-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dm-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── TOKENS ── */
:root,
[data-theme="light"] {
  --font-sans: 'Bricolage Grotesque', sans-serif;
  --font-serif: 'Instrument Serif', serif;
  --font-mono: 'DM Mono', monospace;
  --bg: #f7f8fb;
  --surface: rgba(255, 255, 255, 0.72);
  --border: #c8d3e2;
  --accent: #114cff;
  --accent-dim: rgba(17, 76, 255, 0.08);
  --accent2: #246bff;
  --text: #101827;
  --text-dim: #526174;
  --text-mid: #1f2937;
  --code-bg: #111827;
  --code-text: #f8fafc;
  --code-border: #253047;
  --good: #057a55;
  --bad: #c2410c;
  --callout-error: #c2410c;
  --grain-opacity: 0.08;
  --grid-dot: rgba(17, 76, 255, 0.058);
  --grid-line: rgba(17, 76, 255, 0.03);
  --blueprint-rule: rgba(21, 87, 255, 0.28);
  --paper-shadow: 0 24px 70px rgba(42, 63, 98, 0.13);
}

[data-theme="dark"] {
  --font-sans: 'Bricolage Grotesque', sans-serif;
  --font-serif: 'Instrument Serif', serif;
  --font-mono: 'DM Mono', monospace;
  --bg: #0a0b10;
  --surface: rgba(17, 20, 32, 0.76);
  --border: #253144;
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.12);
  --accent2: #3b82f6;
  --text: #f8fafc;
  --text-dim: #94a3b8;
  --text-mid: #cbd5e1;
  --code-bg: #0f172a;
  --code-text: #f8fafc;
  --code-border: #1f2937;
  --good: #10b981;
  --bad: #ef4444;
  --callout-error: #ef4444;
  --grain-opacity: 0.16;
  --grid-dot: rgba(0, 212, 255, 0.11);
  --grid-line: rgba(0, 212, 255, 0.05);
  --blueprint-rule: rgba(0, 212, 255, 0.26);
  --paper-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 1.35px) 0 0 / 18px 18px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, var(--grid-line) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
}

[data-theme="dark"] body::before {
  mix-blend-mode: screen;
}

/* ── MONO LABEL: shared base for uppercase monospace labels ── */
.post-category,
.eyebrow,
.section-label,
.callout-title,
.read-next-label,
.read-next-category,
.share-label,
.giscus-label,
.toc-label,
.toc-float-heading,
.not-found-code,
.post-nav-direction,
.tab-btn,
.code-label,
.status-badge,
.hub-section-title,
.note-date,
.note-tag,
.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── THEME TOGGLE ── */
.theme-toggle {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
  line-height: 0;
}
.theme-toggle:hover { color: var(--text); }

[data-theme="dark"]  .toggle-sun  { display: block; }
[data-theme="dark"]  .toggle-moon { display: none;  }
[data-theme="light"] .toggle-sun  { display: none;  }
[data-theme="light"] .toggle-moon { display: block; }

/* ── LAYOUT ── */
.container {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0 36px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

#main-content { flex: 1; }

/* ── SITE HEADER ── */
.site-header {
  padding: 22px 0;
  border-bottom: 1px solid var(--blueprint-rule);
  position: relative;
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  border-bottom: 1px dashed color-mix(in srgb, var(--blueprint-rule) 55%, transparent);
}

.site-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-header a.site-name,
.site-header h1.site-name a {
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-name span {
  color: var(--accent);
}
h1.site-name {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.site-nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-back:hover { color: var(--accent); }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav-link span {
  color: var(--accent);
  font-size: 11px;
}
.nav-link:hover { color: var(--text); }

.site-header a.nav-active {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: 10px;
  padding-left: 18px;
  border-left: 1px solid var(--blueprint-rule);
}

.site-header a.language-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 4px 0;
  color: var(--text-dim);
}

.site-header a.language-link.is-active {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}

.site-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 10px;
}

/* ── POST LIST ── */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: fadeUp 0.9s 0.08s ease both;
}

/* ── OFFLINE PAGE ── */
.offline-page { padding: 80px 0; }
.offline-list { list-style: none; margin-top: 32px; }
.offline-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.offline-list a { color: var(--text); text-decoration: none; }
.offline-list a:hover { color: var(--accent); }
.offline-empty { color: var(--text-dim); font-family: var(--font-mono); font-size: 13px; margin-top: 32px; }

.pagination-nav {
  display: flex;
  justify-content: space-between;
  padding: 32px 0 80px;
}

.pagination-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.pagination-btn:hover { color: var(--accent); }

/* ── TAB BAR ── */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
  margin-top: 48px;
}

.tab-btn {
  font-size: 11px;
  letter-spacing: 0.1em;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 14px 20px 12px;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.post-card {
  display: block;
  padding: 28px 0;
  margin-left: 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.post-card:hover .post-title { color: var(--accent); }
.post-card:first-child { border-top: none; }
.post-card.is-hidden { display: none; }

.post-category {
  letter-spacing: 0.18em;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 10px;
  transition: color 0.15s ease;
}

.post-subtitle {
  font-size: 0.92rem;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.65;
  margin-bottom: 14px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ── ARTICLE HEADER ── */
article > header, .article-header {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
  animation: fadeUp 0.8s ease both;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::after {
  content: '';
  display: inline-block;
  height: 1px;
  width: 40px;
  background: var(--accent);
  opacity: 0.5;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.18;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

h1 em,
.post-card .post-title em {
  font-style: italic;
  color: var(--accent);
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-mid);
  font-weight: 300;
  max-width: 560px;
  line-height: 1.7;
}

.meta {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.meta-dot { color: var(--border); }

/* ── ARTICLE BODY ── */
article {
  animation: fadeUp 0.9s 0.1s ease both;
  padding-bottom: 80px;
}

article,
.breadcrumb,
.share-bar,
.read-next,
.giscus-wrap,
.post-nav {
  max-width: 820px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

article p {
  color: var(--text-mid);
  margin-bottom: 1.6em;
  font-weight: 300;
}

article p strong {
  color: var(--text);
  font-weight: 500;
}

article a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 0.14em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
article a:visited {
  color: color-mix(in srgb, var(--accent) 72%, var(--accent2));
}
article a:hover,
article a:focus-visible {
  color: var(--text);
  text-decoration-color: var(--accent);
}

article ul,
article ol {
  margin: 0 0 1.6em 1.4em;
  color: var(--text-mid);
  font-weight: 300;
  line-height: 1.9;
}

article ul li,
article ol li {
  margin-bottom: 0.3em;
}

article ul li strong,
article ol li strong {
  color: var(--text);
  font-weight: 500;
}

article code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent2);
}

/* ── SECTION HEADINGS ── */
article h2 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
  margin-top: 64px;
  line-height: 1.3;
}

.section-label {
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

/* ── CALLOUT BOXES ── */
.callout {
  border-top: 2px solid var(--accent2);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 22px;
  margin: 32px 0;
}
.callout p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}
.callout > div > p:last-child { margin-bottom: 0; }
.callout-title {
  color: var(--accent2);
  margin-bottom: 8px;
  display: block;
}
.callout.error   { border-top-color: #b05c5c; }
.callout.error   .callout-title { color: #b05c5c; }
.callout.warning { border-top-color: #c8922a; }
.callout.warning .callout-title { color: #c8922a; }
.callout.info    { border-top-color: var(--accent2); }
.callout.info    .callout-title { color: var(--accent2); }
.callout.success { border-top-color: #4caf82; }
.callout.success .callout-title { color: #4caf82; }

/* ── DEFINITION BOXES ── */
.definition {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 28px 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px 16px;
  align-items: start;
}
.definition-icon {
  width: 36px;
  height: 28px;
  background: var(--accent-dim);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-top: 2px;
  flex-shrink: 0;
  white-space: nowrap;
}
.definition-term {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 4px;
  font-family: var(--font-sans);
}
.definition-desc {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin: 0;
  font-weight: 300;
}
.definition-desc p { margin: 0; font-size: inherit; color: inherit; }
.definition-desc p:last-child { margin-bottom: 0; }

/* ── CODE BLOCKS ── */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  overflow: hidden;
  margin: 28px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--code-text);
}
.code-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--code-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.code-label {
  letter-spacing: 0.12em;
}
.code-label.bad { color: var(--bad); }
.code-label.good { color: var(--good); }
.code-label.neutral { color: var(--text-dim); }
.code-dots { display: flex; gap: 6px; }
.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--code-border);
}
.code-body-wrapper { overflow-x: auto; }
.code-complexity {
  padding: 8px 16px;
  border-top: 1px solid var(--code-border);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
.code-complexity.bad { color: var(--bad); background: rgba(224, 85, 85, 0.06); }
.code-complexity.good { color: var(--good); background: rgba(76, 175, 130, 0.06); }

/* ── CHROMA SYNTAX HIGHLIGHT OVERRIDES ── */
.code-block .highlight { margin: 0; }
.code-block .highlight pre {
  background: transparent !important;
  padding: 18px 32px !important;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  color: inherit !important;
}
.code-block .highlight code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  color: inherit;
}

/* ── COMPARISON TABLE ── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.9rem;
}
.compare-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
}
.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  font-weight: 300;
  vertical-align: top;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:first-child {
  font-weight: 500;
  color: var(--text);
  font-size: 0.88rem;
  white-space: nowrap;
}

/* ── TAGS ── */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.tag.bad { background: rgba(224, 85, 85, 0.12); color: var(--bad); }
.tag.good { background: rgba(76, 175, 130, 0.12); color: var(--good); }
.tag.neutral { background: var(--surface); color: var(--text-dim); border: 1px solid var(--border); }

/* ── PILLAR CARDS ── */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 32px 0;
}
.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: start;
}
.pillar-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  flex-shrink: 0;
}
.pillar-title {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  font-size: 0.95rem;
}
.pillar-desc {
  font-size: 0.88rem;
  color: var(--text-mid);
  margin: 0;
  font-weight: 300;
  line-height: 1.6;
}
.pillar-desc p { font-size: inherit; color: inherit; margin: 0; }

/* ── DIVIDER ── */
article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}

/* ── FOOTNOTE ── */
.footnote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 0.88rem;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.65;
}
.footnote p { font-size: inherit; color: inherit; margin: 0; }
.footnote strong { color: var(--text-mid); font-weight: 500; }

/* ── CONCLUSION BOX ── */
.conclusion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
  margin-top: 64px;
}
.conclusion h2 {
  margin-top: 0;
  margin-bottom: 16px;
}
.conclusion p {
  margin-bottom: 1em;
}
.conclusion p:last-child { margin-bottom: 0; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── DIAGRAMS ── */
.diagram {
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.diagram-inner {
  padding: 24px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  background: var(--surface);
}
.diagram-inner svg {
  max-width: 100%;
  height: auto;
  display: block;
}
.diagram-caption {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.diagram-light { display: none; }
[data-theme="light"] .diagram-light { display: flex; }
[data-theme="light"] .diagram-dark  { display: none; }

/* ── READ NEXT ── */
.read-next {
  border-top: 1px solid var(--border);
  padding: 48px 0 80px;
}

.read-next-label {
  letter-spacing: 0.16em;
  margin-bottom: 20px;
}

.read-next-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.read-next-card:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.read-next-category {
  letter-spacing: 0.16em;
  color: var(--accent);
  flex-shrink: 0;
}

.read-next-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
}

.read-next-arrow {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}
.read-next-card:hover .read-next-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ── TOC SIDEBAR (wide screens only) ── */
.toc-sidebar {
  display: none;
  position: fixed;
  top: 120px;
  left: calc(50% + 450px);
  width: 200px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  scrollbar-width: none;
}
.toc-sidebar::-webkit-scrollbar { display: none; }

@media (min-width: 1360px) {
  .toc-sidebar { display: block; }
}

.toc-label {
  letter-spacing: 0.16em;
  margin-bottom: 14px;
}

.toc-sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-sidebar nav > ul > li { margin-bottom: 2px; }
.toc-sidebar nav > ul > li > a {
  display: flex;
  align-items: flex-start;
}
.toc-sidebar nav > ul > li > a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
  margin-right: 8px;
  margin-top: 6px;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.toc-sidebar nav > ul > li > a:hover::before { background: var(--accent); }
.toc-sidebar nav a {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  line-height: 1.55;
  padding: 3px 0 3px 10px;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.toc-sidebar nav a:hover { color: var(--text); }
.toc-sidebar nav a.toc-active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.toc-sidebar nav ul ul { display: none; }

/* ── TOC FLOAT BUTTON (below sidebar breakpoint) ── */
.toc-float {
  display: none;
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
}

@media (min-width: 601px) and (max-width: 1359px) {
  .toc-float { display: block; }
}

.toc-float-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 10px 18px 10px 14px;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.toc-float-btn:hover { color: var(--text); border-color: var(--text-dim); }
.toc-float-btn[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
}

.toc-float-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: 232px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  max-height: 55vh;
  overflow-y: auto;
  scrollbar-width: none;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.toc-float-panel::-webkit-scrollbar { display: none; }
.toc-float-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.toc-float-heading {
  letter-spacing: 0.16em;
  margin-bottom: 14px;
}

.toc-float-panel nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-float-panel nav > ul > li { margin-bottom: 2px; }
.toc-float-panel nav > ul > li > a {
  display: flex;
  align-items: flex-start;
}
.toc-float-panel nav > ul > li > a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
  margin-right: 8px;
  margin-top: 6px;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.toc-float-panel nav > ul > li > a:hover::before { background: var(--accent); }
.toc-float-panel nav a {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 0;
  line-height: 1.5;
  transition: color 0.15s ease;
}
.toc-float-panel nav a:hover { color: var(--accent); }
.toc-float-panel nav ul ul { display: none; }

/* ── ABOUT PAGE ── */
.about-page > header {
  padding: 80px 0 48px;
  border-bottom: none;
  margin-bottom: 0;
}

.about-page > header h1 {
  margin-bottom: 0;
}

.about-links {
  display: flex;
  gap: 16px;
  margin-top: 48px;
}

.about-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.about-link:hover {
  color: var(--text);
}

/* ── SHARE BAR ── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.share-label {
  letter-spacing: 0.16em;
}
.share-actions {
  display: flex;
  gap: 8px;
}
.share-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-dim);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.share-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}
.share-btn.copied {
  color: var(--good);
  border-color: var(--good);
}

/* ── GISCUS COMMENTS ── */
.giscus-wrap {
  border-top: 1px solid var(--border);
  padding: 40px 0 80px;
}
.giscus-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.giscus-toggle:hover { color: var(--text); }
.giscus-label {
  letter-spacing: 0.16em;
}
.giscus-chevron {
  transition: transform 0.2s ease;
}
.giscus-toggle[aria-expanded="true"] .giscus-chevron {
  transform: rotate(180deg);
}
.giscus-body {
  display: none;
  margin-top: 24px;
}
.giscus-body.is-open {
  display: block;
}

/* ── TOAST ── */
#toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10001;
  white-space: nowrap;
}
#toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── BACK TO TOP ── */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, color 0.15s ease, border-color 0.15s ease;
  z-index: 100;
}
#back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}
#back-to-top:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

/* ── COPY BUTTON ── */
.copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
  line-height: 0;
  margin-left: auto;
}
.copy-btn:hover { color: var(--text); }
.copy-btn.copied { color: var(--good); }

/* ── 404 PAGE ── */
.not-found {
  padding: 120px 0 80px;
  text-align: center;
}
.not-found-code {
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
}
.not-found-title {
  margin-bottom: 16px;
}
.not-found-desc {
  color: var(--text-dim);
  margin-bottom: 40px;
}
.not-found-home {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.not-found-home:hover { color: var(--text); }

/* ── RESPONSIVE: TABLET (≤ 860px) ── */
@media (max-width: 860px) {
  .container { padding: 0 24px; }
}

/* ── RESPONSIVE: MOBILE (≤ 600px) ── */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .site-header { padding: 18px 0; }
  .site-name { display: none; }
  .site-header-row {
    width: 100%;
  }
  .site-nav-right {
    width: 100%;
    gap: 10px 12px;
    align-items: center;
    justify-content: flex-start;
  }
  .site-header a {
    font-size: 11px;
  }
  .nav-link span {
    font-size: 10px;
  }
  .language-switcher {
    order: 2;
    width: auto;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    gap: 12px;
  }
  .theme-toggle {
    margin-left: auto;
    padding: 6px;
  }
  .site-desc { font-size: 10px; }
  article > header { padding: 36px 0 30px; margin-bottom: 36px; }
  h1 { font-size: clamp(1.75rem, 7vw, 2.2rem); }
  .subtitle { font-size: 0.9rem; }
  .post-title { font-size: 1.3rem; }
  article { padding-bottom: 48px; }
  .code-block { font-size: 12px; }
  .code-block .highlight pre { font-size: 12px !important; padding: 12px 14px !important; }
  .code-block .highlight code { font-size: 12px; }
  .compare-table { display: block; overflow-x: auto; }
  .conclusion { padding: 24px 20px; margin-top: 40px; }
  .read-next-card { flex-wrap: wrap; gap: 10px; padding: 18px 20px; }
  .read-next-title { width: 100%; }
  .read-next-arrow { margin-left: auto; }
  #back-to-top { bottom: 16px; right: 16px; }
  .pagination-nav { padding: 20px 0 60px; }
}

/* ── SKIP TO CONTENT ── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10001;
  padding: 8px 16px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.1s ease;
}
.skip-to-content:focus { top: 0; }

/* ── BREADCRUMBS ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 24px 0 0;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--text-mid); }

/* ── PREV / NEXT POST NAV ── */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.post-nav-link:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.post-nav-link.is-next { text-align: right; }
.post-nav-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.35;
}
.post-nav-link:hover .post-nav-title { color: var(--accent); }
.post-nav-placeholder { visibility: hidden; }

@media (max-width: 600px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-link.is-next { text-align: left; }
}

/* ── DIAGRAM CLICKABLE ── */
.diagram-clickable {
  cursor: zoom-in;
}

/* ── IMAGE LIGHTBOX ── */
.lightbox-trigger {
  cursor: zoom-in;
  display: inline-block;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
}
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#lightbox.is-open { display: flex; }
#lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  pointer-events: none;
}
#lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
#lightbox-close:hover { color: #fff; border-color: #fff; }
#lightbox-svg {
  display: none;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 90vh;
  overflow: auto;
}
#lightbox-svg svg {
  display: block;
  max-width: 90vw;
  max-height: 88vh;
}

/* ── HUB HOMEPAGE ── */
.hub {
  padding: 72px 0 84px;
  animation: fadeUp 0.8s ease both;
  position: relative;
}

.hub::before {
  content: '';
  position: absolute;
  inset: 22px -36px auto;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--blueprint-rule) 0 3px, transparent 3px 11px);
  opacity: 0.55;
}

.hub-blueprint {
  position: absolute;
  top: 132px;
  right: -28px;
  width: min(38vw, 420px);
  color: var(--accent);
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

.hub-blueprint svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.hub-blueprint path,
.hub-blueprint circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.hub-blueprint circle {
  fill: color-mix(in srgb, var(--accent) 16%, transparent);
}

.hub-blueprint .blueprint-soft {
  stroke-dasharray: 6 10;
  opacity: 0.42;
}

.hub-hero {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(56px, 9vw, 104px);
  padding: 22px 0 68px;
  border-bottom: 1px solid var(--blueprint-rule);
  position: relative;
}

.hub-hero::before,
.hub-hero::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 28px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--blueprint-rule), transparent);
  opacity: 0.5;
}

.hub-hero::before { left: 34.5%; }
.hub-hero::after { right: 0; }

.hub-profile {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 4 / 5;
  justify-self: center;
  filter: drop-shadow(var(--paper-shadow));
}

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  filter: grayscale(1) contrast(1.16);
  background: var(--surface);
  box-shadow: none;
}

.profile-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--accent);
  z-index: 2;
}

.figure-label,
.hero-annotation,
.hub-section-heading small {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.profile-label-top {
  position: absolute;
  top: -34px;
  left: 0;
}

.profile-label-side {
  position: absolute;
  top: 18px;
  right: -42px;
  writing-mode: vertical-rl;
  color: var(--text-dim);
}

.hero-annotation {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--text-dim);
}

.hero-annotation span:first-child {
  color: var(--accent);
}

.profile-corner-tl {
  top: -8px;
  left: -8px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.profile-corner-br {
  right: -8px;
  bottom: -8px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.hub-hero-copy h1 {
  margin-bottom: 22px;
  font-size: clamp(3.5rem, 7vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: 0;
  max-width: 820px;
  color: color-mix(in srgb, var(--text) 96%, black);
}

.hub-hero-copy h1::first-letter {
  text-shadow: -0.035em 0 color-mix(in srgb, var(--accent) 18%, transparent);
}

.hub-hero-copy h1 em {
  color: var(--accent);
}

.hub-intro {
  font-family: var(--font-mono);
  font-size: clamp(0.88rem, 1.5vw, 1rem);
  color: var(--text-mid);
  font-weight: 400;
  max-width: 680px;
  line-height: 1.85;
}

.hub-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hub-action {
  min-height: 44px;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, transform 0.16s ease;
  background:
    linear-gradient(90deg, var(--accent) 8px, transparent 8px) left top / 18px 1px no-repeat,
    linear-gradient(180deg, var(--accent) 8px, transparent 8px) left top / 1px 18px no-repeat,
    color-mix(in srgb, var(--surface) 78%, transparent);
}

.hub-action-primary {
  border-color: var(--accent);
}

.hub-action:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.hub-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.hub-meta-line span + span::before {
  content: '•';
  color: var(--accent);
  margin-right: 10px;
}

.hub-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.85fr);
  border-bottom: 1px solid var(--blueprint-rule);
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), var(--blueprint-rule) calc(100% - 1px)),
    radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 1.25px) 0 0 / 16px 16px;
}

.hub-parcours,
.hub-side {
  padding-top: 28px;
}

.hub-parcours {
  padding-right: clamp(36px, 6vw, 72px);
}

.hub-side {
  border-left: 1px solid var(--blueprint-rule);
  padding-left: clamp(36px, 5vw, 56px);
}

.hub-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  color: var(--text-mid);
  text-transform: uppercase;
}

.hub-section-heading small {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 9px;
}

.hub-section-heading span {
  color: var(--accent);
}

.hub-section-heading h2 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.parcours-roadmap {
  position: relative;
  display: grid;
  gap: 34px;
  margin-bottom: 24px;
}

.parcours-roadmap::before {
  content: '';
  position: absolute;
  left: 106px;
  top: 16px;
  bottom: 18px;
  width: 1px;
  background:
    linear-gradient(to bottom, var(--accent), color-mix(in srgb, var(--blueprint-rule) 78%, transparent), transparent),
    repeating-linear-gradient(to bottom, transparent 0 13px, color-mix(in srgb, var(--accent) 28%, transparent) 13px 14px);
}

.parcours-item {
  position: relative;
  display: grid;
  grid-template-columns: 82px 48px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.parcours-date,
.parcours-date-inline,
.parcours-type {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.parcours-date {
  color: var(--text-dim);
  padding-top: 2px;
  text-align: right;
  line-height: 1.55;
}

.parcours-item.is-highlighted .parcours-date {
  color: var(--accent);
}

.parcours-node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 72%, var(--blueprint-rule));
  background: var(--bg);
  margin: 6px auto 0;
  position: relative;
  z-index: 1;
}

.parcours-node::after {
  content: '';
  position: absolute;
  inset: -7px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  transform: rotate(45deg);
  opacity: 0;
}

.parcours-node::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.parcours-item.is-highlighted .parcours-node {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow:
    0 0 0 7px color-mix(in srgb, var(--accent) 9%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 38%, transparent);
  margin-top: 18px;
}

.parcours-item.is-highlighted .parcours-node::after {
  opacity: 1;
}

.parcours-item.is-highlighted .parcours-node::before {
  inset: 0;
  background: var(--accent);
}

.parcours-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.parcours-item.is-highlighted .parcours-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  row-gap: 14px;
  margin-bottom: 18px;
}

.parcours-line h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(0.98rem, 1.9vw, 1.12rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: 0.02em;
}

.parcours-item.is-highlighted .parcours-line h3 {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: clamp(1.02rem, 1.9vw, 1.18rem);
  min-width: 0;
}

.parcours-line h3 span {
  color: var(--text-dim);
}

.parcours-type,
.parcours-date-inline {
  color: var(--accent);
  text-transform: uppercase;
}

.parcours-item.is-highlighted .parcours-type,
.parcours-item.is-highlighted .parcours-date-inline {
  border: 1px solid color-mix(in srgb, var(--accent) 58%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  padding: 3px 9px;
  line-height: 1.25;
}

.parcours-date-inline {
  margin-left: auto;
  text-transform: none;
}

.parcours-item.is-highlighted .parcours-date-inline {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  margin-left: 0;
  white-space: nowrap;
}

.parcours-content p {
  margin: 0;
  max-width: 680px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  color: var(--text-dim);
}

.parcours-content {
  position: relative;
}

.parcours-item:not(.is-highlighted) .parcours-content {
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--blueprint-rule) 48%, transparent);
}

.parcours-item.is-highlighted .parcours-content::before {
  content: '';
  position: absolute;
  left: -10px;
  top: -10px;
  width: 28px;
  height: 28px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  pointer-events: none;
}

.parcours-item.is-highlighted .parcours-content::after {
  content: '';
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 28px;
  height: 28px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  pointer-events: none;
}

.parcours-item.is-highlighted .parcours-content {
  padding: 22px 24px 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 18%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 86%, transparent), color-mix(in srgb, var(--bg) 70%, transparent));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent) 24%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--accent) 18%, transparent);
}

.parcours-item.is-highlighted .parcours-content p {
  position: relative;
  padding-top: 18px;
}

.parcours-item.is-highlighted .parcours-content p::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background:
    linear-gradient(90deg, var(--accent) 0 52%, color-mix(in srgb, var(--blueprint-rule) 68%, transparent) 52% 100%);
}

.hub-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: color 0.16s ease, transform 0.16s ease;
}

.hub-text-link:hover {
  color: var(--text);
}

.hub-latest {
  margin-bottom: 36px;
}

.hub-latest-link {
  display: block;
  text-decoration: none;
  border-bottom: 1px solid var(--blueprint-rule);
  padding-bottom: 28px;
  position: relative;
}

.hub-latest-link::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 0;
  bottom: 28px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 8px, transparent 8px 16px);
  opacity: 0.55;
}

.hub-latest-date {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.hub-latest-title {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.12;
  margin-bottom: 12px;
  transition: color 0.16s ease;
}

.hub-latest-subtitle {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 20px;
}

.hub-latest-link:hover .hub-latest-title {
  color: var(--accent);
}

.hub-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hub-section {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--blueprint-rule);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
  animation: fadeUp 0.6s ease both;
  animation-delay: calc(var(--i) * 0.08s);
}

.hub-section-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.hub-section-main {
  min-width: 0;
}

.hub-section-title {
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text);
  transition: color 0.15s ease;
}

.hub-section-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  border: 1px solid var(--blueprint-rule);
  padding: 1px 6px;
  letter-spacing: 0.04em;
}

.hub-section-desc {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.35;
}

.hub-section-arrow {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  transition: transform 0.15s ease;
}

.hub-section:hover .hub-section-title {
  color: var(--accent);
}

.hub-section:hover .hub-section-arrow {
  transform: translateX(4px);
}

@media (max-width: 860px) {
  .hub-blueprint {
    width: 72vw;
    top: 220px;
    right: -22vw;
    opacity: 0.12;
  }
  .hub-hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hub-hero::before,
  .hub-hero::after {
    display: none;
  }
  .hub-profile {
    width: min(76vw, 280px);
  }
  .hub-dashboard {
    grid-template-columns: 1fr;
  }
  .hub-parcours {
    padding-right: 0;
    padding-bottom: 34px;
  }
  .hub-side {
    border-left: none;
    border-top: 1px solid var(--blueprint-rule);
    padding-left: 0;
    padding-bottom: 8px;
  }
}

/* ── SECTION HEADERS ── */
.section-header {
  padding: 48px 0 0;
  margin-bottom: 8px;
  animation: fadeUp 0.8s ease both;
}

.section-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 8px;
}

.section-empty {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 60px 0;
  text-align: center;
}

/* ── SITE FOOTER ── */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-copy {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a {
  color: var(--text-dim);
  transition: color 0.15s ease;
  line-height: 0;
}
.footer-links a:hover { color: var(--text); }

/* ── PROJECT CARDS ── */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: fadeUp 0.9s 0.08s ease both;
}

.project-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.project-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.3;
}
.project-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.project-title a:hover { color: var(--accent); }

.project-desc {
  font-size: 0.92rem;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.65;
  margin-bottom: 14px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 3px;
}

.project-links {
  display: flex;
  gap: 12px;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.project-link:hover { color: var(--accent); }

.meta-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.meta-link:hover { color: var(--accent); }

/* ── STATUS BADGES ── */
.status-badge {
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  line-height: 1;
}
.status-badge.status-active { color: var(--good); border-color: var(--good); }
.status-badge.status-wip { color: var(--accent); border-color: var(--accent); }
.status-badge.status-archived { color: var(--text-dim); }
.tool-card .status-badge {
  display: inline-block;
  width: fit-content;
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* ── TOOL CARDS ── */
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: fadeUp 0.9s 0.08s ease both;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  min-height: 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tool-card-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.tool-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
  transition: color 0.15s ease;
}

.tool-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-weight: 300;
}


.tool-card:hover .tool-title { color: var(--accent); }
.tool-card:hover .hub-section-arrow {
  color: var(--accent);
  transform: translateX(4px);
  opacity: 1;
}

/* ── TOOL EMBED ── */
.tool-embed {
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.tool-embed iframe {
  width: 100%;
  height: 600px;
  border: none;
  background: var(--surface);
}

/* ── BACKEND LATENCY SIMULATOR ── */
.latency-tool {
  max-width: none;
  padding-bottom: 88px;
  --blocking-x: 6%;
  --blocking-y: 42%;
  --async-x: 6%;
  --async-y: 34%;
}

.latency-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 6vw, 72px);
  align-items: end;
  padding: 64px 0 34px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--blueprint-rule);
  position: relative;
}

.latency-hero::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 28px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--blueprint-rule) 0 4px, transparent 4px 12px);
  opacity: 0.55;
}

.latency-hero-copy h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.7rem, 6.5vw, 5.6rem);
  line-height: 0.98;
}

.latency-kicker,
.latency-board-top,
.latency-lane-heading span,
.latency-steps,
.latency-meter,
.latency-summary-item {
  font-family: var(--font-mono);
}

.latency-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.latency-kicker span:first-child {
  color: var(--accent);
}

.latency-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.latency-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--border));
  background:
    linear-gradient(90deg, var(--accent) 7px, transparent 7px) left top / 16px 1px no-repeat,
    linear-gradient(180deg, var(--accent) 7px, transparent 7px) left top / 1px 16px no-repeat,
    color-mix(in srgb, var(--surface) 74%, transparent);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.latency-button svg {
  width: 15px;
  height: 15px;
}

.latency-button-primary,
.latency-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.latency-button:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.latency-button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.latency-board {
  position: relative;
  padding: 26px 0 0;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 1px), var(--blueprint-rule) calc(50% - 1px), transparent 50%),
    radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 1.25px) 0 0 / 16px 16px;
}

.latency-board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px dashed color-mix(in srgb, var(--blueprint-rule) 60%, transparent);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.latency-board-top span:first-child {
  color: var(--accent);
}

.latency-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}

.latency-lane {
  min-width: 0;
  padding: 0 0 26px;
  position: relative;
}

.latency-lane-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.latency-lane-heading span {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.latency-lane-heading h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.latency-flow {
  position: relative;
  min-height: 230px;
  border-top: 1px solid var(--blueprint-rule);
  border-bottom: 1px solid var(--blueprint-rule);
  overflow: hidden;
}

.latency-flow::before,
.latency-flow::after {
  content: '';
  position: absolute;
  inset: 18px auto 18px 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--blueprint-rule), transparent);
}

.latency-flow::after {
  left: auto;
  right: 0;
}

.latency-rail {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 42%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 32%, transparent));
}

.latency-flow-async .latency-rail {
  top: 34%;
  right: 49%;
}

.latency-rail-worker {
  left: 51%;
  right: 6%;
  top: 62% !important;
}

.latency-rail-worker::before {
  content: '';
  position: absolute;
  left: -1px;
  top: -64px;
  width: 1px;
  height: 64px;
  background: linear-gradient(to bottom, var(--accent), color-mix(in srgb, var(--accent) 36%, transparent));
  transform: rotate(28deg);
  transform-origin: bottom;
}

.latency-node {
  --node-size: 72px;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--node-size);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-align: center;
  transform: translate(-50%, -50%);
}

.latency-node::before,
.latency-node::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: var(--accent);
}

.latency-node::before {
  left: -4px;
  top: -4px;
  border-left: 1px solid;
  border-top: 1px solid;
}

.latency-node::after {
  right: -4px;
  bottom: -4px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.latency-node.is-work,
.latency-node.is-queue {
  background: var(--accent-dim);
}

.latency-packet {
  position: absolute;
  left: var(--blocking-x);
  top: var(--blocking-y);
  min-width: 44px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  background: var(--bg);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 8%, transparent);
  transition: left 0.5s ease, top 0.5s ease, opacity 0.2s ease;
  z-index: 4;
}

.latency-packet-async {
  left: var(--async-x);
  top: var(--async-y);
}

.latency-ack {
  position: absolute;
  left: 27%;
  top: 16%;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--good) 60%, var(--border));
  color: var(--good);
  background: color-mix(in srgb, var(--good) 9%, var(--bg));
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.latency-tool.is-ack-visible .latency-ack {
  opacity: 1;
  transform: translateY(0);
}

.latency-steps {
  list-style: none;
  margin: 18px 0 0;
  display: grid;
  gap: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.latency-steps li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--blueprint-rule) 64%, transparent);
  color: var(--text-dim);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.latency-steps li::before {
  content: '';
  width: 7px;
  height: 7px;
  border: 1px solid var(--blueprint-rule);
  grid-column: 1;
  grid-row: 1;
}

.latency-steps li span {
  grid-column: 2;
}

.latency-steps li b {
  grid-column: 3;
  font-weight: 400;
  color: var(--text-mid);
}

.latency-steps li.is-active,
.latency-steps li.is-complete {
  color: var(--text);
  border-color: var(--accent);
}

.latency-steps li.is-active::before,
.latency-steps li.is-complete::before {
  background: var(--accent);
  border-color: var(--accent);
}

.latency-meter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--blueprint-rule);
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.latency-meter strong {
  color: var(--text);
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.latency-meter-wait strong {
  color: var(--bad);
}

.latency-meter-fast strong {
  color: var(--good);
}

.latency-summary {
  display: grid;
  grid-template-columns: 0.62fr minmax(0, 1fr) minmax(0, 1.45fr);
  gap: 1px;
  margin-top: 26px;
  border-top: 1px solid var(--blueprint-rule);
  border-bottom: 1px solid var(--blueprint-rule);
  background: var(--blueprint-rule);
}

.latency-summary-item {
  min-width: 0;
  padding: 16px 18px;
  background:
    radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 1.25px) 0 0 / 14px 14px,
    var(--bg);
}

.latency-summary-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.latency-summary-item strong {
  color: var(--text);
  font-size: clamp(1rem, 2.1vw, 1.28rem);
  font-weight: 400;
  line-height: 1.25;
}

.latency-summary-item:first-child strong {
  color: var(--accent);
}

.latency-tool.is-running .latency-packet {
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--accent) 8%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 38%, transparent);
}

.latency-tool.is-complete .latency-summary {
  border-color: var(--accent);
}

@media (max-width: 940px) {
  .latency-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .latency-controls {
    justify-content: flex-start;
  }
  .latency-board {
    background: radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 1.25px) 0 0 / 16px 16px;
  }
  .latency-lanes,
  .latency-summary {
    grid-template-columns: 1fr;
  }
  .latency-flow {
    min-height: 210px;
  }
}

@media (max-width: 560px) {
  .latency-hero {
    padding-top: 46px;
  }
  .latency-controls,
  .latency-button {
    width: 100%;
  }
  .latency-button {
    min-height: 44px;
  }
  .latency-board-top,
  .latency-lane-heading,
  .latency-meter {
    align-items: flex-start;
    flex-direction: column;
  }
  .latency-flow {
    min-height: 260px;
  }
  .latency-node {
    --node-size: 64px;
    font-size: 9px;
  }
  .latency-packet {
    min-width: 38px;
    height: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .latency-packet,
  .latency-ack,
  .latency-button {
    transition: none;
  }
}

/* ── NOTE LIST ── */
.note-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: fadeUp 0.9s 0.08s ease both;
}

.note-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.note-date {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  flex-shrink: 0;
  min-width: 50px;
}

.note-title {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  transition: color 0.15s ease;
  flex: 1;
}

.note-row:hover .note-title { color: var(--accent); }

.note-tags {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.note-tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 2px;
}

.note-article > header {
  padding: 48px 0 36px;
  margin-bottom: 36px;
}

/* ── RESPONSIVE: HUB + NEW SECTIONS (MOBILE) ── */
@media (max-width: 600px) {
  .hub { padding: 34px 0 40px; }
  .hub::before,
  .hub-blueprint,
  .profile-label-side {
    display: none;
  }
  .hub-hero {
    padding-bottom: 34px;
  }
  .hub-profile {
    width: min(72vw, 220px);
  }
  .hub-hero-copy h1 {
    font-size: clamp(2.45rem, 16vw, 3.7rem);
  }
  .hub-intro {
    font-size: 0.82rem;
    line-height: 1.75;
  }
  .hero-annotation {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .hub-action {
    min-width: 0;
    flex: 1 1 148px;
  }
  .hub-meta-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .hub-meta-line span + span::before {
    content: '>';
  }
  .hub-parcours,
  .hub-side {
    padding-top: 24px;
  }
  .parcours-roadmap {
    gap: 24px;
  }
  .parcours-roadmap::before {
    left: 8px;
  }
  .parcours-item {
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 18px;
  }
  .parcours-date {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    margin-bottom: 4px;
  }
  .parcours-node {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 5px 0 0 1px;
  }
  .parcours-content {
    grid-column: 2;
  }
  .parcours-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .parcours-item.is-highlighted .parcours-line {
    grid-template-columns: 1fr;
  }
  .parcours-item.is-highlighted .parcours-line h3,
  .parcours-item.is-highlighted .parcours-date-inline {
    grid-column: 1;
    grid-row: auto;
  }
  .parcours-date-inline {
    margin-left: 0;
  }
  .parcours-item.is-highlighted .parcours-date-inline {
    justify-self: start;
  }
  .hub-section {
    grid-template-columns: 28px minmax(0, 1fr) 18px;
  }
  .hub-section-count {
    display: none;
  }
  .hub-latest-title { font-size: 1.55rem; }
  .section-header { padding: 32px 0 0; }
  .site-footer { flex-direction: column; gap: 12px; align-items: flex-start; }
  .note-row { flex-wrap: wrap; gap: 4px 12px; }
  .note-tags { width: 100%; }
}

/* ── POST CARD SHARE ── */
.post-card { position: relative; }
.post-card-share {
  position: absolute;
  right: 0;
  bottom: 28px;
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.post-card:hover .post-card-share {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.post-card-share a,
.post-card-copy {
  color: var(--text-dim);
  transition: color 0.15s ease;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  line-height: 0;
}
.post-card-share a:hover,
.post-card-copy:hover {
  color: var(--accent);
}
.post-card-copy.copied {
  color: var(--good);
}

@media (max-width: 600px) {
  .post-card-share {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin-top: 14px;
  }
}
