/* ==========================================================================
   Kris — 个人站
   设计语言：纸白 + 墨黑，衬线正文，等宽元信息，只有发丝线没有阴影
   参考：归藏 Page（杂志风 / 墨水经典）
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* 纸与墨 */
  --paper:      #f1efea;
  --paper-2:    #e8e5de;
  --ink:        #0a0a0b;
  --body:       #2c2b2c;
  --muted:      #68625a;
  --line:       #d6d3cd;
  --line-2:     #b7b5b2;

  /* 字体 */
  --font-serif: "Source Serif 4", "Noto Serif SC", "Source Han Serif SC",
                "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-sans:  "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
                "Microsoft YaHei", system-ui, sans-serif;
  --font-mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* 字号 */
  --fs-display: clamp(2.375rem, 5vw, 3.75rem);
  --fs-title:   clamp(1.875rem, 3.4vw, 2.5rem);
  --fs-h2:      1.5rem;
  --fs-h3:      1.125rem;
  --fs-lead:    1.1875rem;
  --fs-body:    1.0625rem;
  --fs-sm:      0.9375rem;
  --fs-xs:      0.8125rem;
  --fs-mono:    0.75rem;

  /* 尺寸 */
  --nav-h: 78px;
  --wrap: 1120px;
  --text: 36em;
  --pad: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:lang(zh) {
  --font-serif: "Noto Serif SC", "Source Serif 4", "Source Han Serif SC",
                "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-sans:  "Noto Sans SC", "Inter", "PingFang SC", "Hiragino Sans GB",
                "Microsoft YaHei", system-ui, sans-serif;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  /* 常驻滚动条槽位：短页面和长页面版心一致，切页时导航不会左右跳 */
  scrollbar-gutter: stable;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-sans);
  line-height: 1.75;
  font-size: var(--fs-body);
  line-break: strict;
  text-spacing-trim: normal;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
  font-kerning: normal;
}

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

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; font-size: var(--fs-xs); z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- 2.5 动效 ---------- */
@keyframes page-in   { from { opacity: 0; } }
@keyframes fade-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in   { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes zoom-in   { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes drop-in   { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes panel-in  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 只有正文和页脚淡入淡出，导航栏保持不动；
   不加 animation-fill，动画结束后控制权交回 opacity，离场淡出才生效 */
main, .foot { animation: page-in .34s var(--ease); }

/* 离场：点内部链接时正文淡出，导航保持原位 */
main, .foot { transition: opacity .2s var(--ease); }

body.is-leaving main,
body.is-leaving .foot {
  opacity: 0;
  pointer-events: none;
}

/* 首屏标题 */
.hero__title { animation: rise-in .72s var(--ease) both; animation-delay: .05s; }

/* 滚动进入：进入视口时上浮 10px 淡入，只跑一次。
   只有 JS 正常跑起来（html.js）才会先隐藏，脚本挂了内容照样能看。 */
.js .reveal { opacity: 0; }
.reveal.is-in {
  animation: rise-in .6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

/* ---------- 2.6 鼠标光标 ---------- */
/* 只有 JS 确认是精确指针设备（鼠标）时才接管，触屏和脚本失效都不受影响。
   链接的浏览器默认样式、按钮和照片上的 cursor:pointer 会盖过父级继承来的 none，
   所以要压到每一个元素上，悬停可点区域时才不会露出系统手型。 */
.has-cursor,
.has-cursor * { cursor: none !important; }

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s var(--ease);
  mix-blend-mode: normal;
  will-change: transform;
}

.cursor.is-on { opacity: 1; }

.cursor__dot,
.cursor__ring {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor__dot {
  width: 4px;
  height: 4px;
  background: var(--ink);
  transition: opacity .2s var(--ease), width .34s var(--ease), height .28s var(--ease), border-radius .28s var(--ease);
}

/* 平时只有一个小点；指到可点元素上才绽开圆环 */
.cursor__ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(10, 10, 11, .4);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.45);
  transition: opacity .24s var(--ease), transform .32s var(--ease);
}

.cursor.is-hot .cursor__ring {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cursor.is-hot .cursor__dot { opacity: 0; }

/* 导航这种本来就有下划线的地方：墨点拉开成那条线，移开再收成点 */
.cursor.is-line .cursor__ring { opacity: 0; transform: translate(-50%, -50%) scale(.45); }
.cursor.is-line .cursor__dot {
  width: var(--line-w, 4px);
  height: 1px;
  border-radius: 0;
  opacity: 1;
}

/* 按下 */
.cursor.is-down .cursor__ring { transform: translate(-50%, -50%) scale(.8); }

/* 编辑面板里恢复原生光标，别影响输入 */
.adm, .adm * { cursor: auto !important; }

/* ---------- 3. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.narrow { max-width: var(--text); margin: 0 auto; }

/* ---------- 4. Nav ---------- */
.nav {
  border-bottom: 1px solid var(--line);
}

.nav__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: var(--nav-h);
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.nav__links {
  position: relative;      /* 黑线的定位祖先，否则 bottom:0 会落到视口底部 */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;
  margin-left: auto;
  /* 六项导航时别被 html 的 overflow-x: clip 裁掉右侧 */
  max-width: calc(100% - 5.5rem);
}

@media (min-width: 761px) and (max-width: 980px) {
  .nav__links { gap: 16px; }
  .nav__link { font-size: 12px; }
}

.nav__link {
  position: relative;
  font-size: var(--fs-xs);
  color: var(--muted);
  padding: 4px 0 6px;
  transition: color .2s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right .3s var(--ease);
}

.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { right: 0; }

.nav__link[aria-current="page"] { color: var(--ink); }

/* 当前页的黑线：跨页面时从左一条滑到新的位置 */
.nav__line {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--ink);
  opacity: 0;
  transform: translateX(0);
  will-change: transform, width;
}

.nav__line.is-ready {
  opacity: 1;
  transition: transform .42s var(--ease), width .42s var(--ease), opacity .24s var(--ease);
}

/* 自定义光标接管时，悬停下划线由墨点变成；原来的黑线先让开，避免叠成两条 */
@media (min-width: 761px) {
  .has-cursor .nav__link::after { display: none; }
  .has-cursor:has(.cursor.is-line) .nav__line { opacity: 0; }
}

.nav__toggle {
  display: none;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
  border-radius: 3px;
}

.nav__toggle svg { width: 16px; height: 16px; }

/* ---------- 5. Hero：首屏一句话 ---------- */
.hero {
  /* 占满一屏（扣掉导航），正文全部要往下滑才看得到 */
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  /* 上下不对称，让句子落在视觉中心偏上一点 */
  padding-top: clamp(32px, 5vh, 64px);
  padding-bottom: clamp(88px, 15vh, 176px);
}

/* 首屏水墨：平时全透明，点击才晕开。跟着首屏走，不挡点击 */
.ink {
  position: fixed;
  left: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.q {
  position: relative;
  z-index: 1;
  margin: 0;
  /* 只用 backwards：动画结束后把 transform 交还给内联样式，视差才能生效 */
  animation: rise-in .8s var(--ease) backwards;
  animation-delay: .05s;
}

/* 拉丁字形优先，中文回落户思源宋体 */
.q__text {
  font-family: "Source Serif 4", "Noto Serif SC", "Songti SC", Georgia, serif;
  font-size: clamp(1.75rem, 4.1vw, 3rem);
  line-height: 1.48;
  letter-spacing: 0.005em;
  color: var(--ink);
  max-width: 16em;
  text-wrap: pretty;
  will-change: opacity, transform, filter;
}

.q__text[lang="zh"] {
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.q__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(20px, 3vw, 30px);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  letter-spacing: 0.04em;
  opacity: 0;
  animation: fade-in .5s var(--ease) both;
  animation-delay: .15s;
}

.q__toggle {
  appearance: none;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  padding: 5px 7px;
  cursor: pointer;
  opacity: .5;
  transition: color .2s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease);
}

.q:hover .q__toggle { opacity: 1; }

.q__toggle:hover,
.q__toggle[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--ink);
  opacity: 1;
}

@media (max-width: 560px) {
  .q__text { font-size: clamp(1.5rem, 7.2vw, 2rem); }
}

/* ---------- 5.5 社交图标 ---------- */
.sicons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(24px, 3vw, 32px);
}

