/* =========================================================
   张少臣 · 个人主页
   Palette: 墨蓝 ink navy  +  铜金 brass
   Type:    Latin display = serif,  Chinese/UI = system sans
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  --ink-950: #04080e;
  --ink-900: #060c15;
  --ink-800: #08111c;
  --ink-700: #0c1725;

  --text: #e9eef5;
  --text-soft: #c3cedb;
  --muted: #8b9aab;

  --brass: #dfb45f;
  --brass-bright: #f2d191;
  --brass-deep: #a9803a;

  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
  --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, 0.9);

  --header-bg: rgba(6, 12, 21, 0.62);
  --header-bg-solid: rgba(6, 12, 21, 0.9);
  --alt-bg: rgba(4, 8, 14, 0.55);

  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia,
    "Songti SC", "STSong", "SimSun", serif;
  --font-mono: "Cascadia Mono", "SF Mono", ui-monospace, Consolas,
    "Liberation Mono", monospace;

  --wrap: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.75rem);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-theme="light"] {
  --ink-950: #f4f1ea;
  --ink-900: #f7f4ee;
  --ink-800: #faf8f3;
  --ink-700: #ffffff;

  --text: #131a23;
  --text-soft: #2b3644;
  --muted: #616e7e;

  --brass: #8c6a24;
  --brass-bright: #b08528;
  --brass-deep: #6d5218;

  --line: rgba(19, 26, 35, 0.13);
  --line-strong: rgba(19, 26, 35, 0.22);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-hover: rgba(255, 255, 255, 0.96);

  --shadow-sm: 0 1px 2px rgba(19, 26, 35, 0.08);
  --shadow-md: 0 18px 40px -22px rgba(19, 26, 35, 0.28);
  --shadow-lg: 0 40px 80px -46px rgba(19, 26, 35, 0.35);

  --header-bg: rgba(244, 241, 234, 0.7);
  --header-bg-solid: rgba(247, 244, 238, 0.93);
  --alt-bg: rgba(255, 255, 255, 0.6);
}

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

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

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
p { margin: 0; }
ul, dl, dd, dt { margin: 0; padding: 0; }
li { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

::selection {
  background: var(--brass);
  color: #08111c;
}

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

/* ---------- layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 999;
  padding: 0.6rem 1rem;
  background: var(--brass);
  color: #08111c;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* film-grain overlay, keeps flat dark areas from banding */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="light"] .grain { opacity: 0.035; }

/* ---------- buttons ---------- */
.btn {
  --btn-py: 0.72rem;
  --btn-px: 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: var(--btn-py) var(--btn-px);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease),
    border-color 0.35s var(--ease), color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.btn .ico { width: 1.05em; height: 1.05em; fill: currentColor; stroke: none; }
.btn .ico-arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease);
}

.btn-primary {
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  color: #0a1220;
  box-shadow: 0 10px 26px -14px rgba(223, 180, 95, 0.85);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -14px rgba(223, 180, 95, 0.95);
}
.btn-primary .ico-arrow { transition: transform 0.35s var(--ease); }
.btn-primary:hover .ico-arrow { transform: translateX(3px); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--brass);
  color: var(--brass-bright);
  transform: translateY(-2px);
}
html[data-theme="light"] .btn-ghost:hover { color: var(--brass); }

.btn-sm { --btn-py: 0.5rem; --btn-px: 0.95rem; font-size: 0.82rem; }
.btn-lg { --btn-py: 0.9rem; --btn-px: 1.7rem; font-size: 0.95rem; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: var(--header-bg-solid);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(0, 0, 0, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.4rem);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(223, 180, 95, 0.18), transparent 70%);
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--brass-bright);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
html[data-theme="light"] .brand-mark { color: var(--brass); }
.brand:hover .brand-mark { border-color: var(--brass); transform: rotate(-4deg); }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.14em; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.2vw, 1.9rem); }
.nav-link {
  position: relative;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-block: 0.35rem;
  transition: color 0.3s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease),
    background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.icon-btn:hover { border-color: var(--brass); color: var(--brass-bright); transform: rotate(12deg); }
