*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --site-nav-height: 58px;
  --content-max: 980px;
  --font-sans: "Segoe UI", Arial, "Noto Sans SC", sans-serif;
  --font-mono: Consolas, "SFMono-Regular", "Liberation Mono", Menlo, monospace;
  --base-size: 14.5px;
  --line-height: 1.65;

  --paper: #f5f7fa;
  --paper-grid: rgba(19, 91, 120, 0.065);
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-code: #eef4f8;
  --ink-strong: #0b1320;
  --ink: #202b37;
  --ink-soft: #536271;
  --muted: #738191;
  --line: #cfd9e4;
  --line-soft: #e5ebf1;
  --brand: #0d6b87;
  --brand-deep: #08766f;
  --accent: #9c6200;
  --warm: #c66a2b;
  --globe-grid: #b7c8d4;
  --globe-coast: #27677f;
  --globe-marker: #d89a38;
  --globe-current: #cf5c4a;
  --globe-marker-border: #ffffff;
  --shadow: 0 18px 44px rgba(9, 29, 48, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #07111b;
  --paper-grid: rgba(110, 231, 249, 0.07);
  --surface: rgba(12, 23, 35, 0.9);
  --surface-solid: #0c1723;
  --surface-code: #0f1f2d;
  --ink-strong: #edf6ff;
  --ink: #d4e0ec;
  --ink-soft: #a7b6c5;
  --muted: #8193a6;
  --line: #263a4f;
  --line-soft: #16283a;
  --brand: #6ee7f9;
  --brand-deep: #5eead4;
  --accent: #f6c453;
  --warm: #f09a5b;
  --globe-grid: #35536b;
  --globe-coast: #7dd3e8;
  --globe-marker: #f6c453;
  --globe-current: #fb7185;
  --globe-marker-border: #0c1723;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(var(--paper-grid) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--paper-grid) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--paper);
  font-family: var(--font-sans);
  font-size: var(--base-size);
  line-height: var(--line-height);
}

body,
td,
th,
tr,
p,
a,
strong {
  font-family: var(--font-sans);
  font-size: var(--base-size);
  line-height: var(--line-height);
}

a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--brand), transparent 70%);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

a:hover,
a:focus-visible {
  color: var(--warm);
  border-bottom-color: currentColor;
}

img {
  display: block;
}

figure {
  margin: 0;
}

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

.center {
  text-align: center;
}

.small,
.muted-note {
  color: var(--muted);
  font-size: 12px;
}

.small-center {
  display: flex;
  justify-content: center;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 8px 10px;
  background: var(--surface-solid);
  color: var(--ink-strong);
  border: 1px solid var(--line);
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.lab-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.neural-canvas,
.lab-aurora,
.lab-mesh,
.lab-scanline {
  position: absolute;
  inset: 0;
}

.neural-canvas {
  opacity: 0.22;
}

.lab-aurora {
  opacity: 0.24;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--brand), transparent 52%) 0 1px, transparent 1.5px) 18px 18px / 92px 92px,
    radial-gradient(circle, color-mix(in srgb, var(--accent), transparent 58%) 0 1px, transparent 1.5px) 64px 44px / 148px 148px;
}

.lab-mesh {
  opacity: 0.18;
  background:
    linear-gradient(90deg, transparent 0 39px, color-mix(in srgb, var(--brand), transparent 78%) 40px, transparent 41px) 0 0 / 120px 120px,
    linear-gradient(0deg, transparent 0 39px, color-mix(in srgb, var(--brand-deep), transparent 82%) 40px, transparent 41px) 0 0 / 120px 120px,
    linear-gradient(90deg, transparent 0 18px, color-mix(in srgb, var(--brand), transparent 88%) 18px 34px, transparent 34px 100%) 30px 30px / 240px 160px,
    linear-gradient(0deg, transparent 0 28px, color-mix(in srgb, var(--brand-deep), transparent 88%) 28px 44px, transparent 44px 100%) 80px 70px / 220px 180px;
  animation: circuitDrift 46s linear infinite;
}

.lab-scanline {
  opacity: 0.1;
  background:
    linear-gradient(90deg, transparent 0 8%, color-mix(in srgb, var(--brand), transparent 62%) 8% 8.4%, transparent 8.4% 34%, color-mix(in srgb, var(--brand-deep), transparent 70%) 34% 34.35%, transparent 34.35% 100%) 0 12% / 100% 160px,
    linear-gradient(90deg, transparent 0 58%, color-mix(in srgb, var(--accent), transparent 68%) 58% 58.3%, transparent 58.3% 100%) 0 0 / 100% 220px;
  animation: circuitBlink 7s steps(1, end) infinite;
}

.site-nav,
.main-wrapper {
  position: relative;
  z-index: 1;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-solid), transparent 8%);
  backdrop-filter: blur(14px);
}

