:root {
  --paper: #f7f4ee;
  --surface: #ebe7df;
  --ink: #151411;
  --muted: #625f58;
  --line: #cfc7ba;
  --line-strong: #81786b;
  --oxblood: #7b2230;
  --green: #315b49;
  --gold: #a1782a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
body, p, h1, h2, h3, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; text-underline-offset: .22em; }
a:hover { color: var(--oxblood); }
img { display: block; max-width: 100%; }
.serif { font-family: Georgia, "Times New Roman", serif; }
.page { animation: page-enter 520ms ease both; }
@keyframes page-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(16px); }
.nav { min-height: 64px; max-width: 1280px; margin: 0 auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-size: 1.5rem; }
.nav-links { display: flex; gap: 32px; color: var(--muted); font-size: .95rem; }
.cv-link, .button, .case-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; border: 1px solid var(--line-strong); padding: 0 18px; font-size: .95rem; background: transparent; color: var(--ink); }
.button.primary { min-height: 48px; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.button.primary:hover { background: var(--oxblood); color: var(--paper); border-color: var(--oxblood); }
.button:hover, .cv-link:hover, .case-button:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.section { max-width: 1280px; margin: 0 auto; padding: 64px 40px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; padding-top: 56px; padding-bottom: 56px; }
.eyebrow, .label { color: var(--muted); font-size: .95rem; }
.hero h1 { margin-top: 18px; font-size: 8.5rem; line-height: .9; font-weight: 400; }
.hero-copy { margin-top: 32px; max-width: 680px; font-size: 1.5rem; line-height: 1.5; }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.focus { align-self: end; border-left: 1px solid var(--line); padding-left: 24px; }
.line-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; font-size: 1.125rem; }
.line-list li { display: flex; gap: 12px; align-items: flex-start; }
.line-list li::before { content: ""; width: 32px; height: 1px; margin-top: .8em; background: var(--green); flex: 0 0 auto; }
.work { border-top: 1px solid var(--line); background: var(--surface); }
.section-intro { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; border-bottom: 1px solid var(--line); padding-bottom: 32px; }
.section-intro h2 { max-width: 900px; font-size: 3rem; line-height: 1.12; font-weight: 400; }
.projects { display: grid; }
.project-row { display: grid; grid-template-columns: 160px minmax(320px, .95fr) minmax(280px, .7fr); gap: 24px; align-items: center; padding: 36px 0; border-bottom: 1px solid var(--line); }
.project-number { font-size: 3.2rem; color: var(--oxblood); }
.project-text .tags { color: var(--muted); font-size: .95rem; }
.project-text h3 { margin-top: 14px; font-size: 2.35rem; line-height: 1.12; font-weight: 400; }
.project-text p { margin-top: 20px; color: var(--muted); line-height: 1.7; }
.visual { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.visual img { aspect-ratio: 16 / 11; width: 100%; height: auto; object-fit: cover; transition: transform 500ms ease; }
.visual:hover img { transform: scale(1.025); }
.caption { position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); padding: 13px 16px; color: var(--muted); font-size: .95rem; }
.about { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; }
.about-copy { max-width: 800px; display: grid; gap: 20px; font-size: 2.35rem; line-height: 1.22; }
.capabilities { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.cap-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; }
.cap-table, .contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); overflow: hidden; }
.cap-cell, .contact-cell { background: var(--paper); padding: 28px; }
.cap-cell h2 { font-size: 1.7rem; font-weight: 400; }
.cap-cell ul { margin-top: 24px; }
.cap-cell li::before { background: var(--gold); }
.contact { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; }
.contact h2 { max-width: 900px; font-size: 3rem; line-height: 1.12; font-weight: 400; }
.contact-grid { margin-top: 40px; }
.contact-cell dt { color: var(--muted); font-size: .95rem; }
.contact-cell dd { margin-top: 8px; font-size: 1.15rem; }
.project-hero { padding-top: 40px; }
.back { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; color: var(--muted); font-size: .95rem; }
.project-heading { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; align-items: end; }
.project-heading h1 { margin-top: 20px; max-width: 900px; font-size: 4.8rem; line-height: 1.05; font-weight: 400; }
.summary { border-left: 1px solid var(--line); padding-left: 24px; }
.summary p:last-child { margin-top: 20px; font-size: 1.1rem; line-height: 1.75; }
.case { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.case-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; }
.case-nav { position: sticky; top: 96px; align-self: start; }
.case-nav ol { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: .95rem; }
.case-sections { border-top: 1px solid var(--line); }
.case-section { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.case-section h2 { font-size: 1.7rem; font-weight: 400; }
.case-body { color: var(--muted); font-size: 1.1rem; line-height: 1.75; display: grid; gap: 16px; }
.case-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.case-body li { display: flex; gap: 12px; }
.case-body li::before { content: ""; width: 32px; height: 1px; margin-top: .95em; flex: 0 0 auto; background: var(--gold); }
.next-case { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.next-case h2 { margin-top: 8px; font-size: 2rem; font-weight: 400; }
/* Extend the original editorial system without changing its palette or grid. */
figure { margin: 0; }
button { font: inherit; color: inherit; }
:where(a, button):focus-visible { outline: 2px solid var(--oxblood); outline-offset: 5px; }
:where(a, button) { transition: color 260ms ease, background-color 260ms ease, border-color 260ms ease; }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.language-switch { display: flex; align-items: center; gap: 3px; white-space: nowrap; color: var(--muted); font-size: .875rem; }
.language-switch button { border: 0; background: none; padding: 10px 5px; min-height: 44px; cursor: pointer; text-underline-offset: 5px; }
.language-switch button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; }
.language-switch button:focus-visible { color: var(--oxblood); }
.nav-links a, .text-link, .back, .case-nav a { background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: left bottom; background-size: 0 1px; transition: background-size 280ms ease, color 280ms ease; }
.nav-links a:focus-visible, .text-link:focus-visible, .back:focus-visible, .case-nav a:focus-visible { background-size: 100% 1px; color: var(--oxblood); }
.button svg, .case-button svg, .back svg, .cv-link svg { flex-shrink: 0; transition: transform 280ms ease; }
.button:focus-visible, .cv-link:focus-visible, .case-button:focus-visible { background: var(--surface); border-color: var(--ink); }
.button.primary:focus-visible { background: var(--oxblood); color: var(--paper); }
.work-group { padding-top: 40px; }
.group-heading { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; align-items: baseline; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.group-heading h3 { font-size: 2rem; font-weight: 400; line-height: 1.2; }
.group-heading p:last-child { margin-top: 12px; color: var(--muted); line-height: 1.6; max-width: 720px; }
.project-text h4 { margin: 14px 0 0; font-size: 2.35rem; line-height: 1.12; font-weight: 400; transition: transform 280ms ease; }
.project-meta > .label { margin-bottom: 20px; }
.project-row { transition: border-color 280ms ease; }
.visual img { transition: transform 320ms ease; }
.visual:hover img { transform: none; }
.caption { position: static; min-height: 0; line-height: 1.5; }
.visual-placeholder { aspect-ratio: 16 / 11; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }
.experience-row { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.experience-row h4 { font-size: 1.7rem; font-weight: 400; margin: 0; }
.experience-facts { display: grid; gap: 10px; margin-top: 20px; color: var(--muted); line-height: 1.6; }
.experience-facts div { display: grid; grid-template-columns: 65px minmax(0, 1fr); gap: 12px; }
.experience-copy { display: grid; align-content: start; gap: 12px; line-height: 1.7; color: var(--muted); }
.experience-copy strong { color: var(--ink); font-weight: 600; }
.experience-row h4 { line-height: 1.3; text-wrap: balance; }
.case-visual { margin-top: 40px; }
.cap-cell h3 { margin: 0; font-size: 1.7rem; font-weight: 400; }
h2.label { font-weight: 400; }
.skip-link { position: fixed; top: -100px; left: 20px; background: var(--paper); padding: 12px; z-index: 50; }
.skip-link:focus { top: 12px; }
#main:focus { outline: none; }
section[id], main[id] { scroll-margin-top: 100px; }
.project-row > *, .project-heading > *, .case-section > *, .nav > * { min-width: 0; }
.contact-cell dd, .project-heading h1 { overflow-wrap: anywhere; }
html[lang="zh-CN"] .serif { font-family: Georgia, "Times New Roman", "Songti SC", "Noto Serif CJK SC", serif; }
html[lang="zh-CN"] .hero h1 { font-family: Georgia, "Times New Roman", serif; }
html[lang="zh-CN"] :is(.section-intro h2, .about-copy, .project-text h4, .project-heading h1, .contact h2) { line-height: 1.4; }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover, .text-link:hover, .back:hover, .case-nav a:hover { background-size: 100% 1px; }
  .language-switch button:hover { color: var(--oxblood); }
  .project-row:hover { border-color: var(--line-strong); }
  .project-row:hover .visual img { transform: scale(1.025); }
  .project-row:hover h4 { transform: translateX(3px); }
  .case-button:hover svg, .button:hover svg, .cv-link:hover svg { transform: translateX(2px); }
  .back:hover svg { transform: translateX(-2px); }
}
.project-row:focus-within { border-color: var(--line-strong); }
.project-row:focus-within .visual img { transform: scale(1.025); }
.project-row:focus-within h4 { transform: translateX(3px); }
.case-button:focus-visible svg, .button:focus-visible svg, .cv-link:focus-visible svg { transform: translateX(2px); }
.back:focus-visible svg { transform: translateX(-2px); }
@media (max-width: 1100px) and (min-width: 901px) {
  .project-row { grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr); }
  .nav-links { gap: 20px; }
}
@media (max-width: 900px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .section, .hero { padding-left: 20px; padding-right: 20px; }
  .hero, .section-intro, .about, .cap-grid, .contact, .project-heading, .case-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 5.5rem; }
  .hero-copy { font-size: 1.25rem; }
  .focus, .summary { border-left: 0; padding-left: 0; }
  .project-row { grid-template-columns: 1fr; }
  .project-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .about-copy { font-size: 1.9rem; }
  .section-intro h2, .contact h2 { font-size: 2.25rem; }
  .cap-table, .contact-grid { grid-template-columns: 1fr; }
  .project-heading h1 { font-size: 3.3rem; }
  .case-nav { position: static; }
  .case-section { grid-template-columns: 1fr; }
  .next-case { align-items: flex-start; flex-direction: column; }
  .experience-row { grid-template-columns: 1fr; }
  .group-heading { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; }
  .group-heading h3 { font-size: 1.65rem; }
  .project-text h4 { font-size: 2rem; }
  .nav { flex-wrap: wrap; column-gap: 12px; row-gap: 0; padding-top: 6px; padding-bottom: 6px; }
  .nav-links { display: flex; order: 3; width: 100%; justify-content: space-between; gap: 8px; padding: 8px 0; font-size: .875rem; }
  .nav-actions { gap: 12px; }
  .nav .cv-link { padding: 0 12px; }
  section[id], main[id] { scroll-margin-top: 130px; }
  .case-nav { scroll-margin-top: 130px; }
  .project-heading h1 { font-size: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; scroll-behavior: auto !important; transition-duration: 1ms !important; }
  .project-row:hover .visual img, .project-row:focus-within .visual img, .project-row:hover h4, .project-row:focus-within h4, a:hover svg, a:focus-visible svg { transform: none !important; }
}

