* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 0; }
body { margin: 0; color: var(--ink); background: var(--surface); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body[data-theme="midnight"] { color-scheme: dark; }
a { color: inherit; text-underline-offset: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--accent-deep); color: #fff; }
.profile-shell { width: min(1160px, calc(100% - 80px)); margin: 0 auto; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.profile-topbar { min-height: 104px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.lab-wordmark { display: flex; gap: 2px; align-items: center; font-size: 21px; letter-spacing: -.7px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.lab-wordmark > span:first-child { color: var(--accent-deep); }
.wordmark-caption { margin-left: 20px; padding-left: 20px; border-left: 1px solid var(--line); font-size: 12px; color: var(--muted); letter-spacing: .05em; font-weight: 500; }
.topbar-links { display: flex; gap: 24px; align-items: center; font-size: 13px; }
.quiet-link { text-decoration: none; color: var(--muted); }
.quiet-link:hover { color: var(--ink); }
.language-link { text-decoration: none; font-size: 12px; font-weight: 700; min-width: 40px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; text-align: center; }
.language-link:hover { background: var(--card); }
.manager-bar { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; background: var(--card-soft); font-size: 12px; }
.publication-state { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.publication-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-deep); }
.publication-state.is-private::before { background: #b46d1f; }
.manager-links { display: flex; flex-wrap: wrap; gap: 20px; }
.manager-links a { text-decoration: none; }
.manager-links a:hover { text-decoration: underline; }
.edit-link { font-weight: 700; }
.profile-hero { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.profile-cover { position: relative; height: 170px; overflow: hidden; background: color-mix(in srgb, var(--accent-deep) 17%, var(--surface)); border-bottom: 1px solid var(--line); }
.profile-cover:not(.has-image)::before, .profile-cover:not(.has-image)::after { content: ""; position: absolute; width: 420px; height: 420px; border: 1px solid color-mix(in srgb, var(--accent-deep) 23%, transparent); border-radius: 50%; right: 8%; top: -250px; }
.profile-cover:not(.has-image)::after { width: 520px; height: 520px; top: -300px; right: 4%; }
.profile-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-mark { position: absolute; right: 32px; bottom: 19px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .2em; }
.has-image .cover-mark { display: none; }
.profile-introduction { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 38px; padding: 0 46px 44px; }
.profile-portrait { position: relative; width: 180px; height: 180px; margin-top: -58px; border: 7px solid var(--surface); border-radius: 18px; overflow: hidden; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.profile-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--accent-deep); font-family: Georgia, "Songti SC", serif; font-size: 72px; }
.profile-identity { padding-top: 28px; min-width: 0; }
.role-line { display: flex; gap: 8px; align-items: center; color: var(--accent-deep); font-weight: 700; font-size: 12px; letter-spacing: .04em; margin: 0 0 8px; }
.role-line::before { content: ""; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: currentColor; }
h1 { margin: 0; font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -.055em; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
html[lang="en"] h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.045em; }
.alternate-name { margin: 7px 0 0; font-size: 16px; color: var(--muted); letter-spacing: .015em; }
.headline { font-size: 19px; font-weight: 600; line-height: 1.6; margin: 23px 0 0; text-wrap: pretty; overflow-wrap: anywhere; }
.profile-summary { margin: 13px 0 0; max-width: 64ch; color: var(--muted); font-size: 14px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }
.research-focus { display: flex; gap: 8px 15px; margin-top: 24px; padding-top: 19px; border-top: 1px solid var(--line); align-items: baseline; }
.research-focus > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.research-focus > p { font-size: 13px; font-weight: 500; margin: 0; overflow-wrap: anywhere; }
.profile-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.profile-link { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 39px; border: 1px solid var(--line); padding: 8px 13px; border-radius: 6px; text-decoration: none; font-size: 12px; font-weight: 600; line-height: 1.5; transition: background .15s, border-color .15s; }
.profile-link > span { opacity: .65; }
.profile-link:hover { border-color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.profile-link.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.profile-link.primary:hover { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }
.profile-body { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 34px; padding-top: 40px; align-items: start; }
.profile-body:focus { outline: none; }
.profile-body.is-empty { display: block; }
.profile-directory { position: sticky; top: 32px; }
.section-directory { padding: 8px 0; }
.directory-label { margin: 0 0 15px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .16em; }
.section-directory ol { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.section-directory li { min-width: 0; }
.section-directory li a { display: flex; align-items: baseline; gap: 12px; padding: 9px 11px; margin-left: -11px; text-decoration: none; border-radius: 5px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; border-left: 2px solid transparent; }
.directory-number { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; opacity: .65; flex-shrink: 0; }
.section-directory li a:hover, .section-directory li a[aria-current="location"] { background: var(--card-soft); color: var(--ink); border-left-color: var(--accent-deep); }
.section-directory li a[aria-current="location"] { font-weight: 600; }
.directory-back { display: inline-flex; gap: 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); text-decoration: none; font-size: 11px; color: var(--muted); }
.directory-back:hover { color: var(--ink); }
.profile-sections { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.profile-section { min-width: 0; padding: 32px 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); scroll-margin-top: 32px; }
.section-heading { display: flex; align-items: baseline; gap: 14px; margin-bottom: 23px; }
.section-number { color: var(--accent-deep); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 500; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
html[lang="en"] .section-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 400; }
.freeform-copy { color: var(--ink); font-size: 14px; line-height: 1.95; overflow-wrap: anywhere; }
.freeform-copy > :first-child { margin-top: 0; }
.freeform-copy > :last-child { margin-bottom: 0; }
.freeform-copy p { margin: 0 0 16px; }
.freeform-copy h1, .freeform-copy h2, .freeform-copy h3, .freeform-copy h4, .freeform-copy h5, .freeform-copy h6 { font-family: inherit; font-weight: 650; letter-spacing: -.01em; line-height: 1.5; margin: 24px 0 12px; font-size: 18px; }
.freeform-copy h3, .freeform-copy h4, .freeform-copy h5, .freeform-copy h6 { font-size: 16px; }
.freeform-copy a { color: var(--accent-deep); text-decoration-thickness: 1px; }
.freeform-copy a:hover { color: var(--ink); }
.freeform-copy ul, .freeform-copy ol { padding-left: 22px; margin: 16px 0; }
.freeform-copy li + li { margin-top: 7px; }
.freeform-copy li::marker { color: var(--accent-deep); }
.freeform-copy blockquote { border-left: 3px solid var(--accent-deep); padding: 1px 0 1px 19px; margin: 24px 0; color: var(--muted); }
.freeform-copy pre { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); padding: 17px 20px; border-radius: 7px; background: var(--surface); font-size: 12px; line-height: 1.8; tab-size: 4; }
.freeform-copy code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; background: var(--surface); padding: 2px 5px; border-radius: 3px; }
.freeform-copy pre code { background: none; padding: 0; font-size: inherit; }
.freeform-copy table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 20px 0; font-size: 13px; }
.freeform-copy th, .freeform-copy td { border: 1px solid var(--line); padding: 9px 12px; min-width: 100px; text-align: left; }
.freeform-copy th { background: var(--surface); font-weight: 600; }
.freeform-copy hr { border: 0; border-top: 1px solid var(--line); margin: 25px 0; }
.profile-list { list-style: none; padding: 0; margin: 0; font-size: 14px; line-height: 1.85; }
.profile-list li { position: relative; padding: 17px 0 17px 25px; overflow-wrap: anywhere; }
.profile-list li + li { border-top: 1px solid var(--line); }
.profile-list li:first-child { padding-top: 0; }
.profile-list li:last-child { padding-bottom: 0; }
.profile-list li::before { content: "↗"; position: absolute; left: 0; color: var(--accent-deep); font-size: 12px; }
.list-publications { counter-reset: papers; }
.list-publications li { counter-increment: papers; padding-left: 38px; }
.list-publications li::before { content: counter(papers, decimal-leading-zero); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; top: 21px; }
.list-publications li:first-child::before { top: 4px; }
.list-education li { border-left: 1px solid var(--line); margin-left: 4px; padding-left: 24px; }
.list-education li + li { border-top: 0; }
.list-education li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-deep); border: 2px solid var(--surface); left: -4px; top: 25px; }
.list-education li:first-child::before { top: 8px; }
.list-interests { display: flex; flex-wrap: wrap; gap: 10px; }
.list-interests li, .list-interests li:first-child, .list-interests li:last-child { border: 1px solid var(--line); padding: 7px 12px; border-radius: 5px; background: var(--surface); font-size: 12px; }
.list-interests li::before { display: none; }
.quote-card { border-left: 3px solid var(--accent-deep); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.quote-card .freeform-copy { font-size: 18px; line-height: 1.9; }
html[lang="en"] .quote-card .freeform-copy { font-family: Georgia, "Times New Roman", serif; font-size: 22px; }
.quote-card .section-heading h2 { font-family: inherit; font-size: 12px; letter-spacing: .02em; font-weight: 500; color: var(--muted); }
.quote-card .section-heading { margin-bottom: 14px; }
.empty-profile { padding: 40px; }
.empty-profile h2 { font-size: 22px; font-weight: 600; }
.empty-profile > p:last-child { color: var(--muted); font-size: 14px; margin-bottom: 0; }
.profile-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 56px; padding: 24px 0 36px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.profile-footer a { text-decoration: none; }
.profile-footer a:first-child { font-weight: 800; font-size: 13px; color: var(--ink); letter-spacing: -.03em; }
.profile-footer a:last-child { margin-left: auto; }
body[data-theme="midnight"] .role-line, body[data-theme="midnight"] .section-number, body[data-theme="midnight"] .freeform-copy a, body[data-theme="midnight"] .profile-list li::before { color: var(--accent); }
body[data-theme="midnight"] .avatar-fallback { color: var(--ink); }
@media (max-width: 950px) {
  .profile-shell { width: calc(100% - 48px); }
  .profile-introduction { grid-template-columns: 145px minmax(0, 1fr); gap: 28px; padding: 0 30px 32px; }
  .profile-portrait { width: 145px; height: 145px; }
  .profile-body { grid-template-columns: 175px minmax(0, 1fr); gap: 22px; }
  .profile-section { padding: 26px; }
  .profile-cover { height: 150px; }
}
@media (max-width: 700px) {
  .profile-shell { width: calc(100% - 32px); }
  .profile-topbar { min-height: 78px; gap: 14px; }
  .lab-wordmark { font-size: 18px; }
  .wordmark-caption { display: none; }
  .topbar-links { gap: 13px; font-size: 11px; }
  .profile-cover { height: 125px; }
  .cover-mark { right: 19px; bottom: 15px; font-size: 7px; letter-spacing: .1em; }
  .profile-introduction { display: block; padding: 0 24px 28px; }
  .profile-portrait { width: 112px; height: 112px; margin-top: -43px; border-width: 5px; border-radius: 12px; }
  .avatar-fallback { font-size: 48px; }
  .profile-identity { padding-top: 20px; }
  h1 { font-size: 36px; }
  .role-line { font-size: 11px; margin-bottom: 9px; }
  .alternate-name { font-size: 14px; }
  .headline { font-size: 17px; margin-top: 20px; }
  .profile-summary { font-size: 13px; }
  .research-focus { display: block; margin-top: 20px; padding-top: 15px; }
  .research-focus > p { margin-top: 4px; font-size: 12px; }
  .profile-links { gap: 7px; margin-top: 20px; }
  .profile-link { font-size: 11px; padding: 8px 11px; min-height: 40px; gap: 10px; }
  .profile-body { display: block; padding-top: 24px; }
  .profile-directory { position: sticky; top: 0; z-index: 3; margin: -1px -16px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .section-directory { padding: 10px 16px; overflow-x: auto; scrollbar-width: thin; }
  .section-directory .directory-label, .directory-back, .directory-number { display: none; }
  .section-directory ol { flex-direction: row; width: max-content; gap: 6px; }
  .section-directory li a { white-space: nowrap; font-size: 11px; margin: 0; padding: 9px 12px; border-left: none; border-bottom: 2px solid transparent; border-radius: 4px 4px 0 0; }
  .section-directory li a:hover, .section-directory li a[aria-current="location"] { border-bottom-color: var(--accent-deep); }
  .profile-section { padding: 25px 22px; scroll-margin-top: 82px; }
  .profile-sections { gap: 16px; }
  .section-heading { gap: 10px; margin-bottom: 19px; }
  .section-heading h2 { font-size: 20px; }
  html[lang="en"] .section-heading h2 { font-size: 23px; }
  .freeform-copy, .profile-list { font-size: 13px; }
  .quote-card .section-heading h2 { font-size: 12px; }
  .quote-card .freeform-copy { font-size: 16px; }
  html[lang="en"] .quote-card .freeform-copy { font-size: 19px; }
  .manager-bar { padding: 10px 12px; font-size: 11px; }
  .profile-footer { margin-top: 36px; gap: 10px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  :root { --ink: #111; --muted: #444; --surface: #fff; --card: #fff; --card-soft: #fff; --line: #ddd; --accent: #222; --accent-deep: #222; }
  body { background: #fff; color: #111; }
  .profile-shell { width: 100%; }
  .profile-topbar, .manager-bar, .profile-cover, .profile-directory, .profile-footer, .skip-link { display: none; }
  .profile-hero { border: 0; }
  .profile-introduction { padding: 0 0 25px; }
  .profile-portrait { margin-top: 0; }
  .profile-identity { padding-top: 0; }
  .profile-body { display: block; padding-top: 0; }
  .profile-section { break-inside: avoid; border: 0; border-top: 1px solid #ddd; border-radius: 0; padding: 20px 0; }
  .profile-sections { gap: 0; }
}