.nav-inner {
  width: min(var(--content-max), calc(100% - 32px));
  min-height: var(--site-nav-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-brand {
  flex: 0 0 auto;
  color: var(--ink-strong);
  border-bottom: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.nav-brand::before {
  content: "cd ";
  color: var(--brand-deep);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  gap: 15px;
}

.nav-links a {
  color: var(--ink-soft);
  border-bottom: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--brand);
}

.nav-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.nav-cv-button {
  display: inline-flex;
  min-width: 67px;
  min-height: 34px;
  padding: 5px 13px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid), transparent 5%);
  color: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(9, 29, 48, 0.04);
}

.nav-cv-button:hover,
.nav-cv-button:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

.nav-cv-chevron {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.language-toggle,
.theme-toggle,
.nav-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-code);
  color: var(--ink);
  cursor: pointer;
}

.language-toggle,
.theme-toggle {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-solid), transparent 5%);
  box-shadow: 0 4px 14px rgba(9, 29, 48, 0.04);
}

.language-toggle:hover,
.language-toggle:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible,
.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

.theme-icon {
  position: relative;
  width: 12px;
  height: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: currentColor;
}

.language-toggle {
  color: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.language-toggle[aria-pressed="true"] {
  color: var(--brand);
}

.theme-icon::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface-solid);
}

:root[data-theme="dark"] .theme-icon {
  overflow: visible;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent), transparent 75%);
}

:root[data-theme="dark"] .theme-icon::after {
  display: none;
}

.theme-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle {
  display: none;
  width: 34px;
  height: 31px;
  align-items: center;
  justify-content: center;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  width: 17px;
  height: 2px;
  display: block;
  background: currentColor;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

.main-wrapper {
  width: min(var(--content-max), calc(100% - 36px));
  max-width: var(--content-max);
  margin: 24px auto 48px;
  display: block;
}

#profile,
#research,
#publications,
#patents,
#honors,
#affiliations {
  scroll-margin-top: 86px;
  padding: 22px 0;
  border-top: 1px solid var(--line-soft);
}

#vibe-projects,
#interests {
  scroll-margin-top: 86px;
}

#profile {
  padding-top: 4px;
  border-top: 0;
}

.full-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.pad-2-5 {
  padding: 2.5%;
}

.pad-16 {
  padding: 16px;
}

.pad-8 {
  padding: 8px;
}

.vcenter {
  vertical-align: middle;
}

.col-20 {
  width: 20%;
}

.col-37 {
  width: 37%;
}

.col-63 {
  width: 63%;
}

.col-80 {
  width: 80%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--ink-strong);
  letter-spacing: 0;
}

h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  font-weight: 760;
}

h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid var(--brand);
  background: color-mix(in srgb, var(--brand), transparent 72%);
}

p {
  margin: 0 0 10px;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 286px);
  gap: 36px;
  align-items: start;
  padding: 16px 0 14px;
}

.profile-copy {
  min-width: 0;
}

.name {
  margin: 0 0 13px;
  color: var(--ink-strong);
  font-size: clamp(31px, 4vw, 42px);
  font-weight: 780;
  line-height: 1.08;
}

.name::after {
  content: "Video Generation / Long Video Generation / Video World Models / Distillation / Memory";
  display: block;
  margin-top: 9px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

html[lang="zh-CN"] .name::after {
  content: "视频生成 / 长视频生成 / 视频世界模型 / 模型蒸馏 / 记忆机制";
}

.profile-intro {
  max-width: 670px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 13px 0 0;
}

.profile-links a,
.wechat-link {
  display: inline-flex;
  min-height: 35px;
  padding: 6px 10px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface-solid), transparent 12%);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.profile-links a:hover,
.profile-links a:focus-visible {
  border-color: color-mix(in srgb, var(--brand), var(--line) 30%);
  background: var(--surface-code);
  color: var(--brand);
  transform: translateY(-2px);
}

.social-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background-color: currentColor;
  color: var(--brand);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.social-icon--email {
  -webkit-mask-image: url("images/social/mail.svg");
  mask-image: url("images/social/mail.svg");
}

.social-icon--rednote {
  -webkit-mask-image: url("images/social/xiaohongshu.svg");
  mask-image: url("images/social/xiaohongshu.svg");
}

.social-icon--wechat {
  -webkit-mask-image: url("images/social/wechat.svg");
  mask-image: url("images/social/wechat.svg");
}

.social-icon--github {
  -webkit-mask-image: url("images/social/github.svg");
  mask-image: url("images/social/github.svg");
}

.social-icon--x {
  -webkit-mask-image: url("images/social/x.svg");
  mask-image: url("images/social/x.svg");
}

.profile-portrait {
  justify-self: end;
  text-align: right;
}

.portrait-link {
  display: inline-block;
  border-bottom: 0;
}

.profile-photo {
  width: min(100%, 268px);
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-code);
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--brand), transparent 86%);
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.profile-photo:hover {
  transform: translate(-2px, -2px);
  box-shadow: 11px 11px 0 color-mix(in srgb, var(--brand), transparent 82%);
}

