/* Pale-blue homepage theme. */
@font-face {
  font-family: 'Nickname Handwriting';
  src: url('fonts/ma-shan-zheng/nickname.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Mansalva';
  src: url('fonts/mansalva/Mansalva-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
html:has(body.brat) {
  background: #f5f9ff;
  scroll-behavior: smooth;
}
.brat {
  --paper: #f5f9ff;
  --ink: #27445d;
  --accent: #386c98;
  --line: #c5d7e9;
  --panel: #e3effc;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  max-width: 960px;
  padding: 0 32px;
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.6;
}
.brat ::selection { background: var(--accent); color: #fff; }
.brat .header { padding: 24px 0 34px; text-align: left; }
.brat-meta { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; }
.brat-meta nav { display: flex; gap: 24px; }
.brat .mobile-profile { display: none; }
.brat .portrait-frame img { filter: none; }
.brat .site-title { display: block; margin: 48px 0 10px; }
.brat .site-name {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(32px, 5.75vw, 72px);
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: -0.035em;
  transform: scaleX(1.035);
  transform-origin: left center;
  filter: blur(0.45px);
}
.brat-tagline { font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.04em; }
.brat .section { padding: 28px 0; }
.brat #about .section { border-top: 1px solid var(--line); }
.brat .about-content { gap: 36px; }
.brat .text { margin: 0; min-width: 0; }
.brat .about-para { font-size: 15px; }
.brat .about-para + .about-para { margin-top: 14px; }
.brat #about .research-interest .about-para a.organization-link { display: inline; margin-inline: 3px; white-space: nowrap; vertical-align: baseline; line-height: inherit; }
.brat #about .research-interest .about-para a.organization-link-wrap { white-space: normal; }
.brat .organization-logo.organization-logo-bit { object-fit: cover; object-position: 3% center; }
.brat .organization-logo { display: inline-block; width: 14px; height: 14px; margin-right: 8px; object-fit: contain; vertical-align: -2px; }
.brat .organization-logo.fa-tiktok { font-size: 14px; line-height: 1; vertical-align: 0; color: #161823; text-align: center; text-shadow: -1px -0.5px #25f4ee, 1px 0.5px #fe2c55; }
.brat .portrait-frame { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 12px; }
.brat .profile-pic { margin: 0; flex: 0 0 182px; width: 182px; height: 182px; }
.brat .portrait-frame img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 0; border: 0; }
.brat h2 { color: var(--ink); font-size: 29px; font-weight: 400; letter-spacing: -0.055em; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; }
.brat h3 { color: var(--ink); }
.brat .name, .brat .venue-name, .brat .date-tag, .brat .service-role,
.brat .uni, .brat .ads, .brat .pp-name, .brat .project-direction,
.brat .project-note, .brat .project-cluster .pp-name,
.brat .pronounce-text, .brat .contact-icon, .brat .pronunciation-icon,
.brat .label-icon, .brat .news-icon, .brat .publication-group > h3 { color: var(--ink); }
.brat a .pp-name { color: inherit; }
.brat .professional-highlight, .brat .translator-highlight, .brat .research-question { color: var(--ink); font-weight: 700; }
.brat a:not(.link-list a):not(.publication a):not(#email):not(.social-icon-link),
.brat .publication a, .brat .copy-email, .brat .news-toggle {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.brat a:not(.link-list a):not(.publication a):not(#email):not(.social-icon-link):is(:hover, :focus-visible),
.brat .publication a:is(:hover, :focus-visible), .brat .copy-email:is(:hover, :focus-visible), .brat .news-toggle:is(:hover, :focus-visible) {
  color: #fff;
  background: var(--accent);
}
.brat a:focus-visible, .brat button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.brat .link-list.profile-badges { margin-top: 22px; gap: 8px; flex-direction: column; align-items: flex-start; }
.brat .profile-badges .quick-contact-label { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink); }
.brat .profile-badges .badge-group { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.brat .profile-badges a.profile-badge {
  display: inline-flex;
  flex: none;
  width: auto;
  height: 22px;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid #b7c8d9;
  border-radius: 3px;
  background: #f4f7fa;
  color: #425466;
  font: 11px/1 Verdana, Geneva, sans-serif;
  text-transform: none;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.brat .profile-badge .badge-label, .brat .profile-badge .badge-value {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 6px;
  gap: 4px;
}
.brat .profile-badge .badge-label { background: var(--badge-tint, #dceafe); }
.brat .profile-badge .badge-value { background: #fff; color: var(--ink); font-variant-numeric: tabular-nums; }
.brat .profile-badges .profile-badge i {
  color: var(--badge-icon, #4285f4);
  background: none;
  font-size: 13px;
  margin: 0;
}
.brat .profile-badge.badge-orcid { --badge-tint: #e8f0db; --badge-icon: #648522; }
.brat .profile-badge.badge-linkedin { --badge-tint: #dceafa; --badge-icon: #0a66c2; }
.brat .profile-badge.badge-dblp { --badge-tint: #fff0b8; --badge-icon: #99700a; }
.brat .profile-badge.rednote-profile { --badge-tint: #ffe0e6; }
.brat .profile-badges .rednote-mark { color: #ff2442; width: 20px; height: 10px; }
.brat .profile-badge.badge-x { --badge-tint: #e6e6e6; --badge-icon: #222; }
.brat .profile-badges a.profile-badge:is(:hover, :focus-visible) {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 3px 7px rgb(39 68 93 / 14%);
}
.brat .social-note {
  position: relative;
  background: var(--panel);
  color: var(--ink);
  border: 0;
  border-radius: 0;
  padding: 10px 16px;
  margin: 24px 0 12px;
  width: fit-content;
  max-width: 100%;
}
.brat .social-note::before, .brat .social-note::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12'%3E%3Cpath d='M0 6 Q30 -4 60 6 T120 6 V12 H0 Z' fill='%23e3effc'/%3E%3C/svg%3E") repeat-x left bottom / 120px 12px;
  pointer-events: none;
}
.brat .social-note::before { top: -11px; }
.brat .social-note::after { bottom: -11px; transform: rotate(180deg); }
.brat .social-note-intro { color: inherit; }
.brat .social-note .job-search-note {
  color: #1764b0;
  font-weight: 600;
}
.brat .social-alias { white-space: nowrap; }
.brat .social-handle-zh { font-family: 'Nickname Handwriting', 'Kaiti SC', KaiTi, cursive; font-size: 25px; font-weight: 400; line-height: 1; vertical-align: -2px; }
.brat .social-handle { color: inherit; font-family: 'Mansalva', Arial, sans-serif; font-size: 25px; font-weight: 400; letter-spacing: 0.01em; line-height: 1; }
.brat .cockroach-icon { display: inline-block; width: 26px; height: 29px; vertical-align: -8px; margin-left: 3px; object-fit: contain; transform: rotate(-20deg); }
.brat .social-icon-link { color: var(--ink); }
.brat .link-list a[aria-label="X"]:is(:hover, :focus-visible) { color: var(--ink); transform: translateY(-2px); }
.brat .link-list a[aria-label="X"]:is(:hover, :focus-visible) .x-icon { color: inherit; }
.brat .social-icon-link[aria-label="X"] { transition: transform 0.18s ease; }
.brat .social-icon-link[aria-label="X"]:is(:hover, :focus-visible) { color: var(--ink); transform: translateY(-2px); }
.brat .rednote-mark {
  display: block;
  flex: none;
  width: 32px;
  height: 12px;
  background: currentColor;
  transition: background-color 0.18s ease;
  -webkit-mask: url("images/icons/xiaohongshu.svg") center / contain no-repeat;
  mask: url("images/icons/xiaohongshu.svg") center / contain no-repeat;
}
.brat .social-icon-link[aria-label="RedNote 小红书"] { width: 32px; }
.brat .social-icon-link[aria-label="RedNote 小红书"]:is(:hover, :focus-visible) { color: var(--ink); transform: translateY(-2px); }
.brat .contact-line { margin-top: 14px; }
.brat .copy-email { border-bottom: 0; }
.brat .project-map { gap: 0; border: 1px solid var(--line); }
.brat a.project-cluster:not(.link-list a):not(.publication a):not(#email):not(.social-icon-link) {
  display: flex;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  padding: 22px;
  flex: 1 1 0;
  min-width: 0;
  line-height: 1.6;
}
.brat a.project-cluster + a.project-cluster { border-left: 1px solid var(--line) !important; }
.brat .project-cluster h3 { font-size: 20px; font-weight: 400; letter-spacing: -0.04em; margin-bottom: 12px; }
.brat a.project-cluster:hover { box-shadow: inset 0 -5px var(--ink); }
.brat .ranka { display: inline; border: 0; border-radius: 0; background: transparent; color: inherit; padding: 0; white-space: normal; }
.brat .ranka .label-icon { color: inherit; }
.brat #press li { display: grid; grid-template-columns: 76px 190px minmax(0, 1fr); gap: 12px; align-items: baseline; margin-bottom: 18px; }
.brat #press .date-tag, .brat #press .ads { margin: 0; white-space: nowrap; }
.brat #press li a:not(.link-list a):not(.publication a):not(#email):not(.social-icon-link) {
  display: block;
  justify-self: start;
  max-width: 100%;
  min-width: 0;
  line-height: 1.6;
}
.brat .publication-group + .publication-group { border-color: var(--line); }
.brat .publication-wrapper { gap: 24px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.brat .publication-group > .publication-wrapper:last-child { border-bottom: 0; padding-bottom: 0; }
.brat .pub-visual { flex: 0 0 240px; width: 240px; height: auto; aspect-ratio: 11 / 6; position: relative; overflow: hidden; margin: 0; border: 0; box-sizing: border-box; background: transparent; }
.brat .pub-visual::after { content: none; }
.brat .conf-logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 0; }
.brat .pub-badges { position: absolute; inset: 6px; margin: 0; gap: 4px; }
.brat .pub-badges .ranka, .brat .pub-badges .pp-name { background: #e3effc; color: var(--ink); border: 0; border-radius: 3px; box-shadow: none; padding: 3px 6px; max-width: 100%; box-sizing: border-box; font-size: 11px; font-weight: 400; line-height: 1.3; white-space: normal; }
.brat .pub-badges .pub-venue { margin-top: auto; }
.brat .publication { min-width: 0; }
.brat .publication a { white-space: nowrap; }
.brat .papertitle { font-size: 17px; line-height: 1.35; margin-bottom: 8px; }
.brat .footer { color: var(--ink); border-top: 1px solid var(--line); text-align: left; padding: 20px 0 32px; }
@media (max-width: 768px) {
  .brat { padding: 0 20px; }
  .brat .header { padding: 20px 0 24px; }
  .brat .brat-hero { display: grid; grid-template-columns: minmax(0, 1fr) clamp(80px, 24vw, 104px); align-items: center; gap: 20px; margin: 30px 0 0; }
  .brat .brat-heading { min-width: 0; }
  .brat .brat-tagline { max-width: 20ch; margin-top: 10px; font-size: 16px; line-height: 1.45; letter-spacing: -0.015em; }
  .brat .site-title { margin: 0; min-width: 0; }
  .brat .site-name { font-size: clamp(30px, 8vw, 38px); white-space: nowrap; transform: none; }
  .brat .mobile-profile { display: block; width: 100%; aspect-ratio: 1; border: 0; box-sizing: border-box; }
  .brat .about-content { flex-direction: column; gap: 22px; align-items: stretch; text-align: left; }
  .brat .profile-pic { display: none; }
  .brat .about-para, .brat .social-note, .brat .section ul li,
  .brat .project-note, .brat .publication p:not(.papertitle),
  .brat .publication a, .brat .news-toggle { font-size: 14px; }
  .brat .project-map { display: flex; flex-direction: column; }
  .brat a.project-cluster + a.project-cluster { border-left: 0 !important; border-top: 1px solid var(--line) !important; }
  .brat .publication-wrapper { gap: 16px; }
  .brat .pub-visual { flex: none; width: 240px; align-self: flex-start; }
  .brat #press li { grid-template-columns: 76px minmax(0, 1fr); gap: 2px 12px; margin-bottom: 16px; }
  .brat #press li a { grid-column: 1 / -1; }
  .brat-meta { font-size: 11px; gap: 12px; }
  .brat-meta nav { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.brat) { scroll-behavior: auto; }
  .brat * { transition: none; }
}
@media (max-width: 380px) {
  .brat .link-list { gap: 6px; }
}

.brat .external-arrow { display: inline-block; width: 0.9em; height: 0.9em; vertical-align: -0.08em; }

/* Language navigation and Chinese reading rhythm. */
.brat .awards-zh .award-details { display: block; margin-top: 3px; color: #526b82; font-size: .92em; line-height: 1.6; }
.brat .awards-zh > li { margin-bottom: 14px; }
.brat .language-switch { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.brat .language-switch a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
html[lang="zh-Hans"] .brat { font-family: Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
html[lang="zh-Hans"] .brat .about-para { line-height: 1.9; }
html[lang="zh-Hans"] .brat .brat-tagline { letter-spacing: .08em; }
@media (max-width: 600px) {
  .brat .brat-meta { flex-wrap: wrap; gap: 10px; }
  .brat .brat-meta nav { flex-wrap: wrap; }
}
