@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  color-scheme: light;
  --paper: #f7f8f3;
  --ink: #202a22;
  --muted: #49564b;
  --green: #385544;
  --line: #d4dcd1;
  --tint: #eef1e9;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
}

a {
  color: inherit;
  text-underline-offset: .24em;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

a:hover {
  color: var(--green);
}

h1, h2, h3, p {
  margin: 0;
}

h1, h2, h3 {
  font-weight: 400;
}

h1, h2, .paper h3, .project h3, .entry h2, .record h3 {
  font-family: var(--serif);
  line-height: 1.04;
  letter-spacing: -.015em;
}

:where(h1, h2, h3) a {
  text-decoration: none;
}

:where(h1, h2, h3) a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

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

.skip {
  position: absolute;
  inset: .75rem auto auto 1rem;
  z-index: 1;
  padding: .6rem .85rem;
  background: var(--paper);
  transform: translateY(-180%);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.shell {
  width: min(100% - 6rem, 72rem);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner, .site-footer, .main-nav, .wordmark, .footer-links, .actions {
  display: flex;
  align-items: center;
}

.header-inner {
  min-height: 4.5rem;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark, .main-nav a, .footer-links a {
  text-decoration: none;
}

.wordmark {
  gap: .7rem;
  font-weight: 700;
  white-space: nowrap;
}

.monogram {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: var(--green);
  color: var(--paper);
  border-radius: 2px;
  font-family: var(--serif);
  font-size: 1.01rem;
  font-weight: 400;
  letter-spacing: .025em;
}

.main-nav, .footer-links {
  gap: clamp(1rem, 2.7vw, 2.25rem);
  font-size: .938rem;
  font-weight: 600;
}

.main-nav a, .footer-links a {
  color: var(--muted);
}

.main-nav a:hover, .main-nav a[aria-current], .footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .42em;
}

.hero {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
  padding-block: 3.5rem;
}

.eyebrow {
  color: var(--green);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .055em;
  line-height: 1.4;
}

.eyebrow[lang="zh"] {
  letter-spacing: .12em;
  font-weight: 600;
}

.hero h1 {
  margin: .55rem 0 .9rem;
  font-size: clamp(4.6rem, 9vw, 8rem);
  line-height: .95;
  letter-spacing: -.028em;
}

.hero h1 em {
  color: var(--green);
}

.hero-lead {
  max-width: 28ch;
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.46;
}

.affiliations {
  margin-top: 1rem;
  color: var(--muted);
}

.actions {
  flex-wrap: wrap;
  gap: .85rem 1.5rem;
  margin-top: 1.6rem;
}

.button, .text-link {
  display: inline-block;
  width: fit-content;
  font-size: .938rem;
  font-weight: 700;
}

.button {
  padding: .68rem 1.12rem;
  border: 1px solid var(--green);
  border-radius: 3px;
  background: var(--green);
  color: var(--paper);
  text-decoration: none;
}

.button:hover {
  background: #2a4234;
  color: var(--paper);
}

.button:focus-visible {
  outline-color: var(--green);
}

.text-link {
  color: var(--green);
  text-decoration-thickness: 1px;
}

.text-link:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

.hero-art {
  overflow: hidden;
  aspect-ratio: 1.3;
  border-radius: 3px;
  background: #d3ddd1;
}

.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 56%;
}

.portfolio-section {
  display: grid;
  grid-template-columns: 1fr 2.7fr;
  gap: clamp(1.5rem, 4vw, 3.75rem);
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
}

.section-heading .eyebrow {
  margin-bottom: .38rem;
}

.section-heading h2, .feature h2 {
  font-size: clamp(2.55rem, 4.2vw, 3.7rem);
}

.paper, .entry, .record {
  padding-block: 1.35rem;
}

.paper:first-child, .entry:first-child, .record:first-child {
  padding-top: 0;
}

.paper:last-child, .entry:last-child, .record:last-child {
  padding-bottom: 0;
}

.paper + .paper, .entry + .entry, .record + .record {
  border-top: 1px solid var(--line);
}

.paper h3, .entry h2, .record h3 {
  margin-block: .45rem;
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  line-height: 1.08;
}

.paper > p:not(.eyebrow), .entry > p:not(.eyebrow), .record > p:not(.eyebrow), .project > p:not(.eyebrow), .feature > p:not(.eyebrow) {
  max-width: 66ch;
  color: var(--muted);
}

.paper .paper-authors {
  max-width: 74ch;
  margin-block: .55rem .6rem;
  font-size: .875rem;
  line-height: 1.5;
}

.paper .text-link, .entry .text-link, .project .text-link, .feature .text-link {
  margin-top: .75rem;
}

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

.project {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .48rem;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.project h3 {
  font-size: 2.7rem;
}

.project .text-link {
  margin-top: auto;
  padding-top: .45rem;
}

.feature-grid {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
}

.feature {
  padding: 1.75rem 2rem;
  border-radius: 3px;
  background: var(--tint);
}

.feature h2 {
  margin-block: .35rem .5rem;
}

.feature-blog {
  --ink: #f7f8f3;
  --muted: #e5ede0;
  background: var(--green);
  color: var(--ink);
}

.feature-blog .eyebrow, .feature-blog .text-link {
  color: var(--ink);
}

.site-footer {
  justify-content: space-between;
  gap: .7rem 1rem;
  padding-block: 1.35rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}

.interior, .reading-page {
  padding-block: 3.75rem;
}

.interior {
  min-height: calc(100vh - 9rem);
}

.page-intro {
  margin-bottom: 2rem;
}

.page-intro h1 {
  margin-block: .45rem .65rem;
  font-size: clamp(3.5rem, 7vw, 6rem);
}

.page-intro .hero-lead {
  max-width: 38ch;
}

.entry-list {
  max-width: 50rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.reading-page {
  max-width: 49rem;
}

.reading-page h1 {
  font-size: clamp(3rem, 6vw, 4.75rem);
}

.article-body {
  max-width: 62ch;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  font-size: 1.07rem;
}

.article-body p + p {
  margin-top: 1.1rem;
}

.article-body h2 {
  margin-block: 1.4rem .35rem;
  font-size: 2.1rem;
}

.record .record-role {
  margin-bottom: .25rem;
  font-weight: 700;
}

@media (max-width: 54rem) {
  .shell {
    width: calc(100% - 3.5rem);
  }

  .hero {
    gap: 1.75rem;
  }

  .hero h1 {
    font-size: clamp(4.15rem, 10vw, 6rem);
  }

  .hero-art {
    aspect-ratio: 1;
  }

  .portfolio-section {
    grid-template-columns: 1fr 2.45fr;
    gap: 1.5rem;
  }
}

@media (max-width: 42rem) {
  .shell {
    width: calc(100% - 2.5rem);
  }

  .header-inner {
    min-height: 4rem;
  }

  .main-nav {
    gap: .9rem;
    font-size: .875rem;
  }

  .hero, .portfolio-section {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 1.6rem;
    padding-block: 2rem;
  }

  .hero-art {
    aspect-ratio: 1.55;
  }

  .portfolio-section, .feature-grid {
    padding-block: 1.75rem;
  }

  .feature {
    padding: 1.25rem;
  }

  .wide-only {
    display: none;
  }

  .interior, .reading-page {
    padding-block: 2.5rem;
  }
}

@media (max-width: 28rem) {
  .shell {
    width: calc(100% - 2rem);
  }

  .header-inner {
    flex-wrap: wrap;
    align-content: center;
    gap: .55rem 1rem;
    padding-block: .75rem;
  }

  .main-nav {
    flex-wrap: wrap;
  }

  .project-grid, .feature-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-wrap: wrap;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }

  .site-header, .site-footer, .skip {
    display: none;
  }

  .shell {
    width: 100%;
  }

  .cv, .cv .portfolio-section {
    padding-block: .75rem;
  }

  .cv .portfolio-section {
    display: block;
  }

  .cv .section-heading {
    margin-bottom: .7rem;
  }

  .cv h1 {
    font-size: 2.8rem;
  }

  .cv h2 {
    font-size: 1.8rem;
  }

  .cv h3 {
    font-size: 1.45rem;
  }

  .cv .record {
    break-inside: avoid;
    padding-block: .45rem;
  }
}
