/* ==========================================================================
   高骏喆 · 个人网站
   纯手写 CSS：设计变量 → 基础样式 → 组件 → 响应式
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --paper: #f2ece1;
  --paper-raised: #faf6ee;
  --ink: #1b1815;
  --ink-2: #6b6358;
  --ink-3: #948a7c;
  --line: #d9d0c1;
  --line-soft: #e6dfd2;
  --accent: #b8492b;
  --accent-soft: rgba(184, 73, 43, 0.12);

  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Georgia", serif;
  --font-sans: "Inter", ui-sans-serif, -apple-system, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace;

  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #131211;
  --paper-raised: #1b1a17;
  --ink: #f1e9dc;
  --ink-2: #a39a8b;
  --ink-3: #7d7466;
  --line: #302c27;
  --line-soft: #252320;
  --accent: #e27450;
  --accent-soft: rgba(226, 116, 80, 0.16);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* 环境光：极淡的暖色晕染，避免整页死板 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 12% -10%, rgba(226, 116, 80, 0.10), transparent 65%),
    radial-gradient(50vw 40vh at 95% 8%, rgba(180, 160, 120, 0.12), transparent 70%);
}

/* 细颗粒质感 */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
}

[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: 0.18; }

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-size: 14px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ---------- 3. 页头 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--accent);
  transition: transform 0.5s var(--ease), background-color 0.3s ease;
}
.brand:hover .brand-mark { transform: rotate(-12deg); }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; font-weight: 600; letter-spacing: 0.06em; }
.brand-text em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink-2);
  border-radius: 999px;
  transition: color 0.25s ease, background-color 0.25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.icon-btn:hover { background: var(--paper-raised); border-color: var(--ink-3); }

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.menu-toggle { display: none; }
.menu-bars { display: grid; gap: 5px; width: 18px; }
.menu-bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] .menu-bars i:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- 4. 首屏 ---------- */
.hero {
  position: relative;
  padding-top: clamp(112px, 16vh, 168px);
  padding-bottom: clamp(48px, 8vh, 80px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-title {
  margin-top: clamp(20px, 3vh, 30px);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.35rem, 5.8vw, 4.35rem);
  line-height: 1.2;
  letter-spacing: 0.005em;
}
.hero-title .line { display: block; }

.mark {
  position: relative;
  color: var(--accent);
  white-space: nowrap;
}
.mark::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -4px;
  bottom: 0.06em;
  height: 0.18em;
  background: var(--accent);
  opacity: 0.16;
  border-radius: 40% 60% 55% 45%;
  transform: rotate(-0.6deg);
}

.lede {
  max-width: 34em;
  margin-top: clamp(22px, 3.4vh, 32px);
  color: var(--ink-2);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.9;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(26px, 4vh, 38px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  transition: transform 0.3s var(--ease), background-color 0.25s ease,
    color 0.25s ease, border-color 0.25s ease;
}
.btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(4px); }

.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); color: #fff; }

.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-raised); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 34px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3f9b6d;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid #3f9b6d;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* 首屏图形 */
.hero-art { position: relative; }

.art-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 4px 4px 120px 4px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.45), transparent 60%),
    var(--paper-raised);
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}
[data-theme="dark"] .art-frame {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), transparent 60%), var(--paper-raised);
}

.art-glow {
  position: absolute;
  inset: auto -30% -35% -30%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 62%);
  opacity: 0.35;
  filter: blur(10px);
}

.art-ring {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.ring-1 { width: 78%; aspect-ratio: 1; }
.ring-2 { width: 108%; aspect-ratio: 1; border-style: dashed; opacity: 0.55; }

.art-monogram {
  position: relative;
  font-family: var(--font-serif);
  font-size: clamp(6rem, 14vw, 11rem);
  line-height: 1;
  color: var(--ink);
  opacity: 0.92;
}

.art-caption {
  position: absolute;
  inset: 22px 22px auto auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--ink-3);
}

