/* ==========================================================================
   llsix —— 手绘风格个人站
   基调：铅笔记事本（米白纸 + 浅格 + 铅笔线条）
   实现要点：
     1. 纸张 = 底色 + 极淡方格 + SVG 噪点纹理
     2. 手绘线条 = 不规则圆角 + SVG feTurbulence 抖动滤镜（见 <filter id="wobble">）
     3. 层次 = 硬边偏移阴影（模仿纸片叠放），不使用模糊投影
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计变量
   -------------------------------------------------------------------------- */
:root {
  --paper: #fbfaf5;
  --paper-card: #fffefb;
  --paper-deep: #f3f1e7;
  --ink: #2f3439;
  --ink-2: #4a5058;
  --ink-soft: #6b7280;
  --ink-faint: #9aa0a6;
  --line: #c9cdd4;
  --line-strong: #8a9099;
  --accent: #d97757;
  --accent-deep: #b85c3e;
  --accent-soft: #f7e2da;
  --graphite: #5f6670;
  --marker: #f8e7a8;
  --grid: rgba(140, 150, 165, 0.13);
  --shadow: 5px 6px 0 rgba(120, 128, 140, 0.13);
  --shadow-sm: 3px 3px 0 rgba(120, 128, 140, 0.12);
  --shadow-lg: 8px 9px 0 rgba(120, 128, 140, 0.14);

  --hand: "LXGW WenKai", "霞鹜文楷", KaiTi, "楷体", STKaiti, FangSong, "仿宋", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --mono: "LXGW WenKai Mono", "JetBrains Mono", "Cascadia Code", Consolas, Menlo, monospace;

  --sketch-radius: 18px 10px 20px 12px / 12px 20px 10px 18px;
  --maxw: 1060px;
}

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

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

body {
  margin: 0;
  font-family: var(--hand);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-2);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px;
  overflow-x: hidden;
}

/* 纸纹颗粒：叠在纸张底色之上、正文之下，不影响阅读 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.2'/%3E%3C/svg%3E");
}

.site { position: relative; z-index: 2; }

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

h1, h2, h3, h4 {
  font-family: var(--hand);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1.1em; }

a { color: var(--accent-deep); }

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

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

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   3. 手绘线条工具类
   -------------------------------------------------------------------------- */
.sketch { position: relative; }

.sketch::before,
.sketch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--sketch-radius);
  pointer-events: none;
}

.sketch::before {
  border: 1.8px solid var(--line-strong);
  box-shadow: var(--shadow);
  filter: url(#wobble);
}

/* 第二道压线，制造铅笔反复描边的味道 */
.sketch::after {
  border: 1.2px solid var(--line);
  transform: translate(3px, 3px) rotate(0.35deg);
  opacity: 0.5;
  filter: url(#wobble);
}

.sketch-flat::after { display: none; }
.sketch-flat::before { box-shadow: none; }

.sketch-dashed::before { border-style: dashed; }
.sketch-dashed::after { display: none; }

.sketch .sketch-inner,
.sketch > * { position: relative; z-index: 1; }

/* 细分隔线 */
.rule {
  border: 0;
  height: 2px;
  margin: 2.6em 0;
  background: var(--line);
  filter: url(#wobble-sm);
}

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

.section { padding: 68px 0; }
.section-tight { padding: 44px 0; }

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

.sec-title {
  display: inline-block;
  font-size: 30px;
  margin: 0;
  line-height: 1.3;
}

.sec-title .sq {
  display: block;
  width: 100%;
  height: 10px;
  margin-top: 1px;
  color: var(--accent);
}

.sec-title .sq path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.85;
}

.sec-sub {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-faint);
  margin: 6px 0 0;
}

.more-link {
  font-size: 16px;
  color: var(--graphite);
  text-decoration: none;
  border-bottom: 1.5px dashed var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.2s, transform 0.2s;
}

.more-link:hover { color: var(--accent-deep); transform: translateX(3px); }

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 40px;
  color: var(--line);
}

