/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-display: swap;
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-display: swap;
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/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+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-display: swap;
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-display: swap;
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-display: swap;
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-display: swap;
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-display: swap;
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-display: swap;
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Academic layout, refined with Apple HIG foundation principles (2026-10-08).
   This is a website: sizing and interaction follow web conventions, not native app chrome. */
:root {
  --surface: #fff;
  --surface-muted: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #60606a;
  --link: #1772d0;
  --link-active: #9d4b00;
  --rule: #dedee3;
  --font-body: 'Lato', 'PingFang HK', 'PingFang TC', 'Microsoft JhengHei', Verdana, Helvetica, sans-serif;
  --reading-width: 800px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
html:lang(zh-Hant) body, html:lang(zh-Hans) body { line-height: 1.65; }
table { font: inherit; }
td, th { font: inherit; }
p { margin: 1em 0; }
strong { font-weight: 700; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus {
  color: var(--link-active);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
a:focus-visible, summary:focus-visible, [tabindex='-1']:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
  border-radius: 2px;
}
h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 400;
}
.name {
  margin: 0;
  padding-top: 20px;
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 400;
  text-align: center;
}

/* Keep the familiar reading column; the contents list uses spare desktop width. */
.site-shell {
  max-width: 1016px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 184px minmax(0, var(--reading-width));
  gap: 32px;
}
.site-main { min-width: 0; }
.page {
  width: 100%;
  max-width: var(--reading-width);
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  margin: 0 auto;
}
.layout { width: 100%; border: 0; border-spacing: 0; border-collapse: separate; }
.intro-copy { padding: 2.5%; width: 63%; vertical-align: middle; }
.intro-copy p { margin: 16px 0; }
.intro-photo { padding: 2.5%; width: 37%; vertical-align: middle; }
.portrait { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 27%; border-radius: 50%; }
.links { text-align: center; line-height: 1.7; }
.links a { display: inline-block; padding: 4px 0; }
.email { overflow-wrap: anywhere; }
.language { text-align: right; padding: 8px 20px 0; font-size: .875rem; line-height: 1.5; }
.language a, .language span { display: inline-block; padding: 6px 0; white-space: nowrap; }
.collaboration { margin: 0; padding: 8px 16px 16px; }
.section-heading { padding: 28px 16px 12px; }
.section-heading p { margin: 12px 0 0; }

/* Titles and descriptions lead; complete publication metadata stays compact. */
.papers { border-spacing: 0 16px; }
.paper-image { padding: 16px; width: 192px; vertical-align: middle; }
.paper-image img { width: 160px; max-width: 100%; max-height: 160px; object-fit: contain; display: block; }
.paper-copy { padding: 8px; width: auto; vertical-align: middle; font-size: .875rem; line-height: 1.6; }
.papertitle { font-size: 1rem; line-height: 1.45; font-weight: 700; }
.paper-copy p { margin: 12px 0; font-size: 1rem; }
.author-note { font-size: .8125rem; color: var(--text-secondary); }
.paper-copy .project-recognition { font-size: .875rem; }
.person-name { white-space: nowrap; }

/* One shared logo column aligns education, internships and entrepreneurship. */
.institutions { table-layout: fixed; }
.institution-logo { width: 20%; padding: 16px; vertical-align: middle; text-align: center; }
.institution-logo img { display: block; width: 130px; max-width: 100%; height: 112px; object-fit: contain; margin: auto; }
.institution-mark { position: relative; display: block; width: 130px; max-width: 100%; height: 112px; overflow: hidden; margin: auto; }
.hkust-mark img { position: absolute; width: 175%; max-width: none; height: 175%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.edu-copy { padding: 12px 8px; }
.edu-copy p { margin: 12px 0; }
.experience-copy { padding: 16px 8px; vertical-align: middle; }
.experience-copy p { margin: 10px 0; }
.dates { white-space: nowrap; color: var(--text-secondary); font-size: .875em; }
.resource-links { font-size: .875rem; line-height: 1.7; }
.resource-links time { white-space: nowrap; }

.service-label { padding: 16px; width: 25%; vertical-align: middle; text-align: center; }
.service-copy { padding: 12px 8px; vertical-align: middle; }
.service-copy p { margin: 12px 0; }
.colored-box { color: var(--text); padding: 20px; border-radius: 10px; width: 100%; min-height: 96px; display: flex; align-items: center; justify-content: center; }
.colored-box h2 { font-size: 1.25rem; }
.awards { padding: 0 16px 0 36px; }
.awards li { margin: 12px 0; }
.news dl { margin: 16px 0 0; }
.news-item { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; margin: 0 0 16px; }
.news dt { white-space: nowrap; font-size: .875rem; line-height: 1.85; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.news dd { margin: 0; }
.news-language { font-size: .8125rem; color: var(--text-secondary); }
.footer { text-align: right; color: var(--text-secondary); font-size: .8125rem; padding: 28px 16px 20px; }

/* Native anchors and details keep navigation available without JavaScript. */
.toc-desktop { position: sticky; top: 64px; align-self: start; margin-top: 64px; max-height: calc(100vh - 80px); overflow-y: auto; padding: 4px; }
.toc-title { margin: 0 0 12px; padding-left: 14px; font-size: .8125rem; color: var(--text-secondary); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; min-height: 44px; padding: 11px 14px; font-size: .875rem; line-height: 1.5; }
.toc a:hover, .toc a:focus-visible { background: var(--surface-muted); }
.toc a:focus-visible { outline-offset: -2px; }
.toc-mobile { display: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--surface); padding: 8px; }
#intro, #research, #patent, #education, #experience, #entrepreneurship, #teaching-service, #awards, #news, #public-service { scroll-margin-top: 24px; }

/* Preserve the template's optional figure transitions; respect reduced motion. */
.one { width: 160px; height: 160px; position: relative; }
.two { width: 160px; height: 160px; position: absolute; transition: opacity .2s ease-in-out; }
.fade { transition: opacity .2s ease-in-out; }
span.highlight { background: #ffffd0; }
@media (prefers-reduced-motion: reduce) {
  .two, .fade { transition: none; }
}
@media (prefers-contrast: more) {
  :root { --text: #000; --text-secondary: #333; --link: #064b94; --link-active: #753800; --rule: #60606a; }
}

@media (max-width: 1079px) {
  .site-shell { display: block; max-width: var(--reading-width); }
  .toc-desktop { display: none; }
  .toc-mobile { display: block; margin: 14px 16px 4px; border-bottom: 1px solid var(--rule); }
  .toc-mobile summary { cursor: pointer; color: var(--link); min-height: 44px; padding: 10px 0; font-size: .875rem; }
  .toc-mobile .toc ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 4px 0 12px; }
}
@media (max-width: 600px) {
  .intro-copy, .intro-photo { display: block; width: 100%; }
  .intro-photo { max-width: 220px; margin: 0 auto; padding: 14px; }
  .name { padding-top: 8px; }
  .intro-copy { padding: 12px 16px; }
  .paper-image { padding: 12px; width: 136px; }
  .paper-image img { width: 112px; }
  .paper-copy { padding: 12px 8px; }
  .service-label { width: 28%; padding: 10px; }
  .colored-box { padding: 12px; }
  .colored-box h2 { font-size: 1.125rem; }
}
@media (max-width: 420px) {
  .paper-image, .paper-copy { display: block; width: auto; }
  .paper-image { padding: 16px 16px 0; }
  .paper-image img { width: 160px; }
  .paper-copy { padding: 12px 16px; }
  .paper-image.empty { display: none; }
  .service-label, .service-copy { display: block; width: auto; text-align: left; }
  .service-label { padding: 16px 16px 0; }
  .colored-box { width: 160px; max-width: 100%; min-height: 76px; text-align: center; }
  .service-copy { padding: 8px 16px; }
  .dates { white-space: normal; }
  .institution-logo { width: 26%; padding: 8px; }
  .institution-logo img, .institution-mark { height: 80px; }
  .hkust-mark img { height: 175%; }
  .experience-copy { padding: 12px 8px; }
  .news-item { grid-template-columns: 1fr; gap: 4px; }
}
@media print {
  .site-shell { display: block; }
  .toc-desktop, .toc-mobile, .skip { display: none; }
}
