/* ---------- 颜色和字体：想改颜色就改这里 ---------- */
:root {
  --paper: #EEF1E9;     /* 整个屏幕的底色 */
  --bar: #F7F8F2;       /* 导航条的颜色 */
  --panel: #EFEDE9;     /* logo 旁边的描边等 */
  --ink: #2C3D28;       /* 屏幕上的主要文字（标题、介绍、文章），也是 logo 圆圈的颜色 */
  --ink-2: #212121;     /* 其他文字：导航条、页脚 */
  --muted: #5F6B5C;     /* 日期、次要文字 */
  --accent: #3E6A4A;    /* 鼠标移上去的颜色、当前栏目的下划线、链接、小图标 */
  --button: #3E6A4A;    /* 首页按钮的颜色（保持原来的森林绿） */
  --button-ink: #F4F7F0;/* 按钮上的字 */
  --line: #DDD9D1;      /* 细线 */
  --frame: #FFFFFF;     /* 画作的底色 */

  --brush: "Caveat Brush", "Segoe Print", "Bradley Hand", cursive;           /* 英文：手写毛笔感 */
  --zh-head: "LXGW WenKai Screen", "Kaiti SC", "STKaiti", "KaiTi", serif;     /* 中文标题：楷体 */
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; /* 中文正文 */

  --wide: 78rem;
  --gutter: 4.5rem;     /* 左边日期那一栏的宽度 */
  --measure: 46rem;     /* 右边内容的最大宽度 */
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { margin: 0; line-height: 1.8; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -999px; font-family: var(--brush); }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .25rem .5rem; z-index: 10; }

/* 英文统一用手写毛笔字体 */
.en { font-family: var(--brush); letter-spacing: .01em; }
.doodle { display: block; width: 56px; height: 56px; color: var(--accent); }

/* ---------- 顶部卡片 ---------- */
/* 顶部区域铺满整个屏幕宽度，没有外框 */
.frame {
  background: var(--paper);
}
.top--plain { background: var(--bar); border-bottom: 1px solid var(--line); }
.hero { position: relative; height: clamp(320px, 58vh, 680px); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; }
.top--plain { position: static; align-items: center; padding: 1rem clamp(1.25rem, 3vw, 2.5rem); }

/* 左上角的圆形 logo */
.logo {
  flex: none;
  width: 84px; height: 84px;
  margin: 1.25rem 0 0 1.25rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--panel);
  display: grid;
  place-items: center;
  text-decoration: none;
  font-family: var(--brush);
  font-size: 2.5rem;
  line-height: 1;
  transform: rotate(-8deg);
  box-shadow: 5px 5px 0 var(--panel);
  overflow: hidden;
}
.logo span { transform: translateY(-.06em); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.top--plain .logo { margin: 0; width: 64px; height: 64px; font-size: 2rem; box-shadow: 4px 4px 0 var(--line); }

/* 右上角的导航：图标 + 名字，当前页下面一道手绘线 */
.tabs {
  display: flex;
  gap: .5rem 2rem;
  padding: 1rem 1.9rem 1.1rem;
  background: var(--bar);
  border-bottom-left-radius: 14px;
}
.top--plain .tabs { background: none; padding: 0 .75rem 0 0; }
.tabs a {
  position: relative;
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--ink-2);
  text-decoration: none;
  font-family: var(--brush);
  font-size: 1.6rem;
  line-height: 1;
  padding-bottom: .45rem;
}
.tabs .doodle { width: 28px; height: 28px; stroke-width: 3.6; color: currentColor; }
.tabs a:hover { color: var(--accent); }
.tabs a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: -2px; right: -4px; bottom: -4px;
  height: 9px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 9' preserveAspectRatio='none'%3E%3Cpath d='M2 6.2C22 3.4 45 2.6 66 3.3c18 .6 35 1.6 52 .9' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 9' preserveAspectRatio='none'%3E%3Cpath d='M2 6.2C22 3.4 45 2.6 66 3.3c18 .6 35 1.6 52 .9' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* ---------- 首页介绍区（英文） ---------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2rem clamp(3rem, 7vw, 8rem);
  padding: 3.75rem clamp(1.75rem, 6vw, 6rem) 4rem;
}
.intro__title {
  margin: 0;
  font-family: var(--brush);
  font-weight: normal;
  font-size: clamp(2.5rem, 4.8vw, 3.9rem);
  line-height: 1.12;
  text-wrap: balance;
}
.intro__side { padding-top: .6rem; }
.intro__text { margin: 0 0 1.8rem; font-family: var(--brush); font-size: 1.5rem; line-height: 1.45; color: var(--ink); }