.custom-cursor { position: fixed; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; border: 0; background: var(--ink); box-shadow: none; filter: none; opacity: 1; pointer-events: none; z-index: 2147483647; will-change: transform; transition: background-color 160ms ease; }
.custom-cursor[data-surface="dark"] { background: var(--paper); }
.custom-cursor[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.custom-cursor-active, html.custom-cursor-active * { cursor: none !important; }
}
@media (hover: none), (pointer: coarse) { .custom-cursor { display: none; } }

/* Coursework evidence stays within the existing editorial rows and dividers. */
.project-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.project-metrics div { display: flex; flex-direction: column-reverse; justify-content: end; gap: 8px; }
.project-metrics dt { font-size: .875rem; line-height: 1.45; color: var(--muted); }
.project-metrics dd { font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.editorial-chart { padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chart-title { display: block; font-size: 1.7rem; line-height: 1.35; font-weight: 400; color: var(--ink); margin: 0 0 24px; max-width: 900px; }
.chart-caption { font-size: .95rem; line-height: 1.65; color: var(--muted); margin-top: 24px; max-width: 800px; }
.line-stage { height: 290px; position: relative; margin-top: 12px; }
.line-axis { position: absolute; left: 0; top: 0; bottom: 0; width: 54px; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.line-axis span { position: absolute; transform: translateY(-50%); }
.line-plot { position: absolute; inset: 0 10px 0 58px; }
.line-plot svg { width: 100%; height: 100%; overflow: visible; }
.zero-line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trajectory-line { stroke: var(--green); stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.line-point { position: absolute; width: 36px; height: 36px; border: 0; padding: 0; background: transparent; transform: translate(-50%, -50%); display: grid; place-items: center; cursor: pointer; }
.point-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); border: 1px solid var(--paper); transition: background-color 240ms ease; }
.chart-mark { position: relative; }
.line-point.chart-mark { position: absolute; }
.chart-mark:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; }
.chart-tooltip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(270px, 75vw); padding: 8px 10px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font: 14px/1.5 Arial, Helvetica, sans-serif; text-align: left; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 220ms ease, visibility 220ms ease; z-index: 5; }
.chart-mark:focus .chart-tooltip { opacity: 1; visibility: visible; }
.first-point .chart-tooltip { left: 0; transform: none; }
.last-point .chart-tooltip { left: auto; right: 0; transform: none; }
.line-dates { position: relative; height: 42px; margin: 8px 10px 0 58px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.line-dates span { position: absolute; transform: translateX(-50%); width: max-content; max-width: 62px; text-align: center; }
.chart-data { margin-top: 20px; font-size: .875rem; color: var(--muted); }
.chart-data summary { cursor: pointer; padding: 8px 0; width: fit-content; }
.chart-data summary:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; }
.capture-bars { display: grid; gap: 18px; }
.capture-row { width: 100%; border: 0; padding: 6px 0; background: none; display: grid; grid-template-columns: 190px minmax(0, 1fr) 75px; align-items: center; gap: 16px; text-align: left; cursor: pointer; min-height: 40px; font-size: 1rem; }
.bar-track { height: 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-fill { display: block; height: 100%; background: var(--line-strong); transition: opacity 240ms ease; }
.selected-model .bar-fill { background: var(--oxblood); }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; }
.selected-model { color: var(--oxblood); }
.capture-row .chart-tooltip { left: 0; transform: none; }
.bar-axis { display: flex; justify-content: space-between; margin: 8px 91px 0 206px; color: var(--muted); font-size: .875rem; }
.compact-chart { padding: 24px 16px; background: var(--paper); border: 1px solid var(--line); }
.compact-chart .chart-title { font-size: 1.35rem; margin-bottom: 20px; }
.compact-chart .line-stage { height: 175px; }
.compact-chart .capture-bars { gap: 6px; }
.compact-chart .capture-row { grid-template-columns: minmax(0, 1fr) 70px; gap: 6px; font-size: .875rem; }
.compact-chart .bar-track { grid-row: 2; grid-column: 1 / -1; height: 6px; }
.compact-chart .bar-value { grid-column: 2; grid-row: 1; }
.compact-chart .bar-axis { margin: 8px 0 0; }
.editorial-flow, .model-comparison, .final-metrics { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.editorial-flow ol { margin: 0; padding: 0; list-style: none; }
.editorial-flow li { display: block; position: relative; padding: 0 0 28px 28px; color: var(--ink); font-size: 1rem; line-height: 1.6; }
.editorial-flow li::before { content: ""; position: absolute; left: 3px; top: 11px; margin: 0; width: 5px; height: 5px; background: var(--green); }
.editorial-flow li:not(:last-child)::after { content: "↓"; position: absolute; left: 0; top: 32px; color: var(--line-strong); font-size: 16px; }
.editorial-flow li:last-child { padding-bottom: 0; }
.models-list { font-size: .95rem; line-height: 1.7; }
.models-list > span { color: var(--ink); }
.final-metrics dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.final-metrics dl > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.final-metrics dt { font-size: .875rem; line-height: 1.5; }
.final-metrics dd { margin-top: 8px; font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; max-width: 100%; margin-top: 20px; }
.analysis-table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.6; text-align: left; color: var(--ink); }
.analysis-table th, .analysis-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); font-weight: 400; }
.analysis-table thead { color: var(--muted); }
.analysis-table td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.analysis-table thead th:not(:first-child) { text-align: right; }
.analysis-table th:first-child { padding-left: 0; }
.analysis-table td:last-child { padding-right: 0; }
.model-table { min-width: 415px; }
.policy-table td:nth-child(2), .segment-table td:nth-child(2) { text-align: left; white-space: normal; min-width: 240px; }
.segment-table td:last-child { width: 110px; }
.case-layout > *, .case-body > *, .coursework-visual { min-width: 0; }
.project-hero:has(.coursework-visual) .project-heading h1 { text-wrap: balance; }
.model-table .selected-model th { font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .chart-mark:hover .chart-tooltip { opacity: 1; visibility: visible; }
  .chart-mark:hover .point-dot { background: var(--oxblood); }
  .capture-row:hover .bar-fill { opacity: .75; }
}
@media (max-width: 600px) {
  .line-stage { height: 220px; }
  .capture-row { grid-template-columns: minmax(0, 1fr) 75px; row-gap: 8px; }
  .capture-row .bar-track { grid-row: 2; grid-column: 1 / -1; }
  .capture-row .bar-value { grid-row: 1; grid-column: 2; }
  .bar-axis { margin: 8px 0 0; }
  .project-metrics { gap: 12px; }
  .project-metrics dd { font-size: 1.5rem; }
  .line-dates { gap: 3px; }
  .line-dates span { max-width: 38px; }
  .compact-chart .line-dates { margin-left: 48px; }
  .compact-chart .line-plot { left: 48px; }
  .chart-title { font-size: 1.5rem; }
}
