/* ============================================================
   HT — 项目与实践
   朴素、易读，优先内容
   ============================================================ */

:root {
  --bg: #f7f4ec;
  --bg-soft: #f1ece0;
  --ink: #1b1a16;
  --muted: #5e5a50;
  --faint: #8a8477;
  --line: rgba(27, 26, 22, 0.15);
  --line-strong: rgba(27, 26, 22, 0.3);
  --accent: #8d5a2b;
  --card: #ece5d6;
  --nav-bg: rgba(247, 244, 236, 0.92);

  --serif: "Instrument Serif", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4.4vw, 56px);
  --max: 1080px;
}

html[data-theme="dark"] {
  --bg: #14130f;
  --bg-soft: #1a1813;
  --ink: #f1ebdd;
  --muted: #a49d8d;
  --faint: #7d776a;
  --line: rgba(241, 235, 221, 0.15);
  --line-strong: rgba(241, 235, 221, 0.32);
  --accent: #d3a06a;
  --card: #1e1b15;
  --nav-bg: rgba(20, 19, 15, 0.92);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul, dl { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
svg { display: block; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 导航 */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: padding 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled {
  padding: 12px var(--gutter);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.05em;
}
.nav-links { display: flex; gap: clamp(16px, 2.6vw, 30px); }
.nav-links a {
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.nav-links a:hover { color: var(--ink); border-color: var(--ink); }

.theme-toggle {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.25s;
}
.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* 首屏 */
.hero { padding: clamp(118px, 16vh, 168px) 0 clamp(46px, 6vw, 72px); }
.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 20px;
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  line-height: 1.42;
  letter-spacing: 0.01em;
  max-width: 20em;
}
.lede {
  margin-top: 24px;
  max-width: 40em;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--muted);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(34px, 4vw, 50px);
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.facts dt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}
.facts dd { margin: 0; font-size: 13px; line-height: 1.6; }

/* 区块 */
.section { padding: clamp(56px, 7vw, 88px) 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.3;
}
.section-head .num {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-right: 10px;
  vertical-align: 3px;
}
.section-head p { font-size: 12.5px; color: var(--faint); }

/* 条目 */
.entry { margin-top: clamp(34px, 4.5vw, 54px); }
.entry + .entry {
  margin-top: clamp(48px, 6vw, 76px);
  padding-top: clamp(30px, 4vw, 44px);
  border-top: 1px solid var(--line);
}
.entry-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.entry-no {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--accent);
  padding-top: 8px;
}
.entry-head h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  line-height: 1.4;
}
.entry-head p { max-width: 64em; font-size: 13.5px; color: var(--muted); }

/* 公众号 */
.account {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.account-logo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--line);
}
.account-name { font-size: 14px; font-weight: 500; }
.account-sub { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--faint); margin-top: 2px; }
.account .stats { display: flex; gap: 28px; margin-left: auto; }
.account .stats dt { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.1em; color: var(--faint); }
.account .stats dd { margin: 2px 0 0; font-size: 13px; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}
.article-card { display: block; padding-top: 12px; border-top: 1px solid var(--line); }
.article-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 11px;
  background: var(--card);
}
.article-card .meta {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.article-card h4 {
  margin: 5px 0 5px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.06rem;
  line-height: 1.45;
}
.article-card p { font-size: 12.5px; line-height: 1.75; color: var(--muted); }
.article-card .link {
  display: inline-block;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--accent);
  border-bottom: 1px solid transparent;
}
.article-card:hover .link { border-color: var(--accent); }

/* 独立写作 */
.book {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.book-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.book-kicker { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.18em; color: var(--faint); }
.book-title {
  margin-top: auto;
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.05;
}
.book-title em { font-style: italic; color: var(--accent); }
.book-sub { margin-top: 8px; font-family: var(--serif); font-style: italic; font-size: 0.8rem; color: var(--muted); }
.book-author { margin-top: 14px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.16em; color: var(--faint); }

.book-text h4 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
}
.book-text p { font-size: 13.5px; line-height: 1.9; color: var(--muted); max-width: 56em; }
.book-text p + p { margin-top: 10px; }

