/* ============================================================
   许小生 · 个人站  ——  新中式 · 简洁
   纯静态，无任何外部资源依赖（字体走系统字族，可直接托管 OSS）
   ============================================================ */

:root {
  --bg:        #f7f6f3;   /* 暖白底 */
  --surface:   #ffffff;   /* 卡片 */
  --ink:       #22262b;   /* 主墨 */
  --ink-2:     #565b61;   /* 次级文字 */
  --ink-3:     #98999b;   /* 弱文字 */
  --red:       #bf4226;   /* 朱砂 */
  --red-deep:  #a2351d;
  --red-soft:  rgba(191, 66, 38, .08);
  --line:      #e9e7e2;   /* 发丝线 */
  --gray-bg:   #f4f3f0;   /* 浅灰块 */
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei",
          "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --kai:  "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
}

::selection { background: rgba(191, 66, 38, .16); }

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-deep); }

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

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------
   页首
   ------------------------------------------------------------ */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-in {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none;
  background: var(--red); color: #fff;
  font-family: var(--kai); font-size: 23px; line-height: 1;
  border-radius: 9px;
}
.brand-t {
  font-family: var(--kai); font-size: 21px; letter-spacing: 2px;
  display: flex; flex-direction: column; line-height: 1.2;
}
.brand-t i {
  font-style: normal; font-size: 9px; letter-spacing: 4px;
  color: var(--ink-3); font-family: var(--sans);
}
.site-nav { display: flex; gap: 30px; }
.site-nav a {
  font-size: 15px; color: var(--ink-2); padding: 4px 2px;
  border-radius: 6px; transition: color .15s;
}
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a.on { color: var(--red); font-weight: 600; }

/* ------------------------------------------------------------
   首页 · 卷首
   ------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; }
.hero::after {
  content: "记";
  position: absolute; right: -20px; bottom: -110px;
  font-family: var(--kai); font-size: 360px; line-height: 1;
  color: var(--ink); opacity: .035; pointer-events: none;
}
.hero-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; padding-top: 88px; padding-bottom: 92px;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--red); font-size: 13.5px; font-weight: 600;
  letter-spacing: 3px; margin-bottom: 20px;
  background: var(--red-soft); padding: 5px 14px; border-radius: 999px;
}
.hero h1 {
  font-family: var(--kai); font-size: 50px; font-weight: 400;
  letter-spacing: 4px; line-height: 1.3;
}
.hero h1 b { color: var(--red); font-weight: 400; }
.hero-sub {
  margin-top: 20px; max-width: 540px;
  color: var(--ink-2); font-size: 16px;
}
.hero-cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; font-size: 15px; font-weight: 500;
  letter-spacing: 1px;
  padding: 11px 28px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: all .18s ease;
}
.btn:hover { border-color: #d8d5ce; box-shadow: 0 4px 14px rgba(0, 0, 0, .07); text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-deep); border-color: var(--red-deep); }

.v-poem {
  writing-mode: vertical-rl;
  font-family: var(--kai); font-size: 15px; letter-spacing: 10px;
  color: var(--ink-3); line-height: 2.6; height: 280px; flex: none;
  padding-left: 30px; position: relative; z-index: 1;
}
.v-poem::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 1px; background: var(--line);
}

/* ------------------------------------------------------------
   区块标题
   ------------------------------------------------------------ */
.sec { padding-top: 20px; padding-bottom: 72px; }
.sec-t {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--kai); font-weight: 400;
  font-size: 24px; letter-spacing: 4px; color: var(--ink);
  margin-bottom: 30px;
}
.sec-t::before { content: ""; width: 8px; height: 8px; background: var(--red); transform: rotate(45deg); flex: none; border-radius: 2px; }
.sec-t::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-t em {
  font-style: normal; font-size: 12px; letter-spacing: 3px;
  color: var(--ink-3); font-family: var(--sans);
}

/* ------------------------------------------------------------
   文章卡片
   ------------------------------------------------------------ */