.portrait-caption {
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
}

.portrait-resource-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 6px auto 0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.portrait-resource-links a {
  color: var(--brand);
  border-bottom: 0;
}

.portrait-resource-links a::after {
  content: "↗";
  margin-left: 3px;
  color: var(--muted);
  font-size: 0.85em;
}

.portrait-resource-links a:hover {
  color: var(--brand);
  border-bottom: 0;
}

.portrait-resource-links span {
  color: var(--muted);
  opacity: 0.55;
}

.research-console {
  position: relative;
  overflow: hidden;
  margin: 15px 0 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  background:
    linear-gradient(90deg, var(--paper-grid) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--surface-code);
}

.research-console::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 110px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand), transparent 86%), transparent);
  opacity: 0;
  pointer-events: none;
}

.research-console:hover::after {
  opacity: 1;
  animation: terminalSweep 1.2s ease-out;
}

.console-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}

.console-prompt {
  color: var(--brand-deep);
  font-weight: 700;
}

.console-prompt::before {
  content: "$ ";
  color: var(--accent);
}

.console-path {
  color: var(--muted);
}

.console-cursor {
  width: 7px;
  height: 13px;
  background: var(--brand);
  animation: cursorBlink 1.05s steps(1, end) infinite;
}

.console-grid,
.keyword-strip,
.collab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.console-grid span,
.keyword-strip span,
.collab-tags span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 0;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: 14px;
  margin: 8px 0 0;
}

.meta-card,
.academic-service,
.collab-callout,
.research-focus {
  position: relative;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
}

.academic-service,
.collab-callout {
  margin: 0;
  padding: 13px 14px;
}

.academic-service {
  border-left: 3px solid var(--brand-deep);
}

.service-label,
.collab-kicker,
.focus-index,
.period-title {
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.service-label {
  display: block;
  margin-bottom: 6px;
}

.collab-callout {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.collab-callout::before,
.research-focus::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 2px solid color-mix(in srgb, var(--brand), transparent 42%);
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: left;
  transition: opacity 180ms ease, transform 260ms ease;
  pointer-events: none;
}

.collab-callout:hover::before,
.research-focus:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

.collab-status {
  display: grid;
  grid-template-columns: 8px 26px;
  align-items: center;
  gap: 8px;
  padding-top: 5px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent), transparent 42%);
  animation: statusBlink 1.8s ease-in-out infinite;
}

.status-line {
  width: 26px;
  height: 2px;
  background:
    linear-gradient(90deg, transparent, var(--brand), var(--brand-deep), transparent) 0 0 / 200% 100%;
  animation: statusFlow 1.7s linear infinite;
}

.collab-copy p {
  margin: 5px 0 10px;
  color: var(--ink);
}

.collab-tags span {
  min-height: 22px;
  padding: 2px 7px;
  color: var(--ink-soft);
  background: var(--surface-code);
}

.section-block {
  padding: 8px 0 10px;
}

.research-stack {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  margin: 15px 0 12px;
}

.research-focus {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  padding: 13px;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.research-focus:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand), var(--line) 42%);
  background: color-mix(in srgb, var(--surface-solid), var(--surface-code) 28%);
}

.research-focus h3 {
  margin: 8px 0 7px;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.25;
}

.research-focus p {
  margin: auto 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.keyword-strip {
  margin-top: 8px;
}

.vibe-projects-section > p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.vibe-project-list {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.vibe-project {
  display: grid;
  grid-template-columns: minmax(145px, 0.28fr) minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.vibe-project-body {
  min-width: 0;
}

.vibe-project-heading {
  display: block;
}

.vibe-project h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 780;
  line-height: 1.3;
}

.vibe-project h3 a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-strong);
  border-bottom: 0;
  font-size: inherit;
  line-height: inherit;
}

.vibe-project h3 a:hover,
.vibe-project h3 a:focus-visible {
  color: var(--brand);
}

.vibe-project-heading > span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
}

.vibe-project-body > p {
  max-width: 650px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.vibe-project-links {
  display: flex;
  margin-top: 5px;
  align-items: center;
  gap: 5px;
}

.vibe-project-links a {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}

.vibe-project-links > span {
  color: var(--muted);
  font-size: 10px;
}

.interests-copy {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  line-height: 1.7;
}

.spaced-rows {
  border-collapse: collapse;
}

.spaced-rows > tbody > tr > td {
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 1px solid var(--line-soft);
}

.spaced-rows > tbody > tr:first-child > td {
  border-top: 0;
}

#publications .spaced-rows td:first-child,
#patents .spaced-rows td:first-child {
  width: 26%;
  min-width: 190px;
}

#publications .spaced-rows td:last-child,
#patents .spaced-rows td:last-child {
  width: 74%;
}

#publications > .full-table:first-child td,
#patents > .full-table:first-child td {
  padding-left: 0;
  padding-right: 0;
}

.papertitle {
  color: var(--ink-strong);
  font-weight: 780;
}

