/* 砍刀的个人网站：杏色书桌 */

@font-face {
  font-family: 'Kandao Serif';
  src: url('../fonts/kandao-serif.woff2') format('woff2');
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #f5f1ea;
  --paper-2: #ece6dc;
  --card: #fffdf9;
  --ink: #1f1b17;
  --ink-2: #463f38;
  --muted: #6b635a;
  --line: #ddd4c7;
  --line-2: #e8e1d6;
  --apricot: #e2672b;
  --apricot-ink: #a8431a;
  --apricot-soft: #f9e2d1;
  --night: #1c1a1f;
  --night-2: #2a2730;

  --serif: 'Kandao Serif', 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', serif;
  --en: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --sans:
    system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei',
    'Noto Sans SC', sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--apricot-ink);
}
:focus-visible {
  outline: 2px solid var(--apricot-ink);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: var(--apricot-soft);
  color: var(--ink);
}
svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
svg.fill {
  fill: currentColor;
  stroke: none;
}
kbd {
  font-family: var(--mono);
  font-size: 0.82em;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  white-space: nowrap;
}
button {
  font: inherit;
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
}
.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 234, 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.topbar.is-scrolled {
  border-bottom-color: var(--line-2);
}
.topbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.clock {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.clock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--apricot);
  box-shadow: 0 0 0 0 rgba(226, 103, 43, 0.5);
  animation: pulse 2.4s infinite;
}
.clock-time {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.nav {
  display: flex;
  gap: 4px;
}
.nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink-2);
  transition:
    background 0.2s,
    color 0.2s;
}
.nav a:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.nav a[aria-current='page'],
.nav a.is-active {
  color: var(--ink);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.nav-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.topbar-contact {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 600;
}
.topbar-contact svg {
  font-size: 18px;
  transition: transform 0.3s var(--ease);
}
.topbar-contact:hover svg {
  transform: translate(2px, -2px);
}

/* ---------- 通用 ---------- */
main {
  display: block;
}
.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) 0;
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4px 24px;
  padding-bottom: 28px;
  margin-bottom: clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}
.section-no {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--apricot-ink);
}
.section-head h2,
.contact h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(36px, 5.4vw, 68px);
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.dot {
  color: var(--apricot);
}
.section-en {
  margin: 0 0 8px;
  font-family: var(--en);
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--ink);
  transition:
    transform 0.25s var(--ease),
    background 0.25s,
    color 0.25s,
    box-shadow 0.25s;
}
.btn svg {
  font-size: 18px;
  transition: transform 0.25s var(--ease);
}
.btn-ink {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 24px -14px rgba(31, 27, 23, 0.7);
}
.btn-ink:hover {
  color: #fff;
  background: var(--apricot-ink);
  border-color: var(--apricot-ink);
  transform: translateY(-2px);
}
.btn-ink:hover svg {
  transform: translateX(3px);
}
.btn-line {
  background: transparent;
  color: var(--ink);
}
.btn-line:hover {
  color: var(--ink);
  background: var(--card);
  transform: translateY(-2px);
}

