/* ============================================================
   Vishine 个人站 — 极简瑞士排版 (International Typographic Style)
   纸白墨黑 · 克制朱红 · 强网格 · 充足留白 · 字体层次
   ============================================================ */

/* ---- 三套配色 (对齐博客 vishine 主题)：clean(默认) / paper / dark ---- */
:root,
:root[data-theme="clean"] {
  color-scheme: light;
  --paper: #fafafb;
  --paper-2: #f3f4f6;
  --card: #ffffff;
  --panel: #ffffff;
  --ink: #15181d;
  --ink-2: #545b66;
  --ink-3: #9aa1ad;
  --line: #eceef1;
  --line-2: #dfe2e7;
  --accent: #e0552f;
  --accent-soft: #fdeee8;
  --accent-ink: #c4421f;
  --ok: #2E7D54;
  --warn: #B5760C;
  --sans: "Helvetica Neue", "Inter", Arial, "PingFang SC", "Microsoft YaHei UI", "Hiragino Sans GB", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", "Cascadia Code", ui-monospace, monospace;
  --maxw: 1140px;
  --gut: clamp(20px, 5vw, 64px);
}

:root[data-theme="paper"] {
  color-scheme: light;
  --paper: #f4f1ea;
  --paper-2: #efeae0;
  --card: #fbfaf6;
  --panel: #fbfaf6;
  --ink: #20201d;
  --ink-2: #56544d;
  --ink-3: #8c887d;
  --line: #ddd7c9;
  --line-2: #ccc4b2;
  --accent: #c75132;
  --accent-soft: #f0d9cf;
  --accent-ink: #9e3d22;
  --ok: #2E7D54;
  --warn: #B5760C;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111317;
  --paper-2: #181b21;
  --card: #1a1d23;
  --panel: #1a1d23;
  --ink: #e6e3dd;
  --ink-2: #aab1bd;
  --ink-3: #727a87;
  --line: #262a31;
  --line-2: #333842;
  --accent: #e2724f;
  --accent-soft: #33201a;
  --accent-ink: #f0916f;
  --ok: #46C281;
  --warn: #E0A53C;
}

* { box-sizing: border-box; }