.publication-entry {
  line-height: 1.5;
}

.publication-title {
  line-height: 1.45;
}

.publication-authors,
.publication-venue {
  margin-top: 2px;
}

.publication-authors a {
  color: inherit;
  border-bottom-color: transparent;
}

.publication-authors a:hover {
  color: var(--brand);
  border-bottom-color: currentColor;
}

.author-self {
  color: var(--brand);
  font-weight: 780;
}

.publication-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.publication-links span {
  color: var(--muted);
}

.publication-summary {
  margin: 11px 0 0;
}

em {
  color: var(--ink-soft);
}

.publication-thumbnail,
.publication-thumbnail--fluid {
  position: relative;
  width: 100%;
  max-width: 205px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--paper-grid) 1px, transparent 1px) 0 0 / 16px 16px,
    var(--surface-code);
  box-shadow: 6px 6px 0 color-mix(in srgb, var(--brand), transparent 90%);
}

.publication-thumbnail {
  aspect-ratio: 16 / 10;
}

.publication-thumbnail--fluid {
  max-width: 205px;
  aspect-ratio: 16 / 10;
}

.thumbnail-link {
  display: block;
  width: 100%;
  height: 100%;
  border-bottom: 0;
  cursor: zoom-in;
}

.thumbnail-link--video {
  cursor: pointer;
}

.publication-thumbnail img,
.publication-thumbnail__overlay img,
.publication-preview-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.publication-preview-video {
  display: block;
  background: var(--surface-code);
}

.publication-thumbnail__overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .publication-thumbnail:hover .publication-thumbnail__overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

.thumbnail-actions {
  display: none;
}

#honors .full-table + .full-table tr + tr td {
  border-top: 1px solid var(--line-soft);
}

.period-title {
  margin: 0;
  text-align: left;
}

#honors p {
  margin: 0 0 5px;
}

.honors-section {
  padding-bottom: 4px;
}

.honors-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.35fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 11px;
  margin-top: 14px;
  overflow: visible;
}

.honor-card {
  min-height: 0;
  height: 190px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  background:
    linear-gradient(90deg, var(--paper-grid) 1px, transparent 1px) 0 0 / 18px 18px,
    color-mix(in srgb, var(--surface-code), transparent 26%);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: color-mix(in srgb, var(--brand), transparent 35%) transparent;
  scrollbar-width: thin;
}

.honor-card::-webkit-scrollbar {
  width: 6px;
}

.honor-card::-webkit-scrollbar-track {
  background: transparent;
}

.honor-card::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand), transparent 42%);
  border-radius: 0;
}

.honor-card h3 {
  margin: 0 0 10px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.honor-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: visible;
}

.honor-list li {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.honor-list span {
  display: inline-block;
  min-width: 52px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

hr {
  height: 1px;
  margin: 6px 0 18px;
  border: 0;
  background: var(--line-soft);
}

.institution-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: 14px auto 20px;
}

.institution-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-bottom: 0;
  background: transparent;
}

.institution-logos img {
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: grayscale(0.08) saturate(0.86) contrast(1.14);
  opacity: 0.82;
}

.institution-logos.single {
  margin-bottom: 10px;
}

.institution-logos.pair {
  margin-bottom: 10px;
}

.institution-logos.single img {
  max-width: 280px;
  max-height: 92px;
}

.institution-logos.pair img {
  max-width: 76px;
  max-height: 58px;
}

.institution-logos.pair {
  margin-bottom: 6px;
}

.wechat-container {
  position: relative;
}

.wechat-popup {
  display: none;
  width: min(72vw, 260px);
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  z-index: 1800;
}

.wechat-popup.open,
.wechat-popup.is-fixed {
  display: block;
  position: fixed;
}

.wechat-popup img {
  width: 100%;
}

body.wechat-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1700;
  background: rgba(3, 9, 15, 0.42);
}

:root[data-theme="dark"] .profile-photo {
  filter: brightness(0.92) contrast(1.05);
}

:root[data-theme="dark"] .institution-logos img {
  mix-blend-mode: normal;
  filter: brightness(1.12) saturate(0.95);
  opacity: 0.94;
}