/* 滚动出现 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 首屏 ---------- */
.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px var(--gutter) 0;
  min-height: calc(100svh - 72px);
  display: flex;
  flex-direction: column;
}
.hero-meta-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-bottom: clamp(24px, 4vw, 48px);
}
.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 4.4vw, 72px);
}
.hello {
  margin: 0 0 18px;
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.spark {
  color: var(--apricot);
  font-size: 1.3em;
  line-height: 1;
  display: inline-block;
  animation: spin 14s linear infinite;
}
.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(38px, 4.7vw, 72px);
  line-height: 1.24;
  letter-spacing: 0.01em;
}
.hero-title .line {
  display: block;
  white-space: nowrap;
}
.mark {
  position: relative;
  white-space: nowrap;
}
.mark::after {
  content: '';
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.02em;
  height: 0.2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14 C 50 4, 120 4, 197 10' fill='none' stroke='%23E2672B' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat center / 100% 100%;
  transform-origin: left;
  animation: draw 1.1s 0.5s var(--ease) both;
}
.hero-en {
  margin: 20px 0 0;
  font-family: var(--en);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px);
  color: var(--apricot-ink);
}
.hero-lead {
  margin: 22px 0 0;
  max-width: 34em;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-2);
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-where {
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.hero-where svg {
  font-size: 16px;
}
.sep {
  color: var(--line);
}
.hero-foot {
  margin-top: clamp(32px, 5vw, 56px);
  padding: 20px 0 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}
.hero-foot-mid {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
}
.hero-foot a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* 桌面构图 */
.desk {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  background-color: var(--paper-2);
  background-image: radial-gradient(circle, #d6ccbd 1px, transparent 1.2px);
  background-size: 22px 22px;
  border-radius: 6px;
  isolation: isolate;
}
.desk-corner {
  position: absolute;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.desk-corner.tl {
  left: -6px;
  top: -9px;
}
.desk-corner.br {
  right: -6px;
  bottom: -9px;
}
.desk-label {
  position: absolute;
  left: 22px;
  top: 16px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.desk-label span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apricot);
}
.desk-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.desk-lines path {
  stroke: #c4b8a6;
  stroke-width: 1.2;
  stroke-dasharray: 3 5;
  vector-effect: non-scaling-stroke;
}
.avatar {
  position: absolute;
  left: 50%;
  top: 51%;
  width: 37%;
  margin: 0;
  translate: -50% -50%;
  z-index: 2;
}
.avatar img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 8px solid var(--card);
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 50px -24px rgba(168, 67, 26, 0.45);
}
.avatar-ring {
  position: absolute;
  inset: -9%;
  border-radius: 50%;
  border: 1.5px dashed #c9bba7;
  animation: spin 60s linear infinite;
  z-index: -1;
}
.avatar-tag {
  position: absolute;
  left: 50%;
  bottom: -6%;
  translate: -50% 0;
  rotate: -4deg;
  white-space: nowrap;
  font-family: var(--en);
  font-style: italic;
  font-size: clamp(17px, 1.7vw, 24px);
  padding: 2px 16px 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 8px 18px -12px rgba(31, 27, 23, 0.4);
}
.float {
  position: absolute;
  z-index: 3;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 36px -22px rgba(31, 27, 23, 0.45);
  transition: translate 0.6s var(--ease);
}
.desk [data-depth] {
  will-change: translate;
}

/* QuickSay 小窗 */
.qs {
  left: 3%;
  top: 8%;
  width: 41%;
  rotate: -2deg;
  overflow: hidden;
  animation: bob 7s ease-in-out infinite;
}
.win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-2);
  background: #f8f5f0;
}
.win-title {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.win-title::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--apricot);
}
.kbd-row {
  display: flex;
  gap: 3px;
}
.kbd-row kbd {
  font-size: 9.5px;
  padding: 0 4px;
}
.qs-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: grid;
  gap: 4px;
}
.qs-list button {
  position: relative;
  width: 100%;
  text-align: left;
  min-height: 34px;
  padding: 6px 10px 6px 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s;
}
.qs-list li {
  counter-increment: qs;
}
.qs-list button::before {
  content: counter(qs);
  position: absolute;
  left: 8px;
  top: 50%;
  translate: 0 -50%;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #e3ecf6;
  color: #24507a;
  font: 600 9.5px/14px var(--mono);
  text-align: center;
}
.qs-list button:hover,
.qs-list button.is-hit {
  background: #eef4fb;
}

/* 终端 */
.term {
  right: 3%;
  top: 11%;
  width: 43%;
  background: var(--night);
  border-color: #000;
  color: #e9e6e1;
  padding: 10px 14px 12px;
  font-family: var(--mono);
  font-size: clamp(9px, 0.78vw, 11px);
  line-height: 1.7;
  rotate: 2.5deg;
  animation: bob 8s -2s ease-in-out infinite;
}
.term p {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.term b {
  color: #f0a072;
  font-weight: 500;
}
.term-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px !important;
}
.term-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4a4650;
}
.term-dots span:first-child {
  background: #f0a072;
}
.term-dots em {
  margin-left: 6px;
  font-style: normal;
  color: #8f8a95;
}
.term-user {
  color: #cfc9c0;
}
.term-ai {
  color: #f6c8a6;
}
.caret {
  color: var(--apricot);
  animation: blink 1.1s steps(1) infinite;
}

/* 便利贴 */
.note {
  left: 4%;
  bottom: 8%;
  width: 37%;
  padding: 14px 16px 12px;
  background: #fbe7cf;
  border-color: #efd2b0;
  border-radius: 2px;
  rotate: -4deg;
  animation: bob 9s -4s ease-in-out infinite;
}
.note::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -10px;
  width: 54px;
  height: 18px;
  translate: -50% 0;
  rotate: 3deg;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.note p {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(12px, 1.1vw, 15px);
  line-height: 1.6;
}
.note span {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: #8a5a35;
}