html { background: var(--paper); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.drawer-locked { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

a { color: inherit; text-decoration: none; }
button, input, a { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.012em; }

/* ---- 跟随配色的极淡环境背景层 ---- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% -10%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 50% -10%, #000 0%, transparent 72%);
  opacity: 0.5;
}
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}
.ambient-glow-a {
  top: -180px; right: -120px;
  width: 540px; height: 540px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.ambient-glow-b {
  bottom: -220px; left: -160px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%);
}
:root[data-theme="dark"] .ambient-grid { opacity: 0.4; }
:root[data-theme="dark"] .ambient-glow-a { opacity: 0.7; }
:root[data-theme="dark"] .ambient-glow-b { opacity: 0.55; }
@media (prefers-reduced-motion: reduce) { .ambient { display: none; } }

.icon { width: 17px; height: 17px; flex: 0 0 auto; }

.app-shell { position: relative; z-index: 1; min-height: 100vh; }

/* ---------- 顶栏：压缩、单行、hairline ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  height: 56px;
  padding: 0 var(--gut);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: baseline; gap: 7px; width: fit-content; }
.brand-mark { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.brand-caret { color: var(--accent); font-family: var(--mono); font-size: 13px; }
.brand-subtitle { color: var(--ink-3); font-size: 12px; letter-spacing: 0.02em; }

.nav-tabs { display: flex; align-items: center; gap: 2px; justify-self: center; }
.nav-tab {
  position: relative;
  height: 32px;
  padding: 0 13px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 13.5px;
  transition: color 160ms ease;
}
.nav-tab:hover { color: var(--ink); }
.nav-tab.is-active { color: var(--ink); }
.nav-tab.is-active::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.icon-button, .pill-button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; min-width: 32px; padding: 0 9px;
  border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--ink-2);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.pill-button { gap: 6px; font-size: 12.5px; }
.icon-button:hover, .pill-button:hover { background: var(--paper-2); color: var(--ink); }
.mobile-menu-button { display: none; }

/* ---------- 工作区：单页长滚动 ---------- */
.workspace { min-height: calc(100vh - 56px); }
.content-stage { min-width: 0; }
.longpage { display: block; }

.page { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

/* 单页板块：紧凑垂直节奏 + hairline 分隔 */
.sec { position: relative; scroll-margin-top: 56px; }
.sec-block { padding: clamp(46px, 6vw, 76px) 0; border-top: 1px solid var(--line); }
.sec-alt { background: var(--paper-2); }
.sec-hero { padding: clamp(28px, 4vw, 52px) 0 clamp(36px, 5vw, 60px); }
.sec-footer { padding: clamp(44px, 6vw, 72px) 0 40px; border-top: 1px solid var(--line); background: var(--paper-2); }

/* 板块标题：编号 kicker + 标题 + 描述，左对齐紧凑 */
.sec-head { max-width: 760px; margin-bottom: clamp(26px, 3.5vw, 40px); }
.sec-head .section-kicker { margin: 0 0 12px; }
.sec-head h2 {
  margin: 0;
  font-size: clamp(27px, 3.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.sec-head .sec-desc {
  margin: 14px 0 0;
  max-width: 640px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.65;
}

/* ---------- 通用排版 ---------- */
.eyebrow, .section-kicker, .article-meta, .note-cat, .note-row time, .note-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow, .section-kicker { color: var(--accent); margin: 0 0 18px; }

.page-heading { margin-bottom: clamp(36px, 6vw, 64px); }
.page-heading > div { max-width: 760px; }
.page-heading h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.page-heading p {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- 首页 Hero ---------- */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
  padding: clamp(8px, 2vw, 24px) 0 clamp(34px, 4.5vw, 54px);
}
.hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 750;
}
.hero-copy h1 span { display: block; }
.hero-copy h1 em { font-style: normal; color: var(--accent); }
:lang(zh-CN) .hero-copy h1 { font-size: clamp(32px, 4vw, 52px); line-height: 1.1; letter-spacing: -0.02em; }

.hero-lead {
  max-width: 540px;
  margin: 22px 0 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 30px;
  border-top: 1px solid var(--line);
}
.hero-metrics div {
  flex: 1;
  min-width: 88px;
  padding: 18px 18px 0 0;
}
.hero-metrics strong {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-metrics span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 12.5px; }

/* Hero 右侧：克制的竖向卡片栈（无浮动/无阴影/无椭圆） */
.hero-visual { display: grid; gap: 10px; align-content: end; }
.hero-product-card, .signal-card {
  display: flex; align-items: center; gap: 13px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease;
}
.hero-product-card { width: 100%; cursor: pointer; }
.hero-product-card:hover { border-color: var(--accent); }
.hero-product-card .icon:last-child { margin-left: auto; color: var(--ink-3); flex: 0 0 auto; }
.hero-product-card:hover .icon:last-child { color: var(--accent); }
.hero-product-card strong, .signal-card strong { display: block; font-size: 15px; }
.hero-product-card small, .signal-card small { display: block; margin-top: 3px; color: var(--ink-3); font-size: 12.5px; }
.signal-card { display: grid; gap: 2px; }
.signal-card span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.signal-card strong { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }

.product-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 9px;
  color: var(--accent);
  background: var(--paper-2);
}
.product-tile { background: transparent; padding: 0; }
.product-tile svg { width: 100%; height: 100%; display: block; }
.product-logo {
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 11px; object-fit: cover;
}
.home-product-row .product-logo { width: 40px; height: 40px; }
.drawer-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.drawer-icon:has(img) { border: 0; background: transparent; }
.drawer-shots {
  display: flex; gap: 10px; overflow-x: auto;
  margin-bottom: 24px; padding-bottom: 6px;
}
.drawer-shots img {
  height: 300px; width: auto; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 12px;
}
.drawer-hero { display: block; width: 132px; height: auto; margin: 0 0 16px; }

/* ---------- 按钮 ---------- */
.command-button, .inline-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: transparent; color: var(--ink);
  font-size: 14.5px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}
.command-button.primary { background: var(--ink); color: var(--paper); }
.command-button.primary:hover { opacity: 0.86; }
.command-button.ghost { border-color: var(--line-2); color: var(--ink); }
.command-button.ghost:hover { border-color: var(--ink); }
.command-button .icon { width: 16px; height: 16px; }
.inline-link {
  height: auto; padding: 0; border: 0;
  color: var(--accent); font-size: 14px;
}
.inline-link:hover { color: var(--accent-ink); }

/* ---------- 首页 intro 区块 ---------- */
.home-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
  padding: clamp(30px, 4vw, 46px) 0 0;
  border-top: 1px solid var(--line);
}
.home-about h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.home-about-copy p { margin: 20px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.85; }

.principle-list { display: grid; gap: 0; align-self: start; }
.principle-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.principle-item:last-child { border-bottom: 1px solid var(--line); }
.principle-item .icon { margin-top: 2px; color: var(--accent); }
.principle-item strong { display: block; font-size: 15px; }
.principle-item small { display: block; margin-top: 4px; color: var(--ink-2); line-height: 1.6; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2 { margin: 6px 0 0; }

.home-product-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.home-product-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 22px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: padding-left 160ms ease;
}
.home-product-row:hover { padding-left: 12px; }
.home-product-row .product-icon { width: 38px; height: 38px; }
.home-product-main strong { display: block; font-size: 17px; margin-bottom: 3px; }
.home-product-main small { display: block; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.home-product-row .icon:last-child { color: var(--ink-3); }

/* ---------- 状态标签 ---------- */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em;
  color: var(--ink-3);
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-live { color: var(--ok); }
.status-beta { color: var(--warn); }
.status-wip { color: var(--ink-3); }

/* ---------- 产品页 ---------- */
.search-box {
  display: flex; align-items: center; gap: 9px;
  min-width: 240px; height: 42px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink-3);
}
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-chip {
  height: 32px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-2); font-size: 13px;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.filter-chip:hover { border-color: var(--ink-2); color: var(--ink); }
.filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 180ms ease, transform 220ms cubic-bezier(0.16,1,0.3,1), box-shadow 220ms ease;
}
.product-card:hover, .product-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.08);
  outline: none;
}
.pc-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.pc-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform 360ms ease; }
.product-card:hover .pc-media img { transform: scale(1.035); }
.pc-media-glyph { display: grid; place-items: center; aspect-ratio: 16 / 9; }
.pc-media-glyph .product-icon { width: 56px; height: 56px; }
.pc-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; flex: 1; }
.card-top { display: flex; align-items: flex-start; gap: 12px; }
.card-top .product-icon, .card-top .product-logo { width: 34px; height: 34px; }
.card-top h3 { margin: 0 0 5px; font-size: 17.5px; }
.product-card p { margin: 0; color: var(--ink-2); font-size: 13.8px; line-height: 1.6; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-row span {
  font-family: var(--mono); font-size: 11.5px;
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 5px;
  color: var(--ink-2);
}
.card-actions { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.card-actions .pc-open { color: var(--accent); font-size: 13.5px; }
.card-actions .icon { color: var(--ink-3); }
.product-card:hover .card-actions .icon { color: var(--accent); }
.result-count { margin-top: 24px; color: var(--ink-3); font-size: 13.5px; }
.result-count a { color: var(--accent); }

/* ---------- 文章封面卡片网格 (notes) ---------- */
.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.note-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  color: var(--ink);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease, box-shadow 200ms ease;
}
.note-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.09);
}
.note-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.note-cover img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 340ms ease;
}
.note-card:hover .note-cover img { transform: scale(1.04); }
.note-card-body {
  display: grid; gap: 9px;
  padding: 16px 18px 20px;
}
.note-card .note-cat { margin: 0; }
.note-card h3 {
  margin: 0;
  font-size: 17px; line-height: 1.35; letter-spacing: -0.01em;
  transition: color 160ms ease;
}
.note-card:hover h3 { color: var(--accent); }
.note-card-go {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 2px;
  color: var(--accent); font-size: 13px;
}
.note-card-go .icon { width: 14px; height: 14px; }