.card {
  display: grid; grid-template-columns: 380px 1fr;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover {
  box-shadow: 0 14px 36px rgba(0, 0, 0, .09);
  transform: translateY(-2px);
}
.card-cover {
  position: relative; display: block; overflow: hidden;
  background: var(--gray-bg);
}
.card-cover img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.card-body { padding: 30px 32px; display: flex; flex-direction: column; }
.card-meta {
  font-size: 13px; color: var(--ink-3); letter-spacing: .5px;
  margin-bottom: 12px;
}
.card-meta b { color: var(--red); font-weight: 600; }
.card-meta i { font-style: normal; color: var(--line); margin: 0 8px; }
.card h3 {
  font-size: 21px; font-weight: 700; line-height: 1.55; letter-spacing: .3px;
}
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--red); text-decoration: none; }
.card-ex { margin-top: 12px; color: var(--ink-2); font-size: 14.5px; flex: 1; }
.card-more {
  margin-top: 20px; align-self: flex-start;
  font-size: 14px; font-weight: 600; letter-spacing: 2px;
  color: var(--red);
}
.card-more::after { content: " →"; transition: margin .2s; }
.card-more:hover::after { margin-left: 4px; }

/* ------------------------------------------------------------
   平台
   ------------------------------------------------------------ */
.plat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 30px 26px; text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  transition: box-shadow .2s ease, transform .2s ease;
}
.plat-card:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, .08); transform: translateY(-2px); }
a.plat-card { display: block; color: var(--ink); }
a.plat-card:hover h4 { color: var(--red); }
.plat-media {
  height: 140px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.plat-media svg { width: 44px; height: 44px; stroke: var(--ink-2); transition: stroke .2s; }
.plat-card:hover .plat-media svg { stroke: var(--red); }
.plat-qr {
  width: 136px; height: 136px; object-fit: cover;
  border: 1px solid var(--line); border-radius: 14px; padding: 5px;
  background: #fff;
}
.plat-card h4 { font-size: 16.5px; font-weight: 600; letter-spacing: 1px; transition: color .2s; }
.plat-card p { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.9; }
.plat-card p b { color: var(--red); font-weight: 600; }
.plat-link {
  display: inline-block; margin-top: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 1px; color: var(--red);
}
.plat-note {
  margin-top: 24px; text-align: center;
  font-size: 13.5px; color: var(--ink-3);
}

/* ------------------------------------------------------------
   页脚
   ------------------------------------------------------------ */
.site-foot {
  margin-top: 20px; border-top: 1px solid var(--line);
  background: var(--surface);
}
.foot-in { padding: 42px 24px 38px; text-align: center; }
.foot-slogan { font-family: var(--kai); font-size: 17px; letter-spacing: 4px; color: var(--ink-2); }
.foot-nav { margin-top: 14px; display: flex; justify-content: center; gap: 26px; }
.foot-nav a { font-size: 13.5px; color: var(--ink-3); letter-spacing: 1px; }
.foot-nav a:hover { color: var(--red); }
.foot-fine { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }

/* ------------------------------------------------------------
   文章页
   ------------------------------------------------------------ */
.page { padding-top: 40px; padding-bottom: 80px; max-width: 800px; }
.crumb { font-size: 13.5px; margin-bottom: 26px; }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--red); }

.post-head { text-align: center; padding: 0 8px; }
.post-head h1 {
  font-family: var(--kai); font-weight: 400;
  font-size: 32px; line-height: 1.6; letter-spacing: 1px;
}
.post-sub {
  margin-top: 14px; color: var(--ink-2); font-size: 15px;
}
.post-meta {
  margin-top: 20px; font-size: 13px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px;
}
.post-meta i { font-style: normal; color: var(--line); }
.post-meta b { color: var(--red); font-weight: 600; }

