/* An original, dependency-free layout for Jingwu Tang. */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #17191b;
  --body: #373b40;
  --muted: #5e636a;
  --accent: #3d5269;
  --line: #e2e5e8;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--paper); color: var(--body); font: 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: #e6edf4; color: var(--ink); }
a { color: inherit; text-decoration-color: #adb8c4; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 1px; }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 400; }
.site-shell { width: min(1080px, calc(100% - 112px)); margin-inline: auto; }
.skip-link { position: absolute; left: 24px; top: -80px; z-index: 5; padding: 8px 16px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 16px; color: var(--paper); }
.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); font-size: 17px; font-weight: 550; letter-spacing: -.55px; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav [aria-current] { text-decoration: underline; }

.intro { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 132px; column-gap: 48px; padding-block: 32px 28px; }
h1 { font-family: var(--serif); font-size: clamp(46px, 5vw, 58px); line-height: 1.09; letter-spacing: -2px; }
.chinese-name { display: inline-block; margin-left: 21px; vertical-align: middle; color: var(--muted); font: 20px/1.5 "Songti SC", "Noto Serif CJK SC", "SimSun", serif; letter-spacing: .1em; white-space: nowrap; }
.portrait { grid-column: 2; grid-row: 1 / 3; align-self: start; width: 132px; height: 154px; margin-top: 6px; overflow: hidden; border-radius: 2px; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transform: scale(1.8); transform-origin: 46% 38%; }
.intro-text { grid-column: 1 / -1; grid-row: 2; margin-top: 16px; }
.intro-lede, .research-interests { color: var(--ink); font-size: 20px; line-height: 1.5; letter-spacing: -.2px; }
.intro-lede { padding-right: 180px; }
.research-interests { margin-top: 12px; }
.contact-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 27px; margin-top: 16px; font-size: 15px; }
.contact-links a { text-decoration: none; }
.contact-links a:hover { text-decoration: underline; }