/* ---------- 文章列表 (legacy 行式，保留) ---------- */
.note-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.note-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 22px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  transition: padding-left 160ms ease;
}
.note-row:hover { padding-left: 12px; }
.note-index { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.note-main { min-width: 0; }
.note-cat { display: block; margin-bottom: 8px; }
.note-row h3 { margin: 0 0 8px; font-size: clamp(18px, 2vw, 23px); line-height: 1.25; letter-spacing: -0.01em; }
.note-row:hover h3 { color: var(--accent); }
.note-row p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; max-width: 60ch; }
.note-row time { white-space: nowrap; }

/* ---------- 文章阅读页 ---------- */
.article-page { max-width: var(--maxw); }
.toc-back {
  border: 0; background: transparent; color: var(--ink-3);
  font-size: 13.5px; padding: 0 0 24px;
}
.toc-back:hover { color: var(--accent); }
.article-head { max-width: 760px; padding-bottom: 36px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.article-meta { margin: 0 0 18px; }
.article-head h1 {
  margin: 0 0 26px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.article-toc {
  position: sticky; top: 84px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}
.toc-title { margin: 0 0 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.article-toc nav { display: grid; gap: 2px; }
.toc-link {
  display: block; padding: 4px 0;
  color: var(--ink-3); font-size: 12.5px; line-height: 1.45;
  cursor: pointer; transition: color 140ms ease;
}
.toc-link:hover { color: var(--accent); }
.toc-l3 { padding-left: 12px; font-size: 12px; }
.article-foot { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }

/* ---------- Prose 正文排版 ---------- */
.prose { max-width: 72ch; color: var(--ink); font-size: 16.5px; line-height: 1.85; }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  margin: 2.2em 0 0.7em;
  padding-top: 0.6em;
  border-top: 1px solid var(--line);
  font-size: 1.5em; line-height: 1.25;
}
.prose h3 { margin: 1.8em 0 0.6em; font-size: 1.2em; }
.prose h4 { margin: 1.5em 0 0.5em; font-size: 1.02em; }
.prose p { margin: 1.05em 0; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--accent-ink); }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { margin: 1.05em 0; padding-left: 1.4em; }
.prose li { margin: 0.4em 0; }
.prose li::marker { color: var(--ink-3); }
.prose code {
  font-family: var(--mono); font-size: 0.86em;
  padding: 0.12em 0.4em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.prose pre {
  margin: 1.5em 0;
  padding: 18px 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13.5px; line-height: 1.7;
}
.prose pre code { padding: 0; background: transparent; border: 0; font-size: 13.5px; }
.prose blockquote {
  margin: 1.5em 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--line-2);
  color: var(--ink-2); font-style: italic;
}
.prose table {
  width: 100%; margin: 1.5em 0; border-collapse: collapse; font-size: 14.5px;
}
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--paper-2); font-weight: 700; }
.prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--line); }
.prose img { max-width: 100%; border-radius: 8px; }

