/* ==========================================================================
   个人技术站 — 主样式表
   纯手写 CSS，无外部依赖、无网络字体，首屏体积小、渲染快
   ========================================================================== */

/* ---------- 变量 ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-ink: #0e1420;
  --text: #12161f;
  --text-2: #4a5262;
  --text-3: #838c9c;
  --line: #e9ebef;
  --line-strong: #d8dce3;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eef3ff;
  --accent: #0d9488;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 8px 24px -8px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .04);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
          "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --container: 1080px;
  --header-h: 64px;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color .18s ease;
}
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -.01em;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
li { margin-bottom: .35em; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

::selection { background: #d7e3ff; color: #0b1b3a; }

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

code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .12em .4em;
}

/* ---------- 布局 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--tight { padding: 48px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.55rem;
  margin: 0;
}

.section-head .more {
  font-size: .9rem;
  color: var(--text-2);
  white-space: nowrap;
}
.section-head .more:hover { color: var(--brand); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}

.lead {
  font-size: 1.06rem;
  color: var(--text-2);
  max-width: 62ch;
}

.muted { color: var(--text-3); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -.01em;
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: .92rem;
  color: var(--text-2);
  transition: background .18s ease, color .18s ease;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  position: relative;
  transition: transform .2s ease, background .2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  transition: transform .2s ease;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 首屏 ---------- */
.hero {
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 380px at 82% -8%, #eef4ff 0%, rgba(238, 244, 255, 0) 62%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.95rem, 4.2vw, 2.85rem);
  letter-spacing: -.025em;
  margin-bottom: .5em;
}

.hero .lead { font-size: 1.08rem; margin-bottom: 26px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: .94rem;
  font-weight: 550;
  border: 1px solid transparent;
  transition: transform .16s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .8);
}
.btn--primary:hover { background: var(--brand-dark); color: #fff; }

.btn--ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--text-3); color: var(--text); }

/* 首屏右侧：终端风格卡片 */
.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-ink);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.9;
}

.hero-panel__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.hero-panel__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a4356;
}
.hero-panel__bar span {
  margin-left: 8px;
  color: #6b768b;
  font-size: .74rem;
  letter-spacing: .04em;
}

.hero-panel__body { padding: 16px 18px 20px; color: #c8d2e4; }
.hero-panel__body .k { color: #7dd3c0; }
.hero-panel__body .s { color: #93b4ff; }
.hero-panel__body .c { color: #5c6779; }

/* ---------- 数据条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 44px;
}
.stat {
  background: #fff;
  padding: 18px 20px;
}
.stat b {
  display: block;
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -.02em;
}
.stat span { font-size: .82rem; color: var(--text-3); }

/* ---------- 卡片 ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 22px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

a.card { color: inherit; }
a.card:hover { color: inherit; }

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}
.card__icon svg { width: 19px; height: 19px; }

.card h3 {
  font-size: 1.06rem;
  margin-bottom: .45em;
}

.card p {
  font-size: .92rem;
  color: var(--text-2);
  margin-bottom: 16px;
}

.card__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: .82rem;
  color: var(--text-3);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tag {
  font-size: .74rem;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text-2);
  white-space: nowrap;
}

.badge {
  font-size: .72rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eaf7f4;
  color: #0f766e;
  border: 1px solid #cdece5;
  font-weight: 550;
  white-space: nowrap;
}
.badge--gray { background: var(--bg-soft); color: var(--text-3); border-color: var(--line); }

/* ---------- 项目列表（列表形态） ---------- */
.project {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.project:first-of-type { border-top: 1px solid var(--line); }

.project__idx {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--text-3);
  padding-top: 4px;
}

.project__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.project__head h3 { font-size: 1.12rem; margin: 0; }

.project__desc {
  color: var(--text-2);
  font-size: .94rem;
  max-width: 72ch;
  margin-bottom: 14px;
}

.project__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .84rem;
  color: var(--text-3);
}
.project__meta .tags { margin: 0 auto 0 0; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .86rem;
  font-weight: 550;
}
.link-arrow::after {
  content: "→";
  transition: transform .18s ease;
}
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- 文章列表 ---------- */
.post-list { border-top: 1px solid var(--line); }

.post-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  transition: background .18s ease, padding .18s ease;
}
.post-item:hover {
  background: var(--bg-soft);
  color: inherit;
}

.post-item time {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-3);
  white-space: nowrap;
}

.post-item h3 {
  font-size: 1.02rem;
  margin: 0 0 4px;
  font-weight: 600;
}
.post-item:hover h3 { color: var(--brand); }

.post-item p {
  margin: 0;
  font-size: .88rem;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-item .cat {
  font-size: .76rem;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

/* ---------- 文章正文 ---------- */
.post-header {
  padding: 56px 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.post-header h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  max-width: 22ch;
  margin-bottom: .4em;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .84rem;
  color: var(--text-3);
  font-family: var(--mono);
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

.post-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0 24px;
  font-size: 1.02rem;
}

.post-body h2 {
  font-size: 1.32rem;
  margin: 2.2em 0 .7em;
  padding-left: 12px;
  border-left: 3px solid var(--brand);
}
.post-body h3 {
  font-size: 1.08rem;
  margin: 1.9em 0 .5em;
}
.post-body > h2:first-child { margin-top: 0; }

.post-body blockquote {
  margin: 1.6em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--line-strong);
  background: var(--bg-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text-2);
  font-size: .96rem;
}
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body pre {
  margin: 1.5em 0;
  padding: 16px 18px;
  background: var(--bg-ink);
  color: #d3dcec;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.7;
}
.post-body pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: .9rem;
}
.post-body th, .post-body td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
}
.post-body th { background: var(--bg-soft); font-weight: 600; }