.section-grid { padding-block: 24px 28px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
h2 { font: 30px/1.25 var(--serif); letter-spacing: -.9px; }
.section-heading { margin-bottom: 4px; }
.section-note { margin-top: 18px; color: var(--muted); font-size: 14px; }
.publication-list { list-style: none; }
.publication { padding-block: 12px; border-bottom: 1px solid var(--line); }
.publication:last-child { padding-bottom: 0; border-bottom: 0; }
.publication-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: baseline; }
.publication h3 { font: 22px/1.3 var(--serif); letter-spacing: -.25px; }
.publication h3 a { text-decoration: none; }
.publication h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.publication-venue { color: var(--accent); font: 14px/1.5 var(--sans); text-align: right; white-space: nowrap; }
.publication-venue span { color: var(--muted); }
.publication-authors { max-width: 960px; margin-top: 5px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.publication-authors strong { color: var(--body); font-weight: 600; }
.publication-note { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.5; font-style: italic; }
.service-list { margin-top: 18px; font-size: 16px; line-height: 1.6; }
.service-list dt { margin-top: 12px; color: var(--ink); }
.service-list dt:first-child { margin-top: 0; }
.service-list dd { color: var(--muted); }
.item-date { display: block; margin-bottom: 4px; color: var(--muted); font: 12px/1.6 var(--mono); }
.aside-section .section-content > p { max-width: 760px; margin-top: 16px; font-size: 16px; }
.archive-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.archive-gallery a { display: block; background: #f5f6f7; }
.archive-gallery img { width: 100%; height: 238px; object-fit: contain; padding: 14px; }
.archive-gallery a:hover img { opacity: .9; }
.archive-gallery figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.aside-section .section-content > .erdos-note { margin-top: 26px; color: var(--muted); font-size: 14px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 27px 35px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer p span { margin-left: 10px; font-size: 12px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.cv-page { max-width: 850px; margin-inline: auto; padding-block: 73px 65px; }
.cv-page h1 { margin-bottom: 24px; font-size: 64px; }
.cv-intro { max-width: 580px; margin-bottom: 29px; }
.download-link { display: inline-flex; align-items: center; gap: 26px; padding: 12px 18px; border: 1px solid var(--accent); color: var(--accent); font-size: 14px; text-decoration: none; }
.download-link:hover { background: #f1f5f9; }
.cv-section { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 28px; margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.cv-section h2 { font-size: 23px; }
.cv-entry + .cv-entry { margin-top: 24px; }
.cv-entry h3 { font-size: 17px; font-weight: 550; }
.cv-entry p { margin-top: 4px; font-size: 15px; }
.cv-entry .item-date { font-size: 12px; }

.blog-page { max-width: 850px; margin-inline: auto; padding-block: 73px 65px; }
.blog-page > h1 { margin-bottom: 40px; font-size: 64px; }
.blog-empty { margin-top: 24px; font-size: 18px; }
.blog-list { list-style: none; }
.blog-list-item { padding-block: 28px; border-top: 1px solid var(--line); }
.blog-list-item h2 { font-size: 30px; line-height: 1.3; letter-spacing: -.5px; }
.blog-list-item h2 a { text-decoration: none; }
.blog-list-item h2 a:hover { text-decoration: underline; }
.blog-list-item time { display: block; margin-top: 11px; color: var(--muted); font-size: 14px; }
.blog-list-item p { margin-top: 14px; font-size: 17px; line-height: 1.8; }

.post-page { --reading-serif: "Iowan Old Style", Georgia, "Songti SC", "Noto Serif CJK SC", "SimSun", serif; max-width: 720px; margin-inline: auto; padding-block: 55px 72px; }
.post-back { display: inline-block; margin-bottom: 35px; color: var(--muted); font-size: 14px; }
.post-header h1 { font-family: var(--reading-serif); font-size: clamp(36px, 4.5vw, 48px); line-height: 1.16; letter-spacing: -1px; overflow-wrap: anywhere; }
.post-subtitle { margin-top: 17px; font-family: var(--reading-serif); font-size: 20px; line-height: 1.5; }
.post-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 15px 24px; margin-top: 27px; color: var(--muted); font-size: 14px; }
.post-meta-details { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; }
.post-views { white-space: nowrap; font-variant-numeric: tabular-nums; }
.language-switch { display: flex; gap: 18px; }
.language-switch [aria-current] { color: var(--ink); }
.post-translation-note { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.post-body { margin-top: 30px; font-family: var(--reading-serif); font-size: 18px; line-height: 1.65; overflow-wrap: anywhere; }
.post-body > :first-child { margin-top: 0; }
.post-body .post-note { color: var(--muted); font-family: var(--sans); font-size: 14px; line-height: 1.6; }
.post-body p, .post-body ul, .post-body ol, .post-body blockquote, .post-body pre, .post-body table, .post-body figure { margin-block: .8em; }
.post-body h2 { margin-top: 40px; margin-bottom: 16px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--reading-serif); font-size: 30px; font-weight: 550; line-height: 1.3; letter-spacing: -.3px; }
.post-body h3 { margin-top: 26px; margin-bottom: 11px; font: 600 22px/1.4 var(--reading-serif); letter-spacing: 0; }
.post-body h2 + h3 { margin-top: 22px; }
.post-body .post-caveat { margin-block: 16px 24px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.post-body .post-appendix { margin-top: 48px; padding: 24px 28px; border: 1px solid var(--line); background: #f7f8f9; font-size: 16px; line-height: 1.65; scroll-margin-top: 24px; }
.post-body .post-appendix h2 { margin: 0 0 16px; padding: 0; border: 0; font: 600 20px/1.4 var(--sans); letter-spacing: 0; }
.post-body .post-appendix > :last-child { margin-bottom: 0; }
.post-body h4 { margin-top: 1.4em; margin-bottom: .5em; font-size: 19px; }
.post-body ul, .post-body ol { padding-left: 1.5em; }
.post-body li + li { margin-top: .4em; }
.post-body li > p { margin-block: .65em; }
.post-body blockquote { margin-inline: 0; padding-left: 22px; border-left: 2px solid var(--line); }
.post-body blockquote > :first-child { margin-top: 0; }
.post-body blockquote > :last-child { margin-bottom: 0; }
.post-body code { padding: 2px 5px; background: #f5f6f7; font: .85em/1.6 var(--mono); }
.post-body pre { max-width: 100%; padding: 19px 22px; overflow-x: auto; background: #f5f6f7; font: 14px/1.8 var(--mono); }
.post-body pre code { padding: 0; background: transparent; font: inherit; overflow-wrap: normal; }
.post-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 16px; }
.post-body th, .post-body td { padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.post-body th { font-weight: 600; }
.post-body figure img { margin-inline: auto; }
.post-body figcaption { margin-top: 11px; color: var(--muted); font-size: 14px; }
.post-body .post-screenshot { margin-block: 26px; }
.post-screenshot > a { display: block; }
.post-screenshot img { width: 100%; border: 1px solid var(--line); }
.post-body .post-screenshot figcaption { margin-top: 12px; color: var(--body); font-size: 16px; line-height: 1.65; }
.post-body hr { margin-block: 35px; border: 0; border-top: 1px solid var(--line); }
.post-body .footnotes { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }

@media (min-width: 1440px) {
  .site-shell { width: 1120px; }
}
@media (max-width: 1000px) {
  .site-shell { width: calc(100% - 72px); }
  .intro { column-gap: 36px; grid-template-columns: minmax(0, 1fr) 132px; }
  h1 { font-size: 58px; }
  .chinese-name { display: block; margin: 15px 0 0; font-size: 18px; }
  .portrait { width: 132px; height: 154px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 20px; }
  .site-shell { width: calc(100% - 44px); }
  .site-header { min-height: 72px; gap: 16px; }
  .wordmark { font-size: 15px; }
  .site-nav { gap: 18px; font-size: 13px; }
  .intro { grid-template-columns: minmax(0, 1fr) 92px; gap: 0 20px; padding-block: 32px 30px; }
  h1 { font-size: clamp(40px, 7.5vw, 56px); letter-spacing: -1.8px; }
  .chinese-name { margin-top: 9px; font-size: 16px; }
  .portrait { grid-row: 1; align-self: center; width: 92px; height: 111px; }
  .intro-text { grid-column: 1 / -1; margin-top: 22px; }
  .intro-lede, .research-interests { font-size: 18px; line-height: 1.6; }
  .intro-lede { padding-right: 0; }
  .research-interests { margin-top: 16px; }
  .contact-links { gap: 10px 23px; margin-top: 18px; font-size: 14px; }
  .section-grid { display: block; padding-block: 26px 30px; }
  h2 { font-size: 29px; letter-spacing: -.65px; }
  .section-heading { margin-bottom: 1px; }
  .section-note { margin-top: 18px; font-size: 14px; }
  .publication { padding-block: 16px; }
  .publication-heading { display: block; }
  .publication h3 { font-size: 22px; }
  .publication-venue { margin-top: 4px; font-size: 14px; text-align: left; }
  .publication-authors { margin-top: 6px; font-size: 16px; }
  .publication-note { font-size: 14px; }
  .aside-section .section-content > p { margin-top: 17px; font-size: 16px; }
  .archive-gallery { gap: 13px; margin-top: 22px; }
  .archive-gallery img { height: 170px; padding: 8px; }
  .archive-gallery figcaption { font-size: 14px; }
  .site-footer { padding-block: 24px; font-size: 12px; }
  .cv-page { padding-block: 45px; }
  .cv-page h1 { font-size: 46px; }
  .cv-section { grid-template-columns: 105px minmax(0, 1fr); gap: 22px; }
  .cv-section h2 { font-size: 20px; }
  .blog-page { padding-block: 45px; }
  .blog-page > h1 { margin-bottom: 30px; font-size: 46px; }
  .blog-list-item { padding-block: 23px; }
  .blog-list-item h2 { font-size: 26px; }
  .blog-list-item p { font-size: 16px; }
  .post-page { padding-block: 35px 45px; }
  .post-back { margin-bottom: 28px; }
  .post-header h1 { font-size: 34px; letter-spacing: -.6px; }
  .post-subtitle { margin-top: 15px; font-size: 18px; }
  .post-body { margin-top: 26px; font-size: 17px; }
  .post-body h2 { margin-top: 32px; padding-top: 20px; font-size: 26px; }
  .post-body h3 { font-size: 20px; }
  .post-body .post-appendix { margin-top: 36px; padding: 20px; }
  .post-body pre { padding: 16px; font-size: 13px; }
}
@media (max-width: 380px) {
  .site-shell { width: calc(100% - 36px); }
  .site-nav { gap: 13px; }
  .intro { grid-template-columns: minmax(0, 1fr) 78px; gap: 0 12px; }
  h1 { font-size: 38px; }
  .portrait { width: 78px; height: 98px; }
  .cv-section { display: block; }
  .cv-section h2 { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  body { background: #fff; font-size: 11px; }
  .site-shell { width: 100%; }
  .site-nav, .contact-links, .site-footer, .skip-link, .download-link { display: none; }
  .site-header { min-height: 45px; }
  .intro { padding-block: 30px; }
  .section-grid { padding-block: 22px; }
  .publication, .cv-entry { break-inside: avoid; }
  .archive-gallery img { height: 160px; }
  .post-page { max-width: 100%; padding-block: 25px; }
  .post-back, .language-switch { display: none; }
  .post-body { font-size: 12px; }
}
