@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin.19143dca0759.woff2") format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin-italic.5fbc14d56cea.woff2") format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin.f2ea9c12d2fe.woff2") format('woff2');
}
@font-face {
  font-family: 'Profile Serif SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/name-serif-sc.585d32454a24.woff2") format('woff2');
}
@font-face {
  font-family: 'Profile Serif TC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/name-serif-tc.a29514b75d72.woff2") format('woff2');
}
:root {
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-serif: 'Source Serif 4', 'Noto Serif CJK SC', 'Songti SC', 'STSong', 'SimSun', Georgia, serif;
  --font-reading: var(--font-serif);
  --font-name-sc: 'Profile Serif SC', 'Noto Serif CJK SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-name-tc: 'Profile Serif TC', 'Noto Serif CJK TC', 'Songti TC', 'PMingLiU', serif;
  color-scheme: light;
  --theme: #fcfbf8;
  --entry: #fff;
  --content: #242a30;
  --job-title: #4a5561;
  --secondary: #59636e;
  --tertiary: #e1e1dc;
  --accent: #315b81;
  --accent-soft: #edf2f5;
  --surface: #f4f3ef;
  --code-bg: #f4f4f5;
  --shadow: 0 3px 14px rgba(15,23,42,0.035);
  --radius: 10px;
  --header-height: 72px;
}
html[data-theme='dark'] {
  color-scheme: dark;
  --theme: #0f1115;
  --entry: #161b22;
  --content: #edf2f7;
  --job-title: #d4dde7;
  --secondary: #a7b0ba;
  --tertiary: #28303a;
  --accent: #77a8ff;
  --accent-soft: rgba(119,168,255,0.12);
  --surface: #0b0d11;
  --code-bg: #1d232c;
  --shadow: 0 12px 36px rgba(0,0,0,0.32);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--theme);
  color: var(--content);
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  font-kerning: normal;
  line-height: 1.7;
  transition: background-color 0.25s ease, color 0.25s ease;
}
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
img {
  max-width: 100%;
  display: block;
}
.site-shell {
  min-height: 100vh;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(252,251,248,0.95);
  border-bottom: 1px solid var(--tertiary);
}
.header-inner {
  max-width: 1040px;
  margin: 0 auto;
  min-height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--content);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 24px;
}
.nav-link {
  color: var(--secondary);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.nav-link:hover,
.nav-link[aria-current='page'],
.nav-link.is-active {
  color: var(--content);
  border-color: var(--accent);
}
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--tertiary);
  border-radius: 999px;
  background: var(--entry);
  color: var(--content);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}
.theme-icon {
  position: absolute;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
html[data-theme='light'] .theme-icon-light,
html[data-theme='dark'] .theme-icon-dark {
  opacity: 1;
  transform: scale(1);
}
html[data-theme='dark'] .site-header {
  background: rgba(15,17,21,0.88);
}
.main-content {
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px 24px 88px;
}
.profile-mode {
  margin-bottom: 64px;
}
.profile-card {
  padding: 8px 0 48px;
  border-bottom: 1px solid var(--tertiary);
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: start;
  gap: 22px 52px;
  text-align: left;
}
.profile-avatar {
  width: 140px;
  height: 140px;
  grid-row: 1/4;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--entry);
  box-shadow: var(--shadow);
  justify-self: start;
}
.profile-identity,
.profile-intro,
.profile-links {
  grid-column: 2;
  min-width: 0;
}
.profile-question {
  margin: 0;
  max-width: 680px;
  font-family: var(--font-reading);
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  text-wrap: pretty;
}
.profile-summary {
  margin: 14px 0 0;
  color: var(--secondary);
  font-size: 1rem;
  line-height: 1.65;
}
.profile-question,
.profile-summary,
.home-section[aria-labelledby='Research'] .section-body p,
.home-section[aria-labelledby='About'] .section-body p {
  text-align: justify;
  text-align-last: start;
  hyphens: auto;
  hyphenate-limit-chars: 8 4 3;
}
.profile-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 680px;
  gap: 10px;
}
.anchor-alias {
  scroll-margin-top: calc(var(--header-height) + 24px);
}
.profile-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.18;
}
.name-latin {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.025em;
}
.name-cjk {
  color: var(--secondary);
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0;
  font-family: var(--font-name-sc);
}
.name-cjk-item {
  font-family: inherit;
}
.name-cjk-item[lang='zh-Hant'] {
  font-family: var(--font-name-tc);
}
.profile-subtitle {
  margin: 10px 0 0;
  color: var(--secondary);
  font-size: 1rem;
}
.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--tertiary);
  background: var(--entry);
  color: var(--content);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.social-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.social-button .icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}