/* ---------- 工具箱 ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tool-card {
  display: grid; gap: 8px; align-content: start;
  min-height: 130px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--card); color: var(--ink); text-align: left;
  transition: border-color 160ms ease, transform 180ms ease;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tool-card .icon { color: var(--accent); }
.tool-group-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); padding: 2px 7px; border: 1px solid var(--line); border-radius: 5px; }
.tool-card strong { font-size: 14.5px; margin-top: 2px; }
.tool-card .tool-desc { color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }

/* ---------- 关于 ---------- */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.about-card { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.about-card h3 { margin: 0 0 10px; font-size: 16px; }
.about-card p { margin: 0; color: var(--ink-2); line-height: 1.68; font-size: 14px; }

/* ---------- 联系 / 页脚 ---------- */
.footer-top { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.footer-lead .section-kicker { margin: 0 0 12px; }
.footer-lead h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
.footer-lead .sec-desc { margin: 14px 0 0; max-width: 32ch; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.contact-card {
  display: flex; align-items: center; gap: 13px;
  padding: 16px 18px; min-height: 72px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--card);
  transition: border-color 160ms ease, transform 180ms ease;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-card .icon { color: var(--accent); }
.contact-card strong { font-size: 14px; }
.contact-card small { display: block; margin-top: 3px; color: var(--ink-3); font-size: 12.5px; }
.contact-card.is-copied { border-color: var(--ok); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: clamp(34px, 4vw, 52px); padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 12.5px;
}
.footer-bottom .brand-mark { color: var(--ink); }

/* ---------- 产品详情抽屉（右侧浮层） ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 12, 16, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0; animation: fadeIn 200ms ease forwards;
}
:root[data-theme="dark"] .drawer-backdrop { background: rgba(0, 0, 0, 0.58); }
@keyframes fadeIn { to { opacity: 1; } }
.detail-drawer {
  position: fixed; top: 0; right: 0; z-index: 60;
  width: min(560px, 100vw);
  height: 100vh;
  overflow-y: auto;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.16);
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.detail-drawer.is-open { transform: translateX(0); }
.drawer-inner { min-height: 100%; padding: 36px clamp(24px, 3vw, 40px) 56px; }
.drawer-banner { margin: 0 0 22px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.drawer-banner img { display: block; width: 100%; height: auto; }
.drawer-close {
  position: absolute; top: 22px; right: 24px;
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 7px;
  background: transparent; color: var(--ink-3);
}
.drawer-close:hover { border-color: var(--ink); color: var(--ink); }
.drawer-title { display: flex; align-items: flex-start; gap: 15px; padding-right: 42px; margin-bottom: 26px; }
.drawer-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; color: var(--accent); background: var(--paper-2); }
.drawer-title h2 { margin: 0 0 6px; font-size: 22px; }
.drawer-title p, .drawer-lead { margin: 0; color: var(--ink-2); line-height: 1.6; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.drawer-tabs { display: flex; gap: 6px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.drawer-tabs button { height: 40px; padding: 0 4px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-3); font-size: 13.5px; }
.drawer-tabs button.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.drawer-section { margin-top: 26px; }
.drawer-section h3 { margin: 0 0 12px; font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); }
.drawer-section p { color: var(--ink-2); line-height: 1.65; }
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.meta-grid div { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.meta-grid dt { color: var(--ink-3); font-size: 11.5px; font-family: var(--mono); text-transform: uppercase; }
.meta-grid dd { margin: 6px 0 0; }
.architecture-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.architecture-map span { display: grid; place-items: center; min-height: 50px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); font-size: 13.5px; }
.stack-row span { background: var(--paper-2); }
.note-date { margin-bottom: 8px; }
.index-list, .contact-mini-list { display: grid; gap: 10px; margin-top: 16px; }
.index-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; min-height: 60px; padding: 0 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); text-align: left; }
.index-row:hover { border-color: var(--ink); }
.index-row .icon { color: var(--accent); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(10px); }
.reveal.is-visible { animation: settle 420ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes settle { to { opacity: 1; transform: none; } }

.mobile-nav { display: none; }

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

/* ============================ 响应式 ============================ */
@media (max-width: 1180px) {
  .note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .nav-tabs { display: none; }
  .brand-subtitle, .top-actions .pill-button span:last-child { display: none; }
  .mobile-menu-button { display: inline-flex; }
  .topbar { grid-template-columns: 1fr auto; }

  .home-hero { grid-template-columns: 1fr; align-items: start; gap: 30px; }
  .home-about { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-drawer { width: 100vw; }

  .mobile-nav {
    position: fixed; left: 12px; right: 12px; top: 64px; z-index: 70;
    display: grid; gap: 6px; padding: 10px;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--panel); box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: transform 180ms ease, opacity 180ms ease;
  }
  .mobile-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .mobile-nav-item { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); }
  .mobile-nav-item.is-active { color: var(--accent); }
}

@media (max-width: 620px) {
  :root { --gut: 18px; }
  .product-grid, .note-grid, .tool-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-actions { display: grid; }
  .command-button { width: 100%; }
  .meta-grid, .architecture-map { grid-template-columns: 1fr; }
}

/* ============================================================
   动效层 —— 移植自 ReactBits，全部纯 CSS / vanilla，零依赖
   （reduced-motion 由文件上方的全局 * 规则统一降级）
   ============================================================ */
@property --sb-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ① Shiny Text —— 品牌字光泽缓缓扫过（topbar） */
.brand .brand-mark {
  background: linear-gradient(110deg,
    var(--ink) 0%, var(--ink) 42%,
    var(--accent) 50%,
    var(--ink) 58%, var(--ink) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: brand-shine 6.5s ease-in-out infinite;
}
@keyframes brand-shine { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

/* ② Blur / Split Text —— 大标题逐词模糊揭示（进场） */
.hero-title .hw { display: inline-block; will-change: transform, filter, opacity; }
.hero-title .hw {
  opacity: 0; filter: blur(12px); transform: translateY(16px);
}
.hero-title.play .hw {
  animation: hw-in 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 65ms + 120ms);
}
@keyframes hw-in { to { opacity: 1; filter: blur(0); transform: none; } }

/* ③ Star Border —— 主 CTA 缓慢旋转描边 */
.command-button.primary { position: relative; isolation: isolate; }
.command-button.primary::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1.4px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--sb-a),
    transparent 0deg,
    color-mix(in srgb, var(--accent) 92%, #fff) 44deg,
    transparent 128deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.85;
  animation: sb-spin 5.5s linear infinite;
}
@keyframes sb-spin { to { --sb-a: 360deg; } }

/* ④ Magnet —— 按钮吸附光标（JS 设 transform，这里给缓动） */
.command-button { transition: background 160ms ease, color 160ms ease, border-color 160ms ease, opacity 160ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1); }

/* ⑤ Glare Hover —— 产品卡高光跟随光标 */
.product-card { position: relative; }
.product-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; opacity: 0; transition: opacity 320ms ease; z-index: 3;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%),
    color-mix(in srgb, var(--accent) 15%, transparent), transparent 62%);
}
.product-card:hover::after { opacity: 1; }

