:root {
  --ink: #0c2439;
  --ink-soft: #33516a;
  --muted: #6d8090;
  --paper: #fcf8ef;
  --paper-deep: #f5ecdc;
  --surface: rgba(255, 251, 244, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --line: rgba(12, 36, 57, 0.12);
  --line-strong: rgba(12, 36, 57, 0.22);
  --night: #071522;
  --night-2: #0f2e46;
  --cyan: #20c1cf;
  --cyan-deep: #0d889a;
  --amber: #de9b2b;
  --amber-soft: #f4c974;
  --rose: #d46c58;
  --green: #58794c;
  --shadow-lg: 0 28px 90px rgba(7, 21, 34, 0.14);
  --shadow-md: 0 18px 48px rgba(7, 21, 34, 0.1);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(222, 155, 43, 0.18), transparent 26rem),
    radial-gradient(circle at 86% 6%, rgba(32, 193, 207, 0.2), transparent 24rem),
    linear-gradient(135deg, #fffaf1 0%, #f7efe1 48%, #edf7f8 100%);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(12, 36, 57, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 36, 57, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.2));
  z-index: -1;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-shell {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 70px;
}

.site-nav {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #e7f8ff;
  background:
    radial-gradient(circle at 10% 10%, rgba(32, 193, 207, 0.18), transparent 12rem),
    linear-gradient(135deg, rgba(7, 21, 34, 0.94), rgba(15, 46, 70, 0.96));
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32, 193, 207, 0.52);
  border-radius: 16px;
  background: rgba(32, 193, 207, 0.12);
  box-shadow: 0 0 30px rgba(32, 193, 207, 0.2);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-copy {
  min-width: 0;
}

.brand-copy small {
  display: block;
  color: rgba(231, 248, 255, 0.7);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.25;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(231, 248, 255, 0.82);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-links a:hover,
.nav-links a.is-current {
  color: #fff;
  background: rgba(32, 193, 207, 0.14);
  transform: translateY(-1px);
}

.page-grid {
  display: grid;
  gap: 26px;
}

.hero-panel,
.panel,
.index-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 28px;
  padding: clamp(28px, 5vw, 56px);
  min-height: 650px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 20px 0 0;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button-primary {
  color: #062035;
  background: linear-gradient(135deg, var(--amber-soft), var(--amber));
  box-shadow: 0 12px 26px rgba(222, 155, 43, 0.22);
}

.button-secondary {
  color: var(--ink);
  border: 1px solid rgba(12, 36, 57, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.button-primary:hover,
.button-secondary:hover {
  transform: translateY(-2px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.hero-metrics article {
  padding: 16px 18px;
  border: 1px solid rgba(12, 36, 57, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.hero-metrics strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.hero-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

.hero-art {
  position: relative;
  min-height: 100%;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 38%, rgba(32, 193, 207, 0.26), transparent 9rem),
    linear-gradient(180deg, #0d2131 0%, #12334a 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.1), transparent 20%),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  opacity: 0.85;
}

/* ── Hero Art: blog-desk cards ─────────────────────────── */
.blog-desk {
  position: absolute;
  inset: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  z-index: 1;
}

.blog-panel {
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  color: #e8f7ff;
}

.blog-panel.is-main {
  background: rgba(32, 193, 207, 0.1);
  border-color: rgba(32, 193, 207, 0.24);
  box-shadow: 0 8px 32px rgba(32, 193, 207, 0.08);
}

.blog-panel > span,
.blog-mini-card > span {
  display: block;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(32, 193, 207, 0.85);
  margin-bottom: 7px;
}

.blog-panel > strong,
.blog-mini-card > strong {
  display: block;
  font-size: 17px;
  line-height: 1.28;
  color: #f0faff;
  margin-bottom: 6px;
}

.blog-panel > p,
.blog-mini-card > p {
  margin: 0;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(200, 230, 245, 0.78);
}

.blog-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.blog-mini-card {
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  color: #e8f7ff;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.blog-mini-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.blog-mini-card > span {
  color: rgba(244, 201, 116, 0.9);
  margin-bottom: 5px;
}

.blog-mini-card > strong {
  font-size: 13px;
  margin-bottom: 4px;
}

.blog-mini-card > p {
  font-size: 11px;
}

.blog-rhythm {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 4px;
}

.blog-rhythm span {
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(231, 248, 255, 0.5);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
  letter-spacing: 0.04em;
}

.orb-shell {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.orb-core {
  position: relative;
  width: clamp(260px, 34vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 32%, rgba(255, 255, 255, 0.32), transparent 18%),
    radial-gradient(circle at 52% 54%, rgba(32, 193, 207, 0.4), transparent 45%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 22px 80px rgba(3, 13, 20, 0.5);
}

.orb-core::before,
.orb-core::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.orb-core::after {
  inset: 4%;
  transform: rotate(-24deg);
  border-color: rgba(32, 193, 207, 0.38);
}

.orb-ring {
  position: absolute;
  inset: -10% -15%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.orb-ring.is-2 {
  inset: 8% -18%;
  transform: rotate(22deg);
  border-color: rgba(222, 155, 43, 0.22);
}

.orb-node {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--amber-soft);
  box-shadow: 0 0 0 7px rgba(244, 201, 116, 0.1);
}

.orb-node.node-1 {
  top: 18%;
  left: 19%;
}

.orb-node.node-2 {
  right: 17%;
  top: 34%;
  background: var(--cyan);
  box-shadow: 0 0 0 7px rgba(32, 193, 207, 0.12);
}

.orb-node.node-3 {
  left: 34%;
  bottom: 14%;
}

.art-chip,
.signal-strip,
.side-card {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: #f2fbff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.art-chip {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.45;
}

.art-chip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.art-chip.is-a {
  top: 28px;
  right: 24px;
  width: 180px;
}

.art-chip.is-b {
  left: 24px;
  bottom: 34px;
  width: 178px;
}

.signal-strip {
  right: 28px;
  bottom: 28px;
  width: 220px;
  padding: 14px 16px;
}

.signal-strip strong {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}

.signal-row {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 56px;
}

.signal-row span {
  flex: 1;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(244, 201, 116, 0.92), rgba(32, 193, 207, 0.28));
}

.signal-row span:nth-child(1) { height: 28%; }
.signal-row span:nth-child(2) { height: 65%; }
.signal-row span:nth-child(3) { height: 40%; }
.signal-row span:nth-child(4) { height: 88%; }
.signal-row span:nth-child(5) { height: 55%; }
.signal-row span:nth-child(6) { height: 72%; }
.signal-row span:nth-child(7) { height: 34%; }

.side-card {
  left: 26px;
  top: 24px;
  width: 165px;
  padding: 14px;
}

.side-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.side-card ul {
  margin: 0;
  padding-left: 16px;
  color: rgba(242, 251, 255, 0.82);
  font-size: 12px;
  line-height: 1.6;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head p,
.section-head span {
  margin: 0;
  color: var(--muted);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.section-head a {
  color: var(--cyan-deep);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.panel {
  padding: clamp(24px, 4vw, 34px);
}

.note-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
}

.module-grid,
.video-module-grid,
.template-grid {
  display: grid;
  gap: 16px;
}

.module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-card,
.video-card,
.template-card,
.module-bridge-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(12, 36, 57, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
}

.module-card h3,
.video-card h3,
.template-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.module-card p,
.module-card li,
.video-card p,
.video-card li,
.template-card p,
.module-bridge-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.module-card ul,
.video-card ul {
  margin: 0;
  padding-left: 18px;
}

.module-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.module-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border-radius: 999px;
  color: #0a2639;
  background: rgba(88, 121, 76, 0.16);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.module-status.is-draft {
  background: rgba(222, 155, 43, 0.18);
}

.module-status.is-upcoming {
  background: rgba(212, 108, 88, 0.18);
}

.module-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.module-stack span {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(12, 36, 57, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.module-cta {
  display: inline-flex;
  align-items: center;
  color: var(--cyan-deep);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.module-card.is-video {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at 80% 18%, rgba(212, 108, 88, 0.14), transparent 24%);
}

.note-feature {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(12, 36, 57, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
}

.note-feature-media {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(12, 36, 57, 0.08);
  background: linear-gradient(135deg, #fffef9, #eff7f7);
}

.note-feature-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.note-feature h3,
.note-card h3,
.project-card h3,
.roadmap-card h3,
.about-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.eyeline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-deep);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.eyeline::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 6px rgba(32, 193, 207, 0.12);
}

.note-copy {
  color: var(--ink-soft);
  font-size: 16px;
}

.formula-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.formula-line span {
  padding: 10px 12px;
  border: 1px solid rgba(12, 36, 57, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 13px;
}

.note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-deep);
  font-weight: 700;
}

.mini-list {
  display: grid;
  gap: 16px;
}

.note-card,
.project-card,
.about-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(12, 36, 57, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
}

.note-card p,
.project-card p,
.about-card p,
.roadmap-card p,
.note-feature ul,
.note-card ul,
.project-card ul {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.note-card ul,
.note-feature ul,
.project-card ul,
.about-card ul {
  padding-left: 18px;
}

.tag-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.tag-row span,
.chip-row span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(12, 36, 57, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.note-card.featured-pll {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at 20% 20%, rgba(32, 193, 207, 0.08), transparent 30%);
}

.pll-art {
  min-height: 148px;
  border-radius: 18px;
  border: 1px solid rgba(12, 36, 57, 0.08);
  background:
    radial-gradient(circle at 18% 58%, rgba(32, 193, 207, 0.18), transparent 20%),
    linear-gradient(180deg, rgba(12, 36, 57, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 36, 57, 0.03) 1px, transparent 1px),
    linear-gradient(135deg, #fffdf8 0%, #eef6f3 100%);
  background-size: auto, 24px 24px, 24px 24px, auto;
  position: relative;
  overflow: hidden;
}

.pll-art::before,
.pll-art::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.pll-art::before {
  top: 42%;
  transform: rotate(-9deg);
}

.pll-art::after {
  top: 60%;
  transform: rotate(7deg);
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}

.projects-grid,
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  min-height: 220px;
}

.project-card strong,
.roadmap-card strong {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  color: var(--cyan-deep);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.roadmap-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px 18px 20px;
  border: 1px solid rgba(12, 36, 57, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
}

.roadmap-card b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #062035;
  background: linear-gradient(135deg, var(--amber-soft), var(--amber));
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.about-grid {
  align-items: start;
}

.about-card.is-dark {
  color: #eff8fb;
  background:
    radial-gradient(circle at 12% 16%, rgba(32, 193, 207, 0.18), transparent 16rem),
    linear-gradient(135deg, var(--night) 0%, var(--night-2) 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

.about-card.is-dark p,
.about-card.is-dark li {
  color: rgba(239, 248, 251, 0.82);
}

.footer-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  padding: 0 4px;
  color: var(--muted);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.footer-panel nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--cyan-deep);
  font-weight: 700;
}

.index-panel {
  padding: clamp(24px, 4vw, 34px);
}

.index-header {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: stretch;
}

.index-copy h1 {
  margin: 8px 0 0;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.index-copy p {
  margin: 18px 0 0;
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: 17px;
}

.index-feature {
  padding: 18px;
  border: 1px solid rgba(12, 36, 57, 0.08);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 247, 247, 0.86));
}

.index-feature img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(12, 36, 57, 0.08);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 18px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.filter-bar button {
  padding: 10px 14px;
  border: 1px solid rgba(12, 36, 57, 0.1);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.filter-bar button:hover,
.filter-bar button.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-deep), var(--cyan));
  transform: translateY(-1px);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.catalog-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(12, 36, 57, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.catalog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.catalog-card.is-hidden {
  display: none;
}

.catalog-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(12, 36, 57, 0.08);
  background: linear-gradient(135deg, #fffdf8 0%, #eef6f3 100%);
}

.catalog-art {
  position: relative;
  min-height: 196px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(12, 36, 57, 0.08);
  background:
    radial-gradient(circle at 24% 18%, rgba(32, 193, 207, 0.16), transparent 24%),
    linear-gradient(rgba(12, 36, 57, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 36, 57, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, #fffdf8 0%, #edf7f7 100%);
  background-size: auto, 24px 24px, 24px 24px, auto;
}

.catalog-art::before,
.catalog-art::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  border-radius: 999px;
}

.catalog-art::before {
  top: 48%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: rotate(-6deg);
}

.catalog-art::after {
  top: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  transform: rotate(5deg);
}

.catalog-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.catalog-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.catalog-status.is-draft::before {
  background: var(--amber);
}

.catalog-status.is-upcoming::before {
  background: var(--rose);
}

.catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: var(--muted);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.catalog-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.catalog-card p,
.catalog-card li {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.catalog-card ul {
  margin: 0;
  padding-left: 18px;
}

.catalog-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
}

.catalog-footer .text-link {
  font-size: 14px;
}

.catalog-section-note {
  margin-top: 18px;
  color: var(--muted);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.module-bridge {
  margin-top: 22px;
}

.module-bridge-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at 85% 18%, rgba(32, 193, 207, 0.14), transparent 28%);
}

.video-feature,
.template-panel {
  padding: 18px;
  border: 1px solid rgba(12, 36, 57, 0.08);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 247, 247, 0.86));
}

.video-frame {
  padding: 16px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 24%, rgba(222, 155, 43, 0.18), transparent 20rem),
    linear-gradient(160deg, #102436 0%, #173c54 100%);
}

.video-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 250px;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, rgba(32, 193, 207, 0.22), transparent 10rem),
    linear-gradient(160deg, #081420 0%, #112d42 100%);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.play-dot {
  position: relative;
  width: 76px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 18px 46px rgba(7, 21, 34, 0.45);
}

.play-dot::before {
  content: "";
  position: absolute;
  transform: translate(29px, 20px);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid rgba(255, 255, 255, 0.92);
}

.video-bars {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: flex;
  gap: 8px;
  align-items: end;
  height: 56px;
}

.video-bars span {
  flex: 1;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(244, 201, 116, 0.96), rgba(32, 193, 207, 0.3));
}

.video-bars span:nth-child(1) { height: 28%; }
.video-bars span:nth-child(2) { height: 62%; }
.video-bars span:nth-child(3) { height: 44%; }
.video-bars span:nth-child(4) { height: 84%; }
.video-bars span:nth-child(5) { height: 58%; }

.template-panel {
  margin-top: 22px;
}

.template-card strong {
  color: var(--cyan-deep);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.video-card.compact {
  min-height: 100%;
}

@media (max-width: 1120px) {
  .hero-panel,
  .module-grid,
  .index-header,
  .note-grid,
  .video-module-grid,
  .template-grid,
  .projects-grid,
  .about-grid,
  .roadmap-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 480px;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100%, calc(100% - 24px));
    padding-top: 12px;
  }

  .site-nav {
    position: static;
    border-radius: 26px;
    padding: 16px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-panel,
  .panel,
  .index-panel {
    border-radius: 24px;
    padding: 22px;
  }

  .hero-panel {
    min-height: auto;
  }

  .hero-copy h1,
  .index-copy h1 {
    line-height: 1.08;
  }

  .hero-copy p,
  .index-copy p {
    font-size: 16px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 400px;
  }

  .side-card,
  .art-chip.is-a,
  .signal-strip {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 16px;
  }

  .orb-shell {
    padding: 28px 0;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .module-head {
    flex-direction: column;
    align-items: start;
  }

  .module-bridge-card {
    grid-template-columns: 1fr;
  }

  .note-feature,
  .module-card,
  .video-card,
  .template-card,
  .module-bridge-card,
  .note-card,
  .project-card,
  .about-card,
  .catalog-card {
    padding: 18px;
  }

  .footer-panel {
    padding-bottom: 16px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-panel,
  .panel,
  .index-panel,
  .catalog-card,
  .project-card,
  .note-card {
    animation: rise 0.6s ease both;
  }

  .panel:nth-of-type(2n),
  .catalog-card:nth-of-type(2n) {
    animation-delay: 0.05s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* UI refresh: shared shell, richer card language, calmer typography */
:root {
  --font-ui: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --ink: #102a3f;
  --ink-soft: #435f74;
  --muted: #6b7e8f;
  --paper: #f8f4ea;
  --paper-deep: #eee5d6;
  --surface: rgba(255, 251, 246, 0.74);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(16, 42, 63, 0.1);
  --line-strong: rgba(16, 42, 63, 0.18);
  --night: #071722;
  --night-2: #11324a;
  --cyan: #1ab3b3;
  --cyan-deep: #0f7f8e;
  --amber: #d69a32;
  --amber-soft: #f3cc7d;
  --rose: #cd6d5a;
  --green: #4f835b;
  --shadow-lg: 0 30px 90px rgba(7, 23, 34, 0.12);
  --shadow-md: 0 20px 56px rgba(7, 23, 34, 0.1);
  --shadow-card: 0 14px 34px rgba(7, 23, 34, 0.07);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

body {
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 12% 10%, rgba(214, 154, 50, 0.14), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(26, 179, 179, 0.16), transparent 26rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #fbf7ef 0%, #f5ecdf 46%, #edf7f6 100%);
}

body::before {
  opacity: 0.72;
  background-size: 38px 38px;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.92), transparent 26rem);
  z-index: -1;
}

body.page-note {
  background:
    radial-gradient(circle at 12% 10%, rgba(214, 154, 50, 0.1), transparent 24rem),
    radial-gradient(circle at 86% 6%, rgba(26, 179, 179, 0.12), transparent 22rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #fbf7ef 0%, #f3ebdf 48%, #eef7f6 100%);
}

.site-shell {
  width: min(1380px, calc(100% - 40px));
  padding: 22px 0 84px;
}

.page-grid {
  gap: 30px;
}

.brand-copy strong,
.hero-copy h1,
.section-head h2,
.index-copy h1,
.index-feature h2,
.module-card h3,
.video-card h3,
.template-card h3,
.note-feature h3,
.note-card h3,
.project-card h3,
.roadmap-card h3,
.about-card h3,
.catalog-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
}

.site-nav {
  top: 18px;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 28px;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 23, 35, 0.96), rgba(16, 47, 68, 0.94));
  box-shadow: 0 18px 60px rgba(6, 20, 33, 0.18);
}

.site-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 20%, rgba(26, 179, 179, 0.18), transparent 18rem),
    radial-gradient(circle at 85% -15%, rgba(243, 204, 125, 0.16), transparent 16rem);
}

body.is-scrolled .site-nav {
  box-shadow: 0 22px 72px rgba(6, 20, 33, 0.24);
  transform: translateY(-1px);
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(26, 179, 179, 0.18), rgba(255, 255, 255, 0.04));
}

.brand-copy strong {
  margin-top: 2px;
  font-size: 20px;
}

.nav-links a {
  position: relative;
  padding: 10px 14px;
  border: 1px solid transparent;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 7px;
  height: 1.5px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(4px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-links a:hover,
.nav-links a.is-current {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-links a:hover::after,
.nav-links a.is-current::after {
  opacity: 1;
  transform: none;
}

.hero-panel,
.panel,
.index-panel {
  isolation: isolate;
  animation: none !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.58));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px);
}

.hero-panel::before,
.panel::before,
.index-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 12%, rgba(26, 179, 179, 0.12), transparent 24%),
    radial-gradient(circle at 8% 88%, rgba(214, 154, 50, 0.1), transparent 18%);
}

.hero-panel::after,
.panel::after,
.index-panel::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 42%;
  top: 0;
  height: 1px;
  opacity: 0.8;
  background: linear-gradient(90deg, rgba(26, 179, 179, 0.45), transparent);
}

.hero-panel {
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: clamp(24px, 3vw, 42px);
  min-height: 620px;
}

.hero-copy h1 {
  max-width: 8.9ch;
  font-family: var(--font-ui);
  font-size: clamp(36px, 4.2vw, 64px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.075em;
  text-wrap: balance;
  color: #102234;
}

.hero-copy p {
  max-width: 44ch;
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  margin-top: 30px;
}

.button-primary,
.button-secondary {
  min-height: 52px;
  padding: 0 22px;
  box-shadow: var(--shadow-card);
}

.button-secondary {
  border-color: rgba(16, 42, 63, 0.08);
  background: rgba(255, 255, 255, 0.75);
}

.button-primary:hover,
.button-secondary:hover {
  transform: translateY(-2px) scale(1.01);
}

.hero-metrics article {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 252, 252, 0.64));
  box-shadow: var(--shadow-card);
}

.hero-metrics article::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  width: 60px;
  height: 2px;
  opacity: 0.8;
  background: linear-gradient(90deg, var(--amber), rgba(255, 255, 255, 0));
}

.hero-metrics strong {
  font-family: var(--font-display);
  font-size: 34px;
}

.hero-art {
  min-height: 600px;
  border-radius: 30px;
  background: linear-gradient(155deg, #0c2233 0%, #14364c 58%, #102a3a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 28px 90px rgba(6, 20, 33, 0.2);
}

.hero-art::before {
  inset: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 52%, rgba(26, 179, 179, 0.12), transparent 18rem);
  background-size: auto, 30px 30px, 30px 30px, auto;
}

.orb-core {
  width: clamp(250px, 30vw, 390px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 28px 90px rgba(3, 13, 20, 0.55);
}

.side-card,
.art-chip,
.signal-strip {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.side-card {
  width: 190px;
}

.art-chip.is-a {
  top: 30px;
  right: 26px;
  width: 200px;
}

.art-chip.is-b {
  left: 28px;
  bottom: 32px;
  width: 198px;
}

.signal-strip {
  right: 28px;
  bottom: 28px;
  width: 240px;
}

.eyeline {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.eyeline::before {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 8px rgba(26, 179, 179, 0.1);
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  max-width: 10ch;
  font-size: clamp(30px, 3.1vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-head p,
.section-head span {
  max-width: 60ch;
  font-size: 15px;
  line-height: 1.72;
}

.section-head a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
}

.section-head a::after,
.text-link::after,
.module-cta::after {
  content: "";
  height: 1.5px;
  flex: 1 0 24px;
  border-radius: 999px;
  opacity: 0.45;
  background: linear-gradient(90deg, currentColor, rgba(255, 255, 255, 0));
}

.panel,
.index-panel {
  padding: clamp(26px, 4vw, 38px);
}

.module-grid,
.video-module-grid,
.template-grid,
.projects-grid,
.about-grid,
.roadmap-grid,
.catalog-grid,
.note-grid {
  gap: 18px;
}

.module-card,
.video-card,
.template-card,
.module-bridge-card,
.note-feature,
.note-card,
.project-card,
.about-card,
.roadmap-card,
.catalog-card,
.index-feature,
.video-feature,
.template-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 42, 63, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 252, 252, 0.68));
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.module-card::before,
.video-card::before,
.template-card::before,
.module-bridge-card::before,
.note-feature::before,
.note-card::before,
.project-card::before,
.about-card::before,
.roadmap-card::before,
.catalog-card::before,
.index-feature::before,
.video-feature::before,
.template-panel::before {
  content: "";
  position: absolute;
  left: -10px;
  top: -10px;
  width: 140px;
  height: 140px;
  pointer-events: none;
  background: radial-gradient(circle at 0 0, rgba(26, 179, 179, 0.14), transparent 72%);
}

.module-card,
.video-card,
.template-card,
.note-feature,
.note-card,
.project-card,
.about-card,
.roadmap-card,
.catalog-card,
.index-feature,
.video-feature {
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.module-card:hover,
.video-card:hover,
.template-card:hover,
.note-feature:hover,
.note-card:hover,
.project-card:hover,
.about-card:hover,
.roadmap-card:hover,
.catalog-card:hover,
.index-feature:hover,
.video-feature:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 42, 63, 0.12);
  box-shadow: 0 20px 54px rgba(7, 23, 34, 0.12);
}

.module-card h3,
.video-card h3,
.template-card h3,
.note-feature h3,
.note-card h3,
.project-card h3,
.roadmap-card h3,
.about-card h3,
.catalog-card h3 {
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.module-card p,
.module-card li,
.video-card p,
.video-card li,
.template-card p,
.module-bridge-card p,
.note-card p,
.project-card p,
.about-card p,
.roadmap-card p,
.catalog-card p,
.catalog-card li,
.index-feature p {
  color: var(--ink-soft);
  line-height: 1.78;
}

.formula-line span,
.module-stack span,
.tag-row span,
.chip-row span,
.catalog-meta span,
.note-meta span {
  border-color: rgba(16, 42, 63, 0.07);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.catalog-meta span {
  padding: 6px 10px;
  border-radius: 999px;
}

.module-status,
.catalog-status {
  position: relative;
  z-index: 1;
}

.note-card.featured-pll,
.module-card.is-video,
.module-bridge-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 252, 252, 0.72)),
    radial-gradient(circle at 86% 14%, rgba(214, 154, 50, 0.12), transparent 24%);
}

.breadcrumb {
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(16, 42, 63, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.index-header {
  gap: 28px;
  margin-top: 16px;
}

.index-copy h1 {
  max-width: 8.4ch;
  font-family: var(--font-ui);
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.072em;
  text-wrap: balance;
  color: #143047;
}

.index-copy p {
  max-width: 46ch;
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.82;
}

.index-feature,
.video-feature {
  min-height: 100%;
  display: grid;
  gap: 18px;
  align-content: space-between;
}

.index-feature h2 {
  margin: 4px 0 0;
  font-family: var(--font-ui);
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 800;
  line-height: 1.16;
  color: #163147;
}

.filter-bar {
  width: fit-content;
  max-width: 100%;
  margin: 26px 0 22px;
  padding: 10px;
  border: 1px solid rgba(16, 42, 63, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.filter-bar button {
  border-color: rgba(16, 42, 63, 0.08);
  background: rgba(255, 255, 255, 0.74);
}

.catalog-card:hover {
  transform: translateY(-4px);
}

.catalog-footer {
  gap: 14px;
  align-items: end;
}

.video-frame {
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.template-panel {
  padding: 20px;
}

.project-card,
.about-card,
.roadmap-card {
  min-height: 100%;
}

.footer-panel {
  margin-top: 12px;
  padding: 0 6px;
}

[data-reveal] {
  animation: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
    transition:
      opacity 0.72s ease,
      transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }

  [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 1180px) {
  .hero-panel,
  .index-header,
  .module-grid,
  .video-module-grid,
  .template-grid,
  .projects-grid,
  .about-grid,
  .roadmap-grid,
  .catalog-grid,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
  }

  .hero-copy h1,
  .index-copy h1 {
    max-width: 12ch;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-art {
    min-height: 520px;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100%, calc(100% - 22px));
    padding-top: 12px;
  }

  .site-nav {
    top: 12px;
    padding: 14px;
    border-radius: 24px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .nav-links a {
    white-space: nowrap;
  }

  .hero-panel,
  .panel,
  .index-panel {
    padding: 22px;
    border-radius: 26px;
  }

  .hero-copy h1,
  .index-copy h1 {
    max-width: 100%;
    font-size: clamp(34px, 12vw, 52px);
  }

  .hero-copy p,
  .index-copy p {
    font-size: 16px;
  }

  .button-primary,
  .button-secondary {
    flex: 1 1 100%;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 420px;
  }

  .section-head h2 {
    max-width: none;
  }

  .catalog-footer,
  .module-head,
  .footer-panel {
    align-items: flex-start;
  }

  .footer-panel {
    flex-direction: column;
    gap: 10px;
  }
}

/* Notes book-first library */
.page-notes .notes-landing-header {
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.58fr);
  align-items: center;
}

.page-notes .index-copy h1 {
  max-width: 14ch;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.14;
  letter-spacing: 0;
}

.page-notes .index-copy p {
  max-width: 62ch;
}

.notes-directory-card {
  display: none;
}

.notes-book-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.book-cover-pair {
  display: flex;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.notes-book-hero img {
  width: min(48%, 76px);
  aspect-ratio: 5 / 7;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(7, 23, 34, 0.16);
}

.notes-book-hero h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.18;
}

.notes-book-hero p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.directory-rule {
  display: grid;
  gap: 8px;
  font-family: var(--font-ui);
}

.directory-rule span {
  display: block;
  padding: 9px 11px;
  border: 1px solid rgba(16, 42, 63, 0.08);
  border-radius: 10px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.5;
}

.knowledge-directory,
.book-library,
.book-section {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(16, 42, 63, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.book-library {
  display: grid;
  gap: 18px;
}

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

.directory-heading h2,
.knowledge-section h2,
.book-section h2,
.module-bridge-card h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.16;
  color: #163147;
}

.directory-heading h2 {
  margin-top: 4px;
  font-size: clamp(26px, 2.4vw, 34px);
}

.directory-heading p {
  max-width: 58ch;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.72;
}

.book-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border: 1px solid rgba(16, 42, 63, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 252, 252, 0.64));
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.book-cover-frame {
  display: block;
  width: min(100%, 260px);
  justify-self: center;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(236, 246, 244, 0.78));
  border: 1px solid rgba(16, 42, 63, 0.08);
  box-shadow: 0 18px 42px rgba(7, 23, 34, 0.14);
}

.book-cover-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.book-card-body {
  display: grid;
  gap: 14px;
  align-content: start;
}

.book-card h3 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
}

.book-card p {
  margin: 0;
  max-width: 68ch;
  color: var(--ink-soft);
  line-height: 1.78;
}

.book-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-ui);
}

.book-progress span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(16, 42, 63, 0.08);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.74);
}

.book-progress strong {
  color: var(--ink);
  font-size: 18px;
}

.book-section {
  display: grid;
  gap: 18px;
  scroll-margin-top: 128px;
}

.book-section-head {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.book-section-kicker {
  padding-top: 5px;
  color: var(--cyan-deep);
  text-transform: uppercase;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
}

.book-section h2 {
  font-size: clamp(24px, 2.1vw, 32px);
}

.book-section-head p {
  margin: 7px 0 0;
  max-width: 74ch;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.78;
}

.chapter-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(16, 42, 63, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
}

.chapter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  color: var(--ink);
  border-top: 1px solid rgba(16, 42, 63, 0.08);
  transition: background 0.18s ease, transform 0.18s ease;
}

.chapter-row:first-child {
  border-top: 0;
}

a.chapter-row:hover {
  background: rgba(110, 199, 208, 0.1);
  transform: translateX(3px);
}

.chapter-row span:first-child {
  display: block;
  color: var(--cyan-deep);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.chapter-row strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.22;
}

.chapter-row p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.62;
}