.social-button.profile-cv {
  background: var(--content);
  color: var(--theme);
  border-color: var(--content);
}
.social-button.profile-cv:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.profile-email span {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}
.article-entry {
  padding: 0;
}
.list-page {
  max-width: 740px;
  margin: 0 auto;
}
.list-header {
  margin-bottom: 40px;
}
.list-description {
  margin: 10px 0 0;
  color: var(--secondary);
  font-size: 1rem;
}
.post-list {
  display: grid;
  gap: 18px;
}
.post-card {
  border-top: 1px solid var(--tertiary);
  padding: 28px 0;
}
.post-meta {
  color: var(--secondary);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.post-card-title {
  margin: 10px 0 10px;
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.post-card-title a {
  color: var(--content);
  border-bottom: none;
}
.post-card-title a:hover {
  color: var(--accent);
}
.post-card-excerpt {
  margin: 0 0 14px;
  color: var(--secondary);
  font-size: 0.98rem;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.post-tag {
  padding: 0;
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 500;
}
.empty-state {
  background: var(--entry);
  border: 1px solid var(--tertiary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}
.empty-state p {
  margin: 12px 0 0;
  color: var(--secondary);
}
.single-entry {
  max-width: 740px;
  margin: 0 auto;
}
.entry-actions {
  margin-bottom: 24px;
}
.entry-title {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.inline-link {
  color: var(--secondary);
}
.inline-link:hover {
  color: var(--accent);
}
.article-entry h1,
.article-entry h2,
.article-entry h3,
.article-entry h4 {
  color: var(--content);
  font-weight: 600;
  line-height: 1.25;
}
.article-entry h1,
.article-entry h2 {
  font-family: var(--font-serif);
  font-weight: 500;
}
.article-entry h2 {
  margin: 52px 0 20px;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  scroll-margin-top: calc(var(--header-height) + 24px);
}
.article-entry h2:first-child {
  margin-top: 0;
}
.article-entry h3 {
  margin: 28px 0 12px;
  font-size: 1.25rem;
}
.article-entry p,
.article-entry li {
  color: var(--content);
  font-size: 1.125rem;
  line-height: 1.75;
}
.article-entry p {
  margin: 0 0 22px;
}
.article-entry .post-figure {
  margin: 30px 0 34px;
}
.article-entry .post-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--tertiary);
  border-radius: 8px;
  background: var(--entry);
  box-shadow: none;
}
.article-entry .post-figure-compact img {
  max-width: 760px;
  margin: 0 auto;
}
.article-entry .post-figure figcaption {
  margin-top: 10px;
  color: var(--secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  text-align: center;
}
.article-entry ul,
.article-entry ol {
  margin: 0 0 20px;
  padding-left: 22px;
}
.article-entry li + li {
  margin-top: 8px;
}
.article-entry strong {
  font-weight: 600;
}
.article-entry .job-title {
  font-weight: 700;
  color: var(--job-title);
}
.article-entry .paper-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 0.08rem 0.48rem;
  border-radius: 999px;
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1.35;
  vertical-align: middle;
}
.article-entry .paper-badge-oral,
.article-entry .paper-badge-shortlisted {
  color: #b42318;
  background: #fee4e2;
}
html[data-theme='dark'] .article-entry .paper-badge-oral,
html[data-theme='dark'] .article-entry .paper-badge-shortlisted {
  color: #ffb4ab;
  background: rgba(255,120,120,0.16);
}
.article-entry a {
  color: var(--accent);
  border-bottom: 1px solid rgba(47,103,216,0.35);
}
.article-entry a:hover {
  border-color: var(--accent);
}
.article-entry .headerlink {
  display: none;
}
.article-entry sup {
  font-size: 0.72em;
}
.article-entry code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--code-bg);
  color: var(--content);
  padding: 0.2em 0.45em;
  border-radius: 6px;
}
.article-entry mjx-container {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}
.article-entry mjx-container[jax='CHTML'][display='true'] {
  margin: 1.3rem 0;
}
.article-entry blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
}
.article-entry font[color='red'] {
  color: #cf222e;
}
html[data-theme='dark'] .article-entry a {
  border-bottom-color: rgba(119,168,255,0.4);
}
.site-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 32px;
}
.footer-copy {
  margin: 0;
  text-align: center;
  color: var(--secondary);
  font-size: 0.92rem;
}
.footer-objective {
  display: grid;
  margin: 4px auto 0;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--secondary);
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.6;
  cursor: pointer;
}
.footer-objective[hidden] {
  display: none;
}
.footer-objective span {
  grid-area: 1/1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.footer-objective:hover {
  color: var(--accent);
}
.footer-objective-reply {
  opacity: 0;
  transform: translateY(4px);
}
.footer-objective[aria-pressed='true'] .footer-objective-original {
  opacity: 0;
  transform: translateY(-4px);
}
.footer-objective[aria-pressed='true'] .footer-objective-reply {
  opacity: 1;
  transform: translateY(0);
}
#goldfish-publication {
  scroll-margin-top: calc(var(--header-height) + 24px);
}
.goldfish-mark {
  display: inline-block;
  margin-left: 10px;
  vertical-align: -3px;
  color: #98703e;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linejoin: round;
}
.goldfish-mark circle {
  fill: currentColor;
  stroke: none;
}
html[data-theme='dark'] .goldfish-mark {
  color: #c4a16c;
}
.home-section {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 36px;
  padding: 0 0 48px;
  margin: 0 0 48px;
  border-bottom: 1px solid var(--tertiary);
}
.home-section:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}
.article-entry .home-section > h2 {
  margin: 2px 0 0;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.section-body {
  min-width: 0;
}
.section-body > :last-child {
  margin-bottom: 0;
}
.home-section[aria-labelledby='Research'] .section-body,
.home-section[aria-labelledby='About'] .section-body {
  max-width: 680px;
  font-family: var(--font-reading);
  font-weight: 400;
  letter-spacing: normal;
}
.home-section[aria-labelledby='Research'] .section-body p,
.home-section[aria-labelledby='About'] .section-body p {
  font-size: 1.25rem;
  line-height: 1.65;
  margin-bottom: 24px;
}
.home-section[aria-labelledby='Research'] .section-body > :last-child,
.home-section[aria-labelledby='About'] .section-body > :last-child {
  margin-bottom: 0;
}
.article-entry .publication {
  margin: 0 0 28px;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--tertiary);
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.75;
}
.publication:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}
.article-entry .publication > a:first-child {
  color: var(--content);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.5;
  border-bottom: 0;
}
.article-entry .publication > a:first-child:hover {
  color: var(--accent);
}
.post-header {
  margin-bottom: 28px;
}
.post-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--secondary);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.article-entry .post-byline a {
  color: var(--secondary);
  border-bottom: 0;
}
.article-entry .post-deck {
  margin: 24px 0 0;
  color: var(--secondary);
  font-size: 1.15rem;
  line-height: 1.65;
}
.post-contents {
  margin: 32px 0 40px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
}
.post-contents summary {
  cursor: pointer;
  color: var(--secondary);
  font-size: 0.92rem;
  font-weight: 500;
}
.post-contents nav {
  margin-top: 16px;
}
.post-contents ul,
.post-contents ol {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}
.post-contents li {
  font-size: 0.94rem;
}
.post-contents a {
  border-bottom: 0;
}
.post-body > h2:first-child {
  margin-top: 40px;
}
.nav-more {
  position: relative;
}
.nav-more summary {
  list-style: none;
  cursor: pointer;
}
.nav-more summary::-webkit-details-marker {
  display: none;
}
.nav-more summary::after {
  content: '\2304';
  margin-left: 5px;
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  min-width: 190px;
  padding: 10px;
  background: var(--entry);
  border: 1px solid var(--tertiary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.nav-dropdown .nav-link {
  padding: 8px 12px;
  border-bottom: 0;
  border-radius: 5px;
}
.nav-dropdown .nav-link:hover,
.nav-dropdown .nav-link.is-active {
  background: var(--surface);
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--entry);
  border: 1px solid var(--accent);
}
.skip-link:focus {
  top: 12px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
@media (max-width: 900px) {
  .profile-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 400px;
  }
  .profile-email {
    grid-column: 1/-1;
  }
}
@media (max-width: 700px) {
  :root {
    --header-height: 112px;
  }
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    padding: 12px 20px 10px;
  }
  .site-brand {
    grid-column: 1;
    grid-row: 1;
  }
  .header-actions {
    display: contents;
  }
  .site-nav {
    grid-column: 1/-1;
    grid-row: 2;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
  }
  .nav-link {
    font-size: 0.875rem;
    padding: 10px 0;
  }
  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    width: 34px;
    height: 34px;
  }
  .main-content {
    padding: 36px 22px 56px;
  }
  .profile-mode {
    margin-bottom: 36px;
  }
  .profile-card {
    padding: 0 0 32px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 24px 20px;
  }
  .profile-avatar {
    width: 76px;
    height: 76px;
    grid-row: 1;
  }
  .profile-identity {
    align-self: center;
  }
  .profile-intro,
  .profile-links {
    grid-column: 1/-1;
  }
  .profile-title {
    font-size: 1.6rem;
    gap: 5px;
  }
  .name-cjk {
    font-size: 0.72em;
  }
  .profile-subtitle {
    margin-top: 8px;
    font-size: 0.84rem;
    line-height: 1.5;
  }
  .profile-question {
    font-size: 1.1rem;
    line-height: 1.6;
  }
  .home-section {
    display: block;
    padding-bottom: 32px;
    margin-bottom: 32px;
  }
  .article-entry .home-section > h2 {
    margin: 0 0 20px;
    font-size: 1.4rem;
  }
  .article-entry p,
  .article-entry li {
    font-size: 1.0625rem;
    line-height: 1.75;
  }
  .home-section[aria-labelledby='Research'] .section-body p,
  .home-section[aria-labelledby='About'] .section-body p {
    font-size: 1.125rem;
    line-height: 1.7;
  }
  .article-entry .publication {
    font-size: 0.86rem;
  }
  .article-entry .publication > a:first-child {
    font-size: 1.02rem;
  }
  .article-entry .post-deck {
    font-size: 1.05rem;
  }
  .social-button {
    padding: 0 10px;
    font-size: 0.88rem;
  }
  .social-button .icon {
    width: 16px;
    height: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.125em;
}
