:root {
  --bg: #eef5fc;
  --bg-2: #dcebfa;
  --surface: #ffffff;
  --surface-2: #edf4fc;
  --text: #16233a;
  --muted: #5a6b85;
  --line: #d4e3f3;
  --accent: #2f7de1;
  --accent-2: #5bb4f0;
  --accent-soft: #e0eeff;
  --gold: #e9a91c;
  --ok: #0f8a5f;
  --warn: #b45309;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(30, 80, 150, .06), 0 8px 28px rgba(30, 80, 150, .10);
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1424;
    --bg-2: #0f1d33;
    --surface: #132238;
    --surface-2: #1a2c46;
    --text: #e6eefa;
    --muted: #93a6c2;
    --line: #243a58;
    --accent: #6fb2ff;
    --accent-2: #7fd0ff;
    --accent-soft: #18304f;
    --gold: #f5c04a;
    --ok: #3ccf96;
    --warn: #f0a24a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-2) 0, var(--bg) 520px) fixed, var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, video { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 700; color: var(--text); letter-spacing: .2px; display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand .dot { width: 30px; height: 30px; border-radius: 50%; background: url(img/hero.webp) 66% 40% / 560% auto no-repeat, var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent-2); }
.nav { display: flex; gap: 18px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a.on { color: var(--text); text-decoration: none; }

/* hero */
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.2; margin: 0 0 16px; letter-spacing: -.5px; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 680px; margin: 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 99px; margin-bottom: 16px; }

/* sections */
section { padding: 36px 0; }
h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -.2px; }
h3 { font-size: 19px; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0 0 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } .nav { gap: 12px; font-size: 14px; } .hero { padding: 48px 0 24px; } }

