:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f4f6f8;
  --text: #171b22;
  --text-soft: #556072;
  --text-faint: #7b8494;
  --line: #dbe1e8;
  --accent: #2f6fcf;
  --accent-soft: rgba(47, 111, 207, 0.08);
  --shadow: none;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1.82;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes page-pop-in {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

html.theme-transition body,
html.theme-transition body *,
html.theme-transition body *::before,
html.theme-transition body *::after {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

img {
  max-width: 100%;
  height: auto;
}

button,
a {
  font: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 28px 28px 64px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 16px;
  margin-bottom: 48px;
  border-bottom: 1px dashed var(--line);
}

.site-brand {
  color: var(--text);
  font-weight: 500;
  text-transform: none;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.22ch;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.12ch;
}

.site-mark-link,
.site-path {
  color: var(--accent);
}

.site-mark-link {
  text-decoration: none;
}

.site-mark-link:hover {
  text-decoration: none;
}

.site-mark-prompt {
  color: var(--text);
}

.site-path {
  margin-left: 0.12ch;
}

.site-brand::after {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 0.88ch;
  height: 1.02em;
  margin-left: 0.1ch;
  align-self: center;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 0.55rem color-mix(in srgb, var(--accent) 28%, transparent);
  animation: hero-cursor-fade 1.6s ease-in-out infinite;
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  color: var(--text-soft);
  margin-left: auto;
}

.nav-links a {
  color: inherit;
  font-weight: 500;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-links a.nav-active {
  color: var(--text);
  text-decoration: none;
}

#theme-switcher {
  border: 0;
  background: transparent;
  color: var(--text-faint);
  padding: 0;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

#theme-switcher:hover {
  background: transparent;
  color: var(--text-soft);
}

.hero,
.page-header,
.content-section,
.site-footer {
  opacity: 0;
  animation: page-pop-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero,
.page-header {
  margin-bottom: 52px;
}

.hero {
  animation-delay: 0.04s;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.hero-media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.content-section:nth-of-type(1) {
  animation-delay: 0.08s;
}

.content-section:nth-of-type(2) {
  animation-delay: 0.12s;
}

.content-section:nth-of-type(3) {
  animation-delay: 0.16s;
}

.content-section:nth-of-type(4) {
  animation-delay: 0.2s;
}

.content-section:nth-of-type(5) {
  animation-delay: 0.24s;
}

.content-section:nth-of-type(6) {
  animation-delay: 0.28s;
}

.content-section:nth-of-type(7) {
  animation-delay: 0.32s;
}

.content-section:nth-of-type(8) {
  animation-delay: 0.36s;
}

.site-footer {
  animation-delay: 0.4s;
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .page-header,
  .content-section,
  .site-footer {
    opacity: 1;
    animation: none;
  }

  .site-brand::after {
    animation: none;
    opacity: 0.82;
  }
}

.prompt-line {
  margin: 8px 0 0;
  color: var(--text-faint);
  font-size: 0.94rem;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2.6rem, 5.8vw, 3.4rem);
  line-height: 1.08;
  font-weight: 700;
}

.intro-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
  color: var(--text-faint);
}

.intro-title::before {
  content: none;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.intro-rule {
  margin: 2px 0 12px;
  color: var(--text);
  line-height: 1;
}

@keyframes hero-cursor-fade {
  0%, 18% {
    opacity: 0;
  }

  50% {
    opacity: 0.92;
  }

  100% {
    opacity: 0;
  }
}

.page-summary {
  margin: 0 0 14px;
  color: var(--text);
  text-wrap: pretty;
}

.hero-copy {
  max-width: none;
}

.hero-intro {
  padding-top: 2px;
  max-width: none;
}

.hero-intro p {
  margin: 0 0 20px;
  color: var(--text-soft);
  line-height: 1.78;
  text-align: left;
  text-justify: auto;
  hyphens: none;
}

.hero-intro p:last-child {
  margin-bottom: 0;
}

.intro-highlight {
  color: var(--text) !important;
}

.page-note,
.section-intro,
.pub-meta,
.pub-venue,
.news-text,
.stack-item p,
.detail-item p,
.footer-meta,
.visitor-map-fallback,
.plain-list,
.award-list,
.stack-tags {
  color: var(--text-soft);
}

.news-text {
  color: color-mix(in srgb, var(--text-soft) 90%, var(--line));
}

.page-note,
.page-summary {
  max-width: none;
}

.intro-kicker {
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
  align-items: center;
  color: var(--text-faint);
}

.hero-links a {
  color: var(--text-soft);
}

.hero-links span {
  color: var(--line);
}

.hero-focus {
  margin-top: 10px;
  color: var(--text-soft);
  line-height: 1.62;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
  align-items: center;
  color: var(--text-faint);
}

.resource-links a {
  color: var(--text-soft);
}

.resource-links span {
  color: var(--line);
}

.focus-label {
  color: var(--text-faint);
}


.contact-list li::after {
  content: " /";
  color: var(--line);
  margin-left: 8px;
}

.contact-list li:last-child::after {
  content: "";
  margin-left: 0;
}

.contact-list a {
  display: inline-block;
  padding: 2px 0;
}

.jump-line {
  margin-top: 10px;
  color: var(--text-faint);
}


.profile-container {
  position: relative;
  width: 148px;
  aspect-ratio: 2 / 3;
  border: 1px dashed var(--line);
  overflow: hidden;
  background: var(--surface);
}

.profile-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.profile-image.default {
  opacity: 1;
}

.profile-image.hover {
  opacity: 0;
}

.profile-container:hover .profile-image.default,
.profile-container.toggled .profile-image.default {
  opacity: 0;
}

.profile-container:hover .profile-image.hover,
.profile-container.toggled .profile-image.hover {
  opacity: 1;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 42px;
}

.content-section {
  padding-top: 12px;
  scroll-margin-top: 24px;
}

.content-section > p,
.content-section > .section-intro {
  max-width: none;
  text-align: left;
  text-justify: auto;
  hyphens: none;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-link {
  white-space: nowrap;
  font-size: 0.92rem;
  color: var(--text-faint);
}

h2 {
  margin: 0 0 14px;
  font-size: 1.08rem;
  font-weight: 700;
  text-transform: lowercase;
}

h2::before {
  content: "> ";
  color: var(--text-faint);
}

h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
}

.group-title {
  margin: 18px 0 10px;
  color: var(--text-faint);
  text-transform: lowercase;
}

p {
  margin: 0;
}

.publication-list,
.news-list,
.plain-list,
.award-list {
  margin: 0;
  padding: 0;
}

.publication-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: publication;
}

.latest-publications {
  animation-delay: 0.14s;
}

.latest-publications h2::before {
  content: none;
}

.latest-heading {
  margin-bottom: 14px;
}

.latest-heading h2 {
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
}

.latest-heading-rule {
  margin-top: -3px;
  color: var(--text);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.selected-list {
  gap: 26px;
}

.selected-list .publication-item,
.selected-list .publication-item:first-child {
  position: static;
  padding-left: 0;
  padding-top: 0;
  border-top: 0;
}

.selected-list .publication-item::before {
  content: none;
}

.pub-title-line {
  display: block;
  line-height: 1.55;
}

.selected-list .pub-title {
  font-weight: 800;
  color: var(--text);
}

.inline-links {
  display: inline;
  margin-left: 0.18ch;
}

.inline-links .inline-link,
.inline-links a {
  margin-left: 0.16ch;
  color: #5f9ff2;
}

.pub-authors-line {
  margin-top: 3px;
  color: var(--text);
  line-height: 1.5;
}

.pub-venue-line {
  margin-top: 2px;
  color: var(--text-soft);
  line-height: 1.35;
}

.latest-publications-more {
  margin-top: 14px;
  color: var(--text-faint);
}

.latest-publications-more a {
  color: var(--text-faint);
}

.full-list .publication-item {
  position: relative;
  padding-left: 36px;
}

.full-list .publication-item::before {
  counter-increment: publication;
  content: "[" counter(publication) "]";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text-faint);
}

.publication-item {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.publication-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.pub-title {
  color: var(--text);
  margin-bottom: 4px;
}

.pub-venue {
  margin-top: 2px;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}

.pub-links a,
.inline-link {
  color: var(--accent);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.inline-link:hover,
.pub-links a:hover {
  text-decoration: underline;
}

.contact-lead {
  margin: 0 0 18px;
  color: var(--text-soft);
}

.contact-block {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-block li {
  margin: 0 0 8px;
  color: var(--text-soft);
}

.contact-block a {
  color: inherit;
}

.contact-block .inline-link {
  color: inherit;
}

.contact-block a:hover {
  color: var(--text);
}

.contact-block .inline-link:hover {
  color: var(--text);
}

.contact-block li::before {
  content: "- ";
  color: var(--text);
}

.news-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.news-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.news-date,
.detail-side,
.award-year {
  color: var(--text-faint);
  white-space: nowrap;
}

.stack-list,
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-item,
.detail-item {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.stack-item:first-child,
.detail-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.stack-tags {
  margin-top: 8px;
  font-size: 0.95rem;
}

.detail-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
}

.logo-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.logo-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.entry-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: none;
  background: transparent;
  padding: 0;
  flex-shrink: 0;
}

.entry-logo-wide {
  width: 56px;
}

.entry-logo-sjtu {
  width: 76px;
  height: 76px;
  padding: 0;
  object-fit: contain;
  object-position: center;
}

.plain-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plain-list li,
.award-list li {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.plain-list li:first-child,
.award-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.award-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.award-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.award-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.meta-badge {
  display: inline-block;
  margin-left: 8px;
  color: var(--text);
  border: 1px dashed var(--line);
  padding: 0 6px;
  font-size: 0.85rem;
}

.site-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.visitor-record {
  margin-top: 18px;
}

.footer-label {
  margin: 0 0 8px;
  color: var(--text-faint);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.compact-footer {
  margin-top: 28px;
}

.footer-credit {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.footer-credit a {
  color: inherit;
}

.footer-credit a:hover {
  color: var(--text-soft);
}

.visitor-map {
  margin-top: 0;
  width: min(100%, 560px);
}

.visitor-map > div,
.visitor-map iframe,
.visitor-map img {
  width: 100% !important;
  max-width: 100% !important;
}

.visitor-map img,
.visitor-map iframe {
  display: block;
  border: 1px dashed var(--line);
}

.visitor-map-fallback {
  font-size: 0.95rem;
}

.visitor-map-fallback .fallback-help {
  display: none;
  margin-top: 8px;
}

.visitor-map-fallback.show-help .fallback-help {
  display: block;
}

.visitor-map-fallback[data-state="loaded"] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 12, 16, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  z-index: 1000;
}

.modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-panel {
  position: relative;
  width: min(92vw, 900px);
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.video-panel {
  width: min(84vw, 980px);
  height: min(70vh, 620px);
  max-width: none;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-panel video,
.pdf-panel iframe {
  display: block;
  width: 100%;
}

.video-panel video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  max-height: none;
}

.pdf-panel {
  height: min(88vh, 920px);
}

.image-panel {
  width: min(92vw, 420px);
  padding: 20px;
  background: var(--surface);
}

.image-panel img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px dashed var(--line);
}

.pdf-panel iframe {
  height: 100%;
  border: 0;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.close-button:hover {
  background: color-mix(in srgb, var(--surface-soft) 92%, transparent);
}

body.dark-mode {
  --bg: #11141b;
  --surface: #161b22;
  --surface-soft: #1b212b;
  --text: #e7ebf2;
  --text-soft: #b6c0cf;
  --text-faint: #8e99ad;
  --line: #394354;
  --accent: #86abf4;
  --accent-soft: rgba(134, 171, 244, 0.1);
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px;
  }

  .hero-media {
    display: flex;
  }

  .profile-container {
    width: 96px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 14px 16px 28px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand brand"
      "links theme";
    align-items: center;
    row-gap: 10px;
    column-gap: 10px;
    margin-bottom: 28px;
  }

  .site-brand {
    grid-area: brand;
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    width: auto;
    max-width: 100%;
    font-size: 0.92rem;
    overflow: visible;
    scrollbar-width: none;
  }

  .site-brand::-webkit-scrollbar,
  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .site-mark {
    gap: 0.08ch;
  }

  .site-path {
    display: none;
  }

  .site-brand::after {
    width: 0.62ch;
    height: 0.88em;
    margin-left: 0.08ch;
  }

  .nav-links {
    grid-area: links;
    justify-self: start;
    align-self: center;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.95rem;
    font-size: 0.88rem;
    line-height: 1.2;
    overflow-x: auto;
    white-space: nowrap;
    margin-left: 0;
    padding-left: 0;
  }

  #theme-switcher {
    grid-area: theme;
    justify-self: end;
    align-self: center;
    font-size: 1rem;
    color: var(--text-soft);
  }

  .hero {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 34px;
  }

  .hero-media {
    display: flex;
    align-items: flex-start;
  }

  .profile-container {
    width: 72px;
  }

  .hero-intro {
    padding-top: 0;
  }

  .hero-title {
    font-size: clamp(1.8rem, 10vw, 2.35rem);
  }

  .hero-links {
    gap: 0.2rem 0.45rem;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  .hero-intro p {
    margin-bottom: 14px;
    line-height: 1.62;
    font-size: 0.98rem;
  }

  .intro-highlight {
    line-height: 1.56;
  }

  .main-content {
    gap: 34px;
  }

  .content-section {
    padding-top: 6px;
  }

  h2 {
    margin-bottom: 10px;
    font-size: 1rem;
  }

  .latest-heading {
    margin-bottom: 10px;
  }

  .latest-heading h2 {
    font-size: 1rem;
  }

  .latest-heading-rule {
    margin-top: -2px;
    line-height: 1;
  }

  .selected-list {
    gap: 18px;
  }

  .pub-title-line {
    display: block;
    line-height: 1.52;
  }

  .selected-list .pub-title,
  .pub-title {
    font-size: 0.98rem;
  }

  .inline-links {
    display: block;
    margin-left: 0;
    margin-top: 4px;
    line-height: 1.45;
  }

  .inline-links .inline-link,
  .inline-links a {
    margin-left: 0;
    margin-right: 0.45rem;
  }

  .pub-authors-line,
  .pub-venue-line {
    line-height: 1.45;
  }

  .news-item {
    gap: 4px;
  }

  .news-date {
    font-size: 0.92rem;
  }

  .detail-item,
  .award-list li,
  .news-item {
    grid-template-columns: 1fr;
  }

  .detail-item p,
  .news-text,
  .stack-item p,
  .content-section > p,
  .content-section > .section-intro,
  .contact-lead,
  .contact-block li {
    text-align: left;
    text-justify: auto;
    hyphens: none;
  }

  .logo-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .logo-stack {
    flex-direction: row;
    gap: 8px;
  }

  .entry-logo,
  .entry-logo-sjtu {
    width: 60px;
    height: 60px;
  }

  .contact-block li {
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .modal-panel {
    width: 95vw;
    margin: 0;
  }

  .video-panel {
    height: min(50vh, 320px);
  }
}



