  /* ============ 设计令牌 ============ */
  :root {
    --bg: #fbfbfd;
    --bg-soft: #f5f5f7;
    --text-main: #050505;
    --text-sub: #6e6e73;
    --text-light: #333336;
    --text-faint: #a1a1a6;
    --card-bg: rgba(255, 255, 255, 0.72);
    --card-border: rgba(255, 255, 255, 0.9);
    --hair: rgba(0, 0, 0, 0.07);
    --grid-line: rgba(0, 0, 0, 0.038);
    --accent: #0071e3;
    --accent-2: #8b5cf6;
    --accent-3: #06b6d4;
    --accent-soft: rgba(0, 113, 227, 0.09);
    --glow: rgba(0, 113, 227, 0.16);
    --glow-2: rgba(139, 92, 246, 0.13);
    --tag-bg: #f1f1f4;
    --tag-text: #1d1d1f;
    --code-bg: rgba(255, 255, 255, 0.92);
    --header-bg: rgba(251, 251, 253, 0.72);
    --shadow-1: 0 4px 6px -1px rgba(0, 0, 0, 0.025);
    --shadow-2: 0 20px 44px -12px rgba(0, 0, 0, 0.06);
    --shadow-3: 0 30px 70px -18px rgba(0, 0, 0, 0.1);
    --t-comment: #a0a1a7;
    --t-keyword: #a626a4;
    --t-string: #3f8b46;
    --t-func: #2f6fdd;
    --t-annotation: #b07400;
    --t-number: #8a6100;
    --radius: 24px;
    color-scheme: light;
  }

  [data-theme="dark"] {
    --bg: #08080a;
    --bg-soft: #121215;
    --text-main: #f5f5f7;
    --text-sub: #9b9ba1;
    --text-light: #d5d5da;
    --text-faint: #6e6e73;
    --card-bg: rgba(22, 22, 27, 0.62);
    --card-border: rgba(255, 255, 255, 0.08);
    --hair: rgba(255, 255, 255, 0.09);
    --grid-line: rgba(255, 255, 255, 0.055);
    --accent: #4b9dff;
    --accent-2: #a78bfa;
    --accent-3: #22d3ee;
    --accent-soft: rgba(75, 157, 255, 0.14);
    --glow: rgba(10, 132, 255, 0.26);
    --glow-2: rgba(167, 139, 250, 0.2);
    --tag-bg: rgba(255, 255, 255, 0.06);
    --tag-text: #e8e8ed;
    --code-bg: rgba(12, 12, 16, 0.75);
    --header-bg: rgba(8, 8, 10, 0.7);
    --shadow-1: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 20px 44px -12px rgba(0, 0, 0, 0.75);
    --shadow-3: 0 30px 70px -18px rgba(0, 0, 0, 0.85);
    --t-comment: #6b7280;
    --t-keyword: #c792ea;
    --t-string: #7ee787;
    --t-func: #79b8ff;
    --t-annotation: #ffcb6b;
    --t-number: #ffab70;
    color-scheme: dark;
  }

  /* ============ 基础 ============ */
  * { margin: 0; padding: 0; box-sizing: border-box; }

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  }

  body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
                 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
  }

  ::selection { background: var(--accent-soft); color: var(--text-main); }

  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--hair);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }

  a { color: inherit; }

  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
  }

  /* ============ 背景层 ============ */
  .grid-bg {
    position: fixed; inset: 0; z-index: -3; pointer-events: none;
    background-image:
      linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 85% 60% at 50% 0%, #000 35%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 85% 60% at 50% 0%, #000 35%, transparent 100%);
  }

  .aurora {
    position: fixed; top: -280px; left: 50%; z-index: -2; pointer-events: none;
    width: min(1100px, 150vw); height: 760px;
    transform: translateX(-50%);
    background:
      radial-gradient(circle at 34% 42%, var(--glow) 0%, transparent 58%),
      radial-gradient(circle at 66% 34%, var(--glow-2) 0%, transparent 55%);
    filter: blur(72px);
    animation: drift 20s ease-in-out infinite alternate;
  }

  @keyframes drift {
    from { transform: translateX(-50%) translateY(0) scale(1); }
    to   { transform: translateX(-46%) translateY(46px) scale(1.09); }
  }

  .noise {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    opacity: 0.032;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  .cursor-glow {
    position: fixed; top: 0; left: 0; z-index: 0; pointer-events: none;
    width: 520px; height: 520px; margin: -260px 0 0 -260px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
    filter: blur(28px);
    opacity: 0;
    transition: opacity 0.6s ease;
    will-change: transform;
  }

  /* ============ 滚动进度条 ============ */
  .scroll-progress {
    position: fixed; top: 0; left: 0; z-index: 200;
    height: 2px; width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: 0 0 14px var(--glow);
    transition: width 0.1s linear;
  }

  /* ============ 顶部导航 ============ */
  .header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 150;
    height: 58px;
    display: flex; align-items: center; gap: 18px;
    padding: 0 22px;
    font-size: 13px; font-weight: 500;
    color: var(--text-sub);
    font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    backdrop-filter: saturate(180%) blur(22px);
    border-bottom: 1px solid var(--hair);
  }

  /* ============ 个人 Logo ============ */
  .brand {
    display: inline-flex; align-items: center; gap: 9px;
    text-decoration: none; color: var(--text-main);
    flex: none; padding: 3px 6px 3px 3px; margin-left: -3px;
    border-radius: 11px;
    transition: background-color 0.25s ease;
  }
  .brand:hover { background: var(--tag-bg); }

  .brand-mark {
    display: block; width: 40px; height: 40px;
    border-radius: 12px;
    object-fit: cover;
    object-position: center;
    border: 1px solid var(--hair);
    background: var(--tag-bg);
    box-shadow: 0 5px 14px -6px var(--glow);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  }
  .brand:hover .brand-mark {
    transform: rotate(-7deg) scale(1.07);
    box-shadow: 0 8px 20px -6px var(--glow);
  }

  .brand-text { display: flex; flex-direction: column; line-height: 1.18; }

  .brand-name {
    font-size: 12.5px; font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--text-main);
  }

  .brand-sub {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 8px; font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--text-faint);
  }

  .status { display: inline-flex; align-items: center; white-space: nowrap; }

  .status-dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: #10b981; margin-right: 8px;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
    animation: pulse 2.4s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(16, 185, 129, 0.7); }
    50% { opacity: 0.55; box-shadow: 0 0 3px rgba(16, 185, 129, 0.35); }
  }

  .nav {
    display: flex; align-items: center; gap: 2px;
    margin: 0 auto;
  }
  .nav a {
    padding: 5px 11px; border-radius: 8px;
    text-decoration: none; color: var(--text-faint);
    font-size: 12.5px; letter-spacing: 0.2px;
    transition: color 0.25s ease, background-color 0.25s ease;
  }
  .nav a:hover { color: var(--text-main); background: var(--tag-bg); }
  .nav a.active { color: var(--text-main); background: var(--tag-bg); }

  .header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

  .clock {
    font-size: 12px; color: var(--text-faint);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.4px;
    white-space: nowrap;
  }

  .theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0;
    border-radius: 50%; cursor: pointer;
    background: var(--tag-bg);
    border: 1px solid var(--hair);
    color: var(--text-sub);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.3s ease, color 0.3s ease;
  }
  .theme-toggle:hover { transform: rotate(-18deg) scale(1.08); color: var(--accent); }
  .theme-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  [data-theme="light"] .theme-toggle .icon-moon { display: none; }
  [data-theme="dark"] .theme-toggle .icon-sun { display: none; }

  /* ============ 布局 ============ */
  .container {
    max-width: 700px;
    margin: 0 auto;
    padding: 132px 24px 80px;
    position: relative;
    z-index: 1;
  }

  /* ============ 首屏 ============ */

  /* ============ 移动端菜单 ============ */
  .menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    background: var(--tag-bg);
    border: 1px solid var(--hair);
    color: var(--text-sub);
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 14px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  .menu-toggle span + span { margin-top: 3px; }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-4.5px) rotate(-45deg);
  }

  .mobile-menu { display: none; }

  @media (max-width: 720px) {
    .menu-toggle {
      display: inline-flex;
      flex-direction: column;
    }

    .mobile-menu {
      display: flex;
      position: fixed;
      inset: 0;
      z-index: 145;
      flex-direction: column;
      justify-content: center;
      padding: 96px 28px 40px;
      background: var(--header-bg);
      -webkit-backdrop-filter: blur(26px) saturate(180%);
      backdrop-filter: blur(26px) saturate(180%);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px);
      transition: opacity 0.3s ease,
                  transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                  visibility 0.3s;
    }

    .mobile-menu.open {
      opacity: 1;
      visibility: visible;
      transform: none;
    }

    .mobile-nav {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .mobile-nav a {
      padding: 8px 0;
      border-bottom: 1px solid var(--hair);
      font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
      font-size: 30px;
      font-weight: 700;
      letter-spacing: -1px;
      color: var(--text-main);
      text-decoration: none;
      transition: color 0.2s ease;
    }

    .mobile-nav a:hover,
    .mobile-nav a.active { color: var(--accent); }

    .mobile-menu-foot {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 34px;
      font-family: "SF Mono", Menlo, Consolas, monospace;
      font-size: 10.5px;
      color: var(--text-faint);
    }

    .mobile-menu-foot a {
      color: var(--text-sub);
      text-decoration: none;
    }

    body.menu-open { overflow: hidden; }
  }
  .intro {
    margin-bottom: 56px;
    animation: fadeIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 12.5px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 7px 14px; border-radius: 999px;
    margin-bottom: 22px;
    border: 1px solid var(--hair);
  }

  .eyebrow .pulse-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
    animation: pulse 2.4s ease-in-out infinite;
  }

  .intro h1 {
    font-size: clamp(30px, 6.4vw, 46px);
    font-weight: 800;
    letter-spacing: -1.6px;
    line-height: 1.12;
    margin-bottom: 22px;
    text-wrap: balance;
    background: linear-gradient(115deg, var(--text-main) 8%, var(--accent) 52%, var(--accent-2) 96%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    background-size: 180% 100%;
    animation: shine 9s ease-in-out infinite;
  }

  @keyframes shine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }

  .intro .lede {
    font-size: 17px;
    color: var(--text-light);
    line-height: 1.7;
    font-weight: 400;
    max-width: 62ch;
    text-wrap: pretty;
  }

  .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

  .btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px;
    font-size: 14px; font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease, background-color 0.3s ease,
                color 0.3s ease, border-color 0.3s ease;
  }
  .btn-primary {
    background: var(--text-main); color: var(--bg);
    box-shadow: var(--shadow-2);
  }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
  .btn-ghost {
    background: transparent; color: var(--text-light);
    border-color: var(--hair);
  }
  .btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

  .meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }

  .chip {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 11.5px; letter-spacing: 0.2px;
    color: var(--text-faint);
    padding: 5px 11px; border-radius: 999px;
    border: 1px solid var(--hair);
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  /* ============ 卡片 ============ */
  .section {
    position: relative;
    background: var(--card-bg);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    backdrop-filter: saturate(180%) blur(22px);
    border-radius: var(--radius);
    padding: 34px;
    margin-bottom: 22px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-1), var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    scroll-margin-top: 84px;
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    translate: 0 0;
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                translate 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.5s ease,
                border-color 0.4s ease,
                background-color 0.5s ease;
  }

  [data-theme="dark"] .section {
    box-shadow: var(--shadow-1), var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .section.visible { opacity: 1; transform: translateY(0) scale(1); }
  .section:hover { translate: 0 -3px; box-shadow: var(--shadow-1), var(--shadow-3); }

  /* 光标跟随的卡片内发光 */
  .section::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s ease;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%),
                var(--accent-soft), transparent 45%);
  }
  .section:hover::after { opacity: 1; }

  .section > * { position: relative; z-index: 1; }

  .section h2 {
    font-size: 19px; font-weight: 700;
    letter-spacing: -0.4px;
    margin-bottom: 22px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
  }

  .section h2 .idx {
    font-size: 11px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-weight: 500;
    letter-spacing: 0.6px;
    color: var(--text-faint);
    background: var(--tag-bg);
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    flex: none;
  }

  .section p {
    font-size: 15px;
    color: var(--text-sub);
    margin-bottom: 14px;
    text-align: justify;
    text-wrap: pretty;
  }
  .section p:last-child { margin-bottom: 0; }

  .highlight {
    color: var(--text-main);
    font-weight: 600;
    background: linear-gradient(transparent 62%, var(--accent-soft) 62%);
    padding: 0 4px;
    border-radius: 2px;
  }

  .strike { text-decoration: line-through; color: var(--text-faint); }

  /* ============ 技术标签 ============ */
  .tech-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

  .tech-tag {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 12.5px; font-weight: 500;
    padding: 7px 14px;
    background: var(--tag-bg);
    border: 1px solid var(--hair);
    border-radius: 9px;
    color: var(--tag-text);
    cursor: default;
    opacity: 0;
    translate: 0 9px;
    transition: opacity 0.5s ease, translate 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.22s ease, color 0.22s ease,
                border-color 0.22s ease, box-shadow 0.22s ease,
                transform 0.22s ease;
  }

  .section.visible .tech-tag {
    opacity: 1;
    translate: 0 0;
    transition-delay: calc(var(--i, 0) * 38ms + 90ms);
  }

  .tech-tag:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px var(--glow);
    transition-delay: 0s;
  }

  /* ============ 技术栈文档网格 ============ */
  .stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: 8px;
  }
  @media (max-width: 520px) { .stack-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }

  .stack-item {
    display: flex; flex-direction: column; gap: 1px;
    padding: 9px 12px;
    border-radius: 11px;
    background: var(--bg);
    border: 1px solid var(--hair);
    text-decoration: none;
    color: inherit;
    opacity: 0;
    translate: 0 8px;
    transition: opacity 0.5s ease,
                translate 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.22s ease,
                box-shadow 0.22s ease;
  }

  .section.visible .stack-item {
    opacity: 1;
    translate: 0 0;
    transition-delay: calc(var(--i, 0) * 22ms + 60ms);
  }

  .stack-item:hover {
    border-color: var(--accent);
    translate: 0 -2px;
    box-shadow: 0 10px 22px -14px var(--glow);
    transition-delay: 0s;
  }

  .stack-name {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px; font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text-main);
    line-height: 1.5;
  }

  .stack-name::after {
    content: "↗";
    font-size: 9.5px;
    color: var(--text-faint);
    opacity: 0;
    transform: translate(-2px, 2px);
    transition: opacity 0.22s ease, transform 0.22s ease, color 0.22s ease;
    flex: none;
  }
  .stack-item:hover .stack-name::after { opacity: 1; transform: none; color: var(--accent); }

  .stack-desc {
    font-size: 10.5px;
    line-height: 1.5;
    color: var(--text-faint);
    letter-spacing: 0.1px;
  }

  /* ============ 状态列表 ============ */
  .status-list { list-style: none; margin-top: 16px; }

  .status-list li {
    position: relative;
    padding: 3px 0 3px 26px;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-sub);
    opacity: 0;
    translate: 0 9px;
    transition: opacity 0.5s ease, translate 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.25s ease;
  }

  .section.visible .status-list li {
    opacity: 1;
    translate: 0 0;
    transition-delay: calc(var(--i, 0) * 55ms + 110ms);
  }

  .status-list li:hover { color: var(--text-main); }

  .status-list li::before {
    content: "→";
    position: absolute; left: 0; top: 3px;
    color: var(--accent);
    font-weight: 700;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    transition: transform 0.25s ease;
  }
  .status-list li:hover::before { transform: translateX(3px); }

  /* ============ 代码块 ============ */
  .code-container {
    position: relative;
    background: var(--code-bg);
    border-radius: 16px;
    margin-top: 22px;
    border: 1px solid var(--hair);
    box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.035);
    overflow: hidden;
  }

  .code-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px;
    border-bottom: 1px solid var(--hair);
  }

  .code-dots { display: flex; gap: 6px; }
  .code-dot { width: 10px; height: 10px; border-radius: 50%; }
  .code-dot.red { background: #ff5f56; }
  .code-dot.yellow { background: #ffbd2e; }
  .code-dot.green { background: #27c93f; }

  .copy-btn {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 11px; letter-spacing: 0.4px;
    color: var(--text-faint);
    background: transparent;
    border: 1px solid var(--hair);
    border-radius: 7px;
    padding: 4px 10px;
    cursor: pointer;
    transition: color 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
  }
  .copy-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
  .copy-btn.done { color: #10b981; border-color: #10b981; }

  .code-body {
    margin: 0;
    padding: 18px 20px 20px;
    overflow-x: auto;
    font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12.5px;
    line-height: 1.85;
    color: var(--text-light);
    tab-size: 2;
  }
  .code-body code { font-family: inherit; }

  .t-comment { color: var(--t-comment); font-style: italic; }
  .t-keyword { color: var(--t-keyword); }
  .t-string { color: var(--t-string); }
  .t-func { color: var(--t-func); }
  .t-annotation { color: var(--t-annotation); }
  .t-number { color: var(--t-number); }

  /* ============ 联系 ============ */
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 26px;
  }
  @media (max-width: 520px) { .contact-grid { grid-template-columns: 1fr; } }

  .contact-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px;
    background: var(--bg);
    border: 1px solid var(--hair);
    border-radius: 14px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13.5px; font-weight: 600;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    box-shadow: var(--shadow-1);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  }
  .contact-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 26px -10px var(--glow);
  }
  .contact-btn svg { width: 17px; height: 17px; fill: currentColor; flex: none; }

  /* ============ 页脚 ============ */
  .footer-quote {
    text-align: center;
    margin: 96px 0 56px;
    padding: 0 16px;
  }

  .quote-text {
    font-size: clamp(21px, 5vw, 28px);
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: -0.6px;
    background: linear-gradient(115deg, var(--text-main) 10%, var(--accent) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .quote-sub {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 14px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    letter-spacing: 1.4px;
  }

  .footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-faint);
    font-family: "SF Mono", Menlo, Consolas, monospace;
    padding-top: 28px;
    border-top: 1px solid var(--hair);
    line-height: 2;
    display: flex; flex-direction: column; align-items: center;
  }

  .footer-mark {
    display: block; width: 40px; height: 40px;
    border-radius: 12px;
    object-fit: cover;
    object-position: center;
    border: 1px solid var(--hair);
    background: var(--tag-bg);
    margin-bottom: 10px;
    opacity: 0.9;
    box-shadow: 0 6px 18px -8px var(--glow);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  }
  .footer-mark:hover { transform: rotate(-7deg) scale(1.08); opacity: 1; }

  .footer-name {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px; font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 6px;
  }

  .footer-name-sub {
    display: block;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 8.5px; font-weight: 500;
    letter-spacing: 2px;
    color: var(--text-faint);
    margin-top: 1px;
  }

  .footer-status {
    display: inline-flex; align-items: center;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-faint);
  }

  /* ============ 秋招目标公司墙 ============ */
  .corp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
    gap: 8px;
    margin-top: 4px;
  }
  @media (max-width: 520px) { .corp-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); } }

  .corp-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--hair);
    opacity: 0;
    translate: 0 8px;
    transition: opacity 0.5s ease,
                translate 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.22s ease,
                box-shadow 0.22s ease;
  }

  .section.visible .corp-item {
    opacity: 1;
    translate: 0 0;
    transition-delay: calc(var(--i, 0) * 30ms + 90ms);
  }

  .corp-item:hover {
    border-color: var(--accent);
    translate: 0 -2px;
    box-shadow: 0 10px 22px -14px var(--glow);
    transition-delay: 0s;
  }

  .corp-logo {
    flex: none;
    width: 32px; height: 32px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11.5px; font-weight: 700;
    line-height: 1; letter-spacing: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--c1, #666), var(--c2, #999));
    box-shadow: 0 4px 10px -5px var(--c1, #666);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .corp-item:hover .corp-logo { transform: scale(1.06) rotate(-4deg); }
  .corp-logo.dark { color: #1d1d1f; text-shadow: none; }

  .corp-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

  .corp-name {
    font-size: 12.5px; font-weight: 600;
    color: var(--text-main); line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  .corp-tag {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 9.5px; letter-spacing: 0.2px;
    color: var(--text-faint); line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  .corp-cheer {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-soft), transparent 72%);
    border: 1px solid var(--hair);
    text-align: center;
  }
  .corp-cheer-main {
    font-size: 14px; font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.2px; line-height: 1.6;
    text-wrap: balance;
  }
  .corp-cheer-sub {
    font-size: 11.5px;
    color: var(--text-sub);
    margin-top: 6px; line-height: 1.75;
    text-wrap: pretty;
  }

  /* ============ AI 生态名单 ============ */
  .eco-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 12px; font-weight: 700;
    letter-spacing: 1.4px; text-transform: uppercase;
    color: var(--text-sub);
    margin: 26px 0 13px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
  }
  .eco-title:first-of-type { margin-top: 4px; }
  .eco-title::after { content: ""; flex: 1; height: 1px; background: var(--hair); }

  .eco-sub {
    font-size: 10px; font-weight: 500;
    color: var(--text-faint);
    letter-spacing: 1px;
  }

  .eco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  @media (max-width: 620px) { .eco-grid { grid-template-columns: 1fr; } }

  .eco-item {
    display: block;
    padding: 13px 15px 15px;
    border-radius: 13px;
    background: var(--bg);
    border: 1px solid var(--hair);
    text-decoration: none;
    color: inherit;
    opacity: 0;
    translate: 0 8px;
    transition: opacity 0.5s ease,
                translate 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                box-shadow 0.25s ease;
  }

  .section.visible .eco-item {
    opacity: 1;
    translate: 0 0;
    transition-delay: calc(var(--i, 0) * 42ms + 120ms);
  }

  .eco-item:hover {
    border-color: var(--accent);
    translate: 0 -2px;
    box-shadow: 0 12px 26px -14px var(--glow);
    transition-delay: 0s;
  }

  .eco-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 8px; margin-bottom: 5px;
  }

  .eco-name {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 13.5px; font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text-main);
  }

  .eco-vendor {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 10px; letter-spacing: 0.4px;
    color: var(--text-faint);
    white-space: nowrap;
    flex: none;
  }

  .eco-note {
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text-sub);
    margin: 0 !important;
    text-align: left;
  }

  .eco-badge {
    display: inline-block;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 9.5px; font-weight: 500;
    letter-spacing: 0.3px;
    padding: 1px 6px;
    border-radius: 5px;
    margin-left: 6px;
    vertical-align: 1px;
  }
  .eco-badge.open { color: #0fae74; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.28); }
  [data-theme="dark"] .eco-badge.open { color: #34d399; }
  .eco-badge.closed { color: var(--text-faint); background: var(--tag-bg); border: 1px solid var(--hair); }

  .eco-score {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 8px; margin-top: 10px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 10px; letter-spacing: 0.3px;
    color: var(--text-faint);
  }
  .eco-score-num { font-size: 11.5px; font-weight: 700; color: var(--text-main); }
  .eco-score-num.dim { font-size: 10px; font-weight: 500; color: var(--text-faint); letter-spacing: 0.2px; }

  .eco-bar {
    margin-top: 5px; height: 3px;
    border-radius: 3px;
    background: var(--tag-bg);
    overflow: hidden;
  }
  .eco-bar.unknown {
    background: repeating-linear-gradient(90deg, var(--tag-bg) 0 5px, transparent 5px 10px);
    opacity: 0.8;
  }
  .eco-bar i {
    display: block; height: 100%; width: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .section.visible .eco-bar i { transform: scaleX(var(--w, 1)); }

  .eco-foot {
    margin-top: 20px !important;
    padding-top: 14px;
    border-top: 1px solid var(--hair);
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 11px !important;
    line-height: 1.75;
    color: var(--text-faint) !important;
    text-align: left !important;
  }

  /* ============ 回到顶部 ============ */

  /* ============ 名片首页（P3） ============ */
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 42px;
    align-items: center;
    margin-bottom: 56px;
  }

  .hero-name {
    font-size: clamp(46px, 7vw, 62px);
    font-weight: 800;
    letter-spacing: -2.4px;
    line-height: 1.05;
    color: var(--text-main);
    margin-top: 14px;
  }

  .hero-name-en {
    display: block;
    margin-top: 10px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 4px;
    color: var(--text-faint);
  }

  .hero-tagline {
    margin-top: 18px;
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
  }

  .hero-lede {
    margin-top: 12px;
    max-width: 46ch;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--text-sub);
    text-wrap: pretty;
  }

  .hero .cta { margin-top: 24px; }
  .hero .meta-chips { margin-top: 22px; }

  .hero-card {
    padding: 22px 18px;
    border-radius: 22px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-2);
    text-align: center;
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    backdrop-filter: saturate(180%) blur(22px);
  }

  .hero-avatar {
    width: 128px;
    height: 128px;
    border-radius: 32px;
    object-fit: cover;
    border: 1px solid var(--hair);
    box-shadow: 0 20px 44px -20px var(--glow);
  }

  .hero-card-name {
    margin-top: 14px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-main);
  }

  .hero-card-role {
    margin-top: 4px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0.6px;
    color: var(--text-faint);
  }

  .hero-status {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 10px;
    color: var(--text-sub);
  }

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

  .section-head h2 {
    flex: 1;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 0;
    font-size: 21px;
  }

  .section-link {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 10.5px;
    color: var(--text-faint);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
  }

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

  .work-list { display: flex; flex-direction: column; }

  .work-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 20px 12px;
    margin: 0 -12px;
    border-top: 1px solid var(--hair);
    border-radius: 10px;
  }

  .work-row:last-child { border-bottom: 1px solid var(--hair); }

  .work-row-link {
    text-decoration: none;
    color: inherit;
    transition: background-color 0.25s ease;
  }

  .work-row-link:hover { background: var(--accent-soft); }

  .work-index {
    padding-top: 4px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 10.5px;
    color: var(--text-faint);
  }

  .work-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-main);
    transition: color 0.2s ease;
  }

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

  .work-desc {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--text-sub);
    text-wrap: pretty;
  }

  .work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
  }

  .work-tags span {
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--tag-bg);
    color: var(--tag-text);
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 9.5px;
  }

  .work-meta {
    padding-top: 5px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 10px;
    color: var(--text-faint);
    white-space: nowrap;
  }

  .work-arrow {
    padding-top: 2px;
    font-size: 15px;
    color: var(--text-faint);
  }

  .writing-list { display: flex; flex-direction: column; }

  .writing-row {
    display: block;
    padding: 16px 0;
    border-top: 1px solid var(--hair);
    text-decoration: none;
    color: inherit;
  }

  .writing-row:last-child { border-bottom: 1px solid var(--hair); }

  .writing-meta {
    display: flex;
    gap: 12px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 10px;
    color: var(--text-faint);
  }

  .writing-title {
    margin-top: 5px;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text-main);
    transition: color 0.2s ease;
  }

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

  .writing-summary {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-sub);
    text-wrap: pretty;
  }

  .about-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 28px;
    align-items: center;
  }

  .about-preview h2 { margin-bottom: 10px; }

  .about-preview p {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-sub);
  }

  .about-preview .section-link {
    display: inline-block;
    margin-top: 12px;
  }

  .about-facts {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .about-facts div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hair);
    font-size: 11px;
  }

  .about-facts span {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    color: var(--text-faint);
  }

  .about-facts strong {
    font-weight: 600;
    color: var(--text-main);
  }

  /* ============ 关于页（P3） ============ */
  .page-about .container { max-width: 760px; }

  .about-hero {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 38px;
  }

  .about-avatar {
    width: 96px;
    height: 96px;
    border-radius: 26px;
    object-fit: cover;
    border: 1px solid var(--hair);
    box-shadow: 0 18px 40px -20px var(--glow);
  }

  .about-hero h1 {
    margin: 8px 0;
    font-size: clamp(34px, 5vw, 46px);
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text-main);
  }

  .about-hero .page-lede {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-sub);
  }

  .timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .timeline-list li {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 13px 0;
    border-top: 1px solid var(--hair);
  }

  .timeline-list li:last-child { border-bottom: 1px solid var(--hair); }

  .timeline-list > li > span {
    padding-top: 3px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 10.5px;
    color: var(--text-faint);
  }

  .timeline-list strong {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
  }

  .timeline-list p {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-sub);
  }

  @media (max-width: 720px) {
    .hero {
      grid-template-columns: 1fr;
      gap: 22px;
      margin-bottom: 40px;
    }

    .hero-card {
      order: -1;
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 16px;
      text-align: left;
    }

    .hero-avatar {
      width: 56px;
      height: 56px;
      border-radius: 16px;
    }

    .hero-card-name { display: none; }
    .hero-card-role { font-size: 9.5px; }
    .section-head h2 { font-size: 19px; }
    .hero-status { margin-top: 6px; }
    .hero-name { font-size: clamp(42px, 12vw, 54px); }

    .work-row {
      grid-template-columns: 26px minmax(0, 1fr);
      padding: 18px 0;
      margin: 0;
    }

    .work-meta,
    .work-arrow { display: none; }

    .about-preview { grid-template-columns: 1fr; }

    .about-facts { flex-direction: row; gap: 12px; }

    .about-facts div {
      flex: 1;
      flex-direction: column;
      gap: 3px;
    }

    .about-hero {
      flex-direction: column;
      align-items: flex-start;
      gap: 16px;
    }

    .about-avatar {
      width: 76px;
      height: 76px;
      border-radius: 22px;
    }

    .timeline-list li {
      grid-template-columns: 60px minmax(0, 1fr);
      gap: 12px;
    }
  }
  .to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 140;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--hair);
    color: var(--text-sub);
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    box-shadow: var(--shadow-2);
    transition: opacity 0.35s ease, transform 0.35s ease,
                visibility 0.35s, color 0.25s ease;
  }
  .to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
  .to-top:hover { color: var(--accent); transform: translateY(-3px); }
  .to-top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

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

  /* ============ 响应式 ============ */
  @media (max-width: 720px) {
    .nav { display: none; }
    .clock { display: none; }
    .brand-sub { display: none; }
    .brand-name { letter-spacing: 0.6px; }
    .container { padding: 108px 16px 64px; }
    .section { padding: 26px 22px; border-radius: 20px; }
    .section h2 { font-size: 17.5px; }
    .intro .lede { font-size: 16px; }
    .code-body { font-size: 11.5px; }
  }

  /* ============ 无障碍：降低动效 ============ */
  @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;
    }
    .section { opacity: 1; transform: none; }
    .tech-tag, .status-list li, .eco-item, .stack-item, .corp-item { opacity: 1; translate: 0 0; }
    .eco-bar i { transform: scaleX(var(--w, 1)); }
  }