/* ⑥ Logo Loop —— 技术栈无缝跑马灯 */
.tech-loop {
  position: relative; overflow: hidden; margin-top: clamp(28px, 4vw, 44px);
  padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.tech-track { display: flex; width: max-content; gap: 40px; animation: tech-scroll 34s linear infinite; }
.tech-loop:hover .tech-track { animation-play-state: paused; }
@keyframes tech-scroll { to { transform: translateX(-50%); } }
.tech-chip {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.01em; color: var(--ink-2);
}
.tech-chip::before { content: ""; width: 5px; height: 5px; border-radius: 1.5px; background: var(--accent); opacity: 0.65; }

/* ⑦ Count Up —— 数字滚动时防跳动（等宽数字） */
.hero-metrics strong, .signal-card strong { font-variant-numeric: tabular-nums; }

/* ⑧ Dot Grid —— 交互点阵背景 canvas（叠在静态网格之上） */
#ambientDots { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ⑨ Click Ripple —— 优雅点击涟漪（替代火花） */
.click-ripple {
  position: fixed; z-index: 60; top: 0; left: 0;
  width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 1.5px solid var(--accent); pointer-events: none;
  opacity: 0.5; transform: scale(0);
  animation: ripple-out 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes ripple-out { to { transform: scale(3.4); opacity: 0; } }

/* 让进场 settle 略更从容 */
.reveal { transform: translateY(14px); }
.reveal.is-visible { animation-duration: 520ms; }
