/* ============================================================
   Guangxuan Zhang — personal site
   Palette: warm paper, ink navy, terracotta accent.
   ============================================================ */

:root {
  --bg: #f6f3ec;
  --bg-soft: #efeae0;
  --surface: #fffdf8;
  --ink: #121c2e;
  --ink-soft: #2a3548;
  --muted: #5d6675;
  --line: #ded7ca;
  --line-strong: #c9c0b1;
  --accent: #a6531f;
  --accent-ink: #7c3a12;
  --accent-soft: #f3e3d4;
  --navy: #13233f;
  --teal: #0f5f5c;
  --teal-soft: #dfeeea;
  --shadow: 0 18px 50px rgba(18, 28, 46, 0.08);
  --shadow-sm: 0 8px 24px rgba(18, 28, 46, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c1320;
  --bg-soft: #101a2b;
  --surface: #131e30;
  --ink: #eef2f8;
  --ink-soft: #d7deea;
  --muted: #a6b1c3;
  --line: #253248;
  --line-strong: #34445e;
  --accent: #e3a36b;
  --accent-ink: #f3c79c;
  --accent-soft: #2a2118;
  --navy: #0a1220;
  --teal: #7ecbc6;
  --teal-soft: #122b2a;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(166, 83, 31, 0.09), transparent 60%),
    radial-gradient(800px 520px at 92% 2%, rgba(15, 95, 92, 0.07), transparent 55%);
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(227, 163, 107, 0.10), transparent 60%),
    radial-gradient(800px 520px at 92% 2%, rgba(126, 203, 198, 0.08), transparent 55%);
}

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

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.25em; }
li { margin-bottom: 0.45em; }
strong { font-weight: 650; color: var(--ink); }
small { font-size: 0.86em; }

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  transition: top 160ms ease;
}
.skip-link:focus { top: 1rem; color: var(--bg); }

.wrap {
  width: min(var(--max), calc(100% - 3rem));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.8rem;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.1rem 0 0; }
.tag {
  display: inline-flex;
  white-space: normal;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 550;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--accent); color: var(--ink); }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: transparent; }
.btn svg { width: 1em; height: 1em; flex: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 650; font-size: 0.98rem; }
.brand-sub { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.nav-link[aria-current="page"] { color: var(--ink); background: var(--bg-soft); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.menu-toggle { display: none; }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  min-width: 0;
}
.hero-grid > *, .about-grid > *, .project-body > *, .project-grid > *, .metrics > *, .award-grid > *, .principles > * { min-width: 0; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid color-mix(in srgb, var(--teal) 24%, transparent);
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 16%, transparent); }

.hero h1 {
  font-size: clamp(3rem, 8.4vw, 6.4rem);
  line-height: 0.95;
  margin-bottom: 1.1rem;
  letter-spacing: -0.03em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-cn {
  font-family: var(--sans);
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  color: var(--muted);
  margin: -0.3rem 0 1.1rem;
}
.hero .lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); }

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.hero-card h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.contact-card h2 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
  margin: 0;
}
.fact-list li:last-child { border-bottom: 0; }
.fact-list span:first-child { color: var(--muted); }
.fact-list span:last-child { text-align: right; font-weight: 550; }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 6vw, 5.4rem) 0; border-top: 1px solid var(--line); }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0; }
.section-head p { max-width: 46ch; margin: 0; color: var(--muted); }
.section-index { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--accent); display: block; margin-bottom: 0.4rem; }

/* ---------- project cards ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}
.project-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .project-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .project-grid--three { grid-template-columns: 1fr; } }
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); color: var(--ink); }
.card-cover {
  position: relative;
  min-height: 150px;
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #14233f, #23466b);
  overflow: hidden;
}
.card-cover::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: -70px;
  bottom: -110px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.card-cover--xinju { background: linear-gradient(135deg, #13233f, #2a4d72); }
.card-cover--ziyun { background: linear-gradient(135deg, #0f5f5c, #1f7a6f); }
.card-cover--cishen { background: linear-gradient(135deg, #7c3a12, #b8622c); }
.card-cover--vision { background: linear-gradient(135deg, #2b2a5e, #4b4a8f); }
.card-cover--gas { background: linear-gradient(135deg, #26343d, #41606b); }
.card-cover--fire { background: linear-gradient(135deg, #6b2317, #a63c22); }
.card-cover--forge { background: linear-gradient(135deg, #1c3b34, #3f7d63); }
.card-cover .cover-icon { width: 34px; height: 34px; opacity: 0.9; }
.card-cover .cover-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  opacity: 0.75;
}
.card-body { padding: 1.2rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.45rem; }
.card-body h3 { font-size: 1.35rem; margin-bottom: 0.45rem; }
.card-body p { color: var(--muted); font-size: 0.94rem; margin-bottom: 1rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; font-size: 0.86rem; color: var(--muted); }
.card-arrow { font-family: var(--mono); color: var(--accent); white-space: nowrap; transition: transform 160ms ease; }
.project-card:hover .card-arrow { transform: translateX(3px); }

/* ---------- metrics ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.15rem;
}
.metric strong { display: block; font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1; color: var(--accent); margin-bottom: 0.4rem; }
.metric span { font-size: 0.84rem; color: var(--muted); }

/* ---------- principles ---------- */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.principle {
  padding: 1.4rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.principle .num { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--accent); }
