/* 夏青的学习笔记 —— 站点样式
   ------------------------------------------------------------
   蓝色系 · 白底。无任何外部依赖（不引 CDN、不引字体文件），
   国内访问快，也不会因为外链挂掉而白屏。

   配色说明：所有颜色都收在下面的 :root 变量里，HTML 里不出现硬编码色值，
   整体换色只改这一处。辅助文字用 slate 的 500/700 而不是更浅的灰，
   是为了正文与注释都能过 WCAG AA（4.5:1）—— 浅灰只留给装饰性元素。

   排版说明：中文行宽不宜过宽（超过 45 字眼睛会找不到下一行开头），
   所以正文栏宽收在 740px、字号 17px、行高 1.85。
   ------------------------------------------------------------ */

:root {
  /* ---- 底色与层次 ---- */
  --bg:        #f8fafc;   /* 页面底：极浅蓝灰，让白卡片浮起来 */
  --surface:   #ffffff;   /* 卡片 / 导航底 */
  --ink:       #0f172a;   /* 主文字：近黑的深蓝 */
  --sub:       #334155;   /* 次要文字 */
  --faint:     #64748b;   /* 弱化文字（时间、图注）：4.8:1，仍达 AA */

  /* ---- 描边 ---- */
  --line:        #e2e8f0;
  --line-strong: #cbd5e1; /* 交互态 */

  /* ---- 品牌蓝 ---- */
  --accent:       #1d4ed8;  /* 链接、强调：8.6:1 */
  --accent-hover: #1e40af;
  --accent-soft:  #eff6ff;  /* 浅蓝底：hover、引用块、表头 */
  --accent-line:  #bfdbfe;  /* 浅蓝描边 */
  --focus:        #2563eb;  /* 键盘焦点环 */

  --max:   740px;
  --wide: 1100px;
  --radius: 14px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 6px 18px rgba(15,23,42,.07);
  --shadow-lg: 0 14px 34px rgba(15,23,42,.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
               sans-serif;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

/* 选中文字用品牌蓝，让页面「有颜色」但不靠大面积色块 */
::selection { background: var(--accent-line); color: var(--ink); }

/* 键盘焦点必须看得见 —— 默认轮廓在很多浏览器里被清掉了，只靠 hover 的
   样式对键盘用户等于不存在。鼠标点击不显示，Tab 走的时候才显示。 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 有吸顶导航，锚点跳转要留出导航的高度，否则标题会被压在栏下面 */
:target { scroll-margin-top: 84px; }

.wrap      { max-width: var(--max);  margin: 0 auto; padding: 0 22px; }
.wrap-wide { max-width: var(--wide); margin: 0 auto; padding: 0 22px; }

/* ================= 导航栏 ================= */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
header .wrap-wide {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.site-name {
  font-size: 17px; font-weight: 600; letter-spacing: .5px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
nav { display: flex; gap: 4px; }
nav a {
  color: var(--sub); text-decoration: none; font-size: 14.5px;
  padding: 7px 12px; border-radius: 8px;
  transition: background .18s, color .18s;
}
nav a:hover { color: var(--ink); background: var(--accent-soft); }
nav a.active { color: var(--accent); font-weight: 600; }

/* ================= 首屏 ================= */
.hero {
  padding: 84px 0 40px;
  position: relative;
  /* 一层很淡的蓝色晕染：让首屏「有空气」，但不靠大色块压住文字 */
  background: radial-gradient(1100px 340px at 22% -40%,
              rgba(29,78,216,.10), rgba(29,78,216,0) 70%);
}
.eyebrow {
  font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 20px;
}
.hero h1 {
  font-size: 46px; line-height: 1.36; font-weight: 700;
  letter-spacing: -1px; margin: 0 0 24px;
}
.hero h1 em {
  font-style: normal; color: var(--accent);
  /* 强调处加一道手写下划线：比变色更有「人写的」感觉 */
  background: linear-gradient(transparent 68%, var(--accent-line) 68%);
  padding: 0 2px 2px;
}
.hero .lead {
  font-size: 17.5px; color: var(--sub); margin: 0; max-width: 32em;
}
.byline {
  margin: 24px 0 0; font-size: 14.5px; color: var(--faint);
}

/* ================= 数字带（研究线） ================= */
.band-section { padding: 14px 0 10px; }
.band-kicker {
  font-size: 16px; font-weight: 600; color: var(--ink);
  margin: 0 0 16px;
}
.stat-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px;
  box-shadow: var(--shadow-sm);
}
.stat .num {
  display: block; font-size: 42px; font-weight: 700;
  line-height: 1; letter-spacing: -1.5px; color: var(--accent);
}
.stat .cap {
  display: block; margin-top: 14px; font-size: 14px;
  color: var(--sub); line-height: 1.7;
}
/* 最后一个是结论，用实心蓝把它从三个里面「拎出来」 */
.stat-accent { background: var(--accent); border-color: var(--accent); }
.stat-accent .num { color: #fff; }
.stat-accent .cap { color: rgba(255,255,255,.93); }
.band-note { margin: 18px 0 0; font-size: 15px; color: var(--faint); }
.band-note a { color: var(--accent); }

/* ================= 文章开头的大句 ================= */
.lede {
  font-size: 21px; line-height: 1.72; font-weight: 600;
  color: var(--ink); margin: 0 0 30px;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--accent-line);
}

/* 结论式引言：比 blockquote 更重，用在每一篇的转折处 */
.quotecard {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 24px 28px; margin: 30px 0;
  font-size: 17.5px; line-height: 1.75; font-weight: 500;
  color: var(--ink); border-left: 3px solid var(--accent);
}

/* ================= 关于页：小节标题用的卡片（人 / 爱好） ================= */
.person h3 {
  margin: 0 0 8px; font-size: 16.5px; font-weight: 600;
}
.person h3 .role { font-weight: 500; }

/* ================= 照片墙（瀑布流） ================= */
.wall-section { padding: 44px 0 20px; }

.wall {
  columns: 2;
  column-gap: 12px;
}
@media (min-width: 620px)  { .wall { columns: 3; } }
@media (min-width: 1000px) { .wall { columns: 4; } }

.wall figure {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 12px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--accent-soft);
  box-shadow: var(--shadow-sm);
  transition: transform .28s ease, box-shadow .28s ease;
}
.wall figure:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.wall img {
  display: block; width: 100%; height: auto;
  object-fit: cover;
}
.wall figcaption {
  font-size: 12.5px; color: var(--faint);
  padding: 8px 11px 10px; background: var(--surface);
  border-top: 1px solid var(--line);
}

/* ================= 段落标题 ================= */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0 6px; padding-top: 30px;
}
.section-head h2 {
  font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--faint); font-weight: 600; margin: 0;
}
.section-head a { font-size: 13px; color: var(--faint); text-decoration: none; }
.section-head a:hover { color: var(--accent); }