.site-footer {
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.footer-grid {
  display: flex;
  width: 100%;
  margin: 0 auto;
  align-items: center;
  flex-direction: column;
  gap: 6px;
}

.footer-info {
  display: flex;
  width: 100%;
  order: 2;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 18px;
  text-align: center;
}

.visitor-origins {
  display: flex;
  order: 1;
  margin-bottom: 0;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  color: var(--muted);
}

.visitor-origins__toggle {
  display: inline-flex;
  min-height: 30px;
  margin: 0;
  padding: 2px 0;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  font: 500 11px/1.2 var(--font-mono);
  cursor: pointer;
  opacity: 0.72;
  transition: color 160ms ease, opacity 160ms ease;
}

.visitor-origins__toggle:hover,
.visitor-origins__toggle:focus-visible,
.visitor-origins.is-open .visitor-origins__toggle {
  color: var(--ink-strong);
  opacity: 1;
  outline: none;
}

#visitor-origins-globe {
  display: block;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.visitor-origins__total {
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.visitor-origins__caret {
  color: var(--brand);
  transition: transform 160ms ease;
}

.visitor-origins.is-open .visitor-origins__caret {
  transform: rotate(180deg);
}

.visitor-origins__panel {
  position: static;
  width: min(320px, calc(100vw - 28px));
  padding: 14px;
  color: var(--ink);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: left;
}

.visitor-origins__panel[hidden] {
  display: none;
}

.visitor-origins__head {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
  gap: 13px;
}

#visitor-origins-map {
  display: block;
  width: 120px;
  height: 120px;
  flex: 0 0 auto;
}

.visitor-origins__title {
  display: block;
  color: var(--brand);
  font: 700 11px/1.3 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.visitor-origins__summary {
  display: block;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.visitor-origins__list {
  max-height: 160px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.visitor-origins__item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 52px 32px;
  padding: 3px 0;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
}

.visitor-origins__flag {
  display: block;
  width: 17px;
  height: 11px;
  border: 1px solid rgba(25, 45, 62, 0.22);
  border-radius: 1px;
  object-fit: cover;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.7) inset;
}

.visitor-origins__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-origins__item.is-current .visitor-origins__name {
  color: var(--ink-strong);
  font-weight: 600;
}

.visitor-origins__you {
  margin-left: 4px;
  color: var(--brand);
  font: 600 9px/1 var(--font-mono);
}

.visitor-origins__bar {
  display: block;
  height: 4px;
  overflow: hidden;
  background: var(--line-soft);
  border-radius: 999px;
}

.visitor-origins__bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  border-radius: inherit;
}

.visitor-origins__number {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.visitor-origins__empty,
.visitor-origins__scan,
.visitor-origins__privacy {
  color: var(--muted);
  font-size: 10px;
}

.visitor-origins__scan {
  margin: 8px 0 0;
}

.visitor-origins__privacy {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
  line-height: 1.45;
}

@media (min-width: 1100px) {
  .site-footer {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
  }

  .visitor-origins {
    position: fixed;
    top: 54%;
    right: max(14px, env(safe-area-inset-right));
    z-index: 1400;
    margin: 0;
    align-items: flex-end;
    transform: translateY(-50%);
  }

  .visitor-origins__toggle {
    min-width: 54px;
    min-height: 74px;
    padding: 7px 6px;
    flex-direction: column;
    gap: 4px;
    background: color-mix(in srgb, var(--surface-solid), transparent 4%);
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: 0 10px 26px rgba(9, 29, 48, 0.12);
    opacity: 0.9;
    backdrop-filter: blur(10px);
  }

  .visitor-origins__total {
    font-size: 9px;
    white-space: nowrap;
  }

  .visitor-origins__caret {
    transform: rotate(90deg);
  }

  .visitor-origins.is-open .visitor-origins__caret {
    transform: rotate(-90deg);
  }

  .visitor-origins__panel {
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    transform: translateY(-50%);
  }
}

.shiba-pet {
  --shiba-look-x: 0px;
  --shiba-look-y: 0px;
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 1500;
  width: 132px;
  height: 151px;
  pointer-events: none;
  user-select: none;
}

.shiba-pet__button {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 143px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  filter: drop-shadow(0 8px 10px rgba(12, 32, 46, 0.2));
  transform-origin: 50% 100%;
}

.shiba-pet__button:focus-visible {
  border-radius: 50%;
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.shiba-pet__stage {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: center bottom;
  animation: shibaIdle 4.2s ease-in-out infinite;
}

.shiba-pet__sprite {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("images/shiba_pet_sprites.webp");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 800% 1100%;
  image-rendering: pixelated;
  pointer-events: none;
  transform: translate(var(--shiba-look-x), var(--shiba-look-y));
  transform-origin: center bottom;
  transition: transform 110ms ease-out, filter 180ms ease;
}

.shiba-pet.is-looking .shiba-pet__sprite {
  transform: translate(var(--shiba-look-x), var(--shiba-look-y)) scale(1.08);
}

.shiba-pet.is-touch-looking .shiba-pet__sprite {
  transform: none;
}

.shiba-pet__sparkle,
.shiba-pet__heart {
  position: absolute;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.shiba-pet__sparkle {
  color: #f4b83f;
  font-size: 17px;
  text-shadow: 0 1px 5px rgba(255, 255, 255, 0.9);
}

.shiba-pet__sparkle--one {
  top: 10%;
  left: 10%;
}

.shiba-pet__sparkle--two {
  top: 28%;
  right: 2%;
  font-size: 12px;
}

.shiba-pet__heart {
  top: 2%;
  right: 12%;
  color: #e85d75;
  font-size: 18px;
  text-shadow: 0 2px 6px rgba(232, 93, 117, 0.3);
}

.shiba-pet__bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  z-index: 20;
  width: max-content;
  min-width: 66px;
  max-width: 142px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-solid);
  color: var(--ink-strong);
  box-shadow: var(--shadow);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  opacity: 0;
  transform: translate(-50%, 7px) scale(0.9);
  transition: opacity 160ms ease, transform 180ms ease;
  pointer-events: none;
}

.shiba-pet__bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 9px;
  height: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-solid);
  transform: translateX(-50%) rotate(45deg);
}