.sicon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition:
    color .24s var(--ease),
    border-color .24s var(--ease),
    background-color .24s var(--ease),
    transform .24s var(--ease),
    opacity .24s var(--ease);
}

.sicon svg {
  width: 16px;
  height: 16px;
  display: block;
  opacity: 0;
  transform: translateY(8px);
  animation: sicon-in .7s var(--ease) forwards;
  animation-delay: calc(var(--i) * 55ms + 120ms);
}

@keyframes sicon-in {
  to { opacity: 1; transform: none; }
}

/* 悬停：整组退后，被指的那个回到墨色并上浮 */
.sicons:hover .sicon { opacity: .3; }

.sicons:hover .sicon:hover,
.sicon:focus-visible {
  opacity: 1;
  color: var(--ink);
  border-color: var(--ink);
  background: var(--paper-2);
  transform: translateY(-2px);
}

.sicon:active { transform: translateY(0) scale(.97); }

@media (prefers-reduced-motion: reduce) {
  .sicon svg { animation: none; opacity: 1; transform: none; }
  .sicon { transition: none; }
}

/* ---------- 6. Section ---------- */
.sec { margin-top: clamp(56px, 7vw, 88px); }

.sec__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.sec__title {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  letter-spacing: 0.02em;
}

.sec__desc {
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--muted);
  max-width: 30em;
}