/* ============ 文章页与归档页 ============ */
.page-article .container {
  max-width: 1080px;
}

.page-head {
  margin-bottom: 40px;
}

.page-head h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -1.4px;
  line-height: 1.2;
  margin: 14px 0 12px;
  color: var(--text-main);
}

.page-lede {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-sub);
  max-width: 58ch;
  text-wrap: pretty;
}

/* ============ 归档列表 ============ */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card {
  display: block;
  padding: 24px 26px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-2);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  color: var(--text-sub);
}

.post-card h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.45;
  margin: 9px 0 7px;
}

.post-card h2 a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.25s ease;
}

.post-card:hover h2 a {
  color: var(--accent);
}

.post-card p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-sub);
  text-wrap: pretty;
}

/* ============ 标签 ============ */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.post-tag {
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.2px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--tag-bg);
  color: var(--tag-text);
}

/* ============ 文章布局 ============ */
.article-layout {
  max-width: 720px;
  margin: 0 auto;
}

.article-layout.with-toc {
  display: grid;
  grid-template-columns: minmax(0, 720px) 220px;
  gap: 56px;
  max-width: 1036px;
  align-items: start;
}

.article-head {
  margin-bottom: 36px;
}

.article-head h1 {
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.25;
  color: var(--text-main);
  margin: 14px 0 16px;
  text-wrap: balance;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-sub);
}

