/* =========================================================
   个人主页 · 样式
   设计：极简 / 大气 / 自适应（手机 + 电脑）
   配色与字号都集中在 :root，方便调整。
   ========================================================= */

:root {
  /* 颜色（浅色） */
  --bg: #fcfcfa;
  --bg-soft: #f3f1ec;
  --ink: #1a1916;
  --ink-soft: #56524b;
  --muted: #8a857c;
  --line: rgba(26, 25, 22, 0.10);
  --accent: #a87c4f;          /* 暖铜色，点缀用，低调高级 */
  --accent-ink: #8a6235;

  /* 排版 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "Noto Sans SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;

  /* 尺寸 */
  --container: 1080px;
  --radius: 14px;
  --section-y: clamp(72px, 11vw, 140px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 深色模式（跟随系统） */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --bg-soft: #1c1a15;
    --ink: #f2efe7;
    --ink-soft: #c4bfb4;
    --muted: #8f897c;
    --line: rgba(242, 239, 231, 0.12);
    --accent: #cda06a;
    --accent-ink: #d9af7d;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;     /* 给固定导航留空间 */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

::selection { background: var(--accent); color: #fff; }

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

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

/* ---------- 排版 ---------- */
h1, h2, h3 { line-height: 1.18; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 4.6vw, 46px); margin-bottom: 24px; }
h3 { font-size: clamp(19px, 2.2vw, 23px); }

p { color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 600; }
em { font-style: normal; color: var(--accent-ink); }

.eyebrow {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.section__num {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 500;
}

.section__lead {
  font-size: clamp(16px, 2vw, 19px);
  max-width: 62ch;
  margin-top: 10px;
}

/* ---------- 区块 ---------- */
.section { padding: var(--section-y) 0; }
.section--soft { background: var(--bg-soft); }

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.02em; }
.brand__mark { border-radius: 50%; }
.brand__name { font-size: 18px; }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: 15px; color: var(--ink-soft); transition: color .25s; position: relative; }
.nav__links a:hover { color: var(--ink); }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1.5px; width: 0;
  background: var(--accent); transition: width .3s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after,
.nav__links a.active::after { width: 100%; }

.nav__cta {
  border: 1px solid var(--line);
  padding: 8px 18px; border-radius: 999px;
  transition: border-color .25s, background .25s, color .25s;
}
.nav__cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* 汉堡按钮（移动端） */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  background: none; border: none; cursor: pointer;
}
.nav__toggle span {
  display: block; height: 2px; width: 24px; background: var(--ink);
  border-radius: 2px; transition: transform .35s var(--ease), opacity .25s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  position: relative;
  padding: 120px 0 90px;
}
.hero__status {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 7px 15px; border-radius: 999px;
  margin-bottom: 34px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3fae6a;
  box-shadow: 0 0 0 0 rgba(63,174,106,.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(63,174,106,.45); }
  70% { box-shadow: 0 0 0 8px rgba(63,174,106,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,174,106,0); }
}
.hero__title {
  font-size: clamp(30px, 8.6vw, 82px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin-bottom: 30px;
}
.hero__sub {
  font-size: clamp(17px, 2.3vw, 21px);
  max-width: 58ch;
  margin-bottom: 42px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
}
.hero__scroll span {
  display: block; width: 24px; height: 38px;
  border: 1.5px solid var(--line); border-radius: 14px; position: relative;
}
.hero__scroll span::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 3px; height: 7px;
  background: var(--muted); border-radius: 2px; transform: translateX(-50%);
  animation: scrolldot 1.8s infinite;
}
@keyframes scrolldot { 0%{opacity:0;transform:translate(-50%,0)} 40%{opacity:1} 80%{opacity:0;transform:translate(-50%,12px)} }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 999px;
  font-size: 15.5px; font-weight: 500;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
  border: 1px solid transparent; cursor: pointer;
}
.btn--lg { padding: 17px 38px; font-size: 16.5px; margin-top: 8px; }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(0,0,0,.4); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ---------- 关于 ---------- */
.about {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.about__media { position: relative; }
.about__photo {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius);
  object-fit: cover; background: var(--bg-soft);
  border: 1px solid var(--line);
}
.about__text h2 { margin-bottom: 22px; }
.about__text p + p { margin-top: 18px; }