.sec__more {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.sec__more:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- 7. 首页文章条目 ---------- */
.entries { border-top: 1px solid var(--line); }

.entry {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px 36px;
  padding: 26px 0 28px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.entry__date {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  letter-spacing: 0.03em;
  padding-top: 6px;
}

.entry__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.entry { transition: background-color .22s var(--ease); }
.entry:hover { background-color: rgba(10, 10, 11, 0.022); }
.entry:hover .entry__title { text-decoration: underline; text-underline-offset: 4px; }

.entry__desc {
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.75;
  max-width: 34em;
}

.entry__meta {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- 8. 首页手记 ---------- */
.notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(32px, 5vw, 64px);
  border-top: 1px solid var(--line);
}

.note {
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--line);
}

.note__date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.note__text {
  font-size: var(--fs-sm);
  line-height: 1.85;
  color: var(--body);
}

.note__text code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--paper-2);
  padding: 1px 5px;
  border-radius: 2px;
}

/* ---------- 9. 照片带 ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.strip a,
.strip .strip__cell { display: block; overflow: hidden; position: relative; }

.strip img {
  width: 100%;
  height: clamp(150px, 19vw, 238px);
  object-fit: cover;
  transition: opacity .3s var(--ease);
}

.strip a:hover img { opacity: .82; }

/* ---------- 10. 页头 ---------- */
.page-head {
  padding: clamp(56px, 8vw, 88px) 0 0;
  max-width: var(--text);
}

.page-head__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.page-head__title {
  font-family: var(--font-serif);
  font-size: var(--fs-title);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.page-head__desc {
  margin-top: 18px;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.85;
  max-width: 32em;
}

/* ---------- 10.5 时间线（像一条向下的 git 分支） ---------- */
.tl {
  list-style: none;
  margin: 40px 0 0;
  padding: 0 0 48px;
  max-width: var(--text);
}

.tl__item {
  position: relative;
  padding: 0 0 28px 28px;
}

.tl__item:last-child { padding-bottom: 0; }

.tl__dot {
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--paper);
  z-index: 1;
}

.tl__rail {
  position: absolute;
  left: 4px;
  top: 1.1em;
  bottom: -0.2em;
  width: 1px;
  background: rgba(10, 10, 11, 0.18);
}

.tl__when {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.tl__text {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--body);
  max-width: 36em;
}