.chapter-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(88, 121, 76, 0.18);
  color: #315f36;
  background: rgba(88, 121, 76, 0.12);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.chapter-state.is-upcoming,
.chapter-row.is-upcoming .chapter-state {
  border-color: rgba(212, 108, 88, 0.2);
  color: #8a3c2c;
  background: rgba(212, 108, 88, 0.12);
}

.chapter-state.is-outline {
  border-color: rgba(16, 42, 63, 0.1);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.62);
}

.chapter-row.is-upcoming {
  color: var(--ink-soft);
}

.book-topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.book-topic-links a {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(16, 42, 63, 0.08);
  border-radius: 999px;
  color: var(--cyan-deep);
  background: rgba(255, 255, 255, 0.66);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
}

.knowledge-block-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.knowledge-block {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 148px;
  padding: 14px;
  border: 1px solid rgba(16, 42, 63, 0.08);
  border-radius: 14px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 252, 252, 0.7));
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.58);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.knowledge-block::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  opacity: 0.74;
  background: linear-gradient(90deg, var(--cyan-deep), rgba(255, 255, 255, 0));
}

.knowledge-block:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 42, 63, 0.14);
  box-shadow: 0 18px 44px rgba(7, 23, 34, 0.11);
}

.knowledge-number,
.knowledge-state,
.knowledge-section-kicker {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-number {
  color: var(--cyan-deep);
}

.knowledge-state {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(88, 121, 76, 0.18);
  border-radius: 999px;
  color: #315f36;
  background: rgba(88, 121, 76, 0.12);
}

.knowledge-state.is-upcoming {
  border-color: rgba(212, 108, 88, 0.2);
  color: #8a3c2c;
  background: rgba(212, 108, 88, 0.12);
}

.knowledge-block strong {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.18;
}

.knowledge-block p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.62;
}