.chip {
  position: absolute;
  padding: 8px 15px;
  font-size: 12px;
  letter-spacing: 0.05em;
  background: color-mix(in srgb, var(--paper-raised) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  animation: float 7s ease-in-out infinite;
}
.chip-a { top: 12%; left: -6%; transform: rotate(-4deg); }
.chip-b { bottom: 18%; right: -5%; animation-delay: -2.4s; transform: rotate(3deg); }
.chip-c { bottom: -3%; left: 12%; animation-delay: -4.6s; transform: rotate(-2deg); }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

/* 数据条 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: clamp(52px, 8vh, 88px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.stat dt {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1;
  letter-spacing: 0.01em;
}
.stat dt span {
  font-family: var(--font-sans);
  font-size: 0.5em;
  margin-left: 3px;
  color: var(--ink-2);
}
.stat dd {
  margin-top: 10px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

/* ---------- 5. 滚动标语 ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 16px;
  background: var(--paper-raised);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  letter-spacing: 0.22em;
  color: var(--ink-2);
  white-space: nowrap;
}
.marquee-track i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 6. 通用区块 ---------- */
.section {
  padding-block: clamp(76px, 12vh, 132px);
}
.section-alt { background: var(--paper-raised); border-block: 1px solid var(--line-soft); }

.section-head {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px clamp(24px, 5vw, 72px);
  align-items: start;
  margin-bottom: clamp(40px, 6vw, 68px);
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  white-space: nowrap;
}
.section-label span {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding-inline: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent);
  font-size: 10.5px;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  line-height: 1.32;
  letter-spacing: 0.01em;
  grid-column: 2;
}

.section-desc {
  grid-column: 2;
  max-width: 40em;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 15px;
}

.section-note {
  margin-top: 44px;
  font-size: 14px;
  color: var(--ink-3);
}
.section-note a {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.2s ease;
}
.section-note a:hover { color: var(--accent); }

/* ---------- 7. 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.about-copy p {
  max-width: 34em;
  color: var(--ink-2);
  font-size: clamp(15px, 1.1vw, 16.5px);
  line-height: 1.95;
}
.about-copy p + p { margin-top: 20px; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}
.tag-list li {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-2);
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.tag-list li:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.about-side { display: grid; gap: 16px; }

.card {
  padding: 26px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper-raised) 70%, transparent);
}
.card-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.check-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.8;
}
.check-list li + li { margin-top: 8px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--accent);
}

.timeline li {
  display: grid;
  gap: 2px;
  padding-block: 12px;
  border-top: 1px solid var(--line-soft);
}
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.timeline .what { font-size: 14px; }

/* ---------- 8. 作品 ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3.4vw, 44px);
}

.work-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.35s ease,
    box-shadow 0.45s var(--ease);
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--ink-3);
  box-shadow: 0 26px 50px -34px rgba(0, 0, 0, 0.55);
}

.work-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.work-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 0.5px, transparent 0.5px);
  background-size: 10px 10px;
  opacity: 0.5;
  mix-blend-mode: overlay;
}

.cover-1 { background: linear-gradient(140deg, #e8d6c1 0%, #d6a983 55%, #b8714f 100%); }
.cover-2 { background: linear-gradient(140deg, #d8ddd2 0%, #a3b6a4 55%, #5c7668 100%); }
.cover-3 { background: linear-gradient(140deg, #ddd9e6 0%, #a9a3c6 55%, #6b6392 100%); }
.cover-4 { background: linear-gradient(140deg, #ecdcc9 0%, #d9bf9a 55%, #9d7a4e 100%); }

/* 深色模式里把浅色封面压暗一点，避免刺眼 */
[data-theme="dark"] .work-cover { filter: brightness(0.84) saturate(0.92); }

.cover-num {
  position: absolute;
  left: 22px;
  top: 16px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(27, 24, 21, 0.6);
}

.cover-shape {
  position: absolute;
  right: -12%;
  bottom: -34%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 46% 54% 38% 62% / 52% 40% 60% 48%;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px);
  transition: transform 0.8s var(--ease), border-radius 0.8s var(--ease);
}
.work-card:hover .cover-shape {
  transform: scale(1.12) rotate(-8deg);
  border-radius: 58% 42% 62% 38% / 40% 60% 40% 60%;
}
.cover-2 .cover-shape { background: rgba(255, 255, 255, 0.26); }
.cover-3 .cover-shape { background: rgba(255, 255, 255, 0.3); }

.work-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 26px 26px;
}

.work-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.work-body h3 {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.1vw, 1.6rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}
.work-body h3 span {
  margin-left: 6px;
  font-family: var(--font-sans);
  font-size: 0.62em;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.work-card:hover .work-body h3 { color: var(--accent); }

.work-desc {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.85;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 22px;
}
.work-tags li {
  padding: 4px 10px;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  background: var(--accent-soft);
  border-radius: 4px;
}

/* ---------- 9. 笔记 ---------- */
.note-list { border-top: 1px solid var(--line); }

.note {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 24px;
  padding: 24px 12px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s ease, padding-inline 0.35s var(--ease);
}
.note:hover { background: var(--paper-raised); padding-inline: 20px 8px; }

.note-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.note-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
.note-title {
  font-family: var(--font-serif);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  letter-spacing: 0.015em;
  transition: color 0.25s ease;
}
.note:hover .note-title { color: var(--accent); }
.note-tag {
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink-3);
}
.note-arrow {
  justify-self: end;
  color: var(--ink-3);
  font-size: 16px;
  transition: transform 0.35s var(--ease), color 0.25s ease;
}
.note:hover .note-arrow { transform: translate(3px, -3px); color: var(--accent); }