.divider-line {
  flex: 1;
  height: 2px;
  background: currentColor;
  filter: url(#wobble-sm);
}

.divider .doodle { color: var(--line-strong); flex: none; }

/* --------------------------------------------------------------------------
   5. 按钮
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.62em 1.4em;
  font-family: var(--hand);
  font-size: 16.5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, color 0.18s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.8px solid var(--ink);
  border-radius: var(--sketch-radius);
  filter: url(#wobble-sm);
  transition: border-color 0.18s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.3px solid var(--line-strong);
  border-radius: var(--sketch-radius);
  transform: translate(2.5px, 2.5px) rotate(0.5deg);
  opacity: 0.45;
  filter: url(#wobble-sm);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  transform: translate(-1px, -2px) rotate(-0.8deg);
  color: var(--accent-deep);
}

.btn:hover::before { border-color: var(--accent-deep); }
.btn:hover::after { opacity: 0.75; transform: translate(3.5px, 3.5px) rotate(0.9deg); }
.btn:active { transform: translate(0, 0) rotate(0deg); }

/* 填充色必须放在元素本身：::before 是绝对定位的，会盖住里面的文字 */
.btn-fill {
  color: #fff9f4;
  background: var(--accent-deep);
  border-radius: var(--sketch-radius);
}

.btn-fill::after { display: none; }
.btn-fill:hover { color: #fff; }
.btn-fill:hover::before { border-color: var(--ink); }

.btn-sm { font-size: 15px; padding: 0.42em 1.05em; }

.btn-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* --------------------------------------------------------------------------
   6. 顶栏
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 250, 245, 0.9);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--line-strong);
  opacity: 0.7;
  filter: url(#wobble-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand .brand-mark { color: var(--accent); flex: none; }

.brand:hover .brand-mark { transform: rotate(-12deg); }
.brand .brand-mark { transition: transform 0.25s ease; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  position: relative;
  font-size: 16.5px;
  color: var(--ink-2);
  text-decoration: none;
  padding: 4px 2px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0;
  height: 2.5px;
  background: var(--accent);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  filter: url(#wobble-sm);
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: var(--accent-deep);
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--hand);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 1.6px solid var(--line-strong);
  border-radius: 14px 9px 15px 10px / 10px 15px 9px 14px;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   7. 首页 Hero
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 56px;
  align-items: center;
  padding: 62px 0 66px;
}

.hello-pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--graphite);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 14px 9px 15px 10px / 10px 15px 9px 14px;
  padding: 3px 12px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 46px;
  line-height: 1.32;
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}

.hero h1 .wave {
  background: linear-gradient(transparent 62%, var(--marker) 62%, var(--marker) 92%, transparent 92%);
  padding: 0 2px;
}

.hero-lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 30em;
  margin-bottom: 30px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-social {
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--sans);
  font-size: 14px;
}

.hero-social a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1.5px dashed transparent;
  transition: color 0.2s, border-color 0.2s;
}

.hero-social a:hover { color: var(--accent-deep); border-bottom-color: var(--line-strong); }

.hero-social .dot { color: var(--line); }

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}

/* 拍立得照片框 */
.polaroid {
  position: relative;
  width: 300px;
  padding: 14px 14px 52px;
  background: var(--paper-card);
  transform: rotate(-1.6deg);
}

.polaroid .photo {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.polaroid .photo img,
.polaroid .photo svg { width: 100%; height: 100%; object-fit: cover; }

.polaroid .caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  font-size: 16px;
  color: var(--ink-soft);
}

.tape {
  position: absolute;
  width: 92px;
  height: 24px;
  background: rgba(232, 178, 58, 0.42);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
  clip-path: polygon(3% 6%, 100% 0, 97% 94%, 0 100%);
  pointer-events: none;
}

.tape-top { top: -12px; left: 50%; transform: translateX(-50%) rotate(-4deg); }