.shiba-pet.is-curious .shiba-pet__stage {
  animation: shibaCurious 780ms ease-in-out infinite alternate;
}

.shiba-pet.is-speaking .shiba-pet__bubble {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.shiba-pet.is-happy .shiba-pet__button {
  animation: shibaHop var(--shiba-action-duration, 840ms) cubic-bezier(0.22, 0.8, 0.32, 1) 1;
}

.shiba-pet.is-happy .shiba-pet__stage {
  animation: none;
}

.shiba-pet.is-happy .shiba-pet__heart {
  animation: shibaHeart var(--shiba-action-duration, 840ms) ease-out 1;
}

.shiba-pet.is-excited .shiba-pet__stage {
  animation: shibaExcited var(--shiba-action-duration, 1340ms) ease-in-out 1;
}

.shiba-pet.is-excited .shiba-pet__heart {
  animation: shibaHeartBurst var(--shiba-action-duration, 1340ms) ease-out 1;
}

.shiba-pet.is-double-waving .shiba-pet__stage {
  animation: shibaDoubleWave var(--shiba-action-duration, 1080ms) ease-in-out 1;
}

.shiba-pet.is-double-waving .shiba-pet__sparkle {
  animation: shibaSparkle var(--shiba-action-duration, 1080ms) ease-out 1;
}

.shiba-pet.is-stretching .shiba-pet__stage {
  animation: shibaStretch var(--shiba-action-duration, 2620ms) ease-in-out 1;
}

.shiba-pet.is-pawing .shiba-pet__stage {
  animation: shibaPaw var(--shiba-action-duration, 700ms) ease-in-out 1;
}

.shiba-pet.is-pawing .shiba-pet__sparkle,
.shiba-pet.is-working .shiba-pet__sparkle {
  animation: shibaSparkle var(--shiba-action-duration, 820ms) ease-out 1;
}

.shiba-pet.is-running-right .shiba-pet__stage {
  animation: shibaRunRight var(--shiba-action-duration, 1060ms) ease-in-out 1;
}

.shiba-pet.is-running-left .shiba-pet__stage {
  animation: shibaRunLeft var(--shiba-action-duration, 1060ms) ease-in-out 1;
}

.shiba-pet.is-failed .shiba-pet__stage,
.shiba-pet.is-looking-around .shiba-pet__stage {
  animation: none;
}

.shiba-pet.is-failed .shiba-pet__sprite {
  filter: saturate(0.72) brightness(0.9);
}

.shiba-pet.is-waiting .shiba-pet__stage {
  animation: shibaWaiting var(--shiba-action-duration, 1010ms) ease-in-out 1;
}

.shiba-pet.is-working .shiba-pet__stage {
  animation: shibaWork var(--shiba-action-duration, 820ms) ease-in-out 1;
}

.shiba-pet.is-reviewing .shiba-pet__stage {
  animation: shibaReview var(--shiba-action-duration, 1030ms) ease-in-out 1;
}

.shiba-pet.is-sleeping .shiba-pet__stage {
  animation: shibaSleep var(--shiba-action-duration, 4060ms) ease-in-out 1;
}

.shiba-pet.is-sleeping .shiba-pet__sprite {
  filter: saturate(0.78) brightness(0.92);
}

.shiba-pet.is-held .shiba-pet__button {
  transform: scale(1.04);
}

.shiba-pet.is-dragging .shiba-pet__button {
  cursor: grabbing;
  filter: drop-shadow(0 13px 13px rgba(12, 32, 46, 0.28));
  transform: scale(1.07);
}

.shiba-pet.is-dragging .shiba-pet__stage {
  animation: none;
}

@media (hover: none), (pointer: coarse) {
  .shiba-pet__button {
    cursor: default;
    touch-action: none;
  }
}

@keyframes shibaIdle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.008); }
}

@keyframes shibaCurious {
  from { transform: translateY(0) scale(1.02); }
  to { transform: translateY(-3px) scale(1.04); }
}

@keyframes shibaHop {
  0%, 100% { transform: translateY(0); }
  36% { transform: translateY(-18px); }
  64% { transform: translateY(-6px); }
}

@keyframes shibaPaw {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(-5px, -8px); }
  55% { transform: translate(3px, -4px); }
  78% { transform: translate(-4px, -7px); }
}

@keyframes shibaDoubleWave {
  0%, 100% { transform: translateY(0); }
  20%, 67% { transform: translate(-3px, -5px); }
  40%, 82% { transform: translate(2px, -3px); }
}