/* 输入框 */
.chat {
  right: 3%;
  bottom: 9%;
  width: 39%;
  padding: 10px 12px 12px;
  rotate: 1.5deg;
  animation: bob 7.5s -1s ease-in-out infinite;
}
.chat-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.chat-box {
  margin: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f4;
  font-size: clamp(11.5px, 1.05vw, 13.5px);
  line-height: 1.5;
}
.chat-text {
  transition: background 0.4s;
  border-radius: 3px;
}
.chat-text.is-new {
  background: var(--apricot-soft);
}
.chat-text.is-hint {
  color: var(--muted);
}

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.about-big {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.5;
}
.about-text > p:not(.about-big) {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.95;
  color: var(--ink-2);
  max-width: 36em;
}
.stack {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stack li,
.tags li,
.pill {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
  white-space: nowrap;
}
.now {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.now li {
  position: relative;
  padding: 0 0 32px 28px;
}
.now li:last-child {
  padding-bottom: 0;
}
.now li::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--apricot);
}
.now li:first-child::before {
  background: var(--apricot);
}
.now-when {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--apricot-ink);
  letter-spacing: 0.04em;
}
.now strong {
  display: block;
  margin: 4px 0 6px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
}
.now p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

/* ---------- 作品 ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  margin-bottom: 24px;
}
.feature-wide {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
}
.feature-wide .feature-shot {
  grid-column: 1 / -1;
}
.feature-wide .feature-copy > p:last-child {
  margin-bottom: 0;
}
.feature-alt {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
}
.feature-alt .feature-shot {
  order: -1;
}
.feature .feature-kicker {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.feature-kicker span {
  color: var(--apricot-ink);
}
.feature h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.feature .feature-sub {
  margin: 16px 0 18px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  color: var(--apricot-ink);
}
.feature-copy > p,
.feature-side > p:not(.links) {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-2);
}
.feature blockquote {
  margin: 4px 0 20px;
  padding: 14px 18px;
  border-left: 3px solid var(--apricot);
  background: #fcf3ea;
  border-radius: 0 12px 12px 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.8;
}
.stats {
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}
.stats div {
  padding: 14px 0;
}
.stats div + div {
  padding-left: 16px;
  border-left: 1px dashed var(--line);
}
.stats dt {
  font-size: 12px;
  color: var(--muted);
}
.stats dd {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.2;
}
.tags {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.checks {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.checks li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--ink-2);
}
.checks li::before {
  content: '✳';
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--apricot);
}
.links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}
.links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid transparent;
}
.links a:hover {
  border-bottom-color: currentColor;
}
.feature-shot {
  margin: 0;
}
.feature-shot img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -36px rgba(31, 27, 23, 0.55);
  transition: transform 0.6s var(--ease);
}
.feature:hover .feature-shot img {
  transform: translateY(-4px) rotate(-0.4deg);
}
.feature-shot figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.subhead {
  margin: clamp(48px, 7vw, 80px) 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
}
.subhead h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(24px, 2.6vw, 30px);
}
.subhead p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s,
    border-color 0.3s;
}
.card:hover {
  color: var(--ink);
  transform: translateY(-4px);
  border-color: #cbbfae;
  box-shadow: 0 22px 40px -28px rgba(31, 27, 23, 0.5);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.star {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.card strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.card-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
}
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
}
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.rows li {
  border-bottom: 1px solid var(--line);
}
.rows a {
  display: grid;
  gap: 2px;
  padding: 16px 32px 16px 0;
  position: relative;
}
.rows a::after {
  content: '↗';
  position: absolute;
  right: 4px;
  top: 16px;
  color: var(--muted);
  transition: transform 0.3s var(--ease);
}
.rows a:hover::after {
  transform: translate(3px, -3px);
  color: var(--apricot-ink);
}
.rows strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.rows span {
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- 脚本 ---------- */
.tree {
  background: var(--night);
  color: #e9e6e1;
  border-radius: 20px;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 3.4vw, 40px) clamp(24px, 3.4vw, 40px);
  font-family: var(--mono);
  box-shadow: 0 40px 70px -50px rgba(31, 27, 23, 0.9);
}
.tree-head {
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.tree-head a {
  color: #f6c8a6;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.tree-head a:hover {
  color: #fff;
}
.tree-dots {
  display: flex;
  gap: 6px;
}
.tree-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a4650;
}
.tree-dots span:first-child {
  background: var(--apricot);
}
.tree-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 40px;
}
.tree-dir {
  margin: 0 0 8px;
  color: #a7a1ad;
  font-size: 13px;
}
.tree dl {
  margin: 0;
}
.tree dl div {
  position: relative;
  padding: 12px 0 12px 22px;
  border-bottom: 1px solid #312e36;
}
.tree dl div::before {
  content: '├';
  position: absolute;
  left: 0;
  top: 12px;
  color: #5d5864;
}
.tree dl div:last-child::before {
  content: '└';
}
.tree dt {
  font-size: 14px;
  color: #fff;
  overflow-wrap: anywhere;
}
.tree dd {
  margin: 2px 0 0;
  font-family: var(--sans);
  font-size: 14px;
  color: #c9c3cd;
}

