/* ============================================================
   melon瓜 的个人博客 —— 全站样式表
   ------------------------------------------------------------
   目录：
     1. 颜色 / 尺寸变量       ← 想换整体配色只改这里
     2. 基础重置与排版
     3. 通用布局与组件（按钮、卡片、标签）
     4. 顶部导航 / 页脚
     5. 首页（主视觉、精选照片、最新随笔）
     6. 相册（页签、瀑布流、灯箱）
     7. 随笔列表与文章页
     8. 滚动动画与响应式
   ============================================================ */

/* ---------- 1. 颜色 / 尺寸变量 ---------- */

:root {
  color-scheme: light;

  /* 薄荷绿主色阶 */
  --mint-50: #eefaf6;
  --mint-100: #d9f4ea;
  --mint-200: #b6ecd9;
  --mint-400: #35d6ae;
  --mint-600: #0f8a6c;
  --mint-800: #0a6f57;

  /* 点缀色 */
  --cyan: #45c7d8;
  --yellow: #ffd166;
  --coral: #ff9f8a;

  /* 语义色 */
  --bg: #f3fbf8;
  --surface: #ffffff;
  --surface-soft: #f6fdfa;
  --text: #12362e;
  --text-muted: #4d726b;
  --brand: var(--mint-600);
  --brand-strong: var(--mint-800);
  --brand-soft: var(--mint-100);
  --border: rgba(15, 138, 108, 0.16);
  --border-strong: rgba(15, 138, 108, 0.3);

  /* 阴影 */
  --shadow-sm: 0 4px 14px rgba(16, 140, 112, 0.08);
  --shadow: 0 14px 36px rgba(16, 140, 112, 0.12);
  --shadow-lg: 0 26px 64px rgba(16, 140, 112, 0.18);

  /* 圆角与间距 */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --page: 1080px;

  /* 字体：全部使用系统自带字体，不依赖任何网络字体 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;

  /* 头像取景：方形的头像照片不用动；换成竖长或横宽的照片时调这个值
     （center 30% = 水平居中、垂直偏上，方便对准人脸） */
  --avatar-pos: center 30%;
}

/* 深色主题：只需要把上面这套变量换成深色版本 */
html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0e1a17;
  --surface: #15241f;
  --surface-soft: #1a2b25;
  --text: #e8f6f0;
  --text-muted: #9dbbb3;
  --brand: var(--mint-400);
  --brand-strong: #6ee7c6;
  --brand-soft: rgba(53, 214, 174, 0.16);
  --border: rgba(53, 214, 174, 0.2);
  --border-strong: rgba(53, 214, 174, 0.36);

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 26px 64px rgba(0, 0, 0, 0.5);
}