@keyframes shibaExcited {
  0%, 47%, 100% { transform: translateY(0) scale(1); }
  22%, 72% { transform: translateY(-9px) scale(1.025); }
}

@keyframes shibaStretch {
  0%, 53% { transform: translateY(5px) scaleY(0.98); }
  71% { transform: translateY(2px) scaleY(1.02); }
  85%, 100% { transform: translateY(0) scaleY(1); }
}

@keyframes shibaRunRight {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(9px); }
}

@keyframes shibaRunLeft {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-9px); }
}

@keyframes shibaWaiting {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(2px); }
}

@keyframes shibaWork {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.015); }
}

@keyframes shibaReview {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-2px); }
  70% { transform: translateX(2px); }
}

@keyframes shibaSleep {
  0%, 100% { transform: translateY(5px) scaleY(0.98); }
  50% { transform: translateY(7px) scaleY(0.965); }
}

@keyframes shibaHeart {
  0% { opacity: 0; transform: translateY(8px) scale(0.5) rotate(-8deg); }
  35% { opacity: 1; transform: translateY(0) scale(1.15) rotate(4deg); }
  100% { opacity: 0; transform: translateY(-20px) scale(0.85) rotate(8deg); }
}

@keyframes shibaHeartBurst {
  0%, 45%, 100% { opacity: 0; transform: translateY(7px) scale(0.6); }
  20%, 67% { opacity: 1; transform: translateY(-5px) scale(1.1); }
  35%, 83% { opacity: 0; transform: translateY(-18px) scale(0.85); }
}

@keyframes shibaSparkle {
  0% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  35%, 65% { opacity: 1; transform: scale(1.1) rotate(90deg); }
  100% { opacity: 0; transform: scale(0.5) rotate(180deg); }
}

@media (max-width: 560px) {
  .site-footer {
    padding-top: 10px;
  }

  .footer-grid {
    align-items: center;
    flex-direction: column;
    gap: 4px;
  }

  .visitor-origins {
    align-items: center;
  }

  .footer-info {
    align-items: center;
    flex-direction: column;
    gap: 2px;
    padding: 0 14px 20px;
    text-align: center;
  }

  .shiba-pet {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(7px, env(safe-area-inset-bottom));
    width: 94px;
    height: 110px;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .shiba-pet__button {
    height: 102px;
  }

  .shiba-pet__bubble {
    bottom: calc(100% + 1px);
    min-width: 58px;
    max-width: 116px;
    padding: 6px 8px;
    font-size: 9px;
  }
}

@keyframes circuitDrift {
  from {
    background-position: 0 0, 0 0, 30px 30px, 80px 70px;
  }

  to {
    background-position: 120px 120px, 120px 120px, 270px 190px, 300px 250px;
  }
}

@keyframes circuitBlink {
  0%,
  100% {
    opacity: 0.07;
  }

  42% {
    opacity: 0.12;
  }

  43% {
    opacity: 0.04;
  }

  45% {
    opacity: 0.11;
  }
}

@keyframes sectionBoot {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes cursorBlink {
  0%,
  46% {
    opacity: 0.95;
  }

  47%,
  100% {
    opacity: 0.18;
  }
}

@keyframes terminalSweep {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(120%);
  }
}

@keyframes statusBlink {
  0%,
  100% {
    opacity: 0.46;
  }

  45% {
    opacity: 1;
  }
}

@keyframes statusFlow {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: 0 0;
  }
}

.main-wrapper > section,
.main-wrapper > footer {
  animation: sectionBoot 520ms cubic-bezier(.2, .8, .2, 1) both;
}

.main-wrapper > :nth-child(1) { animation-delay: 30ms; }
.main-wrapper > :nth-child(2) { animation-delay: 80ms; }
.main-wrapper > :nth-child(3) { animation-delay: 130ms; }
.main-wrapper > :nth-child(4) { animation-delay: 180ms; }
.main-wrapper > :nth-child(5) { animation-delay: 230ms; }
.main-wrapper > :nth-child(6) { animation-delay: 280ms; }
.main-wrapper > :nth-child(7) { animation-delay: 330ms; }
.main-wrapper > :nth-child(8) { animation-delay: 380ms; }

