:root {
  --paper: #fbfbf8;
  --paper-deep: #f1f4ef;
  --ink: #17211d;
  --muted: #607066;
  --line: #d9dfd8;
  --forest: #24493d;
  --blue: #315b7c;
  --rust: #9a5737;
  --violet: #62577f;
  --gold: #b98d40;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(23, 33, 29, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

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

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

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 223, 216, 0.9);
  background: rgba(251, 251, 248, 0.92);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}

.brand {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, #14241e 0%, #1a3a2e 50%, #0f1f19 100%);
}

.hero-content {
  position: relative;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 140px 0 72px;
}

.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.06em;
}

.hero h1 {
  margin: 0;
  max-width: 860px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.6rem;
  line-height: 1.08;
  font-weight: 500;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.35);
}

.hero p {
  max-width: 700px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ── Buttons ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}
.button:hover {
  border-color: var(--rust);
  color: var(--rust);
}
.button.light {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}
.button.light:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ── Sections ── */
.section { padding: 80px 0; }
.section.alt { background: var(--paper-deep); }

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 38px;
}
.section-heading h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  line-height: 1.16;
  font-weight: 500;
}
.section-heading p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

/* ── Project Cards ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(154, 87, 55, 0.55);
  color: var(--ink);
}
.project-card .card-body { padding: 20px; }
.project-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.3;
}
.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 8px;
  background: #e8eee8;
  color: var(--forest);
  font-size: 0.75rem;
  font-weight: 700;
}
.tag.blue { background: #e7edf3; color: var(--blue); }
.tag.rust { background: #f2e7df; color: var(--rust); }
.tag.violet { background: #ece9f2; color: var(--violet); }
.tag.gold { background: #f5edd8; color: #7a6020; }
.tag.status {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
}

/* ── Article Layout (sidebar TOC + content) ── */
.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 90px;
  border-left: 3px solid var(--forest);
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}
.toc strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.toc a { display: block; margin: 6px 0; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc .toc-sub { padding-left: 12px; font-size: 0.84rem; }

.article {
  max-width: 820px;
  width: 100%;
  min-width: 0;
}
.article section { scroll-margin-top: 90px; }
.article h2 {
  margin: 0 0 8px;
  padding-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  line-height: 1.2;
  font-weight: 500;
}
.article h2 + .lead { margin-top: 0; }
.article h3 {
  margin: 32px 0 10px;
  font-size: 1.15rem;
  line-height: 1.3;
}
.article p { margin: 14px 0; }

.lead { color: var(--muted); font-size: 1.05rem; }

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

/* ── Quote ── */
.quote {
  margin: 26px 0;
  padding: 22px 24px;
  border-left: 4px solid var(--gold);
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 33, 29, 0.05);
}
.quote p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
}

/* ── KPI Grid ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}
.kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 18px;
}
.kpi strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 500;
  color: var(--forest);
}
.kpi span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ── Method / Result Grids ── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0;
}
.method-box,
.result-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 22px;
}
.method-box h3,
.result-box h3 { margin-top: 0; }
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0;
}
.result-box.good { border-top: 4px solid var(--forest); }
.result-box.caution { border-top: 4px solid var(--rust); }

/* ── Data Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 0.92rem;
  overflow: hidden;
}
.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}
.data-table tr:last-child td { border-bottom: 0; }

/* ── Figures ── */
.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}
.figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}
.figure img { width: 100%; object-fit: contain; background: #fafafa; }
.figure.wide { grid-column: 1 / -1; }
.figure figcaption {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ── Artifacts ── */
.artifact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.artifact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 16px;
}
.artifact a { font-weight: 700; }
.artifact p { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }

/* ── Note ── */
.note {
  padding: 16px 18px;
  border: 1px solid #e5d6c8;
  border-radius: 8px;
  background: #fff8f3;
  color: #5a3b2b;
  font-size: 0.95rem;
  margin: 22px 0;
}

/* ── Research Journey (timeline) ── */
.journey-step {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.journey-step:first-of-type { border-top: 0; padding-top: 8px; }
.journey-step h3 { margin-top: 0; }

/* ── About page ── */
.about-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}
.about-sidebar {
  position: sticky;
  top: 90px;
}
.about-sidebar .contact-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}
.about-sidebar .contact-block a { display: block; margin: 4px 0; }

