/* ============================================================
   松风 · 个人主页样式表
   ------------------------------------------------------------
   目录
     01. 设计令牌（颜色 / 字体 / 间距）
     02. 基础重置与排版
     03. 通用组件（按钮 / 标签 / 容器 / 揭示动画）
     04. 顶部导航
     05. 首屏 Hero
     06. 章节通用结构
     07. 关于
     08. 作品
     09. 经历时间线
     10. 联系
     11. 页脚与提示条
     12. 响应式断点
     13. 减弱动效偏好
   ============================================================ */

/* ---------- 01. 设计令牌 ---------- */
:root {
  /* 颜色 —— 浅色（米白纸感 + 松绿点睛） */
  --paper:        #FBFAF7;
  --paper-2:      #F4F2EC;
  --surface:      #FFFFFF;
  --ink:          #14181A;
  --ink-soft:     #5A6360;
  --ink-faint:    #8B938F;
  --line:         #E5E2D9;
  --line-strong:  #D3CFC2;
  --accent:       #2F6B57;
  --accent-hover: #245544;
  --accent-soft:  #E7F0EB;
  --on-accent:    #FBFAF7;
  --shadow-sm:    0 1px 2px rgba(20, 24, 26, .05);
  --shadow-md:    0 12px 28px -14px rgba(20, 24, 26, .22);
  --shadow-lg:    0 32px 60px -32px rgba(20, 24, 26, .3);

  /* 字体 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong",
                "SimSun", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:  "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas,
                "Liberation Mono", monospace;

  /* 尺度 */
  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 68px;

  /* 动效 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .55s;
}

/* 颜色 —— 深色 */
[data-theme="dark"] {
  --paper:        #0F1211;
  --paper-2:      #141918;
  --surface:      #171C1B;
  --ink:          #EDEBE5;
  --ink-soft:     #9BA39E;
  --ink-faint:    #6E7671;
  --line:         #262C2A;
  --line-strong:  #36403C;
  --accent:       #74C1A0;
  --accent-hover: #8FD2B4;
  --accent-soft:  #1B2723;
  --on-accent:    #0C1210;
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md:    0 12px 28px -14px rgba(0, 0, 0, .6);
  --shadow-lg:    0 32px 60px -32px rgba(0, 0, 0, .75);
}

/* ---------- 02. 基础重置与排版 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.75;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: normal; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: .7rem 1.1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 10px;
  font-size: .9rem;
  transform: translateY(-200%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 03. 通用组件 ---------- */

/* 按钮 */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .78rem 1.4rem;
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s var(--ease),
              border-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
}
.btn svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
  --btn-bd: var(--accent);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover {
  --btn-bg: var(--accent-hover);
  --btn-bd: var(--accent-hover);
  box-shadow: var(--shadow-lg);
}

.btn--ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.btn--lg { padding: .95rem 1.7rem; font-size: 1rem; }

/* 编号标签 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}

/* 技能标签 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 2rem;
}
.chips li {
  padding: .42rem .95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: .85rem;
  color: var(--ink-soft);
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.chips li:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* 滚动揭示动画 —— 仅在 JS 可用时才隐藏，避免脚本失效导致内容不可见 */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { --d: 1; }
.reveal[data-delay="2"] { --d: 2; }
.reveal[data-delay="3"] { --d: 3; }
.reveal[data-delay="4"] { --d: 4; }
.reveal[data-delay="5"] { --d: 5; }

/* ---------- 04. 顶部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--paper); /* 不支持 color-mix 时的兜底 */
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1;
  transition: transform .35s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.06); }
.brand__mark--sm { width: 26px; height: 26px; border-radius: 8px; font-size: .85rem; }

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: var(--font-serif); font-size: 1.02rem; font-weight: 600; letter-spacing: .04em; }
.brand__text em {
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--ink-faint);
  font-style: normal;
}

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a {
  position: relative;
  padding: .5rem .85rem;
  font-size: .93rem;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: color .25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: .85rem; right: .85rem; bottom: .28rem;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); }