.post-cover {
  margin: 34px 0 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.post-cover img { width: 100%; border-radius: 10px; }
.post-cover figcaption {
  text-align: center; font-size: 12.5px; color: var(--ink-3);
  padding: 10px 0 4px;
}

/* 目录 */
.toc {
  margin: 28px 0 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  overflow: hidden;
}
.toc summary {
  cursor: pointer; list-style: none;
  font-size: 14.5px; font-weight: 600; letter-spacing: 6px;
  color: var(--ink-2); text-align: center; padding: 13px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::before { content: "◂ "; color: var(--red); }
.toc[open] summary { border-bottom: 1px solid var(--line); }
.toc[open] summary::before { content: "▾ "; }
.toc ol {
  list-style: none; counter-reset: toc;
  columns: 2; column-gap: 36px; padding: 14px 28px 18px;
}
.toc li { counter-increment: toc; break-inside: avoid; }
.toc a {
  display: block; padding: 6px 0; color: var(--ink-2); font-size: 14px;
}
.toc a::before { content: counter(toc, cjk-ideographic) "、"; color: var(--red); font-family: var(--kai); }
.toc a:hover { color: var(--red); text-decoration: none; }

/* 正文 */
.post-body { margin-top: 26px; font-size: 16.5px; line-height: 2.05; color: #2b2f34; }
.post-body p { margin: 0 0 4px; text-align: justify; }
.post-body p + p { margin-top: 10px; }

.post-body h2 {
  font-family: var(--kai); font-weight: 400;
  font-size: 24px; letter-spacing: 1.5px; line-height: 1.6;
  margin: 54px 0 20px; padding-left: 14px;
  border-left: 3px solid var(--red); border-radius: 2px;
  scroll-margin-top: 86px;
}
.post-body h3 {
  font-size: 17.5px; font-weight: 700;
  margin: 34px 0 14px;
  scroll-margin-top: 86px;
}
.post-body h3::before { content: "◆ "; color: var(--red); font-size: 12px; vertical-align: 2px; }

.post-body strong { color: var(--red-deep); font-weight: 600; }
.post-body em { font-style: normal; border-bottom: 1px dotted var(--ink-3); }

.post-body blockquote {
  margin: 22px 4px; padding: 16px 22px;
  background: var(--gray-bg);
  border-left: 3px solid var(--red); border-radius: 0 10px 10px 0;
  font-size: 16px; line-height: 1.95;
  color: #45494e;
}
.post-body blockquote p { margin: 0; text-align: left; }

.post-body ul { margin: 16px 0 16px 6px; list-style: none; }
.post-body ul li { padding: 5px 0 5px 24px; position: relative; }
.post-body ul li::before {
  content: ""; position: absolute; left: 5px; top: 16px;
  width: 6px; height: 6px; background: var(--red); transform: rotate(45deg);
  border-radius: 1.5px; opacity: .85;
}

/* 流程示意（网页 → 本地 → 结果） */
.flow {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px 6px; margin: 24px auto; padding: 18px 14px;
  background: var(--gray-bg); border-radius: 12px;
  font-size: 15px;
}
.flow span {
  padding: 6px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
  white-space: nowrap; color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.flow i { font-style: normal; color: var(--red); font-weight: 600; }

/* 特性标签 */
.tags {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 24px 0;
}
.tags span {
  font-size: 13.5px; font-weight: 500; letter-spacing: 1px;
  color: var(--red); padding: 6px 16px;
  border-radius: 999px;
  background: var(--red-soft);
}

/* 站外视频嵌入（B站等，16:9 自适应） */
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  margin: 26px 0 8px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: #000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.video-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video-caption {
  text-align: center; font-size: 13px; color: var(--ink-3);
  letter-spacing: 1px; margin-bottom: 20px;
}

/* 网盘下载框 */
.dl-box {
  margin: 30px 0; padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--red);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.dl-t {
  font-size: 15px; font-weight: 700; letter-spacing: 1px;
  color: var(--red); margin-bottom: 10px;
}
.dl-box a { word-break: break-all; font-size: 15px; }
.dl-code { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.dl-code strong {
  font-weight: 600; color: var(--red);
  background: var(--red-soft);
  border-radius: 6px; padding: 2px 12px; margin-left: 8px;
  letter-spacing: 2px;
}

/* 文末 */
.post-foot { margin-top: 64px; text-align: center; }
.end-mark {
  width: 46px; height: 46px; margin: 0 auto 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff;
  font-family: var(--kai); font-size: 23px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(191, 66, 38, .3);
}
.post-nav { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.post-nav a {
  font-size: 14.5px; font-weight: 500; letter-spacing: 1px;
  color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 22px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  transition: all .18s;
}
.post-nav a:hover { color: var(--red); border-color: rgba(191, 66, 38, .4); text-decoration: none; transform: translateY(-1px); }

.follow {
  margin-top: 38px; padding: 20px 24px;
  background: var(--gray-bg); border-radius: 12px;
  font-size: 14px; color: var(--ink-2); line-height: 2;
}
.follow b { font-weight: 600; color: var(--red); }

/* ------------------------------------------------------------
   关于页
   ------------------------------------------------------------ */
.about-hero { text-align: center; padding-top: 16px; }
.about-hero .seal {
  width: 80px; height: 80px; font-size: 48px; border-radius: 18px;
  box-shadow: 0 10px 26px rgba(191, 66, 38, .28);
}
.about-hero h1 {
  margin-top: 22px; font-family: var(--kai); font-weight: 400;
  font-size: 32px; letter-spacing: 4px;
}
.about-hero p { margin-top: 8px; color: var(--ink-3); font-size: 13.5px; letter-spacing: 3px; }
.about-body { max-width: 640px; margin: 40px auto 0; font-size: 16px; line-height: 2.1; }
.about-body p { margin-bottom: 14px; text-align: justify; }
.about-body h2 {
  font-size: 18px; font-weight: 700;
  letter-spacing: 1px; margin: 38px 0 14px; padding-left: 12px;
  border-left: 3px solid var(--red); border-radius: 2px;
}
.about-body ul { list-style: none; }
.about-body ul li { padding: 5px 0 5px 22px; position: relative; }
.about-body ul li::before {
  content: ""; position: absolute; left: 4px; top: 15px;
  width: 6px; height: 6px; background: var(--red); transform: rotate(45deg);
  border-radius: 1.5px; opacity: .85;
}

/* ------------------------------------------------------------
   404
   ------------------------------------------------------------ */
.lost { text-align: center; padding: 110px 24px 130px; }
.lost .seal {
  width: 84px; height: 84px; font-size: 50px; border-radius: 19px;
  box-shadow: 0 10px 26px rgba(191, 66, 38, .28);
}
.lost h1 {
  margin-top: 28px; font-family: var(--kai); font-weight: 400;
  font-size: 34px; letter-spacing: 4px;
}
.lost p { margin: 16px 0 36px; color: var(--ink-2); }
.lost .code { font-size: 12px; color: var(--ink-3); letter-spacing: 6px; margin: 46px 0 0; }

/* ------------------------------------------------------------
   返回顶部
   ------------------------------------------------------------ */
.to-top {
  position: fixed; right: 26px; bottom: 32px; z-index: 60;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink-2);
  font-size: 13px; font-weight: 600;
  cursor: pointer; opacity: 0; pointer-events: none;
  transition: all .25s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { border-color: var(--red); color: var(--red); }

/* ------------------------------------------------------------
   响应式
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .hero-in { padding-top: 60px; padding-bottom: 66px; }
  .hero h1 { font-size: 40px; }
  .v-poem { display: none; }
  .plat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .head-in { height: 58px; }
  .brand-t { font-size: 19px; }
  .site-nav { gap: 20px; }
  .site-nav a { font-size: 14.5px; }
  .hero h1 { font-size: 34px; letter-spacing: 3px; }
  .hero-sub { font-size: 15px; }
  .card { grid-template-columns: 1fr; }
  .card-body { padding: 24px 22px; }
  .card h3 { font-size: 19px; }
  .sec { padding-bottom: 52px; }
  .sec-t { font-size: 21px; }
  .page { padding-top: 28px; }
  .post-head h1 { font-size: 26px; }
  .post-body { font-size: 16px; }
  .post-body h2 { font-size: 21.5px; margin: 42px 0 18px; }
  .toc ol { columns: 1; padding: 12px 22px 16px; }
  .post-meta { display: block; line-height: 2.2; }
  .post-meta i { display: none; }
  .post-meta span { display: inline-block; margin: 0 10px; white-space: nowrap; }
  .card-meta i { margin: 0 5px; }
  .plat-media { height: 156px; }
  .plat-qr { width: 150px; height: 150px; }
  .foot-slogan { font-size: 15px; letter-spacing: 1px; }
  .to-top { right: 16px; bottom: 20px; }
}