/* ---------- 2. 基础重置与排版 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  /* 顶部两团柔和的薄荷/青色光晕，让页面更亮更活泼 */
  background-image:
    radial-gradient(680px 420px at 12% -6%, rgba(53, 214, 174, 0.22), transparent 62%),
    radial-gradient(560px 380px at 92% 2%, rgba(69, 199, 216, 0.18), transparent 60%),
    radial-gradient(520px 420px at 78% 34%, rgba(255, 209, 102, 0.14), transparent 65%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html[data-theme="dark"] body {
  background-image:
    radial-gradient(680px 420px at 12% -6%, rgba(53, 214, 174, 0.14), transparent 62%),
    radial-gradient(560px 380px at 92% 2%, rgba(69, 199, 216, 0.12), transparent 60%),
    radial-gradient(520px 420px at 78% 34%, rgba(255, 209, 102, 0.07), transparent 65%);
}

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

a {
  color: var(--brand-strong);
  text-decoration: none;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.3;
  letter-spacing: 0.01em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.3em;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* 键盘操作时显示清晰的焦点框 */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--brand-strong);
  color: #fff;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

/* ---------- 3. 通用布局与组件 ---------- */

.container {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0 8px;
}

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

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

/* 标题下的小波浪线，手绘感 */
.section-title {
  position: relative;
  display: inline-block;
  margin: 0 0 4px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -10px;
  height: 8px;
  background-image: radial-gradient(circle at 4px 4px, var(--mint-200) 3px, transparent 3.6px);
  background-size: 14px 8px;
  background-repeat: repeat-x;
  opacity: 0.9;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.85rem;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn--primary {
  background-image: linear-gradient(135deg, var(--mint-600), var(--mint-800));
  color: #ffffff;
  box-shadow: var(--shadow);
}

.btn--primary:hover {
  box-shadow: var(--shadow-lg);
}

html[data-theme="dark"] .btn--primary {
  background-image: linear-gradient(135deg, var(--mint-400), #26b390);
  color: #062720;
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--brand-strong);
  box-shadow: var(--shadow-sm);
}

/* 小标签 */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.88rem;
  font-weight: 600;
}

.chip--outline {
  background: transparent;
  border: 1px dashed var(--border-strong);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.meta .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* 进出场动画用的初始状态 */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 4. 顶部导航 / 页脚 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background-image: linear-gradient(135deg, var(--mint-400), var(--mint-600));
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* 左上角的小头像：有头像照片时显示图片，没有时退回「瓜」字方块 */
.brand__mark-img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav__link:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
  text-decoration: none;
}

.nav__link[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* 主题按钮：当前是亮色就显示太阳，是深色就显示月亮 */
.theme-toggle .icon-moon,
html[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.nav__toggle {
  display: none;
}

.site-footer {
  margin-top: 72px;
  padding: 44px 0 36px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.footer__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer__note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer__brand {
  margin-bottom: 6px;
  font-weight: 800;
  font-size: 1.05rem;
}

/* ---------- 5. 首页 ---------- */

.hero {
  position: relative;
  padding: 62px 0 20px;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: center;
  gap: 46px;
}

.hero__name {
  margin: 0 0 14px;
}

/* 名字里的「瓜」字做个渐变高亮（首页和关于页都用到） */
.hero__name em,
.about-hero__name em {
  font-style: normal;
  background-image: linear-gradient(120deg, var(--mint-600), var(--cyan) 60%, var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__signature {
  max-width: 44ch;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero__subtitle {
  margin: 0 0 16px;
  color: var(--brand-strong);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 30px;
}

.hero__learning {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero__learning .meta {
  margin: 0;
}

.hero__avatar-wrap {
  position: relative;
  justify-self: center;
  width: min(300px, 74vw);
  aspect-ratio: 1;
}

/* 头像后面的两个色块，制造活泼的层次 */
.hero__avatar-wrap::before,
.hero__avatar-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 46% 54% 60% 40% / 52% 44% 56% 48%;
  z-index: 0;
}

.hero__avatar-wrap::before {
  background-image: linear-gradient(140deg, rgba(53, 214, 174, 0.55), rgba(69, 199, 216, 0.45));
  transform: rotate(-7deg) scale(1.03);
}

.hero__avatar-wrap::after {
  background-image: linear-gradient(140deg, rgba(255, 209, 102, 0.6), rgba(255, 159, 138, 0.35));
  transform: rotate(9deg) scale(0.97);
}

/* 头像：用 <img> 显示，圆形裁切；照片还没加载出来时显示浅绿色底 */
.avatar {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid var(--surface);
  background-color: var(--brand-soft);
  object-fit: cover;
  object-position: var(--avatar-pos);
  box-shadow: var(--shadow-lg);
}

/* 小装饰：飘在页面角落的图标 */
.doodle {
  position: absolute;
  color: var(--mint-400);
  opacity: 0.75;
  pointer-events: none;
}

.doodle--snow {
  top: 18px;
  left: 4%;
  width: 34px;
}

.doodle--camera {
  right: 5%;
  bottom: 8%;
  width: 40px;
  color: var(--cyan);
}

.about-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 34px;
  padding: 34px;
}

.about-brief__text p:last-child {
  margin-bottom: 0;
}

.learn-box {
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px dashed var(--border-strong);
}

.learn-box h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

/* 精选照片：桌面端做一张大小错落的马赛克 */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 172px;
  gap: 16px;
}

.featured-grid .photo-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-card {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  padding: 0;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  break-inside: avoid;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-card:hover img,
.photo-card:focus-visible img {
  transform: scale(1.06);
}

.photo-card__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 16px 14px;
  color: #ffffff;
  font-size: 0.9rem;
  text-align: left;
  background-image: linear-gradient(to top, rgba(6, 39, 32, 0.78), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.photo-card:hover .photo-card__caption,
.photo-card:focus-visible .photo-card__caption {
  opacity: 1;
  transform: none;
}

/* 随笔卡片 */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 26px;
}

.post-grid--three {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.post-card__cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-soft);
}

.post-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card__cover img {
  transform: scale(1.05);
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 24px;
}

.post-card__title {
  margin: 0;
  font-size: 1.14rem;
}

.post-card__title a {
  color: var(--text);
}

.post-card__title a:hover {
  color: var(--brand-strong);
}

.post-card__summary {
  flex: 1;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.post-card__more {
  font-weight: 700;
  font-size: 0.92rem;
}

/* ---------- 6. 相册 ---------- */

/* 关于我页面 */
.about-hero {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: 36px;
  padding: 34px;
}

.avatar--lg {
  width: 210px;
  height: 210px;
}

.about-hero__name {
  margin-bottom: 6px;
}

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

.cta-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 34px;
}

.cta-card h2 {
  margin-bottom: 6px;
}

.cta-card .meta {
  margin: 0;
}

.page-head {
  padding: 48px 0 6px;
  text-align: center;
}

.page-head p {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--text-muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 30px 0 34px;
}

.tab {
  padding: 9px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.93rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.tab:hover {
  transform: translateY(-2px);
  color: var(--brand-strong);
  border-color: var(--border-strong);
}

.tab[aria-pressed="true"] {
  background-image: linear-gradient(135deg, var(--mint-600), var(--mint-800));
  border-color: transparent;
  color: #ffffff;
}

html[data-theme="dark"] .tab[aria-pressed="true"] {
  background-image: linear-gradient(135deg, var(--mint-400), #26b390);
  color: #062720;
}

.tab__count {
  margin-left: 6px;
  font-size: 0.8rem;
  opacity: 0.8;
}

/* 瀑布流：用 CSS 多列实现，横竖图混排也不会错位 */
.masonry {
  column-count: 3;
  column-gap: 18px;
}

.masonry .photo-card {
  margin-bottom: 18px;
  animation: fade-in 0.4s ease both;
}

.masonry .photo-card.is-hidden {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.empty-hint {
  padding: 60px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-align: center;
}

/* 灯箱：看大图 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 26, 22, 0.86);
  backdrop-filter: blur(6px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  margin: 0;
  max-width: min(1100px, 92vw);
  text-align: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 76vh;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.lightbox__caption {
  margin-top: 16px;
  color: #eafff8;
}

.lightbox__caption strong {
  display: block;
  font-size: 1.05rem;
}

.lightbox__caption span {
  font-size: 0.88rem;
  opacity: 0.85;
}

.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox__btn svg {
  width: 22px;
  height: 22px;
}

.lightbox__close {
  top: 22px;
  right: 22px;
}

.lightbox__prev {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
}

.lightbox__next {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

.lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #eafff8;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

/* ---------- 7. 随笔列表与文章页 ---------- */

.post-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card__tags li {
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 600;
}

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 0;
}

.article__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  font-weight: 700;
  font-size: 0.92rem;
}

.article__title {
  margin-bottom: 14px;
}

.article__cover {
  margin: 26px 0 34px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.article__cover img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

/* 正文排版 */
.prose {
  font-size: 1.03rem;
}

.prose h2 {
  margin: 2em 0 0.6em;
  padding-left: 14px;
  border-left: 5px solid var(--mint-400);
  font-size: 1.32rem;
}

.prose h3 {
  margin: 1.6em 0 0.5em;
}

.prose p {
  margin-bottom: 1.3em;
}

.prose ul,
.prose ol {
  margin-bottom: 1.4em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose figure {
  margin: 1.8em 0;
}

.prose figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.prose figcaption {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.86rem;
  text-align: center;
}

.prose blockquote {
  margin: 1.8em 0;
  padding: 16px 22px;
  border-left: 5px solid var(--mint-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-soft);
  color: var(--text-muted);
}

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

.prose code {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

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

.post-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px dashed var(--border-strong);
}

.post-nav a {
  font-weight: 700;
}

/* ---------- 8. 滚动动画与响应式 ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 34px;
    text-align: center;
  }

  .hero__signature {
    margin: 0 auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero .chip-row {
    justify-content: center;
  }

  .hero__avatar-wrap {
    order: -1;
    width: min(230px, 60vw);
  }

  .about-brief {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }

  .masonry {
    column-count: 2;
  }

  .about-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .avatar--lg {
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .nav {
    min-height: 62px;
  }

  .nav__toggle {
    display: grid;
  }

  /* 手机上导航折成下拉面板 */
  .nav__links {
    position: absolute;
    top: calc(100% + 6px);
    right: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__link {
    padding: 12px 16px;
  }

  .site-header {
    position: relative;
  }

  .section {
    padding-top: 42px;
  }

  .featured-grid {
    grid-auto-rows: 132px;
    gap: 12px;
  }

  .masonry {
    column-count: 1;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox__prev {
    left: 8px;
  }

  .lightbox__next {
    right: 8px;
  }

  .lightbox__btn {
    width: 42px;
    height: 42px;
  }

  .lightbox__img {
    max-height: 66vh;
  }
}