.principle h3 { font-size: 1.2rem; margin: 0.5rem 0 0.45rem; }
.principle p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ---------- timeline ---------- */
.timeline { position: relative; margin-top: 1.5rem; padding-left: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); }
.timeline-item { position: relative; padding: 0 0 1.7rem 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline-time { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.timeline-item h3 { font-size: 1.16rem; margin: 0.2rem 0 0.15rem; }
.timeline-org { font-size: 0.88rem; color: var(--accent); margin-bottom: 0.4rem; }
.timeline-item p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ---------- awards ---------- */
.award-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.award {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}
.award h3 { font-family: var(--sans); font-size: 0.92rem; font-weight: 650; margin-bottom: 0.2rem; }
.award p { margin: 0; color: var(--muted); font-size: 0.84rem; }

/* ---------- project page ---------- */
.project-hero {
  padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(1.8rem, 3vw, 2.6rem);
  border-bottom: 1px solid var(--line);
}
.back { display: inline-flex; gap: 0.35rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; color: var(--muted); margin-bottom: 1.4rem; }
.back:hover { color: var(--accent); }
.project-hero h1 { font-size: clamp(2.2rem, 5.4vw, 4.2rem); max-width: 18ch; margin-bottom: 0.7rem; }
.project-hero .lede { max-width: 70ch; }
.project-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--line);
}
.project-meta div { min-width: 0; }
.project-meta dt { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem; }
.project-meta dd { margin: 0; font-size: 0.92rem; font-weight: 550; }

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 4vw, 3.4rem) 0 clamp(3rem, 6vw, 5rem);
  align-items: start;
}
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); margin-top: 2.1rem; padding-top: 0.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 650; margin-top: 1.3rem; }
.prose p { color: var(--ink-soft); }
.prose ul { color: var(--ink-soft); }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.prose .callout {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--muted);
}
.evidence-list { list-style: none; padding: 0; margin: 0; }
.evidence-list li { padding: 0.65rem 0; border-bottom: 1px dashed var(--line); margin: 0; }
.evidence-list li:last-child { border-bottom: 0; }
.evidence-list a { font-weight: 550; }
.evidence-list span { display: block; color: var(--muted); font-size: 0.82rem; }

.project-aside { position: sticky; top: 88px; display: grid; gap: 1rem; }
.aside-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.15rem;
}
.aside-card h3 { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }
.aside-card ul { list-style: none; padding: 0; margin: 0; }
.aside-card li { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.38rem 0; border-bottom: 1px dashed var(--line); font-size: 0.86rem; margin: 0; }
.aside-card li:last-child { border-bottom: 0; }
.aside-card li span:first-child { color: var(--muted); }
.aside-card li span:last-child { text-align: right; font-weight: 550; }
.aside-card .aside-link { display: block; padding: 0.35rem 0; font-size: 0.88rem; text-decoration: none; border-bottom: 1px dashed var(--line); }
.aside-card .aside-link:last-child { border-bottom: 0; }

