:root {
  --red: #941f22;
  --red-hover: #b73537;
  --ink: #201d1b;
  --muted: #6f6a64;
  --paper: #f6f3ec;
  --card: #fffdf8;
  --line: #ded8ce;
  --mint: #ddeae6;
  --mint-ink: #26584f;
  --blue: #326d89;
  --gold: #b98636;
  --shadow: 0 16px 40px rgba(70, 48, 36, 0.07);
  --sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 14px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: rgba(148, 31, 34, 0.97);
  box-shadow: 0 5px 20px rgba(67, 17, 18, 0.13);
  backdrop-filter: blur(16px);
}
.header-inner {
  width: min(1160px, calc(100% - 48px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 300px;
}
.identity img {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.identity-copy { display: flex; flex-direction: column; line-height: 1.25; }
.identity-copy strong { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.identity-copy small { margin-left: 5px; font-family: var(--sans); font-size: 10px; font-weight: 500; opacity: 0.7; }
.identity-copy > span { font-size: 11px; opacity: 0.78; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 7px 9px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.active { background: rgba(255, 255, 255, 0.14); }
.menu-button { display: none; }

.hero {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 84px 0 42px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(520px, 1.18fr);
  gap: 68px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(54px, 6vw, 86px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.role { margin: 11px 0 25px; color: var(--red); font-size: 17px; font-weight: 750; }
.lead { max-width: 590px; margin: 0; color: #4d4844; font-size: 18px; line-height: 1.9; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; }
.button {
  min-width: 112px;
  padding: 10px 19px;
  border: 1px solid var(--red);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { color: #fff; background: var(--red); }
.button.primary:hover { background: var(--red-hover); }
.button.secondary { color: var(--red); background: transparent; }
.button.secondary:hover { color: #fff; background: var(--red); }
.research-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 28px 0 0; list-style: none; }
.research-tags li { padding: 5px 10px; color: var(--mint-ink); background: var(--mint); border-radius: 4px; font-size: 12px; font-weight: 700; }

.hero-visual { position: relative; min-height: 490px; }
.portrait-wrap {
  position: absolute;
  z-index: 3;
  top: -12px;
  right: 18px;
  width: 145px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}
.portrait-wrap img { width: 100%; aspect-ratio: 210 / 294; object-fit: cover; border-radius: 5px; }
.portrait-wrap span { display: block; padding-top: 7px; color: var(--muted); font-size: 10px; letter-spacing: 0.08em; text-align: center; }
.chart-card {
  position: absolute;
  inset: 64px 54px 10px 0;
  padding: 26px 28px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.chart-heading > div:first-child { display: flex; flex-direction: column; }
.chart-heading span { color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.chart-heading strong { font-family: var(--serif); font-size: 19px; }
.legend { color: var(--muted); font-size: 10px; white-space: nowrap; }
.legend i { display: inline-block; width: 12px; height: 3px; margin: 0 4px 2px 8px; border-radius: 4px; }
.legend .red { background: var(--red); }
.legend .blue { background: var(--blue); }
.legend .gold { background: var(--gold); }
.chart-card svg { width: 100%; height: auto; margin-top: 14px; overflow: visible; }
.grid-lines line { stroke: #e8e2d8; stroke-width: 1; stroke-dasharray: 4 7; }
.series { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1100; stroke-dashoffset: 1100; animation: draw 1.8s ease-out forwards; }
.series-red { stroke: var(--red); }
.series-blue { stroke: var(--blue); animation-delay: 160ms; }
.series-gold { stroke: var(--gold); animation-delay: 320ms; }
.axis-labels { fill: #8d877f; font: 11px var(--sans); }
.chart-card > p { margin: -3px 0 0; color: var(--muted); font-size: 12px; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 56px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metrics div { display: flex; align-items: baseline; justify-content: center; gap: 11px; border-right: 1px solid var(--line); }
.metrics div:last-child { border-right: 0; }
.metrics strong { color: var(--red); font-family: var(--serif); font-size: 34px; line-height: 1; }
.metrics span { color: var(--muted); font-size: 13px; }

.section { padding: 88px max(24px, calc((100vw - 1160px) / 2)); }
.section-tint { background: #efebe3; }
.section-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 54px; align-items: start; }
.section-heading { position: sticky; top: 98px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: 34px; line-height: 1.25; }
.section-heading > p:last-child { margin: 17px 0 0; color: var(--muted); font-size: 14px; }
.content-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(70, 48, 36, 0.045);
}

.publication-list { padding: 0 30px; }
.publication { position: relative; padding: 28px 0 27px; border-bottom: 1px solid var(--line); }
.publication:last-child { border-bottom: 0; }
.publication.featured::before, .publication.accepted::before, .publication.under-review::before { content: ""; position: absolute; top: 32px; left: -31px; width: 3px; height: 64px; background: var(--red); }
.publication.accepted::before { background: var(--mint-ink); }
.publication.under-review::before { background: var(--gold); }
.pub-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.pub-meta span { padding: 2px 7px; color: var(--mint-ink); background: var(--mint); border-radius: 4px; font-size: 10px; font-weight: 800; }
.publication h3 { max-width: 790px; margin: 0 0 7px; font-size: 17px; line-height: 1.46; }
.publication p { margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.publication p strong { color: var(--red); }
.publication em { font-family: Georgia, serif; font-size: 13px; font-weight: 700; }

.about-layout { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: 18px; }
.biography, .timeline { padding: 30px; }
.content-card h3 { margin: 0 0 16px; font-family: var(--serif); font-size: 21px; }
.biography p { margin: 0 0 13px; color: #4c4743; font-size: 14px; line-height: 1.82; }
.biography p:last-child { margin-bottom: 0; }
.timeline-item { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 17px 0; border-top: 1px solid var(--line); }
.timeline-item time { color: var(--red); font-size: 12px; font-weight: 800; }
.timeline-item div { display: flex; flex-direction: column; }
.timeline-item strong { font-size: 14px; }
.timeline-item span { color: var(--muted); font-size: 13px; }
.education-detail { margin: 7px 0 0; color: #5f5954; font-size: 12px; line-height: 1.65; }
.education-detail b { margin-right: 5px; color: var(--ink); }

.dissertation-card { min-width: 0; padding: 36px; overflow: hidden; }
.dissertation-card h3 { max-width: 760px; margin: 0 0 16px; font-size: 23px; line-height: 1.65; overflow-wrap: anywhere; word-break: break-word; }
.dissertation-card p { max-width: 780px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; word-break: break-word; }

.project-list, .conference-list, .award-list { padding: 7px 30px; }
.project-list article, .conference-list article, .award-list article { display: grid; grid-template-columns: 92px 1fr; gap: 20px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.project-list article:last-child, .conference-list article:last-child, .award-list article:last-child { border-bottom: 0; }
.project-list time, .conference-list time, .award-list time { color: var(--red); font-size: 12px; font-weight: 800; }
.project-list p, .award-list p { margin: 0; }
.conference-list div { display: flex; flex-direction: column; }
.conference-list strong { font-size: 15px; }
.conference-list span { margin-top: 3px; color: var(--muted); font-size: 12px; }

.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-grid article { position: relative; min-height: 235px; padding: 32px 28px; overflow: hidden; }
.skill-index { color: var(--red); font-family: var(--serif); font-size: 12px; font-weight: 800; }
.skill-grid h3 { margin-top: 32px; }
.skill-grid p { margin: 0; color: var(--muted); font-size: 14px; }
.skill-grid article::after { content: ""; position: absolute; width: 90px; height: 90px; right: -36px; bottom: -36px; border: 15px solid rgba(148, 31, 34, 0.06); border-radius: 50%; }

.site-footer { padding: 64px 24px 24px; color: rgba(255, 255, 255, 0.82); background: var(--red); }
.footer-inner { width: min(1160px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 70px; }
.footer-name { margin: 0 0 4px; color: #fff; font-family: var(--serif); font-size: 29px; }
.site-footer p { margin: 3px 0; font-size: 13px; }
.site-footer h2 { margin: 0 0 12px; color: #fff; font-size: 13px; }
.site-footer a { font-size: 13px; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-links a { padding: 4px 8px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 4px; text-decoration: none; }
.copyright { width: min(1160px, 100%); margin: 45px auto 0 !important; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.2); opacity: 0.7; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 560ms ease, transform 560ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
a:focus-visible, button:focus-visible { outline: 3px solid #e6ba68; outline-offset: 3px; }

@media (max-width: 980px) {
  .header-inner { width: min(100% - 36px, 1160px); }
  .identity { min-width: 0; }
  .menu-button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 10px;
    place-content: center;
    gap: 4px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
  }
  .menu-button span:not(.sr-only) { width: 18px; height: 2px; background: currentColor; }
  .site-nav {
    position: absolute;
    top: 68px;
    right: 18px;
    left: 18px;
    display: none;
    padding: 12px;
    background: #7f191c;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0 0 9px 9px;
    box-shadow: 0 18px 30px rgba(48, 10, 11, 0.22);
  }
  .site-nav.open { display: grid; grid-template-columns: repeat(4, 1fr); }
  .site-nav a { text-align: center; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-visual { min-height: 440px; }
  .chart-card { right: 44px; }
  .metrics { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .metrics div:nth-child(3) { border-right: 0; }
  .section-grid { grid-template-columns: 1fr; gap: 27px; }
  .section-heading { position: static; max-width: 600px; }
}

@media (max-width: 700px) {
  body { font-size: 15px; }
  html { scroll-padding-top: 76px; }
  .header-inner { width: calc(100% - 28px); min-height: 64px; }
  .identity img { width: 38px; height: 38px; }
  .identity-copy > span { display: none; }
  .site-nav { top: 64px; }
  .site-nav.open { grid-template-columns: repeat(2, 1fr); }
  .hero { width: calc(100% - 36px); padding-top: 58px; }
  .hero h1 { font-size: 55px; }
  .lead { font-size: 16px; }
  .hero-visual { min-height: 355px; }
  .portrait-wrap { width: 105px; right: 0; }
  .chart-card { inset: 45px 24px 0 0; padding: 20px 18px 12px; }
  .chart-heading { display: block; }
  .legend { margin-top: 8px; }
  .chart-heading strong { font-size: 16px; }
  .chart-card > p { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 20px 0; }
  .metrics div:nth-child(2), .metrics div:nth-child(4) { border-right: 0; }
  .metrics div:nth-child(3) { border-right: 1px solid var(--line); }
  .metrics div:last-child { grid-column: 1 / -1; border-right: 0; }
  .metrics strong { font-size: 29px; }
  .metrics span { font-size: 11px; }
  .section { padding: 68px 18px; }
  .section-heading h2 { font-size: 30px; }
  .publication-list, .project-list, .conference-list, .award-list { padding-right: 20px; padding-left: 20px; }
  .publication.featured::before, .publication.accepted::before, .publication.under-review::before { left: -21px; }
  .about-layout, .skill-grid { grid-template-columns: 1fr; }
  .dissertation-card { padding: 26px 20px; }
  .dissertation-card h3 { font-size: 19px; }
  .project-list article, .conference-list article, .award-list article { grid-template-columns: 76px 1fr; gap: 10px; }
  .footer-inner { grid-template-columns: 1fr; gap: 34px; }
}

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

@media print {
  .site-header, .hero-actions, .chart-card, .site-footer { display: none !important; }
  body { background: #fff; font-size: 10.5pt; }
  .hero, .section { width: 100%; padding: 24px 0; }
  .hero-grid, .section-grid { display: block; }
  .hero-visual { min-height: 0; }
  .portrait-wrap { position: static; width: 95px; float: right; box-shadow: none; transform: none; }
  .metrics { clear: both; }
  .section-heading { position: static; margin-bottom: 14px; }
  .content-card { box-shadow: none; break-inside: avoid; }
  .reveal { opacity: 1; transform: none; }
}