.knowledge-sections {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.knowledge-section {
  display: grid;
  gap: 16px;
  scroll-margin-top: 128px;
  padding: 18px;
  border: 1px solid rgba(16, 42, 63, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
}

.knowledge-section-head {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.knowledge-section-kicker {
  padding-top: 5px;
  color: var(--cyan-deep);
  text-transform: uppercase;
}

.knowledge-section h2 {
  font-size: clamp(24px, 2.1vw, 32px);
}

.knowledge-section p {
  margin: 7px 0 0;
  max-width: 74ch;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.78;
}

.knowledge-section .catalog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.knowledge-section .catalog-grid--single {
  grid-template-columns: 1fr;
}

.catalog-card--feature {
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  align-items: stretch;
}

.catalog-card--feature img {
  height: 100%;
  min-height: 260px;
}

.catalog-card-body {
  display: grid;
  gap: 14px;
  align-content: start;
}

.page-notes .module-bridge {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .page-notes .notes-landing-header,
  .book-card,
  .knowledge-section .catalog-grid,
  .catalog-card--feature {
    grid-template-columns: 1fr;
  }

  .book-cover-frame {
    justify-self: start;
  }

  .knowledge-block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-card--feature img {
    min-height: 220px;
  }
}

@media (max-width: 760px) {
  .page-notes .index-copy h1 {
    max-width: 100%;
    font-size: clamp(32px, 10vw, 42px);
  }

  .notes-book-hero {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
  }

  .directory-heading,
  .book-section-head,
  .knowledge-section-head,
  .knowledge-block-grid {
    grid-template-columns: 1fr;
  }

  .directory-heading {
    display: grid;
    align-items: start;
  }

  .knowledge-directory,
  .book-library,
  .book-section,
  .book-card,
  .knowledge-section {
    padding: 14px;
    border-radius: 16px;
  }

  .book-card h3 {
    max-width: 100%;
  }

  .chapter-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .chapter-state {
    justify-self: start;
  }

  .knowledge-block {
    min-height: auto;
  }

  .catalog-card--feature img {
    min-height: 190px;
  }
}

/* ─────────────────────────────────────────────────────────────
 * GitHub Projects + Stars: distinct visual tier
 * Projects = dark "repo terminal" feature cards (stand out from
 * the cream paper notes/modules around them).
 * Stars   = compact secondary-tier reference shelf (browseable,
 * not featured).
 * ──────────────────────────────────────────────────────────── */

/* Shared: GitHub-style language dot palette. data-lang attribute
   is added to .repo-topline span. Falls back to cyan. */
[data-lang] {
  --lang-color: #6ec7d0;
}
[data-lang="Python"]     { --lang-color: #3572A5; }
[data-lang="JavaScript"] { --lang-color: #f1e05a; }
[data-lang="TypeScript"] { --lang-color: #3178c6; }
[data-lang="Rust"]       { --lang-color: #dea584; }
[data-lang="Go"]         { --lang-color: #00ADD8; }
[data-lang="C#"]         { --lang-color: #178600; }
[data-lang="C++"]        { --lang-color: #f34b7d; }
[data-lang="TeX"]        { --lang-color: #3D6117; }
[data-lang="Shell"]      { --lang-color: #89e051; }
[data-lang="HTML"]       { --lang-color: #e34c26; }
[data-lang="Guide"]      { --lang-color: #8b5cf6; }
[data-lang="Skill"]      { --lang-color: #6ec7d0; }

/* ── Projects: dark repo cards ─────────────────────────────── */

.projects-grid--repos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* Higher specificity (.project-card.repo-card) so we beat the
   generic .project-card cream-paper rules from the UI-refresh layer
   in BOTH light and dark mode. */
.project-card.repo-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 26px 26px 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, #0e2032 0%, #0a1622 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e8f0f6;
  box-shadow:
    0 18px 48px rgba(7, 21, 34, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 0;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* Top accent strip — GitHub green → cyan */
.project-card.repo-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: auto;
  height: 3px;
  background: linear-gradient(90deg, #2ea043 0%, #6ec7d0 55%, rgba(110, 199, 208, 0) 100%);
  opacity: 0.85;
  pointer-events: none;
}

.project-card.repo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 199, 208, 0.3);
  box-shadow:
    0 28px 64px rgba(7, 21, 34, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Repo topline: mono path + language pill */
.repo-card .repo-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.repo-card .repo-topline strong {
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, "Microsoft YaHei Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  color: #c9d4df;
  letter-spacing: 0;
}

.repo-card .repo-topline span[data-lang] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-ui);
  font-size: 12px;
  color: #b8c5d2;
}

.repo-card .repo-topline span[data-lang]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lang-color);
  flex: none;
}

.project-card.repo-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  color: #f1f6fb;
  letter-spacing: -0.02em;
}

.project-card.repo-card p {
  margin: 0 0 18px;
  color: rgba(232, 240, 246, 0.78);
  font-size: 15px;
  line-height: 1.78;
}

/* Repo meta row: icons + values, no chip pills (overrides the
   generic chip styling from the UI-refresh layer). */
.project-card.repo-card .repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 16px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: #9aacbb;
}

.project-card.repo-card .repo-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  box-shadow: none;
  color: #9aacbb;
}

.project-card.repo-card .repo-meta span::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.85;
}

/* Octicons (license / star / fork / clock), inlined as data URIs.
   Order in markup is consistent: License, Stars, Forks, Updated. */
.project-card.repo-card .repo-meta span:nth-child(1)::before {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239aacbb'%3E%3Cpath d='M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04a3.516 3.516 0 0 1-.685.45A4.492 4.492 0 0 1 13 11c-.88 0-1.556-.22-2.023-.454a3.515 3.515 0 0 1-.685-.45l-.045-.04-.016-.015-.006-.006-.002-.002-.001-.002.529-.531-.53.53a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04a3.517 3.517 0 0 1-.685.45A4.492 4.492 0 0 1 3 11c-.88 0-1.556-.22-2.023-.454a3.512 3.512 0 0 1-.685-.45l-.045-.04-.016-.015-.006-.006-.002-.002-.001-.002.529-.531-.53.53a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z'/%3E%3C/svg%3E");
}

.project-card.repo-card .repo-meta span:nth-child(2)::before {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e3b341'%3E%3Cpath d='M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z'/%3E%3C/svg%3E");
  opacity: 1;
}

.project-card.repo-card .repo-meta span:nth-child(3)::before {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239aacbb'%3E%3Cpath d='M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z'/%3E%3C/svg%3E");
}

.project-card.repo-card .repo-meta span:nth-child(4)::before {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239aacbb'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm7-3.25v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5a.75.75 0 0 1 1.5 0Z'/%3E%3C/svg%3E");
}

/* Topic pills inside the dark card */
.project-card.repo-card .module-stack {
  margin-bottom: 18px;
}

.project-card.repo-card .module-stack span {
  padding: 5px 11px;
  background: rgba(110, 199, 208, 0.1);
  border: 1px solid rgba(110, 199, 208, 0.18);
  color: #a3d4d9;
  box-shadow: none;
  font-size: 11.5px;
}

/* CTA: chip-shaped pill with arrow that slides on hover */
.project-card.repo-card .text-link {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f6fb;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

/* Override the gradient-underline ::after from the UI-refresh layer
   (which would otherwise add a stretched gradient line after the link). */
.project-card.repo-card .text-link::after {
  content: "→";
  width: auto;
  height: auto;
  flex: none;
  background: none;
  border-radius: 0;
  opacity: 1;
  margin-left: 2px;
  color: inherit;
  font-family: var(--font-ui);
  transition: transform 0.18s ease;
}

.project-card.repo-card .text-link:hover {
  background: rgba(110, 199, 208, 0.16);
  border-color: rgba(110, 199, 208, 0.32);
}

.project-card.repo-card .text-link:hover::after {
  transform: translateX(3px);
}

/* ── Favorites: compact reference shelf ────────────────────── */

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

.favorite-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(16, 42, 63, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.favorite-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 42, 63, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 12px 28px rgba(7, 21, 34, 0.08);
}

.favorite-card .repo-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.favorite-card .repo-topline strong {
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.favorite-card .repo-topline span[data-lang] {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

.favorite-card .repo-topline span[data-lang]::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lang-color);
  flex: none;
}

.favorite-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.favorite-card p {
  margin: 0;
  flex: 1;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.62;
}

/* Arrow link in the bottom corner — replaces the gradient
   underline that the UI-refresh layer adds to .text-link. */
.favorite-card .text-link {
  margin-top: 2px;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--cyan-deep);
}

.favorite-card .text-link::after {
  content: "→";
  width: auto;
  height: auto;
  flex: none;
  background: none;
  border-radius: 0;
  opacity: 1;
  margin-left: 2px;
  color: inherit;
  font-family: var(--font-ui);
  transition: transform 0.18s ease;
}

.favorite-card:hover .text-link::after {
  transform: translateX(3px);
}

@media (max-width: 1180px) {
  .projects-grid--repos {
    grid-template-columns: 1fr;
  }

  .favorites-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .project-card.repo-card {
    padding: 22px 20px 20px;
  }

  .project-card.repo-card h3 {
    font-size: 22px;
  }

  .project-card.repo-card .repo-meta {
    gap: 8px 14px;
  }
}

/* ─────────────────────────────────────────────────────────────
 * Accessibility: focus rings, anchor offsets, reduced motion
 * Applies to both light and dark modes.
 * ──────────────────────────────────────────────────────────── */

/* Sticky-nav-aware anchor offset for in-page jumps (#projects, etc.) */
:where(section[id], article[id], main [id]) {
  scroll-margin-top: 110px;
}

/* Visible keyboard focus for all interactive elements.
   `:focus-visible` only triggers on keyboard tabbing — mouse clicks stay clean. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
.nav-links a:focus-visible,
.button-primary:focus-visible,
.button-secondary:focus-visible,
.book-topic-links a:focus-visible,
.module-cta:focus-visible,
.text-link:focus-visible,
.filter-bar button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Pill-shaped controls deserve a pill-shaped ring */
.nav-links a:focus-visible,
.button-primary:focus-visible,
.button-secondary:focus-visible,
.filter-bar button:focus-visible {
  border-radius: 999px;
  outline-offset: 4px;
}

/* Whole cards become clickable via their inner link — give them a subtle ring too */
.module-card:has(a:focus-visible),
.note-card:has(a:focus-visible),
.project-card:has(a:focus-visible),
.catalog-card:has(a:focus-visible),
.book-card:has(a:focus-visible),
.knowledge-block:has(a:focus-visible) {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* Honour reduced-motion across the board: kill hover lifts, scroll smoothing,
   reveal animations. Above we already gate some animations behind
   `prefers-reduced-motion: no-preference`; this catches the rest. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .module-card:hover,
  .video-card:hover,
  .template-card:hover,
  .note-feature:hover,
  .note-card:hover,
  .project-card:hover,
  .about-card:hover,
  .roadmap-card:hover,
  .catalog-card:hover,
  .index-feature:hover,
  .video-feature:hover,
  .book-card:hover,
  .chapter-row:hover,
  .knowledge-block:hover,
  .button-primary:hover,
  .button-secondary:hover,
  .blog-mini-card:hover,
  .filter-bar button:hover,
  body.is-scrolled .site-nav,
  .nav-links a:hover {
    transform: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────
 * Dark mode
 * Triggered by OS preference. To force light/dark manually later,
 * mirror these rules under `:root[data-theme="dark"]`.
 * ──────────────────────────────────────────────────────────── */

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

    /* Text */
    --ink: #e8eef5;
    --ink-soft: #b6c3d1;
    --muted: #8a9aa9;

    /* Paper / surfaces */
    --paper: #0a1622;
    --paper-deep: #0e1f2f;
    --surface: rgba(20, 32, 46, 0.72);
    --surface-strong: rgba(28, 42, 58, 0.88);

    /* Lines / dividers */
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);

    /* Night accents stay dark but lift slightly so navbar still has contrast against page bg */
    --night: #05111c;
    --night-2: #0a2236;

    /* Accent colors — brightened a touch for AA on dark surfaces */
    --cyan: #4dd6dc;
    --cyan-deep: #6ec7d0;
    --amber: #f0b85a;
    --amber-soft: #f6d28b;
    --rose: #e08c7a;
    --green: #8aaf86;

    /* Shadows: more depth on dark, no gold cast */
    --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.55);
    --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 14px 34px rgba(0, 0, 0, 0.4);
  }

  /* Body: replace warm paper gradient with a calm deep-night gradient */
  body {
    background:
      radial-gradient(circle at 12% 10%, rgba(240, 184, 90, 0.08), transparent 28rem),
      radial-gradient(circle at 88% 8%, rgba(77, 214, 220, 0.1), transparent 26rem),
      linear-gradient(180deg, #07131e 0%, #0a1c2c 50%, #061320 100%);
  }

  /* Page-note pages override body bg too — mirror it */
  body.page-note {
    background:
      radial-gradient(circle at 12% 10%, rgba(240, 184, 90, 0.06), transparent 24rem),
      radial-gradient(circle at 86% 6%, rgba(77, 214, 220, 0.08), transparent 22rem),
      linear-gradient(180deg, #07131e 0%, #0a1c2c 50%, #061320 100%);
  }

  /* The faint grid overlay needs a lighter line to be visible on dark */
  body::before {
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    opacity: 0.5;
  }

  /* The white "sun" radial at top of page from the UI-refresh layer — dim it */
  body::after {
    background: radial-gradient(circle at 50% -10%, rgba(77, 214, 220, 0.05), transparent 26rem);
  }

  /* Sticky navbar: it's already dark, just deepen its contrast a touch and adjust glow */
  .site-nav {
    background: linear-gradient(135deg, rgba(4, 14, 22, 0.96), rgba(10, 30, 46, 0.94));
    border-color: rgba(255, 255, 255, 0.06);
  }

  /* Panels: the UI-refresh layer hardcodes a white-ish gradient — flip to translucent night */
  .hero-panel,
  .panel,
  .index-panel {
    background: linear-gradient(180deg, rgba(20, 34, 48, 0.78), rgba(14, 26, 38, 0.62));
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  /* Card surfaces (module/note/project/catalog/etc.) */
  .module-card,
  .video-card,
  .template-card,
  .module-bridge-card,
  .note-feature,
  .note-card,
  .project-card,
  .about-card,
  .roadmap-card,
  .catalog-card,
  .index-feature,
  .video-feature,
  .template-panel {
    background: linear-gradient(180deg, rgba(22, 36, 52, 0.86), rgba(16, 28, 42, 0.7));
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .module-card:hover,
  .video-card:hover,
  .template-card:hover,
  .note-feature:hover,
  .note-card:hover,
  .project-card:hover,
  .about-card:hover,
  .roadmap-card:hover,
  .catalog-card:hover,
  .index-feature:hover,
  .video-feature:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.5);
  }

  /* Featured variants in the UI-refresh layer also hardcode whites */
  .note-card.featured-pll,
  .module-card.is-video,
  .module-bridge-card {
    background:
      linear-gradient(180deg, rgba(22, 36, 52, 0.92), rgba(16, 28, 42, 0.74)),
      radial-gradient(circle at 86% 14%, rgba(240, 184, 90, 0.08), transparent 24%);
  }

  /* Hero headings — light text on dark */
  .hero-copy h1,
  .index-copy h1,
  .index-feature h2,
  .directory-heading h2,
  .book-card h3,
  .book-section h2,
  .chapter-row strong,
  .knowledge-section h2,
  .module-bridge-card h2 {
    color: #f1f6fb;
  }

  /* Hero metrics tiles */
  .hero-metrics article {
    background: linear-gradient(180deg, rgba(22, 36, 52, 0.78), rgba(16, 28, 42, 0.6));
    border-color: rgba(255, 255, 255, 0.06);
  }

  /* Secondary button on dark needs darker fill, light text */
  .button-secondary {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
  }

  /* Primary button is amber — keep dark text on it, but tighten shadow */
  .button-primary {
    color: #0a1622;
    box-shadow: 0 12px 26px rgba(240, 184, 90, 0.18);
  }

  /* Chips, tags, formula spans */
  .formula-line span,
  .module-stack span,
  .tag-row span,
  .chip-row span,
  .book-progress span,
  .catalog-meta span,
  .note-meta span {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--ink-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  /* Status pills — keep semantic colors but rebalance contrast */
  .module-status {
    color: #d6f0e0;
    background: rgba(138, 175, 134, 0.18);
  }

  .module-status.is-draft {
    color: #f6e0b5;
    background: rgba(240, 184, 90, 0.18);
  }

  .module-status.is-upcoming {
    color: #f4c7bc;
    background: rgba(224, 140, 122, 0.2);
  }

  .knowledge-state {
    color: #b8d8be;
    background: rgba(138, 175, 134, 0.16);
    border-color: rgba(138, 175, 134, 0.28);
  }

  .knowledge-state.is-upcoming {
    color: #f4c7bc;
    background: rgba(224, 140, 122, 0.18);
    border-color: rgba(224, 140, 122, 0.3);
  }

  /* Decorative media wells — the hardcoded cream gradients turn into deep teal */
  .note-feature-media,
  .catalog-card img,
  .pll-art {
    background: linear-gradient(135deg, #0d1f2d 0%, #0a1a25 100%);
    border-color: rgba(255, 255, 255, 0.06);
  }

  .pll-art {
    background:
      radial-gradient(circle at 18% 58%, rgba(77, 214, 220, 0.18), transparent 20%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
      linear-gradient(135deg, #0d1f2d 0%, #0a1a25 100%);
    background-size: auto, 24px 24px, 24px 24px, auto;
    border-color: rgba(255, 255, 255, 0.06);
  }

  .catalog-art {
    background:
      radial-gradient(circle at 24% 18%, rgba(77, 214, 220, 0.18), transparent 24%),
      linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
      linear-gradient(135deg, #0d1f2d 0%, #0a1a25 100%);
    background-size: auto, 24px 24px, 24px 24px, auto;
    border-color: rgba(255, 255, 255, 0.06);
  }

  /* Filter bar + breadcrumb pills */
  .filter-bar {
    background: rgba(20, 34, 48, 0.5);
    border-color: rgba(255, 255, 255, 0.06);
  }

  .filter-bar button {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .breadcrumb {
    background: rgba(20, 34, 48, 0.66);
    border-color: rgba(255, 255, 255, 0.06);
  }

  /* Knowledge directory blocks (notes index) */
  .knowledge-directory,
  .book-library,
  .book-section,
  .knowledge-section {
    background: rgba(20, 34, 48, 0.46);
    border-color: rgba(255, 255, 255, 0.06);
  }

  .book-card,
  .chapter-list {
    background: linear-gradient(180deg, rgba(22, 36, 52, 0.88), rgba(16, 28, 42, 0.7));
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .book-cover-frame {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(20, 34, 48, 0.7));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  }

  .chapter-row {
    border-color: rgba(255, 255, 255, 0.07);
  }

  a.chapter-row:hover {
    background: rgba(110, 199, 208, 0.12);
  }

  .chapter-state {
    color: #b8d8be;
    background: rgba(138, 175, 134, 0.16);
    border-color: rgba(138, 175, 134, 0.28);
  }

  .chapter-state.is-upcoming,
  .chapter-row.is-upcoming .chapter-state {
    color: #f4c7bc;
    background: rgba(224, 140, 122, 0.18);
    border-color: rgba(224, 140, 122, 0.3);
  }

  .chapter-state.is-outline {
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .book-topic-links a {
    color: var(--cyan-deep);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .knowledge-block {
    color: var(--ink);
    background: linear-gradient(180deg, rgba(22, 36, 52, 0.88), rgba(16, 28, 42, 0.7));
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .knowledge-block:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  }

  .directory-rule span {
    background: rgba(20, 34, 48, 0.6);
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--ink-soft);
  }

  /* Dark about-card already exists — bump border to match */
  .about-card.is-dark {
    border-color: rgba(255, 255, 255, 0.06);
  }

  /* Project repo cards: already dark in light mode — just rebalance the shadow
     so they don't look "floating" against the now-dark page background. */
  .project-card.repo-card {
    background: linear-gradient(180deg, #142838 0%, #0c1c2a 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
      0 18px 48px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .project-card.repo-card:hover {
    border-color: rgba(110, 199, 208, 0.35);
    box-shadow:
      0 28px 64px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  /* Favorite cards: flip from cream paper to dark glass shelf */
  .favorite-card {
    background: rgba(20, 34, 48, 0.5);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .favorite-card:hover {
    border-color: rgba(110, 199, 208, 0.28);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 12px 28px rgba(0, 0, 0, 0.4);
  }
}