/* ================= 笔记卡片 ================= */
.notes { padding: 10px 0 56px; }

.note-item {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.note-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-line);
}
.note-item h3 {
  margin: 0 0 8px; font-size: 18.5px; font-weight: 600; line-height: 1.5;
  color: var(--ink); transition: color .2s;
}
.note-item:hover h3 { color: var(--accent); }
.note-item p { margin: 0 0 12px; color: var(--sub); font-size: 15px; }
.note-item time { font-size: 13px; color: var(--faint); letter-spacing: .5px; }

/* ================= 文章正文 ================= */
main.doc { padding: 52px 0 72px; }
main.doc h1 {
  font-size: 29px; line-height: 1.5; font-weight: 700;
  letter-spacing: -.3px; margin: 0 0 12px;
}
main.doc .meta {
  color: var(--faint); font-size: 14px; margin-bottom: 40px;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
main.doc h2 {
  font-size: 19.5px; margin: 40px 0 14px; font-weight: 600;
  letter-spacing: -.2px;
}
main.doc h3 { font-size: 17px; margin: 28px 0 10px; font-weight: 600; }
main.doc p  { margin: 0 0 18px; }
main.doc ul, main.doc ol { padding-left: 24px; margin: 0 0 18px; }
main.doc li { margin-bottom: 8px; }
main.doc blockquote {
  margin: 24px 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  color: var(--sub); font-size: 16px;
}
main.doc a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
main.doc a:hover { color: var(--accent-hover); }
main.doc hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

main.doc table {
  width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15.5px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
main.doc th, main.doc td {
  border-bottom: 1px solid var(--line);
  padding: 11px 14px; text-align: left; vertical-align: top;
}
main.doc th { background: var(--accent-soft); font-weight: 600; }
main.doc tr:last-child td { border-bottom: 0; }

.note-box,
.note {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 22px; margin: 26px 0; font-size: 15.5px;
  border-left: 3px solid var(--accent);
}

.back {
  display: inline-block; margin-top: 40px; font-size: 15px;
  color: var(--sub); text-decoration: none;
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); transition: all .2s;
}
.back:hover { color: var(--accent); border-color: var(--accent); transform: translateX(-3px); }

/* ================= 人物卡片（关于页） ================= */
.people { margin: 28px 0 8px; }
.person {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.person .name { font-weight: 600; font-size: 16.5px; }
.person .role { color: var(--accent); font-size: 14px; margin-left: 8px; }
.person p { margin: 8px 0 0; color: var(--sub); font-size: 15px; }

/* ================= 页脚 ================= */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  font-size: 14px; color: var(--sub);
  background: var(--surface);
}
footer .row {
  display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center;
}
footer a { color: var(--sub); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer .tagline {
  font-size: 14px; color: var(--faint); margin-bottom: 16px;
  font-style: italic;
}
.icp { margin-top: 14px; font-size: 13.5px; }
.icp a { color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ================= 移动端 ================= */
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  header .wrap-wide { height: 54px; }
  .site-name { font-size: 15.5px; }
  nav { gap: 0; }
  nav a { padding: 6px 9px; font-size: 13.5px; }
  .hero { padding: 56px 0 28px; }
  .hero h1 { font-size: 31px; letter-spacing: -.5px; }
  .hero .lead { font-size: 16px; }
  .band-kicker { font-size: 15.5px; }
  .stat-band { grid-template-columns: 1fr; }
  .stat { padding: 20px 20px; }
  .stat .num { font-size: 34px; }
  .stat .cap { margin-top: 10px; }
  .lede { font-size: 18.5px; padding-left: 16px; }
  .quotecard { padding: 20px 22px; font-size: 16.5px; }
  main.doc h1 { font-size: 24px; }
  .note-item { padding: 20px 20px; }
  .note-item h3 { font-size: 17px; }
}
