/* Adapted from Jon Barron’s academic homepage. See the template credit in the footer. */
/* Lato — latin italic 400 */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/lato/v25/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Lato — latin normal 400 */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/lato/v25/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Lato — latin normal 700 */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/lato/v25/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:focus,
a:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

h2 {
  margin: 0;
  font-weight: 400;
  font-size: 22px;
}

.page {
  width: 100%;
  max-width: 816px;
  margin: 0 auto;
  padding: 8px;
}

.bio {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr);
  gap: clamp(18px, 3vw, 30px);
  padding: 32px 2.5% 38px;
}

.bio-photo {
  position: relative;
}

.bio-photo > a {
  position: absolute;
  inset: 11% 0 7%;
  display: block;
}

.bio-photo > a img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 25% center;
}

.name {
  padding-top: 20px;
  margin: 0;
  font-weight: 400;
  font-size: 32px;
  text-align: center;
}

.bio-links {
  margin-bottom: 0;
  text-align: center;
  color: var(--text-muted);
}

.section-header {
  padding: 12px;
}


:root {
  --bg: white;
  --text: #111;
  --text-muted: #565656;
  --accent: #1772d0;
  --accent-hover: #a35600;
  --font-sans: Lato, Verdana, Helvetica, sans-serif;
  --rule: #bbb;
}
body { line-height: 1.35; }
img, video { display: block; max-width: 100%; height: auto; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; top: 0; left: 1rem; transform: translateY(-140%); background: white; }
.skip-link:focus { transform: none; }
.bio-links a { white-space: nowrap; }
.bio .name { padding-top: 0; }
@font-face {
  font-family: "Yuelong Portrait Serif";
  src: url("../fonts/name-zh.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+5F20, U+8DC3, U+9F99;
}
.name-zh, .site-nav [lang="zh-Hans"] {
  color: #000;
  font-family: "Yuelong Portrait Serif", "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC", SimSun, serif;
  font-weight: 600;
  letter-spacing: .06em;
}
.name-zh {
  display: inline-block;
  margin-inline-start: .22em;
  font-size: .79em;
}
.site-nav [lang="zh-Hans"] { margin-inline-start: .25em; }
.site-nav, .site-footer { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 18px 10px; }
.site-nav a:first-child { margin-right: auto; }
.site-nav [aria-current] { text-decoration: underline; }
.site-footer { justify-content: space-between; border-top: 1px solid var(--rule); font-size: 13px; color: var(--text-muted); }
.site-footer nav { word-spacing: 2px; }
.listing, .project-section { border-top: 1px solid var(--rule); padding: 16px 10px; }
.listing > h1, .project-title-block h1 { font-size: 32px; font-weight: 400; margin: 0 0 12px; }
.paper { margin-top: 14px; line-height: 1.5; }
.paper h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.paper p { margin: 4px 0 0; font-size: 16px; }
.paper sup { font-size: inherit; font-weight: 700; line-height: 1; vertical-align: .22em; }
.paper-corresponding, .paper-note { white-space: nowrap; }
.paper-venue { color: var(--text-muted); }
/* Project previews share a narrow image column so the text stays prominent. */
.project-row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  font-size: 16px;
}
.project-row + .project-row { border-top: 1px solid #e2e6e9; }
.project-thumb { position: relative; }
.project-thumb a { display: block; }
.project-thumb img, .project-thumb video {
  display: block;
  height: auto;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 5px;
}
.preview-toggle {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #ffffffad;
  border-radius: 50%;
  background: #142530ce;
  color: white;
  cursor: pointer;
}
.preview-toggle[hidden] { display: none; }
.preview-toggle::before {
  content: "";
  margin-left: 2px;
  border-block: 5px solid transparent;
  border-left: 8px solid currentColor;
}
.preview-toggle[data-playing="true"]::before {
  width: 8px;
  height: 10px;
  margin: 0;
  border: 0;
  border-inline: 3px solid currentColor;
}
.project-typography { font-family: var(--font-sans); }
.project-copy { position: relative; z-index: 1; }
.project-affiliations {
  position: absolute;
  inset-inline-end: 4px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: .10;
  pointer-events: none;
}
.project-affiliations img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}
.project-row h3 { margin: 0; font-size: clamp(18px, 2.8vw, 22px); line-height: 1.17; text-wrap: balance; }
.project-row p { margin: 8px 0 0; line-height: 1.52; }
.project-subheading { color: #48566a; font-weight: 700; }
.project-row .project-subheading { margin-top: 3px; }
.news { padding-left: 1.2em; }
@media (max-width: 680px) {
  .bio { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 22px 0; }
  .bio-text { display: contents; }
  .bio-text .name { order: -2; }
  .bio-photo { order: -1; width: min(50vw, 190px); }
  .bio-photo > a { position: static; }
  .bio-photo > a img { height: auto; }
  .bio-text p { margin: 0; align-self: stretch; }
}
@media (max-width: 600px) {
  .page { padding: 8px 16px; }
  .listing, .site-footer, .project-detail { padding-inline: 0; }
  .project-row { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
  .project-affiliations { gap: 8px; }
  .project-affiliations img { width: 68px; height: 68px; }
  .site-nav { gap: 10px; padding-inline: 0; }
  .site-footer { gap: 8px 20px; }
}


.affiliation-marks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 64px));
  justify-content: center;
  column-gap: clamp(8px, 2.7vw, 30px);
  align-items: center;
  border-block: 1px solid #b7c2c9;
  padding: 14px 5px;
}
.affiliation-marks a { display: grid; place-items: center; min-height: 44px; }
.affiliation-marks img { display: block; height: clamp(40px, 7vw, 52px); width: auto; }
.affiliation-marks + .listing { border-top: 0; }
.experience article {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 0;
}
.experience-marks {
  display: grid;
  justify-items: center;
  align-self: center;
  gap: 5px;
}
.experience-marks img {
  width: 52px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
.experience-marks img:only-child { width: 100%; }
@media (max-width: 600px) {
  .experience article { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .experience-marks img { width: 38px; }
}
/* Shared rows align both degree records even when a university name wraps. */
.education > h2 { margin-bottom: 13px; }
.education-entries {
  --education-logo-size: 76px;
  display: grid;
  width: fit-content;
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 5px 20px;
  margin-inline: auto;
}
.education article { display: grid; grid-template-columns: var(--education-logo-size) minmax(0, 1fr); column-gap: 12px; grid-template-rows: subgrid; grid-row: span 4; }
.education article + article { border-inline-start: 1px solid #e2e6e9; padding-inline-start: 18px; }
.education-logo { grid-column: 1; grid-row: 1 / span 4; position: relative; }
.education-logo img { position: absolute; inset: 0; margin: auto; width: var(--education-logo-size); height: var(--education-logo-size); object-fit: contain; }
.education article > :not(.education-logo) { grid-column: 2; }
.education h3 { margin: 0; font-size: 16px; }
.education p { margin: 0; line-height: 1.45; }
.education-date { color: var(--text-muted); font-size: 13px; }
@media (max-width: 780px) {
  .education-entries { grid-template-columns: minmax(0, 1fr); }
  .education article { grid-row: auto; grid-template-rows: repeat(4, auto); row-gap: 5px; }
  .education article + article { border-inline-start: 0; border-top: 1px solid #e2e6e9; margin-top: 8px; padding: 12px 0 0; }
}
.experience article + article { border-top: 1px solid #e2e6e9; }
.experience header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 3px 16px; }
.experience h3 { margin: 0; font-size: 16px; }
.experience header span { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.experience p { margin: 7px 0 0; line-height: 1.5; }
.experience .appointment { margin-top: 2px; color: #48566a; }

.project-detail {
  --ink: #182c3a;
  --blue: #275873;
  --line: #d3dde1;
  color: var(--ink);
  padding: 24px 10px 42px;
  font-size: 16px;
  line-height: 1.6;
}
.project-intro {
  max-width: 700px;
  margin: 0 auto 26px;
  text-align: center;
}
.project-intro h1, .project-story h2 {
  font-weight: 400;
  text-wrap: balance;
}
.project-intro h1 {
  margin: 0;
  font-size: clamp(29px, 4.8vw, 43px);
  line-height: 1.12;
}
.project-deck {
  margin: 9px auto 0;
  max-width: 42ch;
  color: var(--blue);
  font-size: clamp(18px, 3vw, 23px);
  line-height: 1.28;
  font-weight: 700;
  text-wrap: balance;
}
.project-summary {
  max-width: 59ch;
  margin: 16px auto 0;
  color: #455562;
  line-height: 1.58;
  text-wrap: pretty;
}
.project-demo, .project-strip {
  width: 100%;
  max-width: 700px;
  margin: 23px auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: white;
}
.project-demo { box-shadow: 0 3px 14px rgba(26, 54, 72, .06); }
.project-detail figure a {
  display: block;
  cursor: zoom-in;
  padding: clamp(5px, 1.2vw, 12px);
}
.project-detail figure a:focus-visible { outline-offset: -3px; }
.project-detail figure img, .project-detail figure video {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}
.project-detail figure img { max-height: 340px; object-fit: contain; }
.project-detail .project-strip:has(video) { max-width: 556px; }
.project-detail figcaption {
  padding: 10px clamp(12px, 3vw, 28px);
  border-top: 1px solid var(--line);
  background: #f4f7f8;
  color: #425461;
  font-size: 15px;
  line-height: 1.48;
  text-align: center;
  text-wrap: pretty;
}
.demo-labels {
  display: flex;
  margin: 0;
  padding: 5px 0;
  list-style: none;
  text-align: center;
  font-size: clamp(11px, 2.5vw, 13px);
  font-weight: 700;
  color: var(--blue);
}
.demo-labels li { flex: 1; }
.demo-labels li + li { border-inline-start: 1px solid var(--line); }
.figure-source {
  display: inline-block;
  margin-inline-end: .4em;
  color: #244d67;
  font-weight: 700;
}
.project-contents {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px clamp(4px, 2vw, 19px);
  max-width: 700px;
  margin: 25px auto 0;
  padding: 6px 0;
  border-block: 1px solid var(--line);
  background: white;
}
.project-contents a {
  padding: 5px 10px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
}
.project-contents a:hover, .project-contents a:focus-visible {
  background: #eaf1f4;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.project-story { max-width: 700px; margin-inline: auto; text-align: center; }
.project-story h2 {
  max-width: 34ch;
  margin: 42px auto 14px;
  font-size: clamp(24px, 3.5vw, 29px);
  line-height: 1.16;
  scroll-margin-top: 64px;
}
.project-story h2:not(:first-child)::before {
  content: "";
  display: block;
  width: 50px;
  height: 1px;
  margin: 0 auto 26px;
  background: #9baeb9;
}
.project-story h3 {
  margin: 27px auto 8px;
  font-size: 1.12em;
  line-height: 1.3;
}
.project-story .project-equation {
  padding: 8px 0;
  font-size: 1.12em;
  font-variant-numeric: lining-nums;
}
.project-story p {
  max-width: 59ch;
  margin: 11px auto 16px;
  line-height: 1.64;
  text-wrap: pretty;
}
.project-story table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px auto 24px;
  font-size: 14px;
  line-height: 1.45;
}
.project-story th, .project-story td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.project-story th { background: #edf3f5; color: var(--blue); }
.project-story td:first-child { font-weight: 700; }
@media (max-width: 600px) {
  .project-detail { padding: 12px 0 28px; }
  .project-intro { margin-bottom: 18px; }
  .project-contents { position: static; gap: 1px 4px; margin-top: 18px; }
  .project-contents a { padding: 5px 7px; }
  .project-story h2 { margin-top: 31px; scroll-margin-top: 16px; }
  .project-detail figcaption { padding: 8px 10px; }
}

/* Independent recordings retain one row, with horizontal scrolling on phones. */
.trial-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(148px, 1fr));
  gap: 8px;
  overflow-x: auto;
  max-width: 760px;
  margin: 18px auto 26px;
  padding-bottom: 5px;
  scroll-snap-type: x proximity;
}
.trial-row figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  scroll-snap-align: start;
}
.trial-row video { background: #111; }
.project-detail .trial-row figcaption {
  padding: 6px 3px;
  font-size: 13px;
  font-weight: 700;
}
.massage-study { --ink: #000; }
.massage-study :is(.project-summary, figcaption, .figure-source, .method-equation, th) { color: var(--ink); }
.massage-study .project-story h2:not(:first-child)::before { width: min(45%, 220px); }
.massage-study .project-strip > a { padding: 0; }
.massage-study #fig-2, .massage-study #fig-s3 { max-width: 616px; }
.massage-study .project-strip img { max-height: none; }

.massage-study .project-strip[id] { scroll-margin-top: 6rem; }
.massage-setup-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.1194fr) minmax(0, 1.4465fr);
  gap: clamp(6px, 2vw, 16px);
  max-width: 700px;
  margin: 23px auto;
}
.massage-setup-pair .project-strip { margin: 0; background: #f4f7f8; }
.massage-setup-pair a { background: white; }
@media (max-width: 540px) {
  .massage-setup-pair figcaption { padding-inline: 5px; font-size: 12px; }
}
.massage-study .grasp-figure { width: 94%; max-width: 31rem; }
.wrist-panels {
  display: grid;
  grid-template-columns: repeat(4, minmax(11rem, 1fr));
  gap: .5rem;
  padding: .5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.massage-study .wrist-panels > a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .4rem;
  padding: 0;
  scroll-snap-align: start;
  font-size: .86rem;
  font-weight: 700;
}
@media (min-width: 760px) {
  .massage-study .wrist-figure {
    width: min(60rem, calc(100vw - 3rem));
    max-width: none;
    margin-inline-start: 50%;
    transform: translateX(-50%);
  }
}

.project-detail .bioleg-paper > a { padding: 0; }
.project-detail .bioleg-paper img { max-height: none; }
.bioleg-stance { max-width: 34rem; }
.bioleg-timing, .bioleg-ankle { max-width: 32rem; }
.bioleg-gait-clips {
  margin: 0 auto 1.5rem;
  max-width: 34rem;
}
.bioleg-gait-clips summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 700;
}
.bioleg-gait-clips > div {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: .75rem;
}
.bioleg-gait-clips figure { margin: 0; max-width: 100%; }
.bioleg-gait-clips figcaption {
  padding: 0 0 .4rem;
  background: transparent;
  border: 0;
}
.project-detail .bioleg-gait-clips video {
  width: auto;
  max-width: 100%;
  height: clamp(10rem, 33vw, 14rem);
  object-fit: contain;
}
.project-detail .bioleg-bench:has(video) { max-width: 400px; }

.project-detail .sters-figure > a { padding: 0; }
.project-detail .sters-figure img { max-height: none; }
.sters-hardware { max-width: 26rem; }
.sters-stance { max-width: 32rem; }

.method-equation {
  margin: 1.3rem auto;
  color: #18232c;
  scroll-margin-top: 6rem;
}
.equation-body {
  overflow-x: auto;
  padding-block: .3rem;
  font-size: clamp(.88rem, 1.7vw, 1rem);
}
.equation-body .katex-display {
  width: max-content;
  min-width: 100%;
  margin: 0;
}
/* Reserve space for the native LaTeX tag on the right. */
.equation-body .katex-display > .katex > .katex-html { padding-inline-end: 2.2em; }
@media (max-width: 540px) {
  .equation-body { font-size: clamp(.8rem, 3.35vw, .92rem); }
}
.trial-heading { margin: 0 auto; text-align: center; font-weight: 700; }
.trial-heading + .trial-row { margin-top: 9px; }
@media (max-width: 540px) {
  .massage-study .project-story table { display: block; overflow-x: auto; }
}