/* ============ 目录 ============ */
.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-left: 18px;
  border-left: 1px solid var(--hair);
  font-size: 12.5px;
  line-height: 1.5;
  scrollbar-width: thin;
}

.toc-title {
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
  cursor: pointer;
  list-style: none;
}

.toc-title::-webkit-details-marker {
  display: none;
}

.toc-links {
  margin-top: 2px;
}

.toc a {
  display: block;
  padding: 5px 0;
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.toc a:hover,
.toc a.active {
  color: var(--accent);
  padding-left: 3px;
}

.toc .toc-sub {
  padding-left: 12px;
  font-size: 12px;
}

/* ============ 正文排版 ============ */
.article-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-light);
}

.article-body > * + * {
  margin-top: 1.15em;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--text-main);
  letter-spacing: -0.4px;
  line-height: 1.4;
  scroll-margin-top: 84px;
}

.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 2.3em;
}

.article-body h3 {
  font-size: 19px;
  font-weight: 700;
  margin-top: 1.9em;
}

.article-body h4 {
  font-size: 16.5px;
  font-weight: 700;
  margin-top: 1.7em;
}

.article-body p {
  text-wrap: pretty;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.article-body a:hover {
  opacity: 0.75;
}

.article-body strong {
  color: var(--text-main);
  font-weight: 700;
}

.article-body ul,
.article-body ol {
  padding-left: 1.45em;
}

.article-body li + li {
  margin-top: 6px;
}

.article-body li::marker {
  color: var(--text-faint);
}

.article-body blockquote {
  margin: 1.5em 0;
  padding: 6px 0 6px 20px;
  border-left: 3px solid var(--accent);
  color: var(--text-sub);
}

.article-body blockquote p {
  margin: 0;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 2.6em 0;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--hair);
}