html[data-theme="light"] .icon-btn:hover { color: var(--brass); }
.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
html[data-theme="dark"] .ico-sun,
html[data-theme="light"] .ico-moon { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-block: clamp(7rem, 14vh, 10rem) clamp(4rem, 10vh, 7rem);
  overflow: clip;
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 18%, rgba(223, 180, 95, 0.16), transparent 70%),
    radial-gradient(55% 60% at 12% 82%, rgba(52, 104, 168, 0.24), transparent 72%),
    radial-gradient(90% 90% at 50% 0%, rgba(24, 48, 82, 0.5), transparent 65%);
}
html[data-theme="light"] .hero-glow {
  background:
    radial-gradient(60% 55% at 80% 15%, rgba(176, 133, 40, 0.13), transparent 70%),
    radial-gradient(55% 60% at 10% 85%, rgba(96, 132, 178, 0.16), transparent 72%),
    linear-gradient(180deg, #fbf9f4, #f4f1ea);
}

/* hairline grid, fades out downwards */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(80% 70% at 50% 30%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 10%, transparent 78%);
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.72fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: clamp(1.2rem, 3vw, 1.9rem);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 4px rgba(223, 180, 95, 0.16);
}

.hero-title { margin-bottom: clamp(1.2rem, 3vw, 1.75rem); }
.hero-title .cn {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(3.1rem, 8.5vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.02;
  background: linear-gradient(175deg, #ffffff 8%, #d9e2ee 52%, #9fb0c6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="light"] .hero-title .cn {
  background: linear-gradient(175deg, #18212c 10%, #2f3d4e 55%, #55647a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-title .latin {
  display: block;
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 1.6vw, 0.95rem);
  letter-spacing: 0.42em;
  color: var(--brass);
  text-transform: uppercase;
}

.hero-lead {
  max-width: 34em;
  font-size: clamp(1rem, 1.45vw, 1.12rem);
  line-height: 1.95;
  color: var(--text-soft);
}
.hero-lead b { color: var(--text); font-weight: 600; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.8rem, 4vw, 2.5rem);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: clamp(1.8rem, 4vw, 2.4rem);
}
.chips li {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface);
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.chips li:hover { border-color: var(--brass); color: var(--brass-bright); }
html[data-theme="light"] .chips li:hover { color: var(--brass); }

/* portrait / monogram plate */
.hero-figure { position: relative; }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background:
    radial-gradient(80% 70% at 50% 30%, rgba(223, 180, 95, 0.14), transparent 65%),
    linear-gradient(165deg, var(--ink-700), var(--ink-950));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
html[data-theme="light"] .portrait {
  background:
    radial-gradient(80% 70% at 50% 30%, rgba(176, 133, 40, 0.14), transparent 65%),
    linear-gradient(165deg, #ffffff, #eee9df);
}
.portrait-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: 46px 46px;
  opacity: 0.55;
}
.portrait-char {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 11vw, 8rem);
  line-height: 1;
  color: var(--brass-bright);
  text-shadow: 0 20px 50px rgba(223, 180, 95, 0.35);
  transform: translateY(-4%);
}
html[data-theme="light"] .portrait-char {
  color: var(--brass);
  text-shadow: none;
}
.portrait-latin {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  translate: -50% 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.5em;
  color: var(--muted);
}
.portrait-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--brass);
  opacity: 0.65;
}
.portrait-corner.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.portrait-corner.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.portrait-corner.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.portrait-corner.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

.portrait-caption {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.portrait-caption .sep { color: var(--brass); opacity: 0.6; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  translate: -50% 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
}
.scroll-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, transparent, var(--brass));
  animation: scrollPulse 2.6s var(--ease) infinite;
}
.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.34em;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.6); transform-origin: top; }
  45% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ---------- sections ---------- */
