/* ============================================================
   midodo.tech — 设计系统 v16 「留白」
   ------------------------------------------------------------
   原则
   1. 排版撑气场：超大字号、紧凑行高、克制的负字距（中文 –0.02em 上限）
   2. 留白有结构：所有间距落在 8px 刻度上，区块间用发丝线分区
   3. 色彩克制：暖白底 + 近黑墨色，强调色只用于小面积（按钮、kicker、发丝线）
   4. 单一层叠：每个选择器只定义一次，禁止 !important 堆叠
   ============================================================ */
/* 思源黑体（Noto Sans SC）自托管：访客无需访问 Google，国内可直连
   101 个 unicode-range 分片，浏览器按需拉取，首屏通常只加载 2-5 个分片 */
@import url("fonts/noto-sans-sc.css");

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 色彩 */
  --bg: #fbfbf9;
  --bg-elev: #ffffff;
  --ink: #0e1116;
  --ink-2: #2a2f38;
  --muted: #5d6470;
  --faint: #8d939e;
  --line: rgba(14, 17, 22, .085);
  --line-strong: rgba(14, 17, 22, .18);
  --accent: #7aa800;
  --accent-ink: #566f00;
  --accent-dim: rgba(122, 168, 0, .10);
  --accent-glow: rgba(160, 200, 40, .18);
  --on-accent: #10140a;
  --surface: rgba(14, 17, 22, .022);
  --surface-hover: rgba(14, 17, 22, .048);
  --surface-2: rgba(14, 17, 22, .038);
  --surface-3: rgba(14, 17, 22, .062);
  --green: #2f8f3e;
  --orange: #b26a00;
  --purple: #6b4fd1;

  /* 排版 */
  /* 排版：思源黑体优先，系统字体兜底 */
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
          -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Noto Sans SC", monospace;
  /* 首屏字号：以「每行放得下最长那句」为约束，避免词组被拆断 */
  --t-hero: clamp(32px, 7.2vw, 96px);
  --t-h1: clamp(32px, 4.4vw, 54px);
  --t-h2: clamp(26px, 3.2vw, 38px);
  --t-h3: 1.15rem;
  --t-body: 1rem;
  --t-sm: .84rem;
  --t-xs: .72rem;

  /* 间距刻度（8px 基数） */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 96px;
  --sp-8: 128px;
  --sec-space: clamp(88px, 10vw, 148px);

  /* 形状 */
  --radius: 18px;
  --radius-sm: 10px;
  --w: 1200px;
  --nav-h: 72px;
  --shadow-sm: 0 2px 14px rgba(14, 17, 22, .05);
  --shadow-md: 0 24px 64px rgba(14, 17, 22, .10);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

/* ---------- 3. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

/* ---------- 4. 通用排版 ---------- */
.kicker {
  margin: 0 0 var(--sp-3);
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.section-title,
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; line-height: 1.18; }
.section-title {
  margin: 0;
  font-size: var(--t-h2);
  letter-spacing: -.025em;
}
.lead {
  margin: var(--sp-2) 0 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 56ch;
}

/* 发丝线分区 */
.hairline {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line);
}

/* ---------- 5. 顶栏 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  /* 实色底：半透明 + backdrop-filter 在部分浏览器（如未开启该特性的
     Firefox）不会模糊，滚动时下方深色大标题会清晰透上来。导航必须完全不透明 */
  background: var(--bg);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ink);
  flex: none;
}
.brand span { color: var(--faint); font-weight: 500; }

.nav-links,
.blog-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.nav-links a,
.blog-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--t-sm);
  font-weight: 500;
  transition: color .2s ease, background-color .2s ease;
}
.nav-links a:hover,
.blog-nav a:hover { color: var(--ink); background: var(--surface-hover); }
.nav-links a.active,
.blog-nav a.active { color: var(--ink); }

/* 下拉 */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: inline-flex; align-items: center; gap: 5px; }
.nav-dropdown .caret {
  font-size: 9px;
  color: var(--faint);
  transition: transform .25s ease;
}
.nav-dropdown:hover > a .caret { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 6px);
  min-width: 158px;
  padding: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 60;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: var(--t-sm);
  white-space: nowrap;
}
.dropdown-menu a:hover { color: var(--ink); background: var(--surface-hover); }