.related { display: grid; gap: 0.5rem; }
.related a { display: flex; justify-content: space-between; gap: 1rem; text-decoration: none; color: var(--ink); font-size: 0.9rem; padding: 0.5rem 0; border-bottom: 1px dashed var(--line); }
.related a:last-child { border-bottom: 0; }
.related a:hover { color: var(--accent); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-side { display: grid; gap: 1rem; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.3rem; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.info-card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.92rem; }
.info-card li { margin-bottom: 0.4rem; }

/* ---------- resume ---------- */
.resume-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.2rem 0 2rem; }
.resume-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 4vw, 3rem);
  max-width: 900px;
  margin: 0 auto;
}
.resume-sheet h1 { font-size: 2.1rem; margin-bottom: 0.15rem; }
.resume-sheet .resume-contact { font-size: 0.86rem; color: var(--muted); margin-bottom: 1.4rem; }
.resume-sheet h2 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid var(--line); padding-bottom: 0.35rem; margin: 1.4rem 0 0.7rem; }
.resume-sheet h3 { font-family: var(--sans); font-size: 0.96rem; margin: 0.8rem 0 0.1rem; }
.resume-sheet .r-sub { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.25rem; }
.resume-sheet ul { margin: 0 0 0.6rem; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.88rem; }
.resume-sheet li { margin-bottom: 0.25rem; }
.resume-sheet p { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.6rem 0 2.2rem; margin-top: 2rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; align-items: start; }
.footer-brand { font-family: var(--serif); font-size: 1.2rem; }
.footer-note { color: var(--muted); font-size: 0.86rem; max-width: 38ch; margin-top: 0.4rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.9rem; font-size: 0.9rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; }

/* ---------- reveal ---------- */
.reveal { opacity: 1; transform: translateY(10px); transition: transform 600ms ease; }
.reveal.is-visible { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-grid, .about-grid, .project-body { grid-template-columns: 1fr; }
  .project-aside { position: static; }
  .project-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles { grid-template-columns: 1fr; }
  .award-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 520px; }
  .section-head { flex-direction: column; align-items: start; gap: 0.6rem; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .brand-sub { display: none; }
  .brand { gap: 0.45rem; }
  .brand-mark { width: 34px; height: 34px; font-size: 0.95rem; }
  .brand-name { font-size: 0.92rem; }
  .header-inner { gap: 0.35rem; }
  .theme-toggle, .menu-toggle { width: 34px; height: 34px; }
  .hero-card { padding: 1.1rem; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3.4rem); }
  .project-hero h1 { font-size: clamp(1.9rem, 8.5vw, 3rem); }
  .project-meta { grid-template-columns: 1fr; }
  .fact-list li { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
  .fact-list span:last-child { text-align: left; }
  .wrap { width: min(var(--max), calc(100% - 2rem)); }
  .header-inner { height: 60px; }
  .site-nav {
    position: fixed;
    inset: 60px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.8rem 1rem 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }
  .site-nav.is-open { display: flex; }
  .nav-link { padding: 0.7rem 0.8rem; font-size: 1rem; }
  .menu-toggle { display: grid; }
  .theme-toggle { margin-left: auto; }
  .hero { padding-top: 2.4rem; }
  .hero-cn { letter-spacing: 0.24em; }
  .project-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .footer-grid, .footer-bottom { flex-direction: column; }
  .resume-sheet { padding: 1.1rem; }
}

/* ---------- print (resume) ---------- */
@media print {
  @page { size: A4; margin: 10mm 12mm; }
  body { background: #fff; color: #000; font-size: 9.4pt; line-height: 1.34; }
  body::before, .site-header, .site-footer, .skip-link, .resume-actions, .no-print { display: none !important; }
  .wrap { width: 100%; }
  .resume-sheet { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .resume-sheet h1 { font-size: 19pt; margin-bottom: 0.05rem; }
  .resume-sheet .resume-contact { font-size: 8.6pt; margin-bottom: 0.7rem; }
  .resume-sheet h2 { color: #000; border-bottom: 0.6pt solid #999; font-size: 8pt; margin: 0.9rem 0 0.4rem; padding-bottom: 0.22rem; break-after: avoid; }
  .resume-sheet h3 { font-size: 9.6pt; margin: 0.52rem 0 0.04rem; break-after: avoid; }
  .resume-sheet .r-sub { font-size: 8.4pt; margin-bottom: 0.1rem; break-after: avoid; }
  .resume-sheet p, .resume-sheet li { font-size: 9.2pt; color: #000; line-height: 1.32; }
  .resume-sheet ul { margin-bottom: 0.28rem; padding-left: 0.95rem; }
  .resume-sheet li { margin-bottom: 0.12rem; }
  .resume-sheet a { color: #000; text-decoration: none; }
  .resume-sheet section { break-inside: avoid; }
}

/* ---------- small helpers ---------- */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.text-center { text-align: center; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }






