@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, .82);
  --surface-solid: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(32, 62, 96, .12);
  --accent: #0066cc;
  --accent-soft: #e5effa;
  --accent-border: rgba(0, 102, 204, .18);
  --nav: rgba(255, 255, 255, .90);
  --nav-active: rgba(32, 62, 96, .08);
  --cover: #ffffff;
  --hero-wash: #b4d0ea;
  --shadow: 0 2px 3px #203e6005, 0 8px 24px #203e6009;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1015;
  --surface: rgba(23, 30, 40, .84);
  --surface-solid: #171e28;
  --text: #f5f5f7;
  --muted: #a1a9b5;
  --line: rgba(207, 224, 246, .14);
  --accent: #82baff;
  --accent-soft: #1c2e46;
  --accent-border: rgba(130, 186, 255, .25);
  --nav: rgba(22, 29, 39, .92);
  --nav-active: rgba(207, 224, 246, .10);
  --cover: #f5f7fa;
  --hero-wash: #203a59;
  --shadow: 0 2px 4px #0003, 0 10px 35px #0003;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.8 var(--font);
  min-height: 100vh;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 680px;
  background: linear-gradient(180deg, var(--hero-wash) 0%, var(--hero-wash) 12%, transparent 90%);
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.35; text-wrap: pretty; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.5rem, 5.3vw, 4.125rem); font-weight: 700; letter-spacing: -.045em; }
h2 { font-size: 1.875rem; font-weight: 600; letter-spacing: -.035em; }
h3 { font-weight: 600; }
a { color: inherit; text-decoration: none; overflow-wrap: anywhere; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: #82baff55; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 50; padding: 10px 15px; background: var(--text); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 12px; }
main.site-main, .site-main { width: 100%; max-width: 1008px; margin: 0 auto; padding: 0 32px; }
.site-header { height: 104px; padding: 24px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.monogram { display: inline-flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 600; }
.monogram img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.header-location { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .875rem; white-space: nowrap; }
.location-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.primary-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--nav);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 4px #0001, 0 6px 12px #0001;
}
.primary-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .875rem;
  line-height: 1.4;
  white-space: nowrap;
}
.primary-nav a:hover { background: var(--nav-active); color: var(--text); }
.primary-nav a.active, .primary-nav a[aria-current="page"] { background: var(--nav-active); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.link-icon { display: inline-block; width: 16px; height: 16px; vertical-align: -.15em; flex: 0 0 auto; }
.primary-nav .link-icon { width: 16px; height: 16px; }
.icon-button { display: inline-grid; place-items: center; width: 44px; min-width: 44px; height: 44px; padding: 0; margin-left: 3px; border: 0; border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; background: transparent; color: var(--text); line-height: 1; }
.icon-button:hover { color: var(--accent); }
.icon-button > span { display: grid; place-items: center; }
.icon-button svg { width: 18px; height: 18px; display: block; }
.icon-button > .theme-sun { display: none; }
:root[data-theme="dark"] .icon-button > .theme-moon { display: none; }
:root[data-theme="dark"] .icon-button > .theme-sun { display: grid; }

.hero { text-align: center; padding: 24px 0 0; }
.featured-pill { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 11px; max-width: 100%; padding: 6px 14px; border: 1px solid var(--accent-border); border-radius: 999px; background: var(--accent-soft); font-size: .875rem; line-height: 1.6; box-shadow: 0 2px 12px #0066cc05; }
.featured-pill strong { font-weight: 550; }
.featured-pill span { color: var(--accent); padding-left: 11px; border-left: 1px solid var(--accent-border); }
.hero h1 { max-width: 720px; font-size: clamp(2.375rem, 4.2vw, 3.375rem); font-weight: 650; line-height: 1.12; letter-spacing: -.035em; margin: 25px auto 18px; color: var(--accent); }
.hero-description { max-width: 650px; margin: 0 auto; font-size: 1.3125rem; line-height: 1.65; letter-spacing: -.02em; color: var(--muted); }
.hero-description strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); box-shadow: 0 2px 5px #00000003; font-size: .875rem; line-height: 1.5; font-weight: 500; text-align: center; }
.button:hover { color: var(--accent); border-color: var(--accent-border); box-shadow: var(--shadow); }
.button.primary, .primary { color: var(--bg); background: var(--text); border-color: var(--text); }
.button.primary:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.avatar-button { padding: 5px 15px 5px 5px; gap: 11px; }
.avatar-button img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.text-link { font-size: .875rem; color: var(--muted); }
.text-link:hover { color: var(--accent); }
.hero-bottom { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; color: var(--muted); font-size: .875rem; }
.hero-bottom a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 32px; }
.social-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; color: inherit; font-size: .875rem; line-height: 1.6; }
.hero-bottom time { font-variant-numeric: tabular-nums; }
.tiny-dot { padding: 0 4px; }
.section { padding-top: 58px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-heading h2 { font-size: 1.875rem; }
.section-heading .text-link { flex-shrink: 0; }
.eyebrow { display: inline-block; color: var(--accent); font-size: .875rem; letter-spacing: .07em; }
.page-heading { padding-top: 44px; margin-bottom: 34px; }
.page-heading h1, h1.page-heading { font-size: 3rem; font-weight: 650; letter-spacing: -.04em; color: var(--accent); }
.page-heading p, .page-heading .subheading, .page-intro { color: var(--muted); font-size: 1.0625rem; line-height: 1.8; margin-top: 15px; max-width: 760px; }
.count { display: inline-block; margin-left: 12px; padding: 3px 9px; vertical-align: middle; border: 1px solid var(--line); border-radius: 999px; font-size: .875rem; color: var(--muted); font-weight: 450; letter-spacing: 0; line-height: 1.6; }

.home-work-list { list-style: none; padding: 0; margin: 0; }
.home-work-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; gap: 32px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.home-work-row + .home-work-row { margin-top: 24px; }
.selected-work-visual { display: flex; align-items: center; justify-content: center; align-self: center; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--cover); overflow: hidden; }
.selected-work-visual img { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 8px; }
.selected-work-visual:focus-visible { outline-offset: 4px; }
.selected-work-copy { min-width: 0; }
.selected-work-copy .home-work-details { margin-top: 14px; }
.selected-work-copy .authors { font-size: .875rem; line-height: 1.75; }
.selected-work-copy .home-work-venue { margin-top: 11px; }
.selected-work-copy .contribution-summary { margin-top: 13px; }
.selected-work-copy .paper-links { margin-top: 15px; }
.home-work-row h3 { font-size: 1.4375rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.45; }
.selected-work-title { min-width: 0; }
.selected-title-hint { margin-top: 10px; color: var(--muted); font-size: 1rem; font-weight: 400; line-height: 1.7; letter-spacing: normal; overflow-wrap: anywhere; }
.home-work-details { min-width: 0; }
.home-work-details > p { font-size: 1rem; line-height: 1.8; }
.authors { color: var(--muted); font-size: .875rem; line-height: 1.8; }
.authors strong { color: var(--text); font-weight: 600; }
.home-work-venue { color: var(--muted); font-size: .875rem !important; margin-top: 14px; }
.contribution-summary { color: var(--text); margin-top: 16px; padding-left: 13px; border-left: 2px solid var(--accent-border); font-size: .9375rem !important; line-height: 1.8; }
.contribution-summary strong { display: block; font-size: .875rem; font-weight: 600; color: var(--accent); margin-bottom: 3px; }
.paper-links { display: flex; flex-wrap: wrap; gap: 10px 17px; margin-top: 18px; color: var(--accent); font-size: .875rem; line-height: 1.6; }
.paper-links a { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; }
.paper-links a:hover { text-decoration: underline; }