.header__actions { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  transition: color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn .ico {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  grid-area: 1 / 1;
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.icon-btn .ico--moon { opacity: 1; transform: none; }
.icon-btn .ico--sun  { opacity: 1; transform: none; }
[data-theme="light"] .icon-btn .ico--moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="dark"]  .icon-btn .ico--sun  { opacity: 0; transform: rotate(90deg) scale(.5); }

.menu-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.menu-btn__bar {
  display: block;
  width: 17px; height: 1.7px;
  margin: 2.6px 0;
  border-radius: 2px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.menu-btn[aria-expanded="true"] .menu-btn__bar:first-child { transform: translateY(4.3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bar:last-child  { transform: translateY(-4.3px) rotate(-45deg); }

.header__progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: .85;
}

/* ---------- 05. 首屏 Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(4rem, 12vh, 8rem)) 0 clamp(4rem, 10vh, 7rem);
  overflow: hidden;
}

.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__glow {
  position: absolute;
  top: -18%; right: -8%;
  width: min(680px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--accent-soft) 0%, transparent 68%);
  opacity: .85;
  animation: float 18s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-3%, 4%, 0) scale(1.06); }
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .5;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 20%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 30% 20%, #000 0%, transparent 75%);
}

.hero__inner { position: relative; }

.hero__name {
  margin: 1.6rem 0 0;
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 12vw, 8.5rem);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.02em;
}

.hero__role {
  margin-top: 1.4rem;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  color: var(--ink-soft);
  font-weight: 400;
}
.hero__role em {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -.42em 0 var(--accent-soft);
}

.hero__desc {
  max-width: 46ch;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2.4rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 620px;
  margin-top: clamp(3rem, 8vh, 5rem);
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.stat dt {
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--ink-faint);
}
.stat dd {
  display: flex;
  align-items: baseline;
  gap: .2rem;
  margin-top: .35rem;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1;
  color: var(--ink);
}
.stat dd small { font-size: .95rem; color: var(--accent); font-family: var(--font-sans); }

/* ---------- 06. 章节通用结构 ---------- */
.section { padding: clamp(4.5rem, 11vh, 8rem) 0; }
.section--alt { background: var(--paper-2); }

.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0 1.2rem;
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}
.section__index {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .1em;
  color: var(--accent);
  padding-top: .3rem;
}
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 600;
}
.section__desc {
  grid-column: 2;
  margin-top: .8rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---------- 07. 关于 ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.portrait {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(150deg, var(--accent-soft), transparent 62%),
    var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.portrait__mono {
  font-family: var(--font-serif);
  font-size: clamp(5rem, 14vw, 8rem);
  line-height: 1;
  color: var(--accent);
  opacity: .22;
  transition: transform .6s var(--ease), opacity .6s var(--ease);
}
.portrait:hover .portrait__mono { transform: scale(1.08); opacity: .3; }
.portrait__ring {
  position: absolute;
  width: 62%; aspect-ratio: 1;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: .28;
  animation: spin 26s linear infinite;
}
.portrait__ring::after {
  content: "";
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}
@keyframes spin { to { transform: rotate(360deg); } }

.portrait__caption {
  margin-top: .9rem;
  font-size: .82rem;
  letter-spacing: .08em;
  color: var(--ink-faint);
  text-align: center;
}

.about__body p + p { margin-top: 1.1rem; color: var(--ink-soft); }
.about__body .lead {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- 08. 作品 ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2.2rem;
}
.chip {
  padding: .48rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: .88rem;
  transition: all .25s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.2rem, 2.6vw, 1.8rem);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}
.card.is-hidden { display: none; }
.card__link { display: flex; flex-direction: column; height: 100%; }

.card__thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.card__no {
  position: absolute;
  top: 1rem; left: 1.15rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--ink-faint);
  z-index: 2;
}
.card__art {
  width: 100%; height: 100%;
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  opacity: .5;
  transition: transform .6s var(--ease), opacity .6s var(--ease);
}
.card:hover .card__art { transform: scale(1.06); opacity: .8; }

.card__thumb--1 { background: linear-gradient(140deg, #E7F0EB, #D3E4DA); }
.card__thumb--2 { background: linear-gradient(140deg, #EFEAE0, #E2D9C7); }
.card__thumb--3 { background: linear-gradient(140deg, #E4EDF0, #CFE0E6); }
.card__thumb--4 { background: linear-gradient(140deg, #E9EFE7, #D6E3D2); }
.card__thumb--5 { background: linear-gradient(140deg, #F1ECE4, #E6DED0); }
.card__thumb--6 { background: linear-gradient(140deg, #EDE7F0, #DDD2E4); }

[data-theme="dark"] .card__thumb--1 { background: linear-gradient(140deg, #1B2723, #16211D); }
[data-theme="dark"] .card__thumb--2 { background: linear-gradient(140deg, #272319, #1F1C14); }
[data-theme="dark"] .card__thumb--3 { background: linear-gradient(140deg, #17242A, #131D22); }
[data-theme="dark"] .card__thumb--4 { background: linear-gradient(140deg, #1D271C, #182117); }
[data-theme="dark"] .card__thumb--5 { background: linear-gradient(140deg, #272219, #1F1B14); }
[data-theme="dark"] .card__thumb--6 { background: linear-gradient(140deg, #241D2A, #1D1822); }

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.35rem 1.4rem 1.5rem;
}
.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.card__meta span { font-family: var(--font-mono); }
.card__title {
  margin-top: .7rem;
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 600;
}
.card__text {
  margin-top: .6rem;
  font-size: .92rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.card__more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.2rem;
  padding-top: .1rem;
  font-size: .87rem;
  font-weight: 500;
  color: var(--accent);
}
.card__more svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .3s var(--ease);
}
.card:hover .card__more svg { transform: translateX(4px); }

.works__empty {
  padding: 3rem 0;
  text-align: center;
  color: var(--ink-faint);
}

/* ---------- 09. 经历时间线 ---------- */
.timeline { max-width: 780px; }
.timeline__item {
  display: grid;
  grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-top: 1px solid var(--line);
}
.timeline__item:last-child { border-bottom: 1px solid var(--line); }
.timeline__time {
  font-family: var(--font-mono);
  font-size: .84rem;
  color: var(--accent);
  padding-top: .28rem;
  white-space: nowrap;
}
.timeline__body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
}
.timeline__org {
  margin-top: .25rem;
  font-size: .88rem;
  color: var(--ink-faint);
}
.timeline__body p:last-child {
  margin-top: .7rem;
  color: var(--ink-soft);
  font-size: .95rem;
}

/* ---------- 10. 联系 ---------- */
.section--contact {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.contact { max-width: 680px; }
.contact__title {
  margin-top: 1.2rem;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 600;
  line-height: 1.12;
}
.contact__desc {
  margin-top: 1.4rem;
  color: var(--ink-soft);
  max-width: 44ch;
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2.2rem;
}
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.socials a {
  position: relative;
  font-size: .93rem;
  color: var(--ink-soft);
  transition: color .25s var(--ease);
}
.socials a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.socials a:hover { color: var(--accent); }
.socials a:hover::after { transform: scaleX(1); }

/* ---------- 11. 页脚与提示条 ---------- */
.site-footer {
  padding: 2.4rem 0;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .86rem;
  color: var(--ink-faint);
}
.footer__brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); }
.footer__note { font-family: var(--font-mono); font-size: .78rem; }

.toast {
  position: fixed;
  left: 50%; bottom: 32px;
  z-index: 300;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: .88rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 11b. 演示提示条 ----------
   内容是示例时的醒目提醒。把真实内容填好后，
   删掉 index.html 里的 <div class="demo-note"> 整个元素即可。 */
.demo-note {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem clamp(1rem, 4vw, 2rem);
  background: #FFF4D6;
  border-top: 1px solid #E8CE86;
  color: #6B4E12;
  font-size: .84rem;
  line-height: 1.5;
  box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, .35);
}
[data-theme="dark"] .demo-note {
  background: #2A2313;
  border-top-color: #4A3D1C;
  color: #E8D6A8;
}
.demo-note__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #E0A800;
  color: #3A2A00;
  font-weight: 700;
  font-size: .75rem;
}
.demo-note__text { flex: 1; }
.demo-note__text strong { font-weight: 600; }
.demo-note__text code {
  font-family: var(--font-mono);
  font-size: .82em;
  padding: .1em .35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, .07);
}
.demo-note__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
  opacity: .6;
  transition: opacity .2s var(--ease), background-color .2s var(--ease);
}
.demo-note__close:hover { opacity: 1; background: rgba(0, 0, 0, .08); }

/* 有提示条在时把 toast 抬高，避免互相遮挡 */
body:has(.demo-note) .toast { bottom: 96px; }

/* ---------- 12. 响应式 ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about__portrait { max-width: 260px; }
  .section__head { grid-template-columns: 1fr; gap: 0; }
  .section__desc { grid-column: 1; }
  .section__index { padding-top: 0; margin-bottom: .3rem; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }

  .menu-btn { display: flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .6rem var(--gutter) 1.4rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a {
    padding: .95rem .2rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }

  .stats { grid-template-columns: 1fr; gap: 1.4rem; }
  .stat dd { font-size: 1.9rem; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }

  .timeline__item { grid-template-columns: 1fr; gap: .5rem; }
  .timeline__time { padding-top: 0; }

  .footer__inner { flex-direction: column; align-items: flex-start; }

  .demo-note { font-size: .78rem; align-items: flex-start; }
}

@media (max-width: 420px) {
  .brand__text em { display: none; }
  .contact__actions .btn { width: 100%; justify-content: center; }
}

/* ---------- 13. 减弱动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal, .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 打印 ---------- */
@media print {
  .site-header, .toast, .filters, .hero__bg, .hero__cta { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .card, .portrait { break-inside: avoid; }
}