.section {
  position: relative;
  padding-block: clamp(4.5rem, 11vw, 8.5rem);
  z-index: 2;
  scroll-margin-top: 84px;
}
@media (max-width: 860px) {
  .section { scroll-margin-top: 104px; }
}
.section-alt {
  background: var(--alt-bg);
  border-block: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 0 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: clamp(2.2rem, 5vw, 3.4rem);
  border-bottom: 1px solid var(--line);
}
.section-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--brass);
}
.section-title {
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.section-note {
  justify-self: end;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-intro {
  max-width: 40em;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--text-soft);
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
.about-body p + p { margin-top: 1.1rem; }
.about-body p { color: var(--text-soft); line-height: 1.95; }
.about-body .lead {
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  color: var(--text);
  line-height: 1.85;
}
.about-body em {
  font-style: normal;
  color: var(--brass-bright);
  border-bottom: 1px solid rgba(223, 180, 95, 0.45);
  padding-bottom: 1px;
}
html[data-theme="light"] .about-body em { color: var(--brass); }

.facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.fact {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.fact dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  padding-top: 0.28rem;
}
.fact dd { font-size: 0.94rem; color: var(--text); line-height: 1.6; }
.fact-link dd a {
  color: var(--brass-bright);
  border-bottom: 1px solid rgba(223, 180, 95, 0.4);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
html[data-theme="light"] .fact-link dd a { color: var(--brass); }
.fact-link dd a:hover { color: var(--text); border-bottom-color: var(--text); }

/* ---------- focus cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.4rem);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease),
    background-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: var(--surface-hover);
  box-shadow: var(--shadow-md);
}
.card:hover::before { opacity: 0.9; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.card-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.45s var(--ease);
}
.card:hover .card-icon { transform: translateY(-2px) scale(1.06); }

.card h3 {
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  font-weight: 600;
}
.card p {
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--text-soft);
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.4rem;
}
.tag-list li {
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- work list ---------- */
.work-list { border-top: 1px solid var(--line); }
.work {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(1.4rem, 3vw, 2rem) clamp(0.6rem, 1.6vw, 1.2rem);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s var(--ease);
}
.work:hover { background: var(--surface); }
.work-index {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--brass);
  padding-top: 0.35rem;
}
.work-main h3 {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  font-weight: 600;
  margin-bottom: 0.4rem;
  transition: color 0.35s var(--ease);
}
.work:hover .work-main h3 { color: var(--brass-bright); }
html[data-theme="light"] .work:hover .work-main h3 { color: var(--brass); }
.work-main p {
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--text-soft);
  max-width: 46em;
}
.work-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  padding-top: 0.3rem;
  white-space: nowrap;
}
.work-tag {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--brass);
  border: 1px solid rgba(223, 180, 95, 0.35);
  border-radius: 999px;
  padding: 0.12rem 0.6rem;
}
.work-year {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ---------- contact ---------- */
.section-contact {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(70% 80% at 50% 120%, rgba(223, 180, 95, 0.12), transparent 70%);
}
html[data-theme="light"] .section-contact {
  background: radial-gradient(70% 80% at 50% 120%, rgba(176, 133, 40, 0.1), transparent 70%);
}
.contact-inner { text-align: left; }
.contact-lead {
  max-width: 26em;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--text);
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.8rem, 4vw, 2.6rem);
}
.contact-mail {
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.contact-mail a { color: var(--brass-bright); border-bottom: 1px solid currentColor; }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  background: var(--ink-950);
  padding-block: 1.6rem;
}
html[data-theme="light"] .site-footer { background: #f2eee6; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.footer-brand { font-family: var(--font-mono); letter-spacing: 0.16em; color: var(--text-soft); }
.footer-sep { color: var(--brass); margin-inline: 0.35rem; }
.footer-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.dot-sm { color: var(--brass); }

/* ---------- reveal animation ---------- */
/* 只在 html.js 存在时才隐藏，脚本失效时正文照常可见 */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2.5rem, 7vw, 3.5rem);
  }
  .hero-figure {
    width: min(320px, 62vw);
    margin-inline: auto;
  }
  .portrait { aspect-ratio: 1 / 1; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { gap: 0.75rem; }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    padding-block: 0.6rem;
    gap: 0.5rem 1rem;
    min-height: 0;
  }
  .brand { margin-right: 0; }
  .brand-sub { display: none; }
  .header-actions { margin-left: auto; }
  .nav {
    order: 3;
    width: 100%;
    gap: 1.15rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { font-size: 0.82rem; white-space: nowrap; }
  .btn-sm span { display: none; }
  .hero { padding-top: 8.5rem; }
  .scroll-hint { display: none; }
}