.facts--stack { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--line); }
.facts--stack > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.facts--stack dt { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.1em; color: var(--faint); padding-top: 3px; }
.facts--stack dd { margin: 0; font-size: 12.5px; line-height: 1.7; }

/* 实践 */
.group-photo { margin: 0 0 22px; }
.group-photo img {
  width: 100%;
  max-width: 880px;
  height: auto;
  background: var(--card);
}
.group-photo figcaption { margin-top: 8px; font-size: 11px; color: var(--faint); }

.practice-text {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.practice-text p { font-size: 13.5px; line-height: 1.9; color: var(--muted); }
.practice-text p + p { margin-top: 10px; }
.practice-text .facts--stack { margin-top: 0; border-top: none; padding-top: 0; }

/* 关于 */
.about { background: var(--bg-soft); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(30px, 6vw, 72px);
  align-items: start;
  margin-top: 26px;
}
.about-main p { font-size: 14.5px; line-height: 1.95; color: var(--muted); max-width: 38em; }
.about-main p + p { margin-top: 13px; }
.about-main p:first-child { color: var(--ink); }

.about-side { display: grid; gap: 24px; }
.side-block h3 {
  margin: 0 0 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.13em;
  color: var(--faint);
}
.plain-list li { font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.timeline li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}
.timeline .when { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.06em; color: var(--faint); padding-top: 4px; }
.timeline small { color: var(--muted); font-size: 12px; }

/* 联系 */
.contact { padding-bottom: clamp(70px, 9vw, 110px); }
.contact h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
}
.contact-lede { font-size: 14px; color: var(--muted); max-width: 36em; }
.contact-mail {
  display: inline-block;
  margin-top: 18px;
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: color 0.25s, border-color 0.25s;
}
.contact-mail:hover { color: var(--accent); border-color: var(--accent); }
.contact-other { margin-top: 16px; font-size: 12.5px; color: var(--faint); }
.contact-other a { color: var(--muted); border-bottom: 1px solid var(--line); }
.contact-other a:hover { color: var(--ink); border-color: var(--ink); }

/* 页脚 */
.site-footer { border-top: 1px solid var(--line); padding: 18px 0 24px; }
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--faint);
}
.site-footer a:hover { color: var(--ink); }