/* ---------- 11. 筛选 ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 40px 0 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.filter {
  appearance: none;
  background: none;
  border: 0;
  padding: 0 0 3px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.filter:hover { color: var(--ink); }

.filter.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- 12. 文章列表 ---------- */
.year { margin-top: 44px; }

.year__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  letter-spacing: 0.16em;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.year:first-of-type .year__label { margin-top: 0; }

.row {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 8px 28px;
  align-items: baseline;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.row__date {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  letter-spacing: 0.03em;
}

.row__title {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  line-height: 1.6;
}

.row { transition: background-color .22s var(--ease); }
.row:hover { background-color: rgba(10, 10, 11, 0.022); }
.row:hover .row__title { text-decoration: underline; text-underline-offset: 4px; }

.row__tags {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ---------- 13. 手记页 ---------- */
.notes--page {
  margin-top: 0;
  border-top: 0;
  grid-template-columns: 1fr;
}

.notes--page .note {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 4px 32px;
  align-items: baseline;
  padding: 20px 0 22px;
}

.notes--page .note__date { margin-bottom: 0; padding-top: 5px; }

.notes--page .note__text {
  font-size: var(--fs-body);
  max-width: 34em;
}

/* ---------- 14. 照片墙 ---------- */
/* 没有 JS 时退化成三栏 CSS columns；有 JS 时按图片高度分配到最短的一栏 */
.masonry {
  columns: 3;
  column-gap: 16px;
  margin-top: 44px;
}

.masonry.is-laid {
  columns: auto;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.masonry__col {
  flex: 1 1 0;
  min-width: 0;
}

.masonry figure {
  margin: 0 0 18px;
  break-inside: avoid;
  cursor: zoom-in;
}

.masonry img {
  width: 100%;
  transition: opacity .3s var(--ease);
}

.masonry figure:hover img { opacity: .88; }

.masonry figcaption {
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- 15. 灯箱 ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 11, 0.97);
  padding: clamp(48px, 6vw, 80px);
}

.lb.is-open { display: flex; animation: page-in .18s var(--ease) both; }
.lb.is-open .lb__img { animation: zoom-in .34s var(--ease) both; }

.lb__img {
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
}

.lb__cap {
  position: absolute;
  left: 0; right: 0;
  bottom: 34px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  color: rgba(241, 239, 234, 0.65);
}

.lb__btn {
  position: absolute;
  background: none;
  border: 0;
  color: rgba(241, 239, 234, 0.7);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  line-height: 1;
  padding: 14px;
  transition: color .18s var(--ease);
}

.lb__btn:hover { color: #f1efea; }

.lb__close { top: 18px; right: 18px; font-size: 1.25rem; }
.lb__prev  { left: 8px; top: 50%; transform: translateY(-50%); }
.lb__next  { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- 16. 关于 ---------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
  margin-top: 56px;
}

.intro__body p {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 2;
  color: var(--body);
  max-width: 32em;
}

.intro__body p + p { margin-top: 1.2em; }

.intro__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.92);
}

.now {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px clamp(32px, 6vw, 72px);
  margin-top: 20px;
}

.now__title {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.now li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.now li span:last-child {
  color: var(--muted);
  white-space: nowrap;
  font-size: var(--fs-xs);
}

.contact {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  max-width: 34em;
}

.contact a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.contact__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  letter-spacing: 0.1em;
}

.contact__value {
  font-family: var(--font-serif);
  font-size: var(--fs-sm);
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color .18s var(--ease);
}

.contact a:hover .contact__value { border-bottom-color: var(--ink); }

/* ---------- 17. 文章 ---------- */
.article__head {
  max-width: var(--text);
  margin: 0 auto;
  padding-top: clamp(56px, 8vw, 88px);
}

.article__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  letter-spacing: 0.06em;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.article__title {
  margin-top: 22px;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.6vw, 2.625rem);
  line-height: 1.42;
  letter-spacing: 0.01em;
}

.article__lede {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: var(--fs-lead);
  line-height: 1.85;
  color: var(--muted);
}