/* ---------- 近况 ---------- */
.now__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; }
.now__date { font-size: 14px; color: var(--muted); }
.now__list { list-style: none; margin-top: 30px; display: grid; gap: 2px; }
.now__list li {
  display: flex; gap: 16px; align-items: baseline;
  padding: 18px 4px; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: clamp(16px, 2vw, 18px);
}
.now__list li:last-child { border-bottom: 1px solid var(--line); }
.now__tag {
  flex: none; font-size: 12.5px; color: var(--accent);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 11px; letter-spacing: .04em;
}

/* ---------- 数据条 ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin: 44px 0 56px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 36px 0;
}
.stat { text-align: center; }
.stat strong { display: block; font-size: clamp(38px, 6vw, 48px); font-weight: 600; letter-spacing: -0.02em; }
.stat span { font-size: 14px; color: var(--muted); }

/* ---------- 卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; background: var(--bg);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 40px -24px rgba(0,0,0,.3); }
.card h3 { margin-bottom: 14px; }
.card p { font-size: 15.5px; }
.card__meta { margin-top: 18px; font-size: 13px; color: var(--muted); letter-spacing: .03em; }

/* ---------- 使用说明书 ---------- */
.manual { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; }
.manual__block {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 32px; background: var(--bg);
}
.section--soft .manual__block { background: var(--bg); }
.manual__block h3 { margin-bottom: 18px; }
.manual__block ul { list-style: none; display: grid; gap: 12px; }
.manual__block ul li { position: relative; padding-left: 24px; color: var(--ink-soft); font-size: 15.5px; }
.manual__block ul li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.steps { list-style: none; display: grid; gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: baseline; color: var(--ink-soft); font-size: 15.5px; }
.steps li span {
  flex: none; font-size: 13px; font-weight: 600; color: var(--accent);
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px;
}

/* ---------- 分享 / 文章 ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.post {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; display: flex; flex-direction: column; gap: 14px;
  min-height: 200px; background: var(--bg);
  transition: transform .35s var(--ease), border-color .35s;
}
.post:hover { transform: translateY(-4px); border-color: var(--accent); }
.post__cat { font-size: 12.5px; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.post h3 { font-size: 19px; line-height: 1.4; }
.post__more { margin-top: auto; font-size: 14px; color: var(--muted); }

/* ---------- 联系 ---------- */
.contact { text-align: center; max-width: 720px; margin: 0 auto; }
.contact .section__num { display: inline-block; }
.contact .section__lead { margin: 0 auto 38px; }
.contact__channels {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 40px;
}
.channel {
  display: flex; flex-direction: column; gap: 5px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 32px; min-width: 180px;
  transition: transform .3s var(--ease), border-color .3s;
}
.channel:hover { transform: translateY(-3px); border-color: var(--accent); }
.channel__label { font-size: 13px; color: var(--muted); letter-spacing: .06em; }
.channel__value { font-size: 16px; font-weight: 500; color: var(--ink); }