/* 导航 CTA */
.nav-cta,
.nav-links .nav-cta,
.blog-nav a.nav-cta {
  margin-left: var(--sp-1);
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: var(--t-sm);
  font-weight: 700;
  transition: background-color .2s ease, transform .2s var(--ease);
}
.nav-cta:hover,
.nav-links .nav-cta:hover,
.blog-nav a.nav-cta:hover {
  background: var(--accent-ink);
  color: #fff;
  transform: translateY(-1px);
}

/* 汉堡按钮（≤900px） */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.menu-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
body.nav-open .menu-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(14, 17, 22, .42);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s;
}
body.nav-open .mobile-backdrop { opacity: 1; visibility: visible; }

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  width: min(320px, 84vw);
  padding: var(--sp-3);
  background: var(--bg);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform .32s var(--ease);
  overflow-y: auto;
}
body.nav-open .mobile-drawer { transform: none; }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .16em;
  color: var(--faint);
}
.drawer-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.drawer-nav { display: grid; gap: 2px; padding-top: var(--sp-3); }
.drawer-nav > a {
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}
.drawer-nav > a:hover { background: var(--surface-hover); color: var(--accent-ink); }
.drawer-group {
  margin: var(--sp-2) 0;
  padding: 4px 0 4px 10px;
  border-left: 1px solid var(--line);
}
.drawer-group-title {
  padding: 6px 0 8px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .16em;
  color: var(--faint);
}
.drawer-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: .92rem;
}
.drawer-sub em {
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-style: normal;
  color: var(--accent-ink);
}
.drawer-sub:hover { background: var(--surface-hover); color: var(--ink); }

/* ---------- 6. 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--nav-h));
  padding: clamp(56px, 9vh, 120px) 0 clamp(64px, 9vh, 110px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -22%;
  right: -14%;
  width: 62vw;
  height: 62vw;
  max-width: 780px;
  max-height: 780px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 62%);
  opacity: .5;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { position: relative; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 var(--sp-5);
  padding: 6px 14px 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .06em;
  color: var(--muted);
}
.hero-eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.hero-title {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: var(--t-hero);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.03em;
  text-wrap: balance;
  word-break: keep-all;
}
.ht-1 { color: var(--ink); }
/* 第二行回响：深档橄榄绿，与站点强调色同源但压低明度，保证白底对比度 */
.ht-2 { color: var(--accent-ink); }

.hero-slogan {
  max-width: 44ch;
  margin: var(--sp-5) 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.1875rem);
  line-height: 1.7;
}
.hero .cta-row { margin-top: var(--sp-6); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 4vh, 40px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--faint);
  transition: color .25s ease, border-color .25s ease, transform .25s ease;
}
.scroll-hint:hover {
  color: var(--accent-ink);
  border-color: var(--line-strong);
  transform: translateX(-50%) translateY(3px);
}
.scroll-hint svg { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ---------- 7. 按钮 ---------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cta-row.center { justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background-color .22s ease, color .22s ease,
              border-color .22s ease, transform .22s var(--ease),
              box-shadow .22s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent-ink); color: #fff; box-shadow: 0 10px 28px var(--accent-glow); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--ink); }
.btn-sm { padding: 8px 15px; font-size: var(--t-xs); }
.btn.danger { color: var(--orange); border-color: rgba(178, 106, 0, .35); background: transparent; }

/* ---------- 8. 自我介绍 ---------- */
.intro { padding: var(--sec-space) 0 0; }
.who-grid {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.intro-text {
  max-width: 56ch;
  margin: 0 0 var(--sp-2);
  color: var(--ink-2);
  font-size: clamp(1rem, 1.2vw, 1.0625rem);
  line-height: 1.85;
}
.intro-text:last-of-type { margin-bottom: 0; }
.who-quote {
  margin: var(--sp-5) 0 0;
  padding: 2px 0 2px var(--sp-3);
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: 1.8;
}
.who-quote-by {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--faint);
}
.intro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--sp-4);
}
.chip {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .02em;
  color: var(--muted);
}

/* 名片 */
.profile-card {
  position: relative;
  overflow: hidden;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pc-head { display: flex; align-items: center; gap: var(--sp-2); }
.avatar-xl {
  width: 60px;
  height: 60px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}
.profile-card h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.pc-role {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 1.5;
}
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--sp-3);
}
.pc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: var(--sp-3);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.pc-stat {
  padding: var(--sp-2) var(--sp-1);
  background: var(--bg);
  text-align: center;
}
.pc-stat .num {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1.3;
}
.pc-stat .num.day1 { color: var(--accent-ink); }
.pc-stat .lbl {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--faint);
}