.article-body code {
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--tag-bg);
  color: var(--text-main);
}

.article-body pre {
  margin: 1.4em 0;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--hair);
  background: var(--code-bg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-body pre code {
  display: block;
  padding: 0;
  background: none;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-light);
  white-space: pre;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 1.5em 0;
}

.article-body th,
.article-body td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--hair);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-soft);
}

/* ============ 代码复制 ============ */
.code-block {
  position: relative;
}

.code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--hair);
  background: var(--bg);
  color: var(--text-faint);
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.code-block:hover .code-copy,
.code-copy:focus-visible,
.code-copy.done {
  opacity: 1;
}

.code-copy:hover,
.code-copy.done {
  color: var(--accent);
  border-color: var(--accent);
}

@media (hover: none) {
  .code-copy {
    opacity: 1;
  }
}

/* ============ 文章免责声明 ============ */
.article-disclaimer {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--text-faint);
}

.article-disclaimer a {
  color: var(--text-sub);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-disclaimer a:hover {
  color: var(--accent);
}

/* ============ 系列文章 ============ */
.article-series {
  color: var(--accent);
  font-weight: 600;
}

.series-box {
  margin-top: 56px;
  padding: 20px 22px;
  border: 1px solid var(--hair);
  border-radius: 16px;
  background: var(--bg-soft);
}

.series-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.series-name {
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-sub);
}