@media (max-width: 980px) {
  .research-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .console-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav-inner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
  }

  .nav-brand {
    margin-right: auto;
  }

  .nav-toggle {
    display: inline-flex;
    order: 3;
    margin-left: 0;
  }

  .nav-actions {
    order: 2;
  }

  .nav-links {
    display: none;
    order: 4;
    width: 100%;
    flex: 0 0 100%;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line-soft);
  }

  .nav-links.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .profile-portrait {
    justify-self: center;
    text-align: center;
  }

  .profile-photo {
    width: min(72vw, 242px);
  }

  .profile-meta-grid {
    grid-template-columns: 1fr;
  }

  #publications .spaced-rows,
  #publications .spaced-rows tbody,
  #publications .spaced-rows tr,
  #publications .spaced-rows td,
  #patents .spaced-rows,
  #patents .spaced-rows tbody,
  #patents .spaced-rows tr,
  #patents .spaced-rows td,
  #honors .full-table tbody,
  #honors .full-table tr,
  #honors .full-table td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }

  #publications .spaced-rows tr,
  #patents .spaced-rows tr {
    overflow: hidden;
  }

  .publication-thumbnail,
  .publication-thumbnail--fluid {
    width: min(100%, 320px);
    max-width: 320px;
    margin: 0 auto 7px;
    aspect-ratio: 16 / 10;
    background: var(--surface-code);
  }

  .thumbnail-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 8px;
  }

  .thumbnail-actions a {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
  }

  .period-title {
    margin-bottom: 7px;
  }

  .honors-grid {
    grid-template-columns: 1fr;
  }

  .honor-card {
    height: auto;
    overflow: visible;
  }

  .institution-logos {
    gap: 14px;
  }

  .institution-logos.single img {
    max-width: min(78vw, 260px);
  }

  .institution-logos.pair img {
    max-width: 70px;
  }
}

@media (max-width: 560px) {
  body {
    overflow-x: hidden;
  }

  .main-wrapper {
    width: calc(100% - 32px);
    margin-top: 10px;
  }

  .nav-inner {
    width: calc(100% - 32px);
  }

  .nav-toggle,
  .language-toggle,
  .theme-toggle,
  .nav-cv-button {
    min-height: 40px;
  }

  .language-toggle,
  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .nav-toggle {
    width: 40px;
  }

  .nav-links.open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 0 2px;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 7px 10px;
    border: 1px solid var(--line-soft);
    background: var(--surface-code);
  }

  .profile-hero {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 0 14px;
  }

  .vibe-project {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 14px 0;
  }

  .vibe-project-links {
    margin-top: 5px;
  }

  .profile-copy {
    display: contents;
  }

  .name {
    order: 0;
    width: 100%;
    margin-bottom: 16px;
    font-size: clamp(26px, 7.6vw, 32px);
  }

  .name::after {
    font-size: 11px;
    line-height: 1.45;
  }

  .profile-portrait {
    order: 1;
    align-self: center;
    justify-self: auto;
    margin: 0 0 18px;
  }

  .profile-photo {
    width: min(56vw, 200px);
  }

  .portrait-caption {
    margin-top: 8px;
  }

  .portrait-resource-links {
    margin-top: 6px;
    font-size: 9px;
  }

  .profile-intro {
    order: 2;
    margin-bottom: 12px;
  }

  .research-console {
    order: 3;
    width: 100%;
    margin: 0 0 14px;
  }

  .console-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .console-grid span {
    min-height: 34px;
    text-align: center;
  }

  .console-grid span:last-child {
    grid-column: 1 / -1;
  }

  .profile-links {
    order: 4;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    margin: 0;
  }

  .profile-links > a,
  .profile-links > .wechat-container {
    grid-column: span 2;
  }

  .profile-links > :nth-child(4) {
    grid-column: 2 / span 2;
  }

  .profile-links > a,
  .profile-links .wechat-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 7px 5px;
    text-align: center;
    line-height: 1.3;
  }

  .profile-links .wechat-link {
    width: 100%;
    min-height: 42px;
  }

  .research-stack {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .research-focus {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 3px;
    min-height: 0;
    padding: 12px;
  }

  .research-focus .focus-index {
    grid-column: 1;
    grid-row: 1;
  }

  .research-focus h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .research-focus p {
    grid-column: 2;
    margin: 0;
  }

  .collab-callout {
    grid-template-columns: 1fr;
  }

  .console-grid span,
  .keyword-strip span,
  .collab-tags span {
    justify-content: flex-start;
    white-space: normal;
  }

  #publications .spaced-rows tr,
  #patents .spaced-rows tr {
    border-top: 1px solid var(--line-soft);
  }

  #publications .spaced-rows tr:first-child,
  #patents .spaced-rows tr:first-child {
    border-top: 0;
  }

  #publications .spaced-rows td,
  #patents .spaced-rows td {
    padding: 10px 4px;
    border-top: 0;
  }

  .honor-card {
    padding: 14px;
  }

  .honor-list li {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 5px;
  }

  .honor-list span {
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .nav-inner {
    gap: 5px;
  }

  .nav-brand {
    font-size: 11px;
  }

  .nav-actions {
    gap: 5px;
  }

  .nav-cv-button {
    min-width: 48px;
    padding: 5px 7px;
    gap: 5px;
  }

  .language-toggle,
  .theme-toggle,
  .nav-toggle {
    width: 35px;
    min-height: 35px;
    height: 35px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .neural-canvas,
  .lab-scanline {
    display: none;
  }

  .shiba-pet__stage,
  .shiba-pet__sprite {
    animation: none !important;
  }
}