/* project cards */
.proj { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: var(--text); transition: transform .15s, box-shadow .15s; }
.proj:hover { transform: translateY(-2px); text-decoration: none; }
.proj .pic { background: var(--surface-2); border-bottom: 1px solid var(--line); aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.proj .pic img { width: 100%; height: 100%; object-fit: cover; }
.proj .body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.proj p { color: var(--muted); margin: 4px 0 14px; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.more { margin-top: 14px; font-weight: 600; font-size: 14px; color: var(--accent); }

/* features */
.feat h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.feat p { color: var(--muted); margin: 0; font-size: 15px; }
.ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ico svg { width: 19px; height: 19px; }

/* figure */
figure { margin: 0; }
figure .frame { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; text-align: center; }
.video { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; }
.video video { width: 100%; aspect-ratio: 16 / 9; }

/* tables, steps */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: none; }
.table tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.good { color: var(--ok); font-weight: 600; }
.bad { color: var(--warn); font-weight: 600; }
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
ol.steps li { counter-increment: s; position: relative; padding: 16px 18px 16px 60px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
ol.steps li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
ol.steps b { display: block; }
ol.steps span { color: var(--muted); font-size: 15px; }
code, pre { font-family: var(--mono); font-size: 13.5px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; line-height: 1.55; margin: 12px 0 0; }
.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 0 10px 10px 0; color: var(--text); font-size: 15px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi b { display: block; font-size: 26px; letter-spacing: -.5px; }
.kpi span { color: var(--muted); font-size: 13.5px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.toc a { font-size: 14px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.toc a:hover { color: var(--text); text-decoration: none; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 8px 0 2px; }
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
ul.check { list-style: none; padding: 0; margin: 0; }
ul.check li { padding-left: 26px; position: relative; margin: 6px 0; }
ul.check li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }

/* ===== 汐鸢主题 ===== */
.top { background: color-mix(in srgb, var(--surface) 72%, transparent); }
.brand { font-size: 17px; letter-spacing: 1px; }
.nav a { padding: 4px 2px; border-bottom: 2px solid transparent; }
.nav a.on { border-bottom-color: var(--accent); }

/* full-width art hero (index) */
.art {
  position: relative; container-type: inline-size;
  width: 100%; aspect-ratio: 1632 / 1046; max-height: 92vh; overflow: hidden;
  background: #cfe3f7;
}
.art img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }
.art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.art .title {
  position: absolute; left: 50%; top: 51%; transform: translate(-50%, -50%);
  padding: 1.6cqw 3.4cqw 1.4cqw; border-radius: 1.6cqw; text-align: center; white-space: nowrap;
  background: rgba(120, 175, 230, .22); border: 1px solid rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 .6cqw 2.4cqw rgba(20, 60, 120, .18);
  color: #fff; text-shadow: 0 2px 10px rgba(20, 60, 120, .45);
}
.art .title h1 { margin: 0; font-size: clamp(20px, 3.6cqw, 64px); letter-spacing: .32em; margin-right: -.32em; font-weight: 600; line-height: 1.25; }
.art .title p { margin: .5cqw 0 0; font-size: clamp(11px, 1.25cqw, 22px); letter-spacing: .14em; font-style: italic; opacity: .95; }
.intro { text-align: center; padding: 8px 0 8px; }
.intro p { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 auto; }
.intro .eyebrow { margin-bottom: 12px; }

/* banner hero (sub pages) */
.hero.banner {
  margin-top: 24px; padding: 56px 44px 44px; border-radius: 24px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(14, 44, 96, .82) 0%, rgba(26, 82, 160, .55) 50%, rgba(40, 120, 210, .12) 100%),
              url(img/hero.webp) 0% 22% / 270% auto no-repeat, #2f6fc4;
  box-shadow: var(--shadow);
}
.hero.banner h1 { color: #fff; text-shadow: 0 2px 14px rgba(0, 20, 60, .35); }
.hero.banner p.lead { color: rgba(255, 255, 255, .88); }
.hero.banner .eyebrow { background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.hero.banner .toc a { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; backdrop-filter: blur(6px); }
.hero.banner .toc a:hover { background: rgba(255, 255, 255, .26); }
@media (max-width: 640px) { .hero.banner { padding: 36px 22px 28px; background-size: auto 140%; background-position: 0% 30%; } }

/* softer, airier cards */
.card { border-color: var(--line); }
.proj .pic { aspect-ratio: 16 / 8.5; }
.proj:hover { box-shadow: 0 2px 4px rgba(30, 80, 150, .08), 0 16px 40px rgba(30, 80, 150, .16); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.proj h3 { font-size: 20px; }
.ico { background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 22%, var(--surface))); }
h2 { position: relative; padding-left: 16px; }
h2::before { content: ""; position: absolute; left: 0; top: .28em; bottom: .28em; width: 5px; border-radius: 3px; background: linear-gradient(var(--accent-2), var(--accent)); }
h2 + .sub { padding-left: 16px; }
.kpi b { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
ol.steps li::before { background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.eyebrow { background: var(--accent-soft); }
.star { color: var(--gold); }
footer { text-align: center; }
footer .sig { font-style: italic; letter-spacing: .1em; opacity: .8; margin-top: 4px; }
.brand, .nav a { white-space: nowrap; }
@media (max-width: 640px) {
  .top .wrap { gap: 12px; height: 54px; padding: 0 14px; }
  .brand { font-size: 15px; letter-spacing: .5px; gap: 8px; }
  .brand .dot { width: 26px; height: 26px; }
  .nav { gap: 12px; font-size: 13.5px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 400px) { .nav a[href="hideck.html"] { display: none; } }

/* screenshot rows (HiDeck) */
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.shot img { width: 100%; height: auto; }
.frow { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 40px; }
.frow.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.frow.flip .shot { order: 2; }
.frow h3 { font-size: 21px; margin-bottom: 8px; }
.frow .tag { display: inline-block; margin-bottom: 8px; color: var(--accent); background: var(--accent-soft); border-color: transparent; font-family: var(--mono); }
@media (max-width: 760px) { .frow, .frow.flip { grid-template-columns: 1fr; gap: 16px; } .frow.flip .shot { order: 0; } }
.card.feat ul.check { font-size: 15px; color: var(--muted); }

/* 返回小窝 */
.home-btn { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 6px 14px 6px 11px; border-radius: 99px; font-size: 14px; font-weight: 600; white-space: nowrap; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .15s, box-shadow .15s; }
.home-btn svg { width: 16px; height: 16px; }
.home-btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent); }
.top .brand + .home-btn { margin-left: auto; }
.art .title .hero-home { display: inline-block; margin-top: 1.4cqw; padding: .55cqw 1.6cqw; border-radius: 99px; font-size: clamp(12px, 1.15cqw, 19px); letter-spacing: .12em; color: #fff; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.55); backdrop-filter: blur(4px); transition: background .15s; }
.art .title .hero-home:hover { background: rgba(255,255,255,.32); text-decoration: none; }
@media (max-width: 640px) { .home-btn { padding: 6px 9px; } .home-btn span { display: none; } }

/* ===== 2026-11-23 优化 ===== */
/* 导航：项目变多后可收缩、横向滚动，不挤掉“返回小窝” */
.nav { min-width: 0; }
@media (max-width: 900px) {
  .top .wrap { gap: 14px; }
  .nav { gap: 12px; font-size: 14px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .nav::-webkit-scrollbar { display: none; }
}
/* 项目数为奇数时，最后一张卡片横跨两列、左图右文 */
@media (min-width: 641px) {
  .g2 > .proj:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; }
  .g2 > .proj:last-child:nth-child(odd) .pic { flex: 0 0 50%; aspect-ratio: auto; min-height: 260px; border-bottom: 0; border-right: 1px solid var(--line); }
  .g2 > .proj:last-child:nth-child(odd) .body { justify-content: center; padding: 28px 30px; }
}
/* 新项目角标 */
.new { display: inline-block; vertical-align: middle; margin-left: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 1px 8px; border-radius: 99px; color: #fff; background: linear-gradient(135deg, var(--gold), #f07a3a); }
/* 键盘可达性 */
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .proj, .home-btn { transition: none; } }