/* 聚光灯（.spot 保留用于交互反馈） */
.spot { position: relative; }
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), var(--accent-dim), transparent 70%);
  opacity: 0;
  transition: opacity .3s ease;
}
.spot:hover::before { opacity: 1; }

/* ---------- 9. 想法清单 ---------- */
.ideas { margin-top: clamp(72px, 9vw, 120px); }
.ideas-sub {
  margin: var(--sp-1) 0 var(--sp-5);
  color: var(--muted);
  font-size: var(--t-sm);
}
.ideas-list { display: grid; border-top: 1px solid var(--line); }
.idea-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left .3s var(--ease), background-color .25s ease;
}
.idea-row:hover { padding-left: 14px; background: var(--surface); }
.idea-row .i-num {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--faint);
  letter-spacing: .06em;
}
.idea-row .i-main b {
  display: block;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -.02em;
  transition: color .2s ease;
}
.idea-row:hover .i-main b { color: var(--accent-ink); }
.idea-row .i-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--t-sm);
}
.idea-row .i-status {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--faint);
  letter-spacing: .04em;
  white-space: nowrap;
  transition: color .2s ease, transform .3s var(--ease);
}
.idea-row:hover .i-status { color: var(--accent-ink); transform: translateX(4px); }
.idea-row .i-status.s-purple,
.idea-row .i-status.s-amber,
.idea-row .i-status.s-green { color: var(--faint); }

/* ---------- 10. 第一天 / 时间线 ---------- */
.now { padding: var(--sec-space) 0 0; }
.now-sub {
  margin: var(--sp-1) 0 var(--sp-6);
  color: var(--muted);
  font-size: 1.0625rem;
}
.timeline {
  position: relative;
  display: grid;
  gap: var(--sp-4);
  padding-left: var(--sp-4);
  border-left: 1px solid var(--line);
}
.tl-item {
  position: relative;
  padding: var(--sp-3) 0;
  transition: transform .3s var(--ease);
}
.tl-item::before {
  content: "";
  position: absolute;
  top: calc(var(--sp-3) + 7px);
  left: calc(-1 * var(--sp-4) - 4px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent);
}
.tl-item:hover { transform: translateX(4px); }
.tl-item .when {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .08em;
  color: var(--faint);
}
.tl-item h3 {
  margin: 8px 0 6px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.tl-item p {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 1.75;
}
.ad-num { color: var(--accent-ink); }

/* ---------- 11. 找到我 ---------- */
.contact { padding: var(--sec-space) 0 var(--sp-8); }
.contact-sub {
  max-width: 56ch;
  margin: var(--sp-2) 0 var(--sp-5);
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.75;
}
.mail-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: clamp(.95rem, 1.6vw, 1.0625rem);
  font-weight: 500;
  transition: background-color .22s ease, border-color .22s ease, transform .22s var(--ease);
}
.mail-pill:hover {
  background: var(--surface-hover);
  border-color: var(--ink);
  transform: translateY(-2px);
}
.mp-ico { color: var(--accent-ink); flex: none; }
.mp-addr { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.mp-arrow { color: var(--faint); transition: transform .22s ease; }
.mail-pill:hover .mp-arrow { transform: translateX(3px); }
.contact-note {
  margin: var(--sp-2) 0 0;
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--faint);
}

/* ---------- 12. 留言板 ---------- */
.gb-card {
  max-width: 620px;
  margin: clamp(64px, 8vw, 104px) 0 0;
  padding-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--line);
}
.gb-form { display: grid; gap: var(--sp-3); }
.gb-input {
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-size: .95rem;
  transition: border-color .22s ease;
}
.gb-input::placeholder { color: var(--faint); }
.gb-input:focus { outline: none; border-bottom-color: var(--accent-ink); }
.gb-textarea { min-height: 120px; resize: vertical; }
.gb-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.gb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}
.gb-count {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--faint);
}
.gb-btn {
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: var(--t-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background-color .22s ease, transform .22s var(--ease);
}
.gb-btn:hover:not(:disabled) { background: var(--accent-ink); color: #fff; transform: translateY(-2px); }
.gb-btn:disabled { opacity: .5; cursor: default; }
.gb-err {
  margin: 0;
  color: var(--orange);
  font-size: var(--t-sm);
}
.gb-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(14, 17, 22, .5);
  backdrop-filter: blur(6px);
}
.gb-modal[hidden] { display: none; }
.gb-modal-card {
  width: min(380px, 100%);
  padding: var(--sp-5) var(--sp-4);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.gb-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 0 auto var(--sp-2);
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-ink);
  font-size: 1.25rem;
  font-weight: 700;
}
.gb-modal-card h3 { margin: 0 0 8px; font-size: 1.125rem; }
.gb-modal-card p {
  margin: 0 0 var(--sp-4);
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 1.7;
}