.post-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 0 72px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- 关于页 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.avatar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: #fff;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.avatar {
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 650;
  margin-bottom: 14px;
}

.avatar-card h2 { font-size: 1.05rem; margin-bottom: 2px; }
.avatar-card .role { font-size: .84rem; color: var(--text-3); margin-bottom: 16px; }

.meta-list {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  font-size: .84rem;
}
.meta-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}
.meta-list li .k {
  flex: none;
  color: var(--text-3);
}
.meta-list li > span:last-child {
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-2);
}
.meta-list dt, .meta-list .k { color: var(--text-3); }

.block-title {
  font-size: 1.02rem;
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.block-title:first-child { margin-top: 0; }

.skill-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: .92rem;
}
.skill-row:last-child { border-bottom: 0; }
.skill-row dt { color: var(--text-3); font-size: .86rem; }
.skill-row dd { margin: 0; }

/* 时间线 */
.timeline {
  list-style: none;
  margin: 20px 0 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--line);
}
.timeline li {
  position: relative;
  padding: 0 0 24px 20px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
}
.timeline time {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text-3);
  display: block;
  margin-bottom: 2px;
}
.timeline b { font-size: .96rem; font-weight: 600; display: block; margin-bottom: 2px; }
.timeline p { font-size: .88rem; color: var(--text-2); margin: 0; }

/* ---------- 联系方式 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.contact-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); color: inherit; }

.contact-item .ico {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex: none;
}
.contact-item .ico svg { width: 18px; height: 18px; }
.contact-item .label {
  display: block;
  font-size: .78rem;
  color: var(--text-3);
  margin-bottom: 1px;
}
.contact-item .value {
  display: block;
  font-size: .92rem;
  font-weight: 550;
  word-break: break-all;
}

.note-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 20px;
  font-size: .88rem;
  color: var(--text-2);
}
.note-box h3 { font-size: .95rem; margin-bottom: 8px; }
.note-box ul { margin: 0; padding-left: 1.1em; }
.note-box li { margin-bottom: 6px; }

/* ---------- 页内 CTA ---------- */
.cta {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  background:
    radial-gradient(600px 220px at 88% 0%, #eef4ff 0%, rgba(238, 244, 255, 0) 70%),
    #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta h2 { font-size: 1.35rem; margin-bottom: .3em; }
.cta p { color: var(--text-2); font-size: .94rem; margin: 0; max-width: 46ch; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 48px 0 32px;
  font-size: .88rem;
  color: var(--text-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-grid h3 {
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 7px; }
.footer-grid a { color: var(--text-2); }
.footer-grid a:hover { color: var(--brand); }

.footer-brand p { font-size: .86rem; color: var(--text-3); max-width: 34ch; margin: 12px 0 0; }

.footer-bottom {
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text-3);
}
.footer-bottom .legal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-bottom a { color: var(--text-3); }
.footer-bottom a:hover { color: var(--brand); }

/* 备案信息块：审核重点关注，单独成行、清晰可见 */
.filing {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text-3);
}
.filing a { color: var(--text-2); }
.filing a:hover { color: var(--brand); }

/* ---------- 占位标记 ---------- */
.todo {
  background: #fff7d6;
  border-bottom: 1px dashed #d9b53a;
  color: #7a5c00;
  padding: 0 2px;
  border-radius: 2px;
}

/* ---------- 动效 ---------- */
/* 入场动效：默认可见，仅在 JS 正常执行（html.js）时才隐藏，
   保证禁用脚本或脚本加载失败时内容不会消失 */
.reveal { opacity: 1; transform: none; }

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-panel { max-width: 520px; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .avatar-card { position: static; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  .avatar { margin-bottom: 0; }
  .avatar-card .meta-list { flex: 1 1 100%; min-width: 0; }
  .avatar-card > div:not(.avatar) { flex: 1 1 140px; min-width: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  :root { --header-h: 58px; }

  .container { padding: 0 18px; }
  .section { padding: 52px 0; }
  .hero { padding: 48px 0 44px; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 10px 12px; font-size: .96rem; }

  .grid--3, .grid--2 { grid-template-columns: 1fr; }

  .stat { padding: 14px 16px; }
  .stat b { font-size: 1.2rem; }

  .post-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 18px 4px;
  }
  .post-item .cat { justify-self: start; margin-top: 6px; }

  .project { grid-template-columns: 1fr; gap: 8px; }
  .project__idx { padding-top: 0; }

  .post-header { padding: 36px 0 22px; }
  .post-body { padding: 32px 0 16px; font-size: 1rem; }
  .post-body h2 { font-size: 1.18rem; }
  .post-body table { font-size: .82rem; }
  .post-body th, .post-body td { padding: 8px 10px; }
  .post-body pre { font-size: .78rem; padding: 14px 14px; }

  .cta { padding: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding-bottom: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .filing { flex-direction: column; gap: 6px; }
  .skill-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- 打印 ---------- */
@media print {
  .site-header, .site-footer, .hero-actions, .cta, .nav-toggle { display: none !important; }
  body { font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
}