.cover { margin: clamp(36px, 5vw, 56px) auto; max-width: 920px; }

.cover img { width: 100%; }

.cover figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.prose {
  max-width: var(--text);
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.95;
  color: var(--body);
  text-align: justify;
  text-justify: inter-character;
}

.prose p + p { margin-top: 1.1em; }

.prose h2 {
  margin: 2.8em 0 0.9em;
  font-family: var(--font-serif);
  font-size: 1.375rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.prose ul { margin: 1.2em 0 1.4em; padding-left: 1.1em; list-style: none; }

.prose ul li {
  position: relative;
  margin: 0.55em 0;
  line-height: 1.85;
  text-align: start;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.05em;
  top: 0.85em;
  width: 0.36em;
  height: 1px;
  background: var(--line-2);
}

.prose blockquote {
  margin: 2.2em 0;
  padding-left: 24px;
  border-left: 2px solid var(--ink);
  color: var(--body);
  font-size: 1.0625rem;
  line-height: 1.9;
  text-align: start;
}

.prose blockquote p + p { margin-top: 0.8em; }

.prose .callout {
  margin: 2.6em 0;
  padding: 24px 26px;
  background: var(--paper-2);
  border-radius: 3px;
  font-size: var(--fs-sm);
  line-height: 1.9;
  color: var(--body);
  text-align: start;
}

.prose .callout code,
.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--paper-2);
  padding: 1px 5px;
  border-radius: 2px;
}

.prose .callout code { background: rgba(10, 10, 11, 0.06); }

.prose hr {
  margin: 3em auto;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  transition: border-color .18s var(--ease);
}

.prose a:hover { border-bottom-color: var(--ink); }

.prose__img {
  margin: 1.4em 0;
}

.prose__img img,
.note__text img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

.prose__inline-img {
  display: inline-block;
  max-height: 1.4em;
  vertical-align: -0.2em;
  margin: 0 0.15em;
}

.note__text .prose__img { margin: 0.9em 0; }
.note__text p { margin: 0; }
.note__text p + p { margin-top: 0.85em; }

.article__foot {
  max-width: var(--text);
  margin: 64px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.article__tags {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ---------- 18. 页脚 ---------- */
.foot {
  margin-top: clamp(80px, 10vw, 128px);
  border-top: 1px solid var(--line);
  padding: clamp(40px, 5vw, 56px) 0 36px;
}

.foot__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px 64px;
  align-items: start;
}

.foot__line {
  font-family: var(--font-serif);
  font-size: var(--fs-sm);
  color: var(--body);
}

.foot__mail {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
  transition: border-color .18s var(--ease);
}

.foot__mail:hover { border-bottom-color: var(--ink); }

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: var(--fs-xs);
  color: var(--muted);
  padding-top: 6px;
}

.foot__links a { border-bottom: 1px solid transparent; }
.foot__links a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- 18.5 空状态 ---------- */
.empty {
  padding: 32px 0 8px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ---------- 19. 小工具 ---------- */
.hidden { display: none !important; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 20. 响应式 ---------- */
@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 32px; }
  .intro__photo { max-width: 240px; order: -1; }
  .masonry { columns: 2; }
  .strip { grid-template-columns: repeat(3, 1fr); }
  .strip > :nth-child(n + 4) { display: none; }
}

@media (max-width: 760px) {
  .nav__links {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: var(--nav-h);
    z-index: 50;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--pad) 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .nav--open .nav__links { display: flex; animation: drop-in .22s var(--ease) both; }
  .nav--open { position: relative; }

  .nav__link {
    width: 100%;
    padding: 13px 0;
    font-size: var(--fs-sm);
    border-bottom: 1px solid var(--line);
  }

  .nav__link:last-child { border-bottom: 0; }
  .nav__line { display: none; }
  .nav__toggle { display: inline-flex; }

  .sicons { gap: 11px; }
  .sicon { width: 36px; height: 36px; }
  .sicon svg { width: 15px; height: 15px; }
  .entry { grid-template-columns: 1fr; gap: 10px; }
  .entry__date { padding-top: 0; }
  .row { grid-template-columns: 64px 1fr; gap: 6px 18px; }
  .row__tags { display: none; }
  .notes { grid-template-columns: 1fr; }
  .now, .contact { grid-template-columns: 1fr; }
  .foot__in { grid-template-columns: 1fr; }
  .masonry { column-gap: 10px; gap: 10px; }
  .masonry figure { margin-bottom: 16px; }
}