/* ---------- 13. 页脚 ---------- */
footer {
  border-top: 1px solid var(--line);
}
.foot-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  /* 只给纵向内边距：横向内边距来自同一元素上的 .container。
     用 padding 简写会把左右清成 0，窄屏下文字直接贴边、· 被挤到行首 */
  padding-block: var(--sp-4);
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--faint);
}
.foot-bottom.center { justify-content: center; text-align: center; }
/* 页脚按组换行：组内保持一行，避免窄屏下「·」被挤到行首 */
.fb-group { display: inline-block; }
.foot-bottom a { color: var(--faint); transition: color .2s ease; }
.foot-bottom a:hover { color: var(--accent-ink); }
.foot-center { padding: var(--sp-5) 0 0; }

/* ---------- 14. 内页标题区 ---------- */
.page-head {
  padding: clamp(56px, 8vw, 104px) 0 clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  margin: 0;
  font-size: var(--t-h1);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.page-head .lead { margin-top: var(--sp-2); }
.page-head .kicker { margin-bottom: var(--sp-2); }

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--sp-4) 0 0;
}
.cat-tabs a {
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--t-sm);
  color: var(--muted);
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.cat-tabs a:hover { color: var(--ink); border-color: var(--line-strong); }
.cat-tabs a.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  font-weight: 700;
}

/* ---------- 15. 文章列表 ---------- */
.list {
  display: grid;
  padding: var(--sp-2) 0 var(--sp-7);
  border-top: 1px solid var(--line);
  margin-top: var(--sp-4);
}
.list-row {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 34px;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left .3s var(--ease);
}
.list-row:hover { padding-left: 12px; }
.list-row .num {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--faint);
  letter-spacing: .06em;
}
.list-row h3 {
  margin: 0 0 6px;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -.02em;
  transition: color .2s ease;
}
.list-row:hover h3 { color: var(--accent-ink); }
.list-row p {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 1.7;
}
.list-row .meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: 10px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--faint);
}
.list-row .meta .cat { color: var(--accent-ink); }
.list-row .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--faint);
  transition: border-color .22s ease, color .22s ease, transform .3s var(--ease);
}
.list-row:hover .arrow {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
  transform: rotate(-45deg);
}
.list-empty {
  padding: var(--sp-8) var(--sp-3);
  text-align: center;
  color: var(--faint);
  font-size: var(--t-sm);
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--sp-5) 0 var(--sp-8);
}
.pager button {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: var(--t-sm);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.pager button:hover:not(:disabled) { color: var(--ink); border-color: var(--line-strong); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager span {
  align-self: center;
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--faint);
}

/* ---------- 16. 文章页 ---------- */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 0 var(--sp-8);
}
.article .back {
  display: inline-block;
  margin-bottom: var(--sp-4);
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  color: var(--faint);
  transition: color .2s ease;
}
.article .back:hover { color: var(--accent-ink); }
.article h1 {
  margin: 0 0 var(--sp-2);
  font-size: var(--t-h1);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.14;
  overflow-wrap: anywhere;
}
.article .meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  color: var(--faint);
}
.article .meta .cat { color: var(--accent-ink); }
.article .body {
  padding: var(--sp-5) 0 var(--sp-6);
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--ink-2);
}
.article .body p { margin: 0 0 var(--sp-3); }
.article .body h2 {
  margin: var(--sp-6) 0 var(--sp-2);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.article .body h3 {
  margin: var(--sp-5) 0 var(--sp-2);
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--ink);
}
.article .body a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article .body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: .88em;
  color: var(--accent-ink);
}
.article .body pre {
  margin: 0 0 var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .86rem;
  line-height: 1.75;
  color: var(--ink-2);
}
.article .body pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.article .body blockquote {
  margin: var(--sp-4) 0;
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-3);
  border-left: 2px solid var(--accent);
  color: var(--muted);
}
.article .body ul,
.article .body ol { margin: 0 0 var(--sp-3); padding-left: 1.4em; }
.article .body li { margin-bottom: 6px; }
.article .body li::marker { color: var(--accent-ink); }
.article .body hr {
  height: 1px;
  margin: var(--sp-6) 0;
  border: 0;
  background: var(--line);
}
.article .body table {
  width: 100%;
  margin-bottom: var(--sp-3);
  border-collapse: collapse;
  font-size: var(--t-sm);
}
.article .body th,
.article .body td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}
.article .body th { background: var(--surface); color: var(--ink); font-weight: 700; }
.article .body img { max-width: 100%; border-radius: var(--radius-sm); }
.article .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}
.article .tags span {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--muted);
}

