:root {
  color-scheme: light;
  --paper: #faf8f3;
  --ink: #232f31;
  --muted: #4f5e60;
  --teal: #204e51;
  --wash: #eeeee6;
  --line: #d8dad2;
  --copper: #8d4d36;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --song: "Songti SC", "Noto Serif SC", "SimSun", serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.63 var(--sans); }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--teal); text-underline-offset: .24em; text-decoration-thickness: .075em; }
a:hover { color: var(--copper); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--copper); outline-offset: 4px; }
section[id] { scroll-margin-block: 1.25rem; }
.shell { width: min(69rem, calc(100% - 7rem)); margin-inline: auto; }
.skip { position: fixed; z-index: 5; inset: .75rem auto auto .75rem; background: var(--paper); padding: .55rem .85rem; transform: translateY(-200%); }
.skip:focus { transform: none; }

.site-header {
  display: flex;
  min-height: 4.15rem;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  border-bottom: 1px solid var(--line);
}
nav, .languages { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(.8rem, 3vw, 1.8rem); }
nav a, .languages a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
}
nav a:hover, .languages a:hover { color: var(--copper); }
.languages { flex-wrap: nowrap; gap: .6rem; }
.languages a { padding-inline: .45rem; justify-content: center; }
.languages a[aria-current] {
  color: var(--teal);
  box-shadow: inset 0 -2px var(--copper);
}

.hero {
  padding-block: clamp(2.6rem, 6vw, 4.8rem) clamp(2.2rem, 4.75vw, 3.7rem);
}
h1 {
  margin-bottom: 1.12rem;
  font: 500 clamp(3.2rem, 7.45vw, 6.2rem)/.98 var(--serif);
  letter-spacing: -.057em;
}
html[lang="zh-Hans"] h1 {
  font-family: var(--song);
  font-weight: 700;
  letter-spacing: .035em;
}
.hero-overview { max-width: 38rem; font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.55; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem 1.4rem; margin-top: 1.25rem; }
.hero-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: .9375rem;
  text-decoration: none;
}
.cv-actions { display: flex; flex-wrap: wrap; border-block: 1px solid var(--line); }
.cv-actions a { padding-inline: .68rem; }
.cv-actions a:hover { background: var(--wash); }
.download-cv { gap: .55rem; font-weight: 650; }
.read-pdf { border-left: 1px solid var(--line); color: var(--muted); }
.file-glyph {
  position: relative;
  flex: 0 0 .76rem;
  height: .97rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: var(--copper);
}
.file-glyph::after {
  position: absolute;
  inset: .28rem .15rem auto;
  height: 1px;
  background: currentColor;
  box-shadow: 0 3px currentColor;
  content: "";
}
.hero-links .email { color: var(--muted); overflow-wrap: anywhere; }
.hero-links .email:hover { color: var(--copper); }

.page-section { padding-block: 1.7rem 2.55rem; border-top: 1px solid var(--line); }
.section-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(9.8rem, .27fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.6rem clamp(1.55rem, 4vw, 3.35rem);
}
.section-layout::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.15rem;
  height: 2px;
  background: var(--copper);
  content: "";
}
h2 {
  max-width: 14rem;
  color: var(--teal);
  font: 600 clamp(1.48rem, 2.5vw, 1.96rem)/1.17 var(--serif);
  letter-spacing: -.027em;
  text-wrap: balance;
}
html[lang="zh-Hans"] h2 { font-family: var(--sans); font-weight: 700; letter-spacing: 0; }