@media (max-width: 560px) {
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip > :nth-child(n + 3) { display: none; }
  .notes--page .note { grid-template-columns: 1fr; gap: 6px; }
  .notes--page .note__date { padding-top: 0; }
  .prose { text-align: start; }
  .article__foot { flex-direction: column; gap: 14px; }
  .lb { padding: 56px 20px; }
  .lb__img { max-height: calc(100vh - 160px); }
  .lb__prev { left: 0; }
  .lb__next { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .has-cursor, .has-cursor * { cursor: auto !important; }
  .cursor { display: none; }
  .ink { display: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; }
  body.is-leaving { opacity: 1; }
}

/* ---------- 21. 编辑模式（就地图标，无底部栏） ---------- */
.adm-chip {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 130;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border-radius: 2px;
  box-shadow: 0 10px 30px -16px rgba(10, 10, 11, 0.55);
}

.adm-chip button {
  appearance: none;
  background: rgba(241, 239, 234, 0.12);
  border: 0;
  color: inherit;
  font: inherit;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 2px;
}

.adm-chip button:hover { background: rgba(241, 239, 234, 0.22); }

.adm-host { position: relative; }

.adm-tools {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  gap: 4px;
}

body.is-editing .adm-tools { display: flex; }

.adm-ico,
.adm-add {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 6px 18px -12px rgba(10, 10, 11, 0.45);
}

.adm-ico {
  width: 30px;
  height: 30px;
  padding: 0;
}

.adm-ico:hover { border-color: var(--ink); }
.adm-ico--danger:hover { color: #8a2a1f; border-color: #8a2a1f; }

.adm-add {
  display: none;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-left: 12px;
}

body.is-editing .adm-add { display: inline-flex; }

.sec__head .adm-add { margin-left: auto; flex-shrink: 0; }

.page-head { position: relative; }
.page-head .adm-add {
  position: absolute;
  right: 0;
  top: 0.35em;
}

.adm-sheet {
  margin: 18px 0 28px;
  max-width: 560px;
  background: #fff;
  border: 1px solid var(--line-2);
  padding: 18px 20px 20px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--body);
  animation: panel-in .22s var(--ease) both;
}

.adm__cancel {
  appearance: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 2px;
}

.adm__cancel:hover { border-color: var(--ink); color: var(--ink); }

.adm__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.adm__head strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.adm__close {
  appearance: none; background: none; border: 0;
  font-size: 20px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 0 4px;
}

.adm__form label {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.adm__form input,
.adm__form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.6;
  border-radius: 2px;
}

.adm__form textarea { resize: vertical; font-family: var(--font-serif); font-size: 14px; }
.adm__form input:focus,
.adm__form textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }

.adm__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.adm__imgrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: -4px 0 4px;
}

.adm__imgbtn {
  font: inherit;
  font-size: 12px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
}

.adm__imgbtn:hover { border-color: var(--ink); }
.adm__imgbtn:disabled { opacity: 0.5; cursor: default; }

.adm__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.adm__save {
  appearance: none;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: 9px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 2px;
}

.adm__save:disabled { opacity: 0.5; cursor: default; }

.adm__hint { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

.adm__toast {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translate(-50%, -10px);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 9px 16px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 140;
  max-width: 80vw;
}

.adm__toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.adm__toast[data-kind="err"] { background: #8a2a1f; }

@media (max-width: 760px) {
  .adm__row { grid-template-columns: 1fr; }
  .adm-chip { top: auto; bottom: 14px; right: 12px; left: 12px; justify-content: space-between; }
  .page-head .adm-add { position: static; margin-top: 10px; }
}