.publication-list { list-style: none; margin: 0; padding: 0 0 65px; }
.publication-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; padding: 29px 0; border-top: 1px solid var(--line); align-items: center; }
.publication-thumb { display: block; padding: 10px; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--cover); box-shadow: 0 2px 8px #00000005; }
.publication-thumb img { display: block; width: 100%; height: auto; max-height: 180px; object-fit: contain; }
.publication-copy { min-width: 0; }
.publication-copy h2, .publication-copy h3 { font-size: 1.125rem; letter-spacing: -.012em; font-weight: 600; line-height: 1.55; }
.publication-copy .authors { margin-top: 9px; }
.publication-copy > p { font-size: 1rem; color: var(--muted); margin-top: 10px; }
.publication-metadata { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 9px; margin: 12px 0; }
.venue-badge, .detail-venue { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 10px; border: 1px solid var(--accent-border); border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: .875rem; font-weight: 550; line-height: 1.5; }
.publication-metadata .year, .publication-year { color: var(--muted); font-size: .875rem; }
.research-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 45px; }
.research-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: stretch; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.research-card > a:first-child { display: flex; align-items: center; min-width: 0; background: var(--cover); }
.research-card > a:first-child:focus-visible { outline-offset: -3px; }
.paper-cover { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; padding: 22px 18px; background: var(--cover); }
.paper-cover img { display: block; width: 100%; height: auto; max-height: 280px; object-fit: contain; }
.card-body { min-width: 0; padding: 26px; }
.card-body h3 { font-size: 1.375rem; letter-spacing: -.025em; line-height: 1.45; margin: 9px 0 13px; }
.card-body > p { font-size: 1rem; color: var(--muted); line-height: 1.8; }
.card-meta { color: var(--accent); font-size: .875rem; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.tag { display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .8125rem; line-height: 1.6; }

.about-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 60px; padding: 38px 0 78px; }
.about-sidebar { position: sticky; top: 112px; align-self: start; text-align: center; min-width: 0; max-height: calc(100vh - 128px); overflow-y: auto; scrollbar-width: thin; }
.about-avatar { display: block; width: 160px; height: 160px; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; margin: 10px auto 19px; }
.profile-meta { color: var(--muted); font-size: .875rem; line-height: 1.7; margin: 14px 0; }
.about-sidebar .tags { justify-content: center; }
.profile-socials { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 18px 0 24px; }
.profile-socials .social-link { position: relative; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); }
.profile-socials .social-link:hover { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
.profile-socials .social-link .link-icon { width: 18px; height: 18px; margin: 0; }
.profile-socials .social-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.about-sidebar nav { display: grid; gap: 13px; margin-top: 30px; text-align: left; }
.toc-link { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .875rem; line-height: 1.6; padding: 4px 0; }
.toc-link::before { content: ""; width: 12px; height: 1px; flex: 0 0 auto; background: var(--line); }
.toc-link.active, .toc-link[aria-current="location"] { color: var(--text); }
.toc-link.active::before, .toc-link[aria-current="location"]::before { width: 20px; background: var(--accent); }
.about-content { min-width: 0; }
.about-content h1 { color: var(--text); font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.12; letter-spacing: -.043em; margin: 22px 0 5px; }
.about-role, .profile-role { color: var(--muted); font-size: 1.75rem; line-height: 1.45; letter-spacing: -.025em; }
.about-bio { font-size: 1.0625rem; line-height: 1.85; margin-top: 32px; }
.about-bio p + p { margin-top: 19px; }
.about-bio a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-border); }
.about-bio a:hover { text-decoration-color: currentColor; }
.bio-section { margin-top: 50px; }
.bio-section h2 { font-size: 1.875rem; margin-bottom: 24px; }
.bio-section h3 { font-size: 1.25rem; margin: 25px 0 10px; }
.timeline { display: grid; gap: 0; }
.timeline-entry { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 10px 24px; padding: 23px 0; border-top: 1px solid var(--line); min-width: 0; align-items: start; }
.timeline-entry > .timeline-content, .timeline-entry > div { grid-column: 2; grid-row: 1; min-width: 0; }
.timeline-entry h3, .timeline-entry h4 { font-size: 1.125rem; font-weight: 600; line-height: 1.45; margin: 0; }
.timeline-entry > .timeline-year, .timeline-entry > .timeline-date, .timeline-entry > time, .timeline-entry > span { grid-column: 1; grid-row: 1; color: var(--muted); font-size: .875rem; line-height: 1.8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline-entry > p { grid-column: 2; }
.timeline-entry p { font-size: 1rem; color: var(--muted); line-height: 1.8; margin-top: 5px; }
.timeline-entry .timeline-role { color: var(--accent); font-size: .9375rem; }
.about-content .research-card { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
.about-content .card-body { padding: 20px; }
.about-content .card-body h3 { font-size: 1.1875rem; }
.about-content .paper-cover { padding: 16px 12px; }
.about-content .paper-cover img { max-height: 230px; }

.writing-list { list-style: none; margin: 0; padding: 0 0 58px; }
.writing-row { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 25px; padding: 27px 0; border-top: 1px solid var(--line); }
.writing-date { color: var(--muted); font-size: .875rem; line-height: 1.8; font-variant-numeric: tabular-nums; padding-top: 3px; }
.writing-date time, .writing-date > span { display: block; }
.writing-date > span { margin-top: 4px; color: var(--accent); }
.writing-copy { min-width: 0; }
.writing-title { font-size: 1.3125rem; font-weight: 600; line-height: 1.5; letter-spacing: -.02em; margin: 0 0 11px; }
.writing-title a { color: var(--text); }
.writing-title a:hover { color: var(--accent); }
.writing-summary { color: var(--muted); font-size: 1rem; line-height: 1.85; }
.writing-copy .tags { margin: 13px 0 0; }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 23px 0 30px; }
.filter-bar input[type="search"] { flex: 1 1 240px; min-width: 0; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 1rem; line-height: 1.5; }
.filter-bar input[type="search"]::placeholder { color: var(--muted); opacity: 1; }
.filter-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-bar [data-result-count] { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.filter-button { min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .875rem; line-height: 1.5; }
.filter-button:hover { color: var(--accent); border-color: var(--accent-border); }
.filter-button.active, .filter-button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
.empty-state { margin: 30px 0; padding: 30px 24px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 1rem; text-align: center; }

.paper-detail { max-width: 860px; margin: 0 auto; padding: 42px 0 68px; min-width: 0; }
.paper-detail-header { text-align: center; max-width: 820px; margin: 30px auto 35px; }
.paper-detail-header h1 { color: var(--accent); font-size: clamp(1.875rem, 4vw, 2.625rem); font-weight: 650; line-height: 1.25; letter-spacing: -.025em; margin: 20px 0; }
.paper-detail-header .authors { max-width: 740px; margin: 0 auto; font-size: .9375rem; line-height: 1.8; }
.paper-detail-header .page-meta, .paper-detail-header time { color: var(--muted); font-size: .875rem; }
.paper-detail-header > p { max-width: 740px; margin: 14px auto 0; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.detail-venue { border-radius: 999px; padding: 5px 12px; }
.detail-resources { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin: 23px auto 0; }
.detail-resources a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--accent); font-size: .875rem; line-height: 1.5; }
.detail-resources a:hover { background: var(--accent-soft); border-color: var(--accent-border); }
.article-body, .prose { max-width: 760px; min-width: 0; margin-left: auto; margin-right: auto; font-size: 1.0625rem; line-height: 1.9; overflow-wrap: anywhere; }
.article-body { padding: 6px 0 30px; }
.article-body > p, .prose p { margin: 0 0 1.25em; }
.article-body h1, .prose h1 { font-size: 2rem; }
.article-body h2, .prose h2 { font-size: 1.625rem; font-weight: 600; letter-spacing: -.025em; }
.article-body h3, .prose h3 { font-size: 1.3125rem; }
.article-body h4, .prose h4 { font-size: 1.125rem; }
.article-body h1, .article-body h2, .article-body h3, .article-body h4,
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.6em 0 .65em; line-height: 1.5; }
.article-body a, .prose a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-border); }
.article-body a:hover, .prose a:hover { text-decoration-color: currentColor; }
.article-body ul, .article-body ol, .prose ul, .prose ol { padding-left: 1.55em; margin: 0 0 1.5em; }
.article-body li, .prose li { margin-bottom: .4em; }
.article-body li p, .prose li p { margin-bottom: .6em; }
.article-body figure, .prose figure { margin: 30px 0; max-width: 100%; }
.article-body figcaption, .prose figcaption { color: var(--muted); font-size: .875rem; line-height: 1.7; text-align: center; margin-top: 12px; }
.article-body img, .prose img { max-width: 100%; height: auto; margin-left: auto; margin-right: auto; }
.article-body pre, .prose pre { max-width: 100%; overflow-x: auto; padding: 20px; margin: 26px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: .90625rem/1.8 var(--mono); white-space: pre; }
.article-body code, .prose code { font-family: var(--mono); font-size: .88em; padding: 2px 5px; border-radius: 4px; background: var(--accent-soft); }
.article-body pre code, .prose pre code { padding: 0; background: transparent; }
.article-body blockquote, .prose blockquote { margin: 28px 0; padding: 19px 23px; border-left: 3px solid var(--accent); background: linear-gradient(90deg, var(--accent-soft), transparent); color: var(--text); }
.article-body blockquote p:last-child, .prose blockquote p:last-child { margin-bottom: 0; }
.article-body hr, .prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.table-scroll, .article-body figure:has(> table), .prose figure:has(> table) { max-width: 100%; overflow-x: auto; margin: 25px 0; }
.article-body table, .prose table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.7; }
.article-body th, .article-body td, .prose th, .prose td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th, .prose th { background: var(--accent-soft); font-weight: 600; }
.article-body table p, .prose table p { margin: 0; }
.article-body details, .prose details { margin: 24px 0; padding: 17px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.article-body summary, .prose summary { cursor: pointer; font-weight: 600; }
.article-toc { max-width: 760px; margin: 25px auto 32px; padding: 17px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: .875rem; line-height: 1.8; }
.article-toc h2, .article-toc strong { font-size: .875rem; color: var(--text); }
.article-toc ol, .article-toc ul { margin: 9px 0 0; padding-left: 18px; }
.article-toc a:hover { color: var(--accent); }
.article-end { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px 24px; max-width: 760px; margin: 28px auto 0; padding: 23px 0; border-top: 1px solid var(--line); font-size: .875rem; }
.article-end a { min-height: 32px; display: inline-flex; align-items: center; color: var(--accent); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 25px 0; color: var(--muted); font-size: .875rem; }

/* Original text and media remain content, never a second theme runtime. */
.content-group { min-width: 0; margin-bottom: 25px; }
.content-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }
.content-column { min-width: 0; }
.content-column > h2:first-child { margin-top: 0; }
.sidebar { min-width: 0; padding-top: 24px; border-top: 1px solid var(--line); }
.media-text { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1fr); gap: 32px; align-items: center; margin: 28px 0; }
.media-text .entry-image { margin: 0; }
.media-text-content { min-width: 0; }
.entry-image { max-width: 100%; }
.entry-image img { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; border-radius: 10px; object-fit: contain; }
/* Independent columns keep full image ratios without a portrait stretching every row. */
.image-gallery { display: block; column-count: 3; column-gap: 16px; column-fill: balance; margin: 30px 0; line-height: 0; }
.image-gallery > div:not(.gallery-item), .gallery-row, .gallery-col { display: contents; }
.gallery-item { display: inline-block; width: 100%; min-width: 0; break-inside: avoid; page-break-inside: avoid; vertical-align: top; margin: 0 0 16px !important; line-height: 1.7; }
.gallery-item img { display: block; width: 100%; height: auto; border-radius: 10px; }
.post-list { list-style: none; padding: 0 !important; margin: 0 !important; }
.post-preview { padding: 0 0 30px; margin: 0 0 30px !important; border-bottom: 1px solid var(--line); }
.entry-title { font-size: 1.375rem; line-height: 1.45; margin: 15px 0 !important; }
.entry-date { color: var(--muted); font-size: .875rem; }
.entry-excerpt { color: var(--muted); font-size: 1rem; line-height: 1.85; }
.media-link, .attachment-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; margin: 16px 0; padding: 10px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .875rem; color: var(--accent); }
.author-avatar img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin: 0; }
.author-byline { color: var(--muted); font-size: .875rem; line-height: 1.7; }
.image-small { width: auto; max-width: min(100%, 240px); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin: 32px 0 18px; font-size: .875rem; }
.pagination a, .pagination [aria-current] { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; border-radius: 999px; }
.pagination [aria-current] { color: var(--accent); background: var(--accent-soft); }
.story-list { list-style: none; padding: 0 !important; margin: 0 !important; }
.story-list li { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 24px; padding: 23px 0; margin: 0 !important; border-top: 1px solid var(--line); }
.story-list time { color: var(--muted); font-size: .875rem; }
.story-list a { color: var(--text); font-size: 1.125rem; line-height: 1.6; }
.attachment-image { max-width: 960px; margin: 35px auto; }
.attachment-image img { display: block; max-width: 100%; height: auto; margin-inline: auto; border-radius: 12px; }
.attachment-image figcaption { color: var(--muted); font-size: .875rem; margin-top: 14px; text-align: center; }