.publication { padding-block: 1.15rem; }
.publication:first-child, .employer:first-child { padding-top: 0; }
.publication:last-child, .employer:last-child { padding-bottom: 0; }
.publication + .publication, .employer + .employer { border-top: 1px solid var(--line); }
.publication-type { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.publication-type span {
  padding-inline-end: .6rem;
  border-right: 1px solid var(--line);
  color: var(--copper);
  font-size: .9375rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.publication h3 {
  margin-block: .33rem .32rem;
  font: 600 clamp(1.24rem, 2.5vw, 1.62rem)/1.25 var(--serif);
  overflow-wrap: anywhere;
}
html[lang="zh-Hans"] .publication h3 { font: 700 clamp(1.16rem, 2.5vw, 1.34rem)/1.4 var(--sans); }
.byline, .publication .muted { font-size: .9625rem; }
.muted, .role { color: var(--muted); }
.publication .muted { margin-top: .15rem; }
.work-note { max-width: 45rem; margin-top: .48rem; }
.source-links { display: flex; flex-wrap: wrap; gap: .1rem .9rem; margin-top: .3rem; }
.source-links a { font-size: .9375rem; font-weight: 650; }

.employer { padding-block: 1.25rem; }
.employer-profile { margin-bottom: .48rem; }
.employer-profile h3, .entry h3, .skills h3 { font-size: 1.14rem; line-height: 1.35; overflow-wrap: anywhere; }
.entry h4 { font-size: 1.04rem; line-height: 1.4; overflow-wrap: anywhere; }
.employer-profile h3, .skills h3 { color: var(--teal); }
.employer-profile > p { display: inline; font-size: .9rem; }
.employer-profile > .role {
  margin-inline-start: .45rem;
  padding-inline-start: .55rem;
  border-left: 1px solid var(--line);
}
.project { border-bottom: 1px solid var(--line); }
.project:last-child { border-bottom: 0; }
.project summary, .career summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  min-height: 2.75rem;
  padding: .6rem .65rem .6rem 1.58rem;
  transition: background-color .16s ease, color .16s ease;
}
summary::-webkit-details-marker { display: none; }
.project summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .16rem .9rem; }
summary:hover, details[open] > summary { background: var(--wash); color: var(--teal); }
summary::before, summary::after {
  position: absolute;
  top: 1.37rem;
  left: .35rem;
  width: .63rem;
  height: 1.5px;
  background: var(--copper);
  pointer-events: none;
  content: "";
}
summary::after { transform: rotate(90deg); transition: transform .16s ease; }
details[open] > summary::after { transform: rotate(0); }
.project-name { font-weight: 650; line-height: 1.42; }
.date { color: var(--copper); font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.project > ul { margin: .45rem .65rem .9rem 1.58rem; }
.project > .role { margin: .38rem .65rem 0 1.58rem; }
.entry ul, .project ul, .career-content > ul { padding-left: 1rem; }
.entry ul { margin: .35rem 0 0; }
li + li { margin-top: .23rem; }
li::marker { color: var(--copper); }
.role { font-size: .9375rem; margin-top: .15rem; }

.career { border-top: 1px solid var(--line); }
.career + .career { margin-top: .85rem; }
.career summary h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .12rem .75rem;
  color: var(--teal);
  font-size: 1.05rem;
  font-weight: 650;
}
.career summary .date { font-weight: 400; }
.career-content { padding: .65rem .65rem .25rem 1.58rem; }
.career-content > ul { margin: 0; }
.career-content > ul li + li { margin-top: .4rem; }
.entry + .entry { margin-top: .87rem; }
.entry-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .15rem .75rem; }

.study-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 2.1rem; }
.skills { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.skills dl { margin: .48rem 0 0; font-size: .9625rem; }
.skills dl div + div { margin-top: .48rem; }
.skills dt { font-weight: 650; }
.skills dd { margin: .06rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
footer { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-block: 1.25rem 2rem; color: var(--muted); font-size: .875rem; }

@media (max-width: 58rem) {
  .shell { width: calc(100% - 3rem); }
  .study-grid { grid-template-columns: 1fr; }
  .skills { padding-left: 0; padding-top: .9rem; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 42rem) {
  .shell { width: calc(100% - 2rem); }
  .site-header { flex-wrap: wrap; min-height: 3rem; gap: 0 .35rem; }
  nav { gap: .55rem; }
  .languages { gap: 0; }
  nav a, .languages a { min-width: 2.75rem; justify-content: center; font-size: .875rem; }
  .hero { padding-block: 1.95rem 1.45rem; }
  h1 { font-size: clamp(2.4rem, 11vw, 3.55rem); margin-bottom: .78rem; }
  .hero-overview { font-size: 1.0625rem; }
  .hero-links { margin-top: .85rem; }
  .page-section { padding-block: 1.35rem 1.85rem; }
  .section-layout { grid-template-columns: 1fr; gap: .82rem; }
  h2 { max-width: none; }
  .source-links { gap: 0 .9rem; margin-top: .05rem; }
  .source-links a { display: inline-flex; min-height: 2.75rem; align-items: center; }
  .employer-profile > p { display: block; }
  .employer-profile > .role { margin-inline-start: 0; padding-inline-start: 0; border-left: 0; }
}
@media (max-width: 26rem) {
  .site-header { column-gap: .2rem; }
  nav { gap: .35rem; }
  .hero-links .email { flex-basis: 100%; }
  .project summary { display: grid; justify-content: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