/* 响应式 */
@media (max-width: 860px) {
  .book { grid-template-columns: 180px minmax(0, 1fr); }
  .practice-text { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
  .article-grid { grid-template-columns: 1fr 1fr; }
  .article-card:last-child { grid-column: 1 / -1; }
  .article-card:last-child img { aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
  .nav { padding-left: 16px; padding-right: 16px; }
  .nav.scrolled { padding-left: 16px; padding-right: 16px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 11.5px; }
  .hero { padding-top: 106px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:last-child { display: none; }
  .account { flex-wrap: wrap; }
  .account .stats { margin-left: 92px; width: 100%; gap: 20px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card:last-child { grid-column: auto; }
  .article-card:last-child img { aspect-ratio: 4 / 3; }
  .book { grid-template-columns: 1fr; }
  .book-cover { max-width: 200px; }
  .about-side { grid-template-columns: 1fr; }
  .entry-head { grid-template-columns: 24px minmax(0, 1fr); gap: 8px; }
}

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

.read-link { margin-top: 18px; }
.read-link a {
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.read-link a:hover { color: var(--ink); border-color: var(--ink); }

.read-hint { margin-left: 10px; font-size: 11px; color: var(--faint); }

.entry-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.entry-body p { font-size: 13.5px; line-height: 1.9; color: var(--muted); }
.entry-body p + p { margin-top: 10px; }
.entry-body .facts--stack { margin-top: 0; border-top: none; padding-top: 0; }
@media (max-width: 860px) { .entry-body { grid-template-columns: 1fr; } }

.camp-ed { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.camp-ed-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.camp-when { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.1em; color: var(--accent); }
.camp-ed-head h4 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.05rem; line-height: 1.4; }
.camp-ed-body {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
}
.camp-photo { margin: 0; }
.camp-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.camp-photo figcaption { margin-top: 7px; font-size: 11px; color: var(--faint); }
.camp-ed-body p { font-size: 13.5px; line-height: 1.9; color: var(--muted); }
.camp-ed-body .facts--stack { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 4px; }
.group-photo--after { margin-top: 30px; }
@media (max-width: 860px) { .camp-ed-body { grid-template-columns: 1fr; } }

/* ============================================================
   折叠式经历列表
   ============================================================ */
.experiences { border-top: 1px solid var(--line-strong); }
.exp { border-bottom: 1px solid var(--line); }
.exp summary {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 22px;
  gap: 18px;
  align-items: center;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
.exp summary::-webkit-details-marker { display: none; }
.exp-thumb img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  display: block;
  background: var(--card);
}
.exp-main { display: grid; gap: 2px; }
.exp-no {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.exp-title {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.4;
  transition: color 0.2s;
}
.exp-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }
.exp-icon { position: relative; width: 14px; height: 14px; justify-self: end; }
.exp-icon::before,
.exp-icon::after {
  content: "";
  position: absolute;
  background: var(--muted);
  transition: transform 0.25s ease;
}
.exp-icon::before { left: 0; top: 6.5px; width: 14px; height: 1px; }
.exp-icon::after { left: 6.5px; top: 0; width: 1px; height: 14px; }
.exp[open] .exp-icon::after { transform: scaleY(0); }
.exp:hover .exp-title { color: var(--accent); }
.exp-body { padding: 6px 0 30px; }
.exp-body .account { margin-top: 0; }

/* 石墨文档风格封面 */
.book-cover {
  background: #fbfbfa;
  border: 1px solid #dcdcd6;
  color: #2c2c28;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.book-kicker { color: #8a8a84; }
.book-title em { color: #6f6f68; }
.book-sub { color: #6f6f68; }
.book-author { color: #8a8a84; }

@media (max-width: 640px) {
  .exp summary { grid-template-columns: 84px minmax(0, 1fr) 20px; gap: 12px; }
  .exp-thumb img { width: 84px; height: 63px; }
  .exp-title { font-size: 1rem; }
}

.source-link { margin-top: 12px; font-size: 12px; line-height: 1.7; }
.source-link a { color: var(--accent); border-bottom: 1px solid transparent; }
.source-link a:hover { border-color: var(--accent); }

.pack-figure { margin: 26px 0 0; }
.pack-figure img { width: 100%; border: 1px solid var(--line); background: #fbfaf7; }
.pack-figure figcaption { margin-top: 8px; font-size: 11px; color: var(--faint); }

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
}
.live-text p { font-size: 13.5px; line-height: 1.9; color: var(--muted); }
.live-text p + p { margin-top: 10px; }
.live-text .facts--stack { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 4px; }
.live-posters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.live-posters figure { margin: 0; }
.live-posters img { width: 100%; height: auto; border: 1px solid var(--line); background: var(--card); }
.live-posters figcaption { margin-top: 6px; font-size: 10px; line-height: 1.5; color: var(--faint); }
@media (max-width: 860px) { .live-grid { grid-template-columns: 1fr; } }

.zhiji-item { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.zhiji-item:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.zhiji-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.zhiji-head h4 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.05rem; line-height: 1.4; }
.zhiji-item p { font-size: 13.5px; line-height: 1.9; color: var(--muted); }
.zhiji-item p + p { margin-top: 9px; }
.zhiji-item .facts--stack { margin-top: 12px; }

.edu-note { margin-top: 10px; font-size: 11.5px; line-height: 1.7; color: var(--faint); }