.hero-sparkle {
  position: absolute;
  color: var(--accent);
  opacity: 0.85;
}

.hero-arrow {
  position: absolute;
  color: var(--line-strong);
  pointer-events: none;
}

/* 便签 */
.note {
  padding: 26px 30px;
  background: var(--paper-card);
  max-width: 780px;
  margin: 0 auto;
}

.note-h {
  display: inline-block;
  font-size: 22px;
  margin: 0 0 10px;
  background: linear-gradient(transparent 58%, var(--marker) 58%);
  padding: 0 3px;
}

.note p { margin: 0 0 0.6em; color: var(--ink-soft); font-size: 16.5px; }

.note-foot {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   8. 文章卡片
   -------------------------------------------------------------------------- */
.post-list { display: block; }

.post-card {
  display: block;
  position: relative;
  padding: 26px 30px 24px;
  margin-bottom: 30px;
  background: var(--paper-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.24s ease;
}

.post-card:hover { transform: translate(-2px, -5px) rotate(-0.45deg); }
.post-card:nth-child(even):hover { transform: translate(-2px, -5px) rotate(0.45deg); }
.post-card:hover .post-title { color: var(--accent-deep); }
.post-card:hover .post-go { opacity: 1; transform: translateX(0); }

.post-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.post-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.post-title {
  font-size: 23px;
  margin: 0 0 10px;
  transition: color 0.2s ease;
}

.post-summary {
  color: var(--ink-soft);
  font-size: 16.5px;
  margin: 0 0 16px;
}

.post-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-faint);
}

.post-go {
  font-family: var(--hand);
  font-size: 15.5px;
  color: var(--accent-deep);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.22s, transform 0.22s;
}

/* 标签 */
.tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.tag {
  display: inline-block;
  font-family: var(--hand);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--graphite);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 13px 9px 14px 10px / 10px 14px 9px 13px;
  padding: 1px 11px;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

a.tag:hover, .tag.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
}

.tag-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.tag-filter .label {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   9. 作品卡片
   -------------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 34px;
}

.work-card {
  display: block;
  position: relative;
  padding: 16px 16px 20px;
  background: var(--paper-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.24s ease;
}

/* 卡片轻微歪斜，像随手贴上去的 */
.work-card:nth-child(3n + 1) { transform: rotate(-0.7deg); }
.work-card:nth-child(3n + 2) { transform: rotate(0.5deg); }
.work-card:nth-child(3n + 3) { transform: rotate(-0.2deg); }

.work-card:hover { transform: translate(-2px, -6px) rotate(0deg); }
.work-card:hover .work-title { color: var(--accent-deep); }

.work-thumb {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
}

.work-thumb svg { width: 100%; height: 100%; display: block; }

.work-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  background: rgba(255, 254, 251, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 7px;
}

.work-title { font-size: 21px; margin: 0 0 6px; transition: color 0.2s; }

.work-desc {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin: 0 0 14px;
  min-height: 3em;
}

/* --------------------------------------------------------------------------
   10. 文章正文 (.prose)
   -------------------------------------------------------------------------- */
.post-header { padding: 46px 0 34px; max-width: 760px; }

.post-header h1 {
  font-size: 38px;
  line-height: 1.36;
  margin: 14px 0 18px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-faint);
}

.prose {
  max-width: 760px;
  font-size: 18px;
  line-height: 2.05;
  color: var(--ink-2);
  padding-bottom: 20px;
}

.prose h2 {
  font-size: 27px;
  margin: 2.1em 0 0.75em;
  scroll-margin-top: 90px;
}

.prose h2::after {
  content: "";
  display: block;
  width: 62px;
  height: 3px;
  margin-top: 9px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
  filter: url(#wobble-sm);
}

.prose h3 {
  font-size: 21px;
  margin: 1.9em 0 0.6em;
  color: var(--ink);
  scroll-margin-top: 90px;
}

.prose h3::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border: 2px solid var(--accent);
  border-radius: 3px 6px 3px 6px;
  transform: translateY(-1px);
}