.about-content { max-width: 720px; }
.about-content h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 500;
  margin: 48px 0 12px;
}
.about-content h2:first-child { margin-top: 0; }
.about-content p { margin: 14px 0; }

/* ── CV Embed ── */
.cv-embed {
  width: 100%;
  height: 85vh;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* ── Home Timeline ── */
.home-timeline {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--line);
}
.home-timeline .tl-item {
  position: relative;
  padding: 0 0 36px;
}
.home-timeline .tl-item:last-child { padding-bottom: 0; }
.home-timeline .tl-dot {
  position: absolute;
  left: -35px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--forest);
  border: 2px solid var(--paper);
}
.home-timeline .tl-year {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rust);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.home-timeline .tl-title {
  font-weight: 700;
  margin: 4px 0 2px;
}
.home-timeline .tl-title a { color: var(--ink); text-decoration: none; }
.home-timeline .tl-title a:hover { color: var(--blue); }
.home-timeline .tl-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ── Minor timeline node ── */
.home-timeline .tl-item.minor { padding-bottom: 28px; }
.home-timeline .tl-item.minor .tl-dot {
  width: 8px; height: 8px;
  left: -33px; top: 5px;
  background: var(--muted);
  border-color: var(--paper);
}
.home-timeline .tl-item.minor .tl-title { font-size: 0.88rem; font-weight: 600; }
.home-timeline .tl-item.minor .tl-desc { font-size: 0.84rem; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); }

/* ── Card with gradient image ── */
.card-image-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
}
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.card-image-wrap::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70px;
  background: linear-gradient(to top, var(--white) 0%, transparent 100%);
  pointer-events: none;
}

/* ── Project hero with background image ── */
.hero-img {
  background-size: cover;
  background-position: center;
}
.hero-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 30, 22, 0.58);
  backdrop-filter: blur(4px);
}

/* ── Pilot cities layout ── */
.pilot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 28px 0;
  align-items: start;
}
.city-list { list-style: none; padding: 0; margin: 0; }
.city-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.city-list li:last-child { border-bottom: 0; }
.city-list .city-name { font-weight: 700; }
.city-list .city-info { color: var(--muted); font-size: 0.88rem; }
#china-map {
  width: 100%;
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0f4f8;
}

/* ── Vertical data boxes ── */
.data-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 26px 0;
}

/* ── Responsive ── */
@media (max-width: 920px) {
  .projects-grid,
  .article-layout,
  .about-grid,
  .method-grid,
  .result-grid,
  .figure-grid,
  .artifact-list { grid-template-columns: 1fr; }

  .toc {
    position: static;
    border-left: 0;
    border-top: 3px solid var(--forest);
    padding: 14px 0 0;
    margin-bottom: 32px;
  }
  .about-sidebar { position: static; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .nav {
    width: min(100% - 28px, 1120px);
    min-height: 56px;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
    gap: 6px;
  }
  .nav-links { gap: 12px; }
  .hero { min-height: 440px; }
  .hero-content { width: min(100% - 28px, 1120px); padding: 100px 0 56px; }
  .hero h1 { font-size: 2.4rem; }
  .section { padding: 52px 0; }
  .section-heading h2,
  .article h2 { font-size: 1.6rem; }
  .kpi-grid { grid-template-columns: 1fr; }
  .data-table { display: block; overflow-x: auto; white-space: nowrap; }
  .container,
  .hero-content { width: min(100% - 28px, 1120px); }
}