/* ---------- 10. 联系 ---------- */
.contact {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -30%;
  width: 46vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 62%);
  opacity: 0.22;
  pointer-events: none;
}
.contact .section-label { color: color-mix(in srgb, var(--paper) 55%, transparent); }
.contact .section-label span {
  border-color: color-mix(in srgb, var(--paper) 26%, transparent);
  color: var(--accent);
}

.contact-title {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.contact-title .underline {
  position: relative;
  display: inline-block;
  color: var(--accent);
}

.contact-desc {
  max-width: 32em;
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.9;
  color: color-mix(in srgb, var(--paper) 62%, transparent);
}

.mail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(30px, 5vh, 48px);
  padding-bottom: 8px;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3.4vw, 2.2rem);
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 30%, transparent);
  transition: border-color 0.3s ease, color 0.3s ease, gap 0.35s var(--ease);
}
.mail svg {
  width: 0.62em;
  height: 0.62em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mail:hover { color: var(--accent); border-color: var(--accent); gap: 18px; }

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 46px;
}
.socials a {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid color-mix(in srgb, var(--paper) 22%, transparent);
  border-radius: 999px;
  font-size: 13px;
  color: color-mix(in srgb, var(--paper) 78%, transparent);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.socials a:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- 11. 页脚 ---------- */
.site-footer { padding-block: 30px; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.25s ease;
}
.to-top svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}
.to-top:hover { color: var(--accent); }
.to-top:hover svg { transform: translateY(-3px); }

/* ---------- 12. 滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 200;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* ---------- 13. 入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* 卡片本身还有 hover 位移，恢复它自己的过渡与优先级 */
.work-card.is-visible {
  transition: transform 0.45s var(--ease), border-color 0.35s ease,
    box-shadow 0.45s var(--ease);
}
.work-card.reveal.is-visible:hover { transform: translateY(-6px); }
.note.is-visible { transition: background-color 0.3s ease, padding-inline 0.35s var(--ease); }

/* 锚点跳转时焦点会落到区块上，但不需要一圈巨大的描边 */
section[tabindex="-1"]:focus,
section[tabindex="-1"]:focus-visible { outline: none; }

/* ---------- 14. 响应式 ---------- */
/* 宽屏时导航真正居中 */
@media (min-width: 821px) {
  .header-inner { position: relative; }
  .nav {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art {
    order: -1;
    max-width: 380px;
    margin-inline: auto;
    width: 100%;
  }
  .hero-copy { max-width: 42em; }
  .about-grid { grid-template-columns: 1fr; }
  .about-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { grid-template-columns: 150px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .menu-toggle { display: grid; }

  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 18px var(--pad) 26px;
    background: color-mix(in srgb, var(--paper) 96%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.35s var(--ease), visibility 0.3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav-link {
    padding: 14px 4px;
    font-size: 16px;
    border-radius: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-link:last-child { border-bottom: 0; }
  .nav-link::after { display: none; }

  body.menu-open { overflow: hidden; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 26px 20px; }
  .work-grid { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 10px; }
  .section-title, .section-desc { grid-column: 1; }
  .section-label { padding-top: 0; }
  .about-side { grid-template-columns: 1fr; }
  .note { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .note-date { grid-column: 1; }
  .note-main { grid-column: 1; }
  .note-arrow { grid-row: 1 / span 2; }
}

@media (max-width: 560px) {
  .hero { padding-top: 104px; }
  .hero-art { max-width: 320px; }
  .chip { font-size: 11px; padding: 6px 12px; }
  .chip-a { left: -3%; }
  .chip-b { right: -3%; }
  .hero-cta .btn { flex: 1; justify-content: center; }
  .brand-text em { display: none; }
  .stats { gap: 22px 16px; }
  .footer-inner { justify-content: center; text-align: center; }
  .contact::before { width: 70vw; }
}

/* 触摸设备取消多余动效 */
@media (hover: none) {
  .work-card:hover { transform: none; }
  .note:hover { padding-inline: 12px; }
}

/* ---------- 15. 无障碍：减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ---------- 16. 打印 ---------- */
@media print {
  .site-header, .marquee, .scroll-progress, .grain, .chip, .hero-art { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .hero { padding-block: 24px; }
  .reveal { opacity: 1; transform: none; }
}