/* ---------- 17. 后台 ---------- */
.admin {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) 0 var(--sp-8);
}
.login-card {
  max-width: 380px;
  margin: var(--sp-7) auto;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.login-card h1 { margin: 0 0 6px; font-size: 1.5rem; }
.login-card p { margin: 0 0 var(--sp-3); color: var(--muted); font-size: var(--t-sm); }
.login-card input { width: 100%; }
.login-card .err { margin: 12px 0 0; color: var(--orange); font-size: var(--t-sm); min-height: 1em; }
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.admin-head h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.admin-head .sub { color: var(--muted); font-size: var(--t-sm); }
.admin-list { display: grid; gap: 8px; margin-bottom: var(--sp-4); }
.admin-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.admin-item .t { flex: 1; font-size: .92rem; font-weight: 700; }
.admin-item .s {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--muted);
}
.admin-item .s.published { color: var(--accent-ink); border-color: rgba(122, 168, 0, .4); }
.admin-item button { font-size: var(--t-xs); padding: 6px 12px; }
.editor { display: none; }
.editor.on { display: block; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.editor label {
  display: block;
  margin: 14px 0 6px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .06em;
  color: var(--faint);
}
.editor input,
.editor textarea,
.editor select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  font-size: .92rem;
}
.editor .md-input {
  min-height: 440px;
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.7;
  resize: vertical;
}
.preview {
  min-height: 440px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow-y: auto;
  font-size: .92rem;
  line-height: 1.85;
  color: var(--ink-2);
}
.preview h2 { margin: 20px 0 10px; font-size: 1.25rem; color: var(--ink); }
.preview pre { padding: 12px; border-radius: 8px; background: var(--surface-2); overflow-x: auto; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--sp-3); }
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 130;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: var(--t-sm);
  font-weight: 700;
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 18. 404 / 旧版页辅助 ---------- */
.site-header {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 clamp(20px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}

/* 进度条 */
.progress,
#progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .1s linear;
}

/* ---------- 19. 动效 ---------- */
.fade-up { animation: fade-up .8s var(--ease) both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.egg-on .ad-num { color: var(--accent-ink); }

/* ---------- 20. 响应式 ---------- */
@media (max-width: 900px) {
  :root { --nav-h: 64px; }

  .menu-toggle { display: flex; }
  .nav-links,
  .blog-nav { display: none; }

  .who-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .profile-card { max-width: 460px; }
  .editor-grid { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
}

@media (max-width: 600px) {
  :root { --sec-space: 72px; }

  .hero { min-height: auto; padding: 56px 0 64px; }
  .hero-eyebrow { margin-bottom: var(--sp-4); }
  .hero-slogan { margin-top: var(--sp-4); }
  .hero .cta-row { margin-top: var(--sp-5); }

  .idea-row { grid-template-columns: 32px 1fr; gap: var(--sp-2); padding: 18px 0; }
  .idea-row .i-status { grid-column: 2; justify-self: start; }
  .idea-row:hover { padding-left: 6px; }

  .list-row { grid-template-columns: 32px 1fr; gap: var(--sp-2); }
  .list-row .arrow { display: none; }
  .list-row:hover { padding-left: 6px; }

  .btn { padding: 12px 20px; }
  .mail-pill { padding: 12px 18px; }
  .article .body { font-size: 1rem; }
  .admin-item { flex-wrap: wrap; }
}

/* 极窄屏 */
@media (max-width: 380px) {
  .brand { font-size: .92rem; }
  .hero-eyebrow { font-size: .65rem; }
}

/* ---------- 21. 降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .scroll-hint svg { animation: none; }
}