.button {
  display: inline-block;
  padding: .55rem 1.6rem .6rem;
  background: var(--button);
  color: var(--button-ink);
  text-decoration: none;
  border-radius: 4px;
  font-family: var(--brush);
  font-size: 1.45rem;
  line-height: 1.2;
}
.button:hover { background: color-mix(in srgb, var(--button) 86%, #1D2A21); }

/* ---------- 栏目内容（中英双语） ---------- */
.sheet {
  position: relative;
  max-width: calc(var(--gutter) + 2.5rem + var(--measure) + 3rem);
  margin: 0 auto;
  padding: 4rem 1.5rem 1rem;
}
.sheet::before {
  content: "";
  position: absolute;
  top: 4rem; bottom: 0;
  left: calc(1.5rem + var(--gutter) + 1.25rem);
  width: 1px;
  background: var(--line);
}

.bi-title { margin: 0; font-weight: normal; }
.bi-title .zh { display: block; font-family: var(--zh-head); font-size: clamp(1.9rem, 4vw, 2.4rem); line-height: 1.3; }
.bi-title .en { display: block; font-size: clamp(1.7rem, 3.4vw, 2.1rem); line-height: 1.15; color: var(--muted); margin-top: .1rem; }

.section-head { margin: 0 0 3rem calc(var(--gutter) + 2.5rem); }
.section-head .doodle { margin-bottom: .75rem; }

.entry, .yearmark { display: grid; grid-template-columns: var(--gutter) minmax(0, var(--measure)); column-gap: 2.5rem; }
.yearmark { margin: 0 0 1.5rem; font-family: var(--brush); font-size: 1.9rem; line-height: 1.2; text-align: right; grid-template-columns: var(--gutter); }

.entry { margin-bottom: 4rem; }
.entry__margin { display: flex; flex-direction: column; align-items: flex-end; text-align: right; padding-top: .2rem; line-height: 1.4; }
.entry__date { color: var(--muted); text-decoration: none; font-size: .95rem; font-variant-numeric: tabular-nums; }
a.entry__date:hover { color: var(--accent); }
.entry__date-en { color: var(--muted); font-size: 1.2rem; }
.entry__type { color: var(--muted); font-size: .82rem; text-decoration: none; margin-top: .35rem; }
.entry__type .en { font-size: 1.1rem; }
.entry__type:hover { color: var(--accent); }

.entry__title { margin: 0 0 .8rem; font-weight: normal; line-height: 1.3; }
.entry__title .zh { display: block; font-family: var(--zh-head); font-size: 1.6rem; }
.entry__title .en { display: block; font-size: 1.5rem; color: var(--muted); }
.entry--single .entry__title { margin-bottom: 1.4rem; }
.entry--single .entry__title .zh { font-size: clamp(1.9rem, 5vw, 2.5rem); }
.entry--single .entry__title .en { font-size: clamp(1.6rem, 3.4vw, 2rem); }
.entry__title a { color: var(--ink); text-decoration: none; }
.entry__title a:hover .zh { color: var(--accent); }

/* About me、Contact 等页面的英文标题 */
.page-title { margin: 0 0 1.4rem; font-family: var(--brush); font-weight: normal; font-size: clamp(2.3rem, 5vw, 3rem); line-height: 1.1; }

.prose { font-size: 1.08rem; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1em; }
.prose h2, .prose h3 { font-family: var(--zh-head); font-weight: normal; line-height: 1.4; margin: 1.8em 0 .6em; }
.prose h2 { font-size: 1.45rem; }
.prose h3 { font-size: 1.2rem; }
.prose blockquote { margin: 1.2em 0; padding-left: 1.1em; border-left: 3px solid var(--accent); border-radius: 0; color: var(--muted); }
.prose hr { border: 0; text-align: center; margin: 2em 0; }
.prose hr::after { content: "～"; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose code { font-size: .9em; background: color-mix(in srgb, var(--muted) 14%, transparent); padding: .1em .3em; border-radius: 3px; }
.prose img, .prose video { display: block; max-width: 100%; height: auto; margin: .3em 0 .8em; border-radius: 6px; }
.entry--drawings .prose img { background: var(--frame); box-shadow: 0 0 0 1px var(--line); }
.prose video { width: 100%; background: #000; }
.video { position: relative; aspect-ratio: 16 / 9; margin: .3em 0 .8em; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }
.more { margin: .4rem 0 0; }
.more .en, .pager .en, .empty .en { font-size: 1.2em; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 2rem calc(var(--gutter) + 2.5rem); max-width: var(--measure); }
.pager a { color: var(--muted); }
.pager a:hover { color: var(--accent); }
.empty { color: var(--muted); margin-left: calc(var(--gutter) + 2.5rem); }

/* ---------- 页脚：只有 About me 和 Contact ---------- */
.foot {
  margin: 3rem 0 0;
  padding: 1.5rem clamp(1.75rem, 6vw, 6rem) 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}
.frame + .foot { margin-top: 0; }  /* 首页：页脚紧接着介绍区 */
.foot__nav { display: flex; gap: 2rem; }
.foot__nav a { color: var(--ink-2); text-decoration: none; font-family: var(--brush); font-size: 1.45rem; }
.foot__nav a:hover { color: var(--accent); }

/* ---------- 手机 ---------- */
@media (max-width: 44rem) {
  .hero { height: 44vh; min-height: 280px; }
  .logo { width: 60px; height: 60px; margin: .75rem 0 0 .75rem; font-size: 1.9rem; box-shadow: 4px 4px 0 var(--panel); }
  .top--plain { padding: .75rem; }
  .top--plain .logo { width: 52px; height: 52px; font-size: 1.7rem; }
  .tabs { gap: .9rem; padding: .75rem .9rem .85rem; }
  .top--plain .tabs { padding-right: .25rem; }
  .tabs a { font-size: 1.3rem; gap: .25rem; }
  .tabs .doodle { width: 21px; height: 21px; stroke-width: 4; }
  .intro { grid-template-columns: 1fr; padding: 2.5rem 1.4rem 2.75rem; gap: 1rem; }
  .intro__side { padding-top: 0; }

  .sheet { padding: 2.75rem 1.25rem 1rem 2.6rem; }
  .sheet::before { top: 2.75rem; left: 1.4rem; }
  .section-head, .pager, .empty { margin-left: 0; }
  .section-head { margin-bottom: 2rem; }
  .entry, .yearmark { display: block; }
  .entry { margin-bottom: 3.2rem; }
  .entry__margin { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .15rem .8rem; text-align: left; margin-bottom: .5rem; }
  .entry__type { margin-top: 0; }
  .yearmark { text-align: left; margin-bottom: 1rem; }
  .foot { padding: 1.25rem 1.4rem 2.25rem; justify-content: center; }
}
