  /* =====================================================
     夜月行 · redesign
     节奏：hero(深) → 文章(米白) → 项目(浅灰绿) → 关于(米白) → 页脚(深)
     间距体系：8px 基准
     ===================================================== */

  :root {
    /* 明暗两套底色 */
    --night: #101a18;      /* hero / 页脚深底 */
    --night-2: #0e1513;    /* 更深一档 */
    --paper: #f6f2ea;      /* 米白 */
    --paper-2: #efe9dd;
    --sage-paper: #e9ede3; /* 项目区浅灰绿 */
    --card: #fffdf9;

    --cream: #f6f2ea;
    --cream-dim: rgba(246, 242, 234, .72);
    --cream-faint: rgba(246, 242, 234, .45);

    --ink: #26241f;
    --ink-2: #55504a;
    --muted: #5f5a51;
    --dim: #7b7468;
    --line: #ded5c6;
    --line-2: #c9bfa9;
    --line-dark: rgba(246, 242, 234, .12);

    --sage: #5d8064;
    --sage-soft: #e9eee5;
    --clay: #b0805f;
    --apricot: #d9a066;    /* 杏黄点缀，取自主视觉 */

    --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(58, 50, 38, .05), 0 16px 32px -20px rgba(58, 50, 38, .28);
    --shadow-dark: 0 24px 64px -24px rgba(0, 0, 0, .55);
  }

  * { box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC",
      "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC",
      "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
  }

  ::selection { background: #dfe8da; color: var(--ink); }

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

  img { max-width: 100%; }

  .wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }

  /* ---------- nav：初始透明（压在深色 hero 上），滚动后毛玻璃 ---------- */
  .nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: transparent;
    color: var(--cream);
    border-bottom: 1px solid transparent;
    transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  }

  .nav.scrolled {
    background: rgba(14, 21, 19, .72);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    border-bottom-color: var(--line-dark);
  }

  .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

  .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .01em; }

  .brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--apricot);
  }

  .brand-sub {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--cream-faint);
    letter-spacing: .14em;
    text-transform: uppercase;
    padding-left: 10px;
    margin-left: 2px;
    border-left: 1px solid var(--line-dark);
  }

  .nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--cream-dim); }
  .nav-links a { position: relative; padding: 4px 0; transition: color .2s; }
  .nav-links a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 1px;
    background: var(--apricot);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .28s ease;
  }
  .nav-links a:hover { color: var(--cream); }
  .nav-links a:hover::after { transform: scaleX(1); }

  /* ---------- hero（深） ---------- */
  .hero {
    position: relative;
    background:
      radial-gradient(720px 480px at 12% -8%, rgba(217, 160, 102, .12), transparent 60%),
      radial-gradient(880px 560px at 88% 4%, rgba(93, 128, 100, .18), transparent 64%),
      var(--night);
    color: var(--cream);
    padding: 96px 0 88px;
    overflow: hidden;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;   /* 60/40 视觉分栏（文字略宽由字号撑起） */
    gap: 64px;
    align-items: center;
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--apricot);
    margin-bottom: 24px;
  }

  .eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--apricot);
    opacity: .6;
  }

  h1.name {
    margin: 0 0 8px;
    font-size: clamp(56px, 9vw, 104px);
    line-height: 1.08;
    letter-spacing: .08em;              /* 超大字号 + 字距处理 */
    font-weight: 640;
    color: var(--cream);
  }

  .role {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--cream-dim);
    letter-spacing: .03em;
    margin-bottom: 24px;
  }

  .role b { color: var(--cream); font-weight: 500; }

  .lede { color: var(--cream-dim); font-size: 16px; max-width: 44ch; margin: 0 0 32px; }
  .lede em {
    font-style: normal;
    color: var(--cream);
    border-bottom: 1px dashed rgba(217, 160, 102, .6);
    padding-bottom: 1px;
  }

  .btns { display: flex; gap: 12px; flex-wrap: wrap; }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 500;
    transition: background .18s, border-color .18s, color .18s, transform .18s;
  }

  .btn-primary {
    background: var(--apricot);
    color: #241a10;
    border: 1px solid var(--apricot);
  }
  .btn-primary:hover { background: #e3b078; border-color: #e3b078; transform: translateY(-2px); }

  .btn-ghost {
    background: transparent;
    color: var(--cream);
    border: 1px solid rgba(246, 242, 234, .28);
  }
  .btn-ghost:hover { border-color: var(--cream); transform: translateY(-2px); }

  .hero-art { margin: 0; }
  .hero-art img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid var(--line-dark);
    box-shadow: var(--shadow-dark);
    will-change: transform;
  }

  /* 细滚动提示 */
  .scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--cream-faint);
  }
  .scroll-text {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .3em;
    text-transform: uppercase;
  }
  .scroll-line {
    width: 1px;
    height: 40px;
    background: var(--line-dark);
    position: relative;
    overflow: hidden;
  }
  .scroll-line::after {
    content: "";
    position: absolute;
    left: 0; top: -12px;
    width: 1px;
    height: 12px;
    background: var(--apricot);
    animation: scroll-drop 2.2s ease-in-out infinite;
  }
  @keyframes scroll-drop {
    0%   { top: -12px; }
    70%  { top: 40px; }
    100% { top: 40px; }
  }

  /* ---------- 区块通用 ---------- */
  section { padding: 96px 0; }

  .sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 40px; }

  .sec-num {
    font-family: var(--mono);
    font-size: 11.5px;
    color: #4f7358;
    letter-spacing: .1em;
  }

  h2 { margin: 0; font-size: 24px; letter-spacing: -.012em; font-weight: 620; color: var(--ink); }

  .sec-head p { margin: 0; color: var(--muted); font-size: 13px; }

  .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

  /* ---------- 文章（米白）：封面卡片，2 列 ---------- */
  #posts { background: var(--paper); }

  .posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .post {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(58, 50, 38, .03);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  }

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

  .post-cover {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--paper-2);
  }
  .post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.001);
    transition: transform .5s ease;
  }
  .post:hover .post-cover img { transform: scale(1.05); }

  .post-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 24px 24px; }

  .post-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

  .post time { font-family: var(--mono); font-size: 12px; color: #4e4941; letter-spacing: .03em; }

  .post h3 {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.6;
    font-weight: 520;
    letter-spacing: -.004em;
    color: var(--ink);
    transition: color .2s;
  }
  .post:hover h3 { color: var(--sage); }

  .post .meta { font-size: 12.5px; color: #6a6459; }

  .tag {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--ink-2);
    border: 1px solid var(--line-2);
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
    background: var(--card);
    transition: border-color .2s, color .2s;
  }
  .post:hover .tag { border-color: rgba(111, 143, 115, .45); color: var(--sage); }

  /* ---------- 项目（浅灰绿）：muse 封面卡片 ---------- */
  #projects {
    background:
      radial-gradient(640px 400px at 4% 0%, rgba(255, 255, 255, .5), transparent 60%),
      var(--sage-paper);
  }

  .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

  .card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid #d8ddcf;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(58, 50, 38, .03);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  }

  .card:hover {
    transform: translateY(-6px);
    border-color: #c4cdb8;
    box-shadow: var(--shadow);
  }

  .card-cover { position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; background: var(--night); }
  .card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.001);
    transition: transform .5s ease;
  }
  .card:hover .card-cover img { transform: scale(1.05); }

  .card-view {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(16, 26, 24, .55);
    color: var(--cream);
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: .12em;
    border: 1px solid rgba(246, 242, 234, .3);
    border-radius: 999px;
    margin: auto;
    width: 96px;
    height: 40px;
    opacity: 0;
    transition: opacity .24s ease;
  }
  .card:hover .card-view { opacity: 1; }

  .card-body { padding: 20px 24px 24px; }
  .card h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
  .card p { margin: 0 0 16px; font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }

  .stack { display: flex; flex-wrap: wrap; gap: 8px; }

  .chip {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .03em;
    color: var(--ink-2);
    background: #e3e8da;
    border-radius: 4px;
    padding: 3px 8px;
  }

  /* ---------- 关于（米白） ---------- */
  #about { background: var(--paper); }

  .about { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: start; }

  .about-main { min-width: 0; }

  .whoami { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }

  .avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--paper-2);
    border: 1px solid var(--line-2);
  }

  .whoami-name { font-size: 16.5px; font-weight: 600; letter-spacing: -.008em; }
  .whoami-role { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }

  .about-main p { color: var(--ink-2); font-size: 15px; margin: 0 0 16px; }
  .about-main p strong { color: var(--ink); font-weight: 600; }

  .about-art { margin: 24px 0 0; }
  .about-art img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  /* facts：侧栏两列网格 */
  .facts {
    position: sticky;
    top: 88px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 1px 2px rgba(58, 50, 38, .03);
  }

  .fact {
    margin: 0;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .fact:nth-child(odd) { border-right: 1px solid var(--line); }
  /* 第二行（3、4 项）与通栏末项去掉底边，避免双线 */
  .fact:nth-child(3), .fact:nth-child(4), .fact:last-child { border-bottom: 0; }
  .fact-wide { grid-column: 1 / -1; border-right: 0 !important; }

  .fact dt { color: var(--muted); font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; }
  .fact dd { margin: 0; color: var(--ink); font-size: 13.5px; }

  /* ---------- 页脚（深） ---------- */
  footer {
    background:
      radial-gradient(640px 320px at 84% 0%, rgba(93, 128, 100, .16), transparent 64%),
      var(--night-2);
    color: var(--cream-dim);
    padding: 64px 0 32px;
    font-size: 13px;
  }

  .foot-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: start;
  }

  .foot-name { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; color: var(--cream); }
  .foot-sub { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--cream-faint); margin-top: 8px; }

  .foot-nav { display: flex; gap: 24px; font-size: 13px; }
  .foot-nav a { transition: color .2s; color: var(--cream-dim); }
  .foot-nav a:hover { color: var(--apricot); }

  .foot-rule {
    height: 1px;
    margin: 32px 0 24px;
    background: linear-gradient(90deg, rgba(246, 242, 234, .18), rgba(246, 242, 234, .04));
  }

  .foot-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--cream-faint);
    font-size: 12.5px;
  }
  .foot-year { font-family: var(--mono); letter-spacing: .1em; }
  .foot-icp { color: inherit; text-decoration: none; }
  .foot-icp:hover { color: var(--apricot); text-decoration: underline; }

  /* ---------- reveal ---------- */
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .65s ease, transform .65s ease; }
  .reveal.in { opacity: 1; transform: none; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .scroll-line::after { animation: none; }
    .post, .card, .btn, .post-cover img, .card-cover img { transition: none; }
    .hero-art img { transform: none !important; }
  }

  /* ---------- responsive ---------- */
  @media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-art { max-width: 560px; }
    .cards { grid-template-columns: 1fr; max-width: 560px; }
    .about { grid-template-columns: 1fr; gap: 32px; }
    .facts { position: static; }
    .nav-links { gap: 18px; font-size: 13px; }
    .brand-sub { display: none; }
  }

  @media (max-width: 768px) {
    .posts { grid-template-columns: 1fr; }
    section { padding: 64px 0; }
    .hero { padding: 64px 0 80px; }
    .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  }

  @media (max-width: 620px) {
    .wrap { padding: 0 16px; }
    .sec-head p { display: none; }
    h2 { font-size: 20px; }
    section { padding: 48px 0; }
    .nav-inner { height: 56px; }
    .nav-links { gap: 14px; font-size: 12.5px; }
    .brand { gap: 8px; font-size: 15px; }
    h1.name { letter-spacing: .05em; }
    .lede { font-size: 15px; }
    .post-body { padding: 16px 16px 20px; }
    .card-body { padding: 16px 16px 20px; }
    .avatar { width: 60px; height: 60px; }
    .scroll-hint { display: none; }
    .foot-bottom { justify-content: flex-start; }
  }