.contact { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 50px 0 64px; padding: 35px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(120deg, var(--surface), var(--accent-soft)); }
.contact h2 { margin: 14px 0; line-height: 1.3; }
.contact p { color: var(--muted); font-size: 1rem; line-height: 1.8; }
.contact-links { display: flex; flex-direction: column; align-items: stretch; flex: 0 0 auto; gap: 12px; }
.site-footer { max-width: 1100px; margin: 0 auto; padding: 25px 32px 30px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; line-height: 1.6; }
.site-footer a:hover { color: var(--accent); }
.footer-credit { font-size: .8125rem; }
.footer-credit a { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 15px; }

/* Readable compact navigation, not desktop labels squeezed into a phone. */
@media (max-width: 1000px) {
  .header-location, .site-header .monogram { display: none; }
  .about-layout { gap: 38px; }
  .home-work-row { gap: 26px; padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 900px) {
  .image-gallery { column-count: 2; }
}
@media (max-width: 800px) {
  .hero-description { font-size: 1.1875rem; }
  .home-work-row { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 22px; }
  .selected-work-visual { width: 100%; }
  .publication-row { grid-template-columns: 170px minmax(0, 1fr); gap: 22px; }
  .card-body { padding: 22px; }
  .card-body h3 { font-size: 1.25rem; }
  .contact { padding: 28px; }
}
@media (max-width: 700px) {
  body { font-size: 1rem; }
  html { scroll-padding-top: 100px; }
  main.site-main, .site-main { padding-left: 22px; padding-right: 22px; }
  .site-header { height: 90px; padding: 19px 22px; }
  .primary-nav { top: 18px; max-width: calc(100vw - 24px); gap: 2px; padding: 5px; }
  .primary-nav a { width: 44px; min-width: 44px; height: 44px; min-height: 44px; gap: 0; padding: 0; }
  .primary-nav .link-icon { width: 18px; height: 18px; }
  .primary-nav .nav-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .primary-nav .icon-button { width: 44px; min-width: 44px; margin-left: 0; }
  .hero { padding-top: 20px; }
  .hero h1 { font-size: 2.25rem; line-height: 1.13; letter-spacing: -.035em; margin-top: 23px; margin-bottom: 16px; }
  .hero-description { font-size: 1rem; line-height: 1.75; }
  .hero-actions { gap: 12px 17px; margin-top: 22px; }
  .hero-bottom { gap: 8px 16px; margin-top: 20px; }
  .hero-bottom > span { flex-basis: 100%; }
  .featured-pill { font-size: .875rem; gap: 9px; padding: 6px 12px; }
  .section { padding-top: 44px; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
  .section-heading h2, h2 { font-size: 1.625rem; }
  .page-heading { padding-top: 30px; margin-bottom: 27px; }
  .page-heading h1, h1.page-heading { font-size: 2.25rem; letter-spacing: -.035em; }
  .page-heading p, .page-intro { font-size: 1rem; }
  .home-work-row { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 18px; border-radius: 18px; }
  .home-work-row + .home-work-row { margin-top: 20px; }
  .selected-work-visual { padding: 6px; border-radius: 12px; }
  .home-work-row h3 { font-size: 1.3125rem; }
  .publication-list { padding-bottom: 45px; }
  .publication-row { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 24px 0; }
  .publication-thumb { width: min(100%, 260px); }
  .publication-thumb img { max-height: 190px; }
  .research-grid { gap: 21px; padding-bottom: 30px; }
  .research-card, .about-content .research-card { grid-template-columns: minmax(0, 1fr); }
  .paper-cover, .about-content .paper-cover { padding: 19px 17px; }
  .paper-cover img, .about-content .paper-cover img { max-height: 240px; }
  .card-body, .about-content .card-body { padding: 22px; }
  .card-body h3, .about-content .card-body h3 { font-size: 1.25rem; }
  .about-layout { grid-template-columns: minmax(0, 1fr); gap: 27px; padding-top: 26px; padding-bottom: 48px; }
  .about-sidebar { position: static; padding: 0; max-height: none; overflow-y: visible; }
  .about-avatar { width: 120px; height: 120px; margin-top: 0; margin-bottom: 13px; }
  .about-sidebar nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 20px; }
  .about-sidebar .toc-link { font-size: .875rem; gap: 6px; }
  .about-sidebar .toc-link::before, .about-sidebar .toc-link.active::before { width: 8px; }
  .about-content > h1, .about-content .about-introduction { text-align: center; }
  .about-content h1 { font-size: 3rem; letter-spacing: -.04em; margin-top: 10px; }
  .about-role, .profile-role { font-size: 1.5rem; }
  .about-bio { margin-top: 28px; font-size: 1rem; }
  .bio-section { margin-top: 40px; }
  .bio-section h2 { font-size: 1.625rem; }
  .timeline-entry { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .timeline-entry > .timeline-year, .timeline-entry > .timeline-date, .timeline-entry > time, .timeline-entry > span { grid-column: 1; grid-row: 1; white-space: normal; }
  .timeline-entry > .timeline-content, .timeline-entry > div { grid-column: 1; grid-row: 2; }
  .timeline-entry > p { grid-column: 1; }
  .writing-row, .story-list li { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 23px 0; }
  .writing-title { font-size: 1.25rem; }
  .writing-date { padding-top: 0; }
  .writing-list { padding-bottom: 38px; }
  .filter-bar { gap: 8px; margin-top: 20px; }
  .filter-button { padding-left: 14px; padding-right: 14px; }
  .paper-detail { padding-top: 26px; padding-bottom: 43px; }
  .paper-detail-header { margin-top: 24px; margin-bottom: 30px; }
  .paper-detail-header h1 { font-size: 1.875rem; line-height: 1.3; letter-spacing: -.02em; }
  .paper-detail-header .authors { font-size: .875rem; }
  .article-body, .prose { font-size: 1rem; line-height: 1.9; }
  .article-body h2, .prose h2 { font-size: 1.5rem; }
  .article-body h3, .prose h3 { font-size: 1.25rem; }
  .article-body pre, .prose pre { padding: 16px; font-size: .875rem; }
  .article-body th, .article-body td, .prose th, .prose td { padding: 9px 11px; }
  .article-toc { padding: 16px 18px; }
  .image-gallery { column-count: 2; column-gap: 12px; }
  .gallery-item { margin-bottom: 12px !important; }
  .content-columns, .media-text { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .contact { margin: 36px 0 44px; padding: 25px; flex-direction: column; align-items: flex-start; gap: 24px; }
  .contact-links { width: 100%; align-items: flex-start; }
  .site-footer { padding: 23px 22px; }
  .footer-credit { order: 3; width: 100%; }
}
@media (max-width: 520px) {
  .image-gallery { column-count: 1; }
}
@media (max-width: 360px) {
  main.site-main, .site-main { padding-left: 18px; padding-right: 18px; }
  .hero h1 { font-size: 2rem; }
  .hero-actions { gap: 11px; }
  .about-content h1 { font-size: 2.625rem; }
  .card-body, .about-content .card-body { padding: 19px; }
  .section-heading .text-link { flex-shrink: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