.prose p { margin: 0 0 1.35em; }

.prose a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.35em; }
.prose li { margin: 0.45em 0; }
.prose li::marker { color: var(--accent); }

.prose blockquote {
  margin: 1.7em 0;
  padding: 16px 22px;
  background: var(--paper-deep);
  border-left: 3px solid var(--line-strong);
  border-radius: 0 12px 12px 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  font-family: var(--mono);
  font-size: 0.87em;
  background: var(--paper-deep);
  color: var(--accent-deep);
  border-radius: 5px;
  padding: 0.12em 0.42em;
}

.prose pre {
  position: relative;
  margin: 1.7em 0;
  padding: 20px 22px;
  background: #2f3439;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14.5px;
  line-height: 1.75;
  box-shadow: var(--shadow);
}

.prose pre code {
  background: none;
  color: #ece8dd;
  padding: 0;
  font-size: inherit;
}

.prose img {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin: 1.4em 0;
}

.prose hr {
  border: 0;
  height: 2px;
  background: var(--line);
  margin: 2.6em 0;
  filter: url(#wobble-sm);
}

.prose strong { color: var(--ink); }

.prose del { color: var(--ink-faint); }

/* 目录 */
.toc {
  padding: 22px 26px;
  background: var(--paper-card);
  margin: 0 0 46px;
  max-width: 760px;
}

.toc-h {
  font-size: 19px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc ol {
  margin: 0;
  padding-left: 1.3em;
  font-size: 16px;
  line-height: 1.9;
}

.toc ol ol { padding-left: 1.2em; font-size: 15px; }
.toc a { color: var(--ink-soft); text-decoration: none; border-bottom: 1.5px dashed transparent; }
.toc a:hover { color: var(--accent-deep); border-bottom-color: var(--line-strong); }

/* 阅读进度条 */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  z-index: 80;
  transition: width 0.1s linear;
}

/* 作品详情大图 */
.work-hero {
  max-width: 760px;
  padding: 14px;
  margin-bottom: 34px;
  background: var(--paper-card);
}

.work-hero svg {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* 上一篇 / 下一篇 */
.postnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 760px;
  margin: 20px 0 0;
}

.postnav a {
  display: block;
  padding: 16px 20px;
  background: var(--paper-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.postnav a:hover { transform: translateY(-3px); }
.postnav .k {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 4px;
}
.postnav .v { font-size: 16.5px; color: var(--ink); }
.postnav .next { text-align: right; }

/* --------------------------------------------------------------------------
   11. 关于页
   -------------------------------------------------------------------------- */
.timeline { position: relative; padding-left: 30px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
  filter: url(#wobble-sm);
}

.tl-item { position: relative; padding: 0 0 30px; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 9px;
  width: 12px;
  height: 12px;
  background: var(--paper-card);
  border: 2px solid var(--accent);
  border-radius: 50% 40% 55% 45%;
}

.tl-year {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-faint);
}

.tl-h { font-size: 20px; margin: 3px 0 6px; }
.tl-item p { color: var(--ink-soft); font-size: 16px; margin: 0; }

.skill-cloud { display: flex; gap: 10px; flex-wrap: wrap; }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
}

.fact {
  padding: 20px 22px;
  background: var(--paper-card);
}

.fact .k {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.fact .v { font-size: 19px; color: var(--ink); }

/* --------------------------------------------------------------------------
   12. 工具栏 / 搜索 / 空状态
   -------------------------------------------------------------------------- */
.toolbar {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5em 1.1em;
  min-width: 260px;
  background: var(--paper-card);
}

.search::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.6px solid var(--line-strong);
  border-radius: var(--sketch-radius);
  filter: url(#wobble-sm);
  pointer-events: none;
}

.search .ico { color: var(--ink-faint); flex: none; position: relative; }

.search input {
  position: relative;
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--hand);
  font-size: 16.5px;
  color: var(--ink);
}

.search input::placeholder { color: var(--ink-faint); }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-faint);
}