.series-count {
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  color: var(--text-faint);
}

.series-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 18px;
}

.series-list li {
  margin: 0;
}

.series-link {
  display: block;
  padding: 4px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s ease;
}

.series-link:hover {
  color: var(--accent);
}

.series-link.current {
  color: var(--accent);
  font-weight: 600;
}

.series-link.current::before {
  content: "▸ ";
}

@media (max-width: 720px) {
  .series-list {
    grid-template-columns: 1fr;
  }
}

/* ============ 上一篇 / 下一篇 ============ */
.article-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--hair);
}

.article-foot:empty {
  display: none;
}

.post-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--hair);
  background: var(--bg-soft);
  text-decoration: none;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.post-nav:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.post-nav-label {
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-faint);
}

.post-nav-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-main);
}

.post-nav:last-child {
  text-align: right;
  align-items: flex-end;
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .article-layout.with-toc {
    display: flex;
    flex-direction: column;
    max-width: 720px;
  }

  .toc {
    order: -1;
    align-self: stretch;
    position: static;
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 30px;
    padding: 16px 18px;
    border: 1px solid var(--hair);
    border-radius: 14px;
    background: var(--bg-soft);
  }
}

@media (max-width: 720px) {
  .page-article .container {
    padding-top: 104px;
  }

  .article-body {
    font-size: 15.5px;
    line-height: 1.82;
  }

  .article-head h1 {
    letter-spacing: -0.8px;
  }

  .article-body table {
    display: block;
    overflow-x: auto;
  }

  .article-foot {
    grid-template-columns: 1fr;
  }

  .post-nav:last-child {
    text-align: left;
    align-items: flex-start;
  }

  .post-card {
    padding: 20px 20px;
  }
}

/* ============ 标签云与标签页 ============ */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 26px;
}

.tag-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tag-cloud-item:hover {
  color: var(--accent);
}

.tag-cloud-item span {
  color: var(--text-faint);
  font-size: 9.5px;
}

a.post-tag {
  text-decoration: none;
  transition: color 0.2s ease;
}

a.post-tag:hover {
  color: var(--accent);
}

.tag-head h1 {
  word-break: break-word;
}

.tag-back {
  margin-top: 30px;
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.tag-back a {
  color: var(--text-sub);
  text-decoration: none;
}

.tag-back a:hover {
  color: var(--accent);
}

/* ============ 404 ============ */
.page-404 .container {
  max-width: 720px;
}

.not-found {
  padding: 48px 0 80px;
  text-align: center;
}

.not-found h1 {
  margin: 18px 0 14px;
  font-size: clamp(80px, 16vw, 128px);
  font-weight: 800;
  letter-spacing: -4px;
  line-height: 1;
  color: var(--text-main);
}

.not-found p {
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--text-sub);
}

.not-found .cta {
  justify-content: center;
}