/* ---------- 页脚 ---------- */
.footer { padding: 48px 0; border-top: 1px solid var(--line); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer span, .footer a { font-size: 14px; color: var(--muted); }
.footer__top:hover { color: var(--ink); }

/* ---------- 进场动画（渐进增强：无 JS 时内容默认可见）---------- */
.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.in { opacity: 1; transform: none; }

/* ====================================================
   响应式：平板 & 手机
   ==================================================== */
@media (max-width: 920px) {
  .about { grid-template-columns: 1fr; text-align: left; }
  .about__media { max-width: 240px; }
  .cards, .posts, .manual { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --section-y: clamp(88px, 17vw, 120px); }
  body { font-size: 16.5px; }
  html { scroll-padding-top: 16px; }

  /* 顶栏不再跟随滚动：停在页面顶部，随页面一起滑走（更清爽、不抖动） */
  .nav { position: absolute; }
  .nav.scrolled {
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
  }
  .nav__inner { height: 64px; }

  /* 移动端菜单 */
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 24px;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .nav__links.open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .nav__links a { width: 100%; padding: 15px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .nav__cta { border: none; padding: 15px 0; border-radius: 0; color: var(--accent); }
  .nav__cta:hover { background: none; color: var(--accent-ink); }

  .hero { min-height: 100svh; padding: 96px 0 84px; }
  .hero__title { font-size: clamp(26px, 7.8vw, 34px); line-height: 1.26; margin-bottom: 26px; }
  .hero__sub { font-size: 16.5px; }
  .hero__status { margin-bottom: 28px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; }
  .br-desktop { display: none; }
  .hero__scroll { display: none; }

  .stats { grid-template-columns: 1fr; gap: 28px; padding: 30px 0; }
  .cards, .posts, .manual { grid-template-columns: 1fr; }
  .contact__channels { flex-direction: column; }
  .channel { width: 100%; }
  .about__media { max-width: 300px; }
}

/* 尊重"减少动态效果"的系统设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .dot, .hero__scroll span::after { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ====================================================
   博客 / 手记（blog.html + post.html）
   ==================================================== */
.page-head { padding: clamp(120px, 16vw, 180px) 0 clamp(28px, 5vw, 48px); }
.page-title { font-size: clamp(40px, 8vw, 72px); font-weight: 600; letter-spacing: -0.02em; }
.page-lead { max-width: 60ch; margin-top: 16px; font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); }
.section--pad { padding-top: 0; }

/* 文章列表 */
.blog-list { border-top: 1px solid var(--line); }
.blog-item {
  display: block; padding: 36px 4px; border-bottom: 1px solid var(--line);
  transition: padding-left .35s var(--ease);
}
.blog-item:hover { padding-left: 16px; }
.blog-item__meta { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.blog-item__cat { font-size: 12.5px; letter-spacing: .08em; color: var(--accent); }
.blog-item__meta time { font-size: 13.5px; color: var(--muted); }
.blog-item__title {
  font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 10px; line-height: 1.3; transition: color .3s;
}
.blog-item:hover .blog-item__title { color: var(--accent-ink); }
.blog-item__excerpt { color: var(--ink-soft); max-width: 70ch; }
.blog-item__more { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--muted); }

/* 文章正文 */
.container--narrow { max-width: 760px; }
.article { padding: clamp(110px, 15vw, 160px) 0 clamp(60px, 8vw, 90px); }
.article__back { margin-bottom: 30px; }
.article__back a { color: var(--muted); font-size: 14px; }
.article__back a:hover { color: var(--ink); }
.article__meta { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.article__meta time { font-size: 13.5px; color: var(--muted); }
.article__title {
  font-size: clamp(30px, 5vw, 46px); font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.22; margin-bottom: 36px;
}

/* 正文排版 */
.prose { font-size: 17.5px; line-height: 1.9; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.4em; }
.prose h2 { font-size: clamp(22px, 3vw, 28px); color: var(--ink); margin-top: 1.8em; }
.prose h3 { font-size: 20px; color: var(--ink); margin-top: 1.6em; }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .5em; }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: 6px 0 6px 22px; margin-left: 0;
  color: var(--ink); font-size: 1.05em;
}
.article__foot {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line);
}

/* 首页"分享"区通往博客的链接 */
.link-arrow { display: inline-block; margin-top: 22px; color: var(--accent-ink); font-weight: 500; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 720px) {
  .blog-item { padding: 26px 0; }
  .blog-item:hover { padding-left: 0; }
  .prose { font-size: 16.5px; }
}
