/* The same reading column runs from the introduction through the writing index. */
.profile-page main,
.lab-page main {
  width: min(calc(100% - 2 * var(--gutter)), 68rem);
  margin-inline: auto;
}
.profile-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(9rem, 17vw, 13.25rem);
  grid-template-areas: "heading photo" "bio photo";
  align-items: start;
  gap: 1.4rem clamp(2rem, 8vw, 7.5rem);
  padding-block: clamp(3rem, 5.6vw, 5.25rem) clamp(3rem, 5vw, 4.5rem);
}
.profile-heading { grid-area: heading; }
.profile-role {
  color: var(--muted);
  font: 500 .875rem/1.6 var(--sans);
  letter-spacing: .025em;
}
.profile-page .profile-heading h1 {
  margin-top: .55rem;
  font: 500 clamp(4.25rem, 7.5vw, 7.1rem)/1.04 var(--sans);
  letter-spacing: -.065em;
  text-wrap: wrap;
}
.profile-page .profile-heading h1 em {
  font: italic 400 1.06em/.95 'Instrument Serif', Georgia, serif;
  letter-spacing: -.045em;
  color: var(--accent);
}
.profile-portrait {
  grid-area: photo;
  justify-self: end;
  align-self: center;
  display: block;
  width: 100%;
  height: auto;
  border-radius: .25rem;
  border: 1px solid var(--line);
}
.profile-bio { grid-area: bio; max-width: 41rem; }
.profile-bio p { font-size: 1rem; line-height: 1.7; color: var(--muted); }
.profile-bio .profile-lead {
  font-size: clamp(1.3rem, 1.85vw, 1.65rem);
  line-height: 1.42;
  letter-spacing: -.025em;
  color: var(--ink);
  margin-bottom: .8rem;
  text-wrap: pretty;
}
.profile-page .text-link,
.lab-page .text-link { min-height: 44px; font-weight: 500; font-size: .9375rem; }
.profile-bio .text-link { margin-top: .6rem; }
.home-ledger {
  display: grid;
  grid-template-columns: minmax(10rem, .7fr) minmax(0, 1.65fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  padding-block: 2.45rem;
  border-top: 1px solid var(--line);
}
.profile-page .home-ledger h2,
.profile-page .home-section-heading h2,
.profile-page .contact-main h2 {
  margin: 0;
  font: 500 clamp(1.7rem, 3vw, 2.55rem)/1.16 var(--sans);
  letter-spacing: -.045em;
}
.ledger-heading button {
  cursor: pointer;
  color: var(--muted);
  background: none;
  padding: 0;
  min-height: 44px;
  font: 400 .85rem/1.5 var(--sans);
}
.ledger-heading button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.ledger-heading button span { margin-inline-start: .25rem; }
.career-list details + details { border-top: 1px solid var(--line); }
.career-list summary, .academic-entry {
  display: grid;
  grid-template-columns: minmax(7rem, .55fr) minmax(0, 1.8fr) 1.6rem;
  align-items: baseline;
  column-gap: clamp(.65rem, 2vw, 1.4rem);
}
.career-list summary { list-style: none; padding: 1.25rem 0; min-height: 48px; cursor: pointer; }
.career-list summary::-webkit-details-marker { display: none; }
.career-list details:first-child summary { padding-top: .2rem; }
.career-list details:last-child:not([open]) summary { padding-bottom: 0; }
.career-date { font: 400 .8rem/1.65 var(--mono); color: var(--muted); }
.career-list h3, .academic-entry h3 {
  font: 500 clamp(1.2rem, 2vw, 1.48rem)/1.35 var(--sans);
  letter-spacing: -.025em;
}
.career-list summary p, .academic-entry p { margin-top: .24rem; color: var(--muted); font-size: .94rem; line-height: 1.6; }
.career-toggle {
  justify-self: end;
  color: var(--accent);
  font: 400 1.4rem/1 var(--sans);
}
.career-toggle::before { content: "+"; }
.career-list details[open] .career-toggle::before { content: "−"; }
.career-list summary:hover h3 { color: var(--accent); }
.career-detail { max-width: 65ch; padding-bottom: 1.45rem; font-size: .985rem; line-height: 1.7; }
.career-detail p { margin: 0 0 .6rem; }
.career-detail ul { padding-left: 1.15rem; margin: 0; }
.career-detail li { margin: .32rem 0; }
.career-detail li::marker { color: var(--accent); }
.academic-entry { grid-template-columns: minmax(7rem, .55fr) minmax(0, 1.8fr) 1.6rem; }
.academic-entry p.minors { margin-top: .45rem; }
.profile-page .work, .profile-page .notebook { padding: 0 0 3.2rem; }
.home-section-heading {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 2rem 1.4rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 901px) {
  .profile-page .work-row { grid-template-columns: minmax(0, 1fr) 1.5rem; }
}
@media (max-width: 900px) {
  .profile-page .work-index.has-tabs .work-row {
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .55rem .25rem;
    text-align: center;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .profile-page .work-index.has-tabs .work-row strong { font-size: .875rem; color: var(--ink); }
}
.profile-page .work-panels .project-art { max-height: 19rem; margin-bottom: 1.25rem; }
.profile-page .contact { background: transparent; margin: 0; padding: 2rem 0; border-block: 1px solid var(--line); }
.profile-page .contact-main { display: block; padding: 0; margin: 0; }
.profile-page .contact-bottom { margin-top: 1rem; padding-top: 0; border: none; }
.profile-page .notebook-number { color: var(--muted); }
.lab-intro { padding-block: clamp(2rem, 5vw, 4rem) 1.75rem; max-width: 46rem; }
.lab-intro h1 { font: 500 clamp(2.35rem, 5vw, 4.5rem)/1.1 var(--sans); letter-spacing: -.055em; margin-block: .5rem .75rem; }
.lab-intro > p:last-child { font-size: 1.06rem; line-height: 1.7; }
.lab-page .lab-viewer { margin: 0; padding: 0; }
.lab-page .lab-viewer .work-demo { padding: 0; border: 0; margin: 0; }
.lab-page .lab-viewer .demo-frame { margin: 0; }
.lab-sources { display: flex; flex-wrap: wrap; gap: .4rem 2rem; padding: .75rem 0 1.5rem; }
html[lang=zh-CN] .profile-bio .profile-lead { line-height: 1.6; }
html[lang=zh-CN] .career-detail { line-height: 1.85; }
@media (max-width: 820px) {
  .home-ledger { grid-template-columns: 1fr; gap: 1.15rem; padding-block: 1.8rem; }
  .ledger-heading { display: flex; align-items: center; justify-content: space-between; column-gap: 1rem; }
}
@media (max-width: 680px) {
  .profile-intro {
    grid-template-areas: "heading photo" "bio bio";
    grid-template-columns: minmax(0, 1fr) clamp(4.7rem, 20vw, 7rem);
    gap: 1.15rem 1rem;
    padding-block: 2.25rem 1.9rem;
  }
  .profile-page .profile-heading h1 { font-size: clamp(2.65rem, 8.8vw, 3.8rem); margin-top: .4rem; }
  .profile-role { font-size: .81rem; }
  .profile-portrait { align-self: start; }
  .profile-bio .profile-lead { font-size: 1.26rem; }
  .home-section-heading { padding-block: 1.65rem 1rem; flex-wrap: wrap; gap: .25rem 1rem; }
  .profile-page .work, .profile-page .notebook { padding-bottom: 2rem; }
  .career-list summary { padding-block: 1rem; }
  .career-list summary, .academic-entry { grid-template-columns: 1fr 1.5rem; row-gap: .2rem; }
  .career-list summary .career-date, .academic-entry .career-date { grid-column: 1; grid-row: 1; }
  .career-list summary > div, .academic-entry > div { grid-column: 1; grid-row: 2; }
  .career-toggle { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .career-list summary p, .academic-entry p { font-size: .93rem; }
  .profile-page .work-index { top: auto; }
}
