/* Peng JI — a quiet, text-first research homepage. No remote assets. */
:root {
  color-scheme: light;
  --paper: #faf9f6;
  --paper-warm: #f1f0eb;
  --ink: #152e46;
  --body: #364b5b;
  --muted: #64727a;
  --line: #d8ddd9;
  --accent: #174e74;
  --accent-wash: #e9eff1;
  --serif: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --page-width: 1100px;
  --header-height: 73px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #cadce7;
  color: var(--ink);
}

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

a:hover {
  text-decoration: underline;
}

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

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

p,
li,
a {
  overflow-wrap: break-word;
}

.container {
  width: min(var(--page-width), calc(100% - 96px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 16px;
  padding: 10px 16px;
  transform: translateY(-200%);
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(250, 249, 246, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.wordmark-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  flex: 1;
  gap: 26px;
  font-size: 13px;
}

.site-nav a,
.language-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--body);
  text-decoration: none;
}

.site-nav a:hover,
.language-switch:hover {
  color: var(--accent);
  text-decoration: underline;
}

.language-switch {
  flex-shrink: 0;
  padding-left: 25px;
  border-left: 1px solid var(--line);
  font-size: 13px;
}

.hero {
  padding-top: 42px;
  padding-bottom: 28px;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow,
.section-index,
.research-number,
.project-number {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.09em;
  line-height: 1.5;
  text-transform: uppercase;
}

.availability-marker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--body);
  font-size: 12px;
  line-height: 1.5;
}

.availability-marker::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: #407260;
  border-radius: 50%;
}

.hero-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 23px;
  font-size: clamp(50px, 5.2vw, 68px);
  font-weight: 550;
  letter-spacing: -0.065em;
  line-height: 1.08;
}

.name-zh {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.hero-headline {
  max-width: 850px;
  margin-top: 18px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(27px, 2.6vw, 36px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.28;
  text-wrap: balance;
}

.hero-intro {
  max-width: 800px;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.75;
}

.hero-availability {
  max-width: 720px;
  margin-top: 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

.hero-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 20px;
  font-size: 13px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 19px;
  text-decoration: none;
}

.button-primary {
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 3px;
  color: #fff;
}

.button-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.research-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
  padding-block: 9px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.research-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
}

.page-section,
.contact-section {
  padding-top: 58px;
}

.research-links + .page-section {
  padding-top: 36px;
}

.section-heading {
  display: grid;
  grid-template-columns: 34px auto 1fr;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.section-index {
  color: var(--accent);
}

.section-note {
  justify-self: end;
  max-width: 380px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}

.project-card {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
}

.project-featured {
  grid-column: 1 / -1;
  padding-bottom: 36px;
}

.project-topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  margin-bottom: 12px;
}

.project-card h3 {
  margin-bottom: 10px;
  font-size: 23px;
  font-weight: 550;
  letter-spacing: -0.035em;
}

.project-subtitle {
  max-width: 850px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

.project-description,
.project-contribution,
.project-result {
  font-size: 14px;
  line-height: 1.75;
}

.project-featured > .project-description {
  max-width: 880px;
  font-size: 15px;
}

.project-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
  width: 100%;
  margin-top: 16px;
}

.project-details > :only-child {
  grid-column: 1 / -1;
  max-width: 880px;
}

.project-details .project-contribution {
  margin-top: 0;
}

.project-figure {
  width: 100%;
  margin-block: 20px 0;
}

.project-figure > a {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
}

.project-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.project-figure figcaption {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 18px;
  padding-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.project-figure figcaption a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.figure-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 18px;
}

.project-contribution {
  margin-top: 11px;
}

.project-contribution strong,
.project-result strong {
  color: var(--ink);
  font-weight: 600;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 16px;
  margin-bottom: 8px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 3px 8px;
  background: var(--paper-warm);
  color: #52616b;
  font-size: 12px;
  line-height: 1.5;
}

.project-links,
.publication-links,
.contribution-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 21px;
  font-size: 13px;
  line-height: 1.7;
}

.project-links {
  margin-top: auto;
}

.project-links a,
.publication-links a,
.contribution-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}

.project-links a {
  min-height: 44px;
}

.project-links a:hover,
.publication-links a:hover,
.contribution-links a:hover {
  text-decoration: underline;
}

.project-links a::after {
  content: " ↗";
  font-size: 11px;
}