/* ---------- 联系 ---------- */
.contact {
  padding-bottom: clamp(72px, 10vw, 120px);
}
.contact-inner {
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.contact h2 {
  font-size: clamp(48px, 8vw, 112px);
  margin-top: 10px;
}
.contact-lead {
  margin: 12px 0 32px;
  font-size: 17px;
  color: var(--ink-2);
}
.contact-mail {
  margin: 0 0 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.contact-mail a {
  font-family: var(--en);
  font-style: italic;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.1;
  border-bottom: 2px solid var(--apricot);
  overflow-wrap: anywhere;
}
.copy {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 14px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.copy:hover {
  border-color: var(--ink);
}
.copy.is-done {
  background: var(--apricot-soft);
  border-color: var(--apricot);
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.contact-list a,
.contact-qq {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s;
}
.contact-list a:hover {
  color: var(--ink);
  transform: translateY(-3px);
  border-color: #cbbfae;
}
.contact-list span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.contact-list strong {
  font-size: 19px;
  overflow-wrap: anywhere;
}
.contact-list em {
  font-style: normal;
  font-size: 14px;
  color: var(--muted);
}
.contact-qq .copy {
  align-self: flex-start;
  margin-top: 6px;
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px var(--gutter) 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 18px;
}
.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

/* ---------- 子页面通用 ---------- */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(72px, 10vw, 120px);
}
.page-title {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1.1;
}
.page-en {
  margin: 12px 0 0;
  font-family: var(--en);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--apricot-ink);
}
.page-lead {
  margin: 20px 0 0;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 34em;
}
.empty {
  margin-top: 48px;
  padding: clamp(32px, 6vw, 64px) 24px;
  border: 1px dashed #cbbfae;
  border-radius: 24px;
  background: var(--card);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.empty-term {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--muted);
  text-align: left;
}
.empty-term b {
  color: var(--apricot-ink);
  font-weight: 500;
}
.empty h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
}
.empty p {
  margin: 0;
  color: var(--ink-2);
}

/* 404 */
.error {
  min-height: calc(100svh - 160px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.error-no {
  font-family: var(--en);
  font-style: italic;
  font-size: clamp(120px, 24vw, 280px);
  line-height: 0.9;
  color: var(--apricot);
}

/* ---------- 动画 ---------- */
@keyframes spin {
  to {
    rotate: 360deg;
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(226, 103, 43, 0.5);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgba(226, 103, 43, 0);
  }
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
@keyframes draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .topbar-inner {
    grid-template-columns: auto 1fr auto;
  }
  .nav {
    justify-content: center;
  }
  .nav-num {
    display: none;
  }
}
@media (max-width: 920px) {
  .hero {
    min-height: 0;
  }
  .hero-grid,
  .about-grid,
  .feature,
  .feature-alt,
  .split,
  .tree-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .desk {
    order: -1;
    width: min(100%, 560px);
    margin: 0 auto;
  }
  .feature-alt .feature-shot {
    order: 0;
  }
  .feature-shot {
    order: 2;
  }
  .contact-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .split > div + div .subhead {
    margin-top: 40px;
  }
}
@media (max-width: 720px) {
  .topbar-inner {
    grid-template-columns: 1fr auto;
    min-height: 60px;
    padding-top: 6px;
  }
  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    margin: 0 -8px;
    gap: 0;
  }
  .nav a {
    padding: 8px 10px;
    font-size: 14px;
  }
  html {
    scroll-padding-top: 120px;
  }
  .hero-meta-row,
  .hero-foot-mid {
    display: none;
  }
  .hero {
    padding-top: 20px;
  }
  .hero-title {
    font-size: clamp(30px, 10vw, 46px);
  }
  .section-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .section-en {
    margin: 4px 0 0;
  }
  .stats div + div {
    padding-left: 10px;
  }
  .feature {
    border-radius: 18px;
  }
  .desk {
    aspect-ratio: 1 / 0.9;
  }
  .desk-label,
  .term,
  .note,
  .desk-lines path:nth-child(2),
  .desk-lines path:nth-child(4) {
    display: none;
  }
  .avatar {
    width: 48%;
    left: 66%;
    top: 46%;
  }
  .kbd-row {
    display: none;
  }
  .qs {
    width: 47%;
    left: 3%;
    top: 5%;
  }
  .qs-list button {
    min-height: 30px;
    font-size: 11px;
  }
  .chat {
    width: 52%;
    right: auto;
    left: 3%;
    bottom: 6%;
  }
}
@media (max-width: 380px) {
  .nav a {
    padding: 8px 6px;
  }
  .btn {
    padding: 0 18px;
  }
}

@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;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .topbar,
  .footer,
  .skip-link {
    display: none;
  }
}