.empty .doodle { margin: 0 auto 14px; color: var(--line); }

.result-count {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   13. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 70px;
  padding: 0 0 54px;
}

.footer-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--line);
  margin-bottom: 34px;
}

.footer-rule .divider-line { flex: 1; height: 2px; background: currentColor; filter: url(#wobble-sm); }

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.footer-note { font-size: 16px; color: var(--ink-soft); max-width: 30em; }
.footer-note .sig { color: var(--ink); font-size: 18px; }

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 14px;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1.5px dashed transparent;
}

.footer-links a:hover { color: var(--accent-deep); border-bottom-color: var(--line-strong); }

.footer-copy {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 26px;
}

/* --------------------------------------------------------------------------
   14. 动效
   -------------------------------------------------------------------------- */
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(6deg); }
}

.floaty { animation: floaty 5.5s ease-in-out infinite; }

/* 只淡入不改位移：卡片上挂着 SVG 滤镜，做位移会每帧重算，很掉帧 */
@keyframes draw-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal { animation: draw-in 0.55s ease both; }
.reveal.pre { animation: none; opacity: 0; }

/* --------------------------------------------------------------------------
   15. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 40px 0 48px;
  }
  .hero-art { order: -1; justify-content: flex-start; }
  .hero-arrow { display: none; }
  .hero h1 { font-size: 36px; }
  .polaroid { width: 250px; }
  .section { padding: 52px 0; }
  .sec-title { font-size: 26px; }
  .prose, .post-header, .toc, .postnav { max-width: 100%; }
  .post-header h1 { font-size: 30px; }
  .prose { font-size: 17px; line-height: 1.95; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 20px;
    background: var(--paper-card);
    display: none;
  }

  .nav-links::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1.7px solid var(--line-strong);
    border-radius: var(--sketch-radius);
    box-shadow: var(--shadow);
    filter: url(#wobble);
    pointer-events: none;
  }

  .nav-links.open { display: flex; }
  .nav-link { padding: 9px 2px; font-size: 17.5px; }
  .nav-link::after { bottom: 4px; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 18px; }
  .hero h1 { font-size: 31px; }
  .post-card { padding: 22px 22px 20px; }
  .post-title { font-size: 21px; }
  .postnav { grid-template-columns: 1fr; }
  .postnav .next { text-align: left; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .floaty, .reveal { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   16. 归档页
   -------------------------------------------------------------------------- */
.arc-group { margin-bottom: 44px; }

.arc-year {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 25px;
  margin: 0 0 6px;
  color: var(--ink);
}

.arc-year .line {
  flex: 1;
  height: 2px;
  background: var(--line);
  filter: url(#wobble-sm);
}

.arc-year .n {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
  flex: none;
}

/* 一条一条像笔记本目录：标题 …… 标签 日期 */
.arc-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 4px;
  text-decoration: none;
  color: var(--ink-2);
  border-radius: 8px;
  transition: color 0.18s ease, padding-left 0.18s ease, background 0.18s ease;
}

.arc-item:hover {
  color: var(--accent-deep);
  padding-left: 12px;
  background: rgba(217, 119, 87, 0.06);
}

.arc-item .t { font-size: 17.5px; flex: none; }

/* 空元素 + 下边框当引线：按基线对齐，虚线正好落在标题基线上 */
.arc-item .lead {
  flex: 1;
  min-width: 30px;
  height: 0;
  border-bottom: 2px dotted var(--line-strong);
  opacity: 0.55;
}

.arc-item .tags { flex: none; }

.arc-item .d {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-faint);
  flex: none;
}

@media (max-width: 620px) {
  .arc-item { flex-wrap: wrap; gap: 6px 10px; padding: 14px 4px; }
  .arc-item .lead { display: none; }
  .arc-item .t { flex: 1 1 100%; font-size: 16.5px; }
  .arc-year { font-size: 22px; }
}