.project-note,
.credit-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.publication-list {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.publication {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}

.publication-meta {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
  padding-top: 3px;
}

.publication-year {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.author-role {
  display: inline-block;
  padding: 3px 7px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.publication-body {
  min-width: 0;
}

.publication h3 {
  max-width: 880px;
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.publication h3 a {
  color: var(--ink);
  text-decoration: none;
}

.publication h3 a:hover {
  text-decoration: underline;
}

.authors {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.authors strong {
  color: var(--ink);
  font-weight: 600;
}

.venue {
  margin-top: 3px;
  color: var(--body);
  font-size: 13.5px;
  font-style: italic;
}

.publication-links {
  margin-top: 6px;
}

.contribution-list {
  border-top: 1px solid var(--line);
}

.contribution {
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

.contribution-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 9px;
}

.contribution-heading h3 {
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.contribution-heading h3 a {
  color: var(--ink);
  text-decoration: none;
}

.contribution-heading h3 a:hover {
  text-decoration: underline;
}

.contribution-area {
  color: var(--muted);
  font-size: 12px;
}

.contribution > p:not(.credit-note) {
  max-width: 870px;
  font-size: 14px;
  line-height: 1.8;
}

.contribution-links {
  margin-top: 12px;
}

.education-list {
  border-top: 1px solid var(--line);
}

.education-entry {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 25px;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}

.education-period {
  padding-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.education-entry h3 {
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.institution {
  margin-top: 5px;
  font-size: 14px;
}

.education-detail {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.contact-section {
  padding-bottom: 54px;
}

.contact-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 35px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.contact-intro {
  max-width: 610px;
  margin-bottom: 16px;
  font-size: 15px;
}

.contact-email {
  color: var(--ink);
  font-size: clamp(21px, 3vw, 32px);
  font-weight: 450;
  letter-spacing: -0.035em;
  text-decoration-color: #a4b5bd;
  text-underline-offset: 7px;
  overflow-wrap: anywhere;
}

.contact-links {
  display: flex;
  flex-shrink: 0;
  gap: 23px;
  padding-bottom: 5px;
  font-size: 13px;
}

.contact-links a,
.footer-inner a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 23px;
  color: var(--muted);
  font-size: 11px;
}

.footer-inner a {
  color: var(--muted);
  text-decoration: none;
}

:lang(zh-CN) .hero-headline {
  max-width: 860px;
  font-size: clamp(26px, 2.4vw, 34px);
  letter-spacing: 0.005em;
  line-height: 1.5;
}

:lang(zh-CN) .hero-intro {
  line-height: 1.85;
}

:lang(zh-CN) .section-heading h2,
:lang(zh-CN) .project-card h3 {
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .container {
    width: calc(100% - 64px);
  }

  .header-inner {
    gap: 22px;
  }

  .site-nav {
    gap: 18px;
  }

  .section-heading {
    grid-template-columns: 29px minmax(0, 1fr);
    gap: 9px;
  }

  .section-note {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }

  .project-grid {
    column-gap: 32px;
  }

  .contact-body {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 89px;
  }

  body {
    font-size: 15px;
  }

  .container {
    width: calc(100% - 40px);
  }

  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 20px;
    min-height: 88px;
  }

  .wordmark {
    gap: 8px;
    font-size: 14px;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0 22px;
    font-size: 13px;
  }

  .language-switch {
    grid-column: 2;
    grid-row: 1;
    padding-left: 14px;
    font-size: 13px;
  }

  .hero {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .hero-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
  }

  .eyebrow {
    font-size: 10px;
  }

  .availability-marker {
    font-size: 11px;
  }

  .hero-name {
    gap: 12px;
    font-size: clamp(46px, 11vw, 62px);
  }

  .name-zh {
    font-size: 19px;
  }

  .hero-headline {
    margin-top: 15px;
    font-size: clamp(25px, 5.5vw, 32px);
    line-height: 1.28;
  }

  .hero-intro {
    margin-top: 15px;
    font-size: 15px;
    line-height: 1.7;
  }

  .hero-availability {
    font-size: 13px;
  }

  .hero-links {
    gap: 4px 18px;
    margin-top: 16px;
    font-size: 12px;
  }

  .research-links {
    gap: 0 22px;
    padding-block: 6px;
  }

  .research-link {
    gap: 7px;
    font-size: 12px;
  }

  .page-section,
  .contact-section {
    padding-top: 44px;
  }

  .research-links + .page-section {
    padding-top: 22px;
  }

  .research-links + .page-section .section-note {
    display: none;
  }

  .section-heading {
    margin-bottom: 20px;
  }

  .section-heading h2 {
    font-size: 25px;
  }

  .project-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .project-card {
    padding-block: 22px 28px;
  }

  .project-card:last-child {
    padding-bottom: 0;
  }

  .project-card h3 {
    font-size: 22px;
  }

  .project-subtitle {
    font-size: 15px;
  }

  .project-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 12px;
  }

  .project-figure {
    margin-top: 16px;
  }

  .project-figure figcaption {
    gap: 0 16px;
    font-size: 12px;
  }

  .publication {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding-block: 22px;
  }

  .publication-meta {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 11px;
    padding-top: 0;
  }

  .publication h3 {
    font-size: 17px;
  }

  .contribution-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .contribution-area {
    font-size: 11px;
  }

  .education-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-block: 21px;
  }

  .contact-section {
    padding-bottom: 40px;
  }

  .contact-body {
    padding-top: 23px;
  }

  .contact-intro {
    font-size: 14px;
  }

  .contact-links {
    flex-wrap: wrap;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding-block: 20px;
    font-size: 10px;
  }

  :lang(zh-CN) .hero-headline {
    font-size: clamp(24px, 5.2vw, 30px);
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  body {
    background: #fff;
    color: #222;
    font-size: 10pt;
  }

  .container {
    width: 100%;
    max-width: none;
  }

  .site-header,
  .skip-link,
  .hero-links,
  .research-links,
  .site-footer {
    display: none;
  }

  .hero {
    padding-block: 0 22px;
  }

  .hero-name {
    font-size: 42pt;
  }

  .hero-headline {
    font-size: 22pt;
  }

  .hero-intro {
    font-size: 11pt;
  }

  .page-section,
  .contact-section {
    padding-top: 25px;
  }

  .project-card,
  .publication,
  .contribution,
  .education-entry {
    break-inside: avoid;
  }

  a {
    color: inherit;
  }
}