@media (max-width: 640px) {
  .hero-title .cn { letter-spacing: 0.03em; }
  .hero-title .latin { letter-spacing: 0.28em; }
  .chips li { font-size: 0.72rem; }
  .section-head {
    grid-template-columns: auto 1fr;
    gap: 0 0.7rem;
  }
  .section-note { display: none; }
  .work {
    grid-template-columns: 1.6rem minmax(0, 1fr);
    gap: 0.8rem 0.9rem;
  }
  .work-meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    padding-top: 0.1rem;
  }
  .fact { grid-template-columns: 4.4rem 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .header-actions .btn-ghost { padding: 0.5rem; }
  .header-actions .btn-ghost .ico { width: 1.15em; height: 1.15em; }
}

/* ---------- accessibility / print ---------- */
@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,
  html.js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .scroll-hint, .grain, .hero-glow, .hero::before { display: none !important; }
  body { background: #fff; color: #111; }
  .reveal,
  html.js .reveal { opacity: 1; transform: none; }
  .hero-title .cn {
    background: none;
    -webkit-text-fill-color: #111;
    color: #111;
  }
}

/* =========================================================
   精简版布局（v2）
   首页只留照片位；关于我一句话；方向只留标题；
   在做的事四条；联系两个按钮。
   以下规则覆盖上面的旧样式，删除某段即可恢复旧版。
   ========================================================= */

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

/* 左上角：姓名 + 英文名 */
.header-inner .nav { margin-inline: auto; }
.brand-name {
  font-size: 1.04rem;
  letter-spacing: 0.12em;
}
.brand-sub {
  margin-top: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--brass);
}

/* 首页：照片铺满整屏 */
.hero {
  display: block;
  min-height: 100svh;
  height: 100svh;
  padding: 0;
  overflow: hidden;
}
.hero-inner {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
/* 顶部暗角：保证固定导航压在亮照片上也读得清 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 28vh;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(4, 8, 14, 0.78),
    rgba(4, 8, 14, 0.22) 58%,
    transparent
  );
}
html[data-theme="light"] .hero::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.72),
    rgba(255, 255, 255, 0.16) 58%,
    transparent
  );
}

.photo-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--ink-900);
  box-shadow: none;
}
html[data-theme="light"] .photo-frame { background: #ece7dd; }

.photo-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 12rem);
  line-height: 1;
  color: var(--brass-bright);
}
html[data-theme="light"] .photo-fallback { color: var(--brass); }

.photo-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.photo-corner { display: none; }

/* 关于我：一句话 */
.about-single {
  max-width: 30em;
  font-size: clamp(1.12rem, 2.2vw, 1.42rem);
  line-height: 1.95;
  letter-spacing: 0.01em;
  color: var(--text);
}

/* 方向：只留标题（卡片数量变化时自动排布） */
.cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card-minimal {
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: clamp(120px, 16vw, 168px);
  padding: clamp(1.6rem, 4vw, 2.4rem) 1rem;
}
.card-minimal h3 {
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  transition: color 0.4s var(--ease);
}
.card-minimal:hover h3 { color: var(--brass-bright); }
html[data-theme="light"] .card-minimal:hover h3 { color: var(--brass); }

/* 在做的事：标题式条目 */
.work { padding-block: clamp(1.15rem, 2.4vw, 1.6rem); }
.work-main h3 {
  margin-bottom: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  letter-spacing: 0.04em;
}

/* 移动端微调 */
@media (max-width: 640px) {
  .brand-name { font-size: 0.98rem; }
  .brand-sub { font-size: 0.64rem; }
  .card-minimal { min-height: 104px; }
  .photo-img { object-position: 50% 28%; }
}
