/* ============ Fonts ============ */
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============ Variables ============ */
:root {
  --bg: #fbfcfe;
  --bg-soft: #f2f5f9;
  --text: #1f2733;
  --text-soft: #5b6675;
  --link: #2563eb;
  --link-hover: #ea7d2c;
  --accent: #2f5bea;
  --accent-soft: #eef2ff;
  --badge-bg: #2f5bea;
  --badge-text: #ffffff;
  --card-bg: #ffffff;
  --card-shadow: rgba(31, 45, 80, 0.10);
  --card-shadow-hover: rgba(47, 91, 234, 0.18);
  --border: #e6eaf0;
  --highlight: #fff6cf;
  --maxw: 1040px;
}

body.dark {
  --bg: #0c0f16;
  --bg-soft: #141925;
  --text: #e8eef6;
  --text-soft: #9aa6b8;
  --link: #6ea8ff;
  --link-hover: #f0a85a;
  --accent: #5b8cff;
  --accent-soft: #16233f;
  --badge-bg: #3b6fe0;
  --badge-text: #ffffff;
  --card-bg: #151b27;
  --card-shadow: rgba(0, 0, 0, 0.5);
  --card-shadow-hover: rgba(91, 140, 255, 0.35);
  --border: #28303f;
  --highlight: #3a3410;
}

/* ============ Base ============ */
* { box-sizing: border-box; }

body,
td,
th,
tr,
p,
a {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--accent) 6%, transparent), transparent),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  transition: background-color .25s ease, color .25s ease;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover,
a:focus {
  color: var(--link-hover);
}

strong { font-weight: 700; }

/* ============ Layout ============ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ Header / Nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 14px rgba(31, 45, 80, 0.06);
  transition: background-color .25s ease, border-color .25s ease;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.nav-brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--text);
  background: linear-gradient(120deg, var(--accent), #7c4dff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 600;
  position: relative;
  padding: 4px 0;
  transition: color .15s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { transform: scaleX(1); }
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 16px;
  transition: background-color .15s ease;
}
.theme-toggle:hover { background: var(--bg-soft); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

/* ============ Sections ============ */
main { padding: 30px 0 60px; }
section { margin-bottom: 48px; scroll-margin-top: 70px; }

.section-title {
  font-size: 24px;
  font-weight: 800;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  letter-spacing: .3px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-bottom: none;
  padding-bottom: 8px;
  margin: 40px 0 22px;
  position: relative;
}
.section-title::before {
  content: '';
  width: 6px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), #7c4dff);
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
/* ============ Year group headings (publications) ============ */
.year-group {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin: 28px 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 20%, transparent);
  letter-spacing: .5px;
}
.year-group:first-child { margin-top: 14px; }

/* ============ About ============ */
.about {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 24px;
}
.about-photo { flex: 0 0 280px; }
.about-photo .portrait {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 14px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--border), 0 8px 24px var(--card-shadow-hover);
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}
.about-photo .portrait:hover {
  transform: scale(1.03);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 12px 30px var(--card-shadow-hover);
}
.about-text { flex: 1; text-align: justify; }
.name {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 32px;
  margin: 0 0 6px;
}
.hiring {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 18px 0;
}
/* Social / quick links: pill buttons, same style as publication links */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease, transform .15s ease;
}
.social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ============ News ============ */
.news-list {
  list-style: none;
  padding: 0 0 0 8px;
  margin: 0;
  position: relative;
}
.news-list::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 17px;
  bottom: 17px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), color-mix(in srgb, var(--accent) 20%, transparent));
  border-radius: 2px;
}
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 14px 10px 8px;
  border-radius: 10px;
  transition: background-color .2s ease;
  position: relative;
}
.news-item:hover {
  background: var(--bg-soft);
}
.news-list.collapsed .news-item:nth-child(n+6) {
  display: none;
}
.news-item + .news-item {
  border-top: none;
}
.news-icon {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
  z-index: 1;
}
.news-item.award .news-icon { background: #e0a800; }
.news-date {
  flex: 0 0 74px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.news-text { flex: 1; text-align: justify; }
.news-toggle {
  margin-top: 14px;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--link);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.news-toggle:hover {
  background: var(--link);
  color: #fff;
  border-color: var(--link);
}

/* ============ Tech transfer ============ */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.tech-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 2px 2px 8px var(--card-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 4px 8px 20px var(--card-shadow);
}
/* Tech Transfer 2x2 grid: portrait cards (S60/S50) on row 1, landscape on row 2 */
.tech-grid-half {
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
}
.tech-card-solo {
  flex-direction: row;
  align-items: stretch;
}
.tech-card-solo .tech-media {
  flex: 0 0 250px;
  aspect-ratio: 9 / 16;
  max-height: none;
}
.tech-card-solo .tech-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tech-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
}
.tech-media img,
.tech-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.tech-card:hover .tech-media img,
.tech-card:hover .tech-media video {
  transform: scale(1.06);
}
.tech-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  backdrop-filter: blur(2px);
}
.tech-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  color: var(--text-soft);
  font-size: 13px;
}
.tech-media-placeholder i {
  font-size: 30px;
  color: var(--accent);
  opacity: .6;
}
.tech-body { padding: 16px 18px 20px; }
.tech-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}
.tech-title i { color: var(--accent); margin-right: 6px; }
.tech-desc {
  color: var(--text-soft);
  font-size: 15px;
  margin: 0 0 12px;
  line-height: 1.55;
}
.tech-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tech-link {
  font-size: 14px;
  font-weight: 600;
}
.tech-link.ghost {
  color: #07c160;
}
.tech-link.ghost:hover { color: #06a850; }

/* ============ Other publications ============ */
.other-list { line-height: 1.9; }

/* ============ Publications ============ */
.publications {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.paper {
  display: flex;
  gap: 26px;
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 10px var(--card-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.paper:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px var(--card-shadow-hover);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.paper.spotlight {
  background: var(--highlight);
}
/* Star badge marking representative papers (see the legend above the list) */
.paper.spotlight::before {
  content: "\f005";
  font-family: 'FontAwesome';
  position: absolute;
  top: -11px;
  right: -11px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f0a500;
  color: #fff;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(240, 165, 0, .45);
  z-index: 2;
}
/* Legend chip explaining the representative-paper marker */
.legend-rep {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--highlight);
  border: 1px solid #f0d68a;
  color: #8a6100;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.legend-rep i { color: #f0a500; }
body.dark .legend-rep { border-color: #6b5a1a; color: #f2d98a; }
.paper-media {
  position: relative;
  flex: 0 0 260px;
  max-width: 260px;
}
.paper-media img,
.paper-media video {
  width: 100%;
  border-radius: 8px;
  display: block;
  box-shadow: 2px 2px 6px var(--card-shadow);
  transition: transform .35s ease;
}
.paper:hover .paper-media img,
.paper:hover .paper-media video {
  transform: scale(1.04);
}
.takeaway {
  margin: 0 0 10px;
  padding: 8px 12px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-soft);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.takeaway::before {
  content: "\201C";
  color: var(--accent);
  font-weight: 700;
  margin-right: 1px;
}
.takeaway::after {
  content: "\201D";
  color: var(--accent);
  font-weight: 700;
  margin-left: 1px;
}
.paper-badge {
  position: absolute;
  top: -10px;
  left: -10px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 700;
}
.paper-info { flex: 1; text-align: justify; }
.paper-title {
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0 8px;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
}
.paper-title a { color: var(--text); transition: color .15s ease; }
.paper-title a:hover { color: var(--accent); }
.authors { margin: 0 0 4px; }
.venue { color: var(--text-soft); margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.venue-ext { margin: -4px 0 8px; font-size: 14px; color: var(--text-soft); font-style: normal; }
/* Research direction tag inside venue line */
.research-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.4;
}
.rt-3dgs { background: #e8f0ff; color: #2f5bea; border: 1px solid #c7d7fb; }
.rt-diffusion { background: #f3eaff; color: #7c3aed; border: 1px solid #ddd0fb; }
.rt-cphoto { background: #e0f2f1; color: #0f766e; border: 1px solid #99d5cf; }
.rt-neural { background: #eef2ff; color: #4f46e5; border: 1px solid #cfd6fb; }
body.dark .rt-3dgs { background: rgba(47, 91, 234, .18); color: #8fb0ff; border-color: rgba(47, 91, 234, .4); }
body.dark .rt-diffusion { background: rgba(124, 58, 237, .18); color: #c4a5ff; border-color: rgba(124, 58, 237, .4); }
body.dark .rt-cphoto { background: rgba(13, 148, 136, .18); color: #5eead4; border-color: rgba(13, 148, 136, .4); }
body.dark .rt-neural { background: rgba(79, 70, 229, .18); color: #a5b4fc; border-color: rgba(79, 70, 229, .4); }
.links { font-size: 14px; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-weight: 600;
  transition: all .15s ease;
}
.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
/* ============ Research grid ============ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 26px;
}
.research-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 2px 10px var(--card-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.research-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px var(--card-shadow-hover);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.research-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
  margin-bottom: 14px;
}
.research-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.research-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-soft);
}

/* ============ Pub filter ============ */
.pub-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 24px;
}
.filter-btn {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  padding: 6px 16px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-soft);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.filter-btn.active {
  background: linear-gradient(120deg, var(--accent), #7c4dff);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px var(--card-shadow-hover);
}

/* Research direction filter (second row) */
.research-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}
.rfilter-btn {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 13px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-soft);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.rfilter-btn:hover { transform: translateY(-1px); }
.rfilter-btn.rt-neural:hover { border-color: #4f46e5; color: #4f46e5; }
.rfilter-btn.rt-3dgs:hover { border-color: #2f5bea; color: #2f5bea; }
.rfilter-btn.rt-diffusion:hover { border-color: #7c3aed; color: #7c3aed; }
.rfilter-btn.rt-cphoto:hover { border-color: #0f766e; color: #0f766e; }
.rfilter-btn.active { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 4px 12px var(--card-shadow-hover); }
.rfilter-btn.rt-neural.active { background: #4f46e5; }
.rfilter-btn.rt-3dgs.active { background: #2f5bea; }
.rfilter-btn.rt-diffusion.active { background: #7c3aed; }
.rfilter-btn.rt-cphoto.active { background: #0f766e; }

/* hover-swap */
.swap-base, .swap-over {
  width: 100%;
  border-radius: 8px;
  display: block;
}
.swap-over {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity .25s ease;
}

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 14px;
  color: var(--text-soft);
  text-align: right;
}

/* ============ Back to top ============ */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #7c3aed));
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, box-shadow .3s ease;
  z-index: 100;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent);
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 50%, transparent);
}
.back-to-top:active {
  transform: translateY(-2px) scale(1.04);
}

/* ============ Legacy element styles (kept for compatibility) ============ */
subtitle { font-family: 'Lato', Verdana, Helvetica, sans-serif; font-size: 18px; }
heading { font-family: 'Lato', Verdana, Helvetica, sans-serif; font-size: 24px; }
papertitle { font-family: 'Lato', Verdana, Helvetica, sans-serif; font-size: 18px; font-weight: 700; }
name { font-family: 'Lato', Verdana, Helvetica, sans-serif; font-size: 32px; }
span.highlight { background-color: var(--highlight); padding: 0 2px; }

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px)  rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

span.fa-twitter:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: #1DA1F2; }
span.ai-cv:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: brown; }
span.fa-facebook:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: #4267B2; }
span.fa-file-alt:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: darkgoldenrod; }
span.ai-google-scholar:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: #4285F4; }
span.ai-researchgate:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: #14d4b4; }
span.fa-linkedin:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: #1DA1F2; }
span.fa-youtube:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: #FF0000; }
span.fa-github:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: #4078c0; }
span.fa-bilibili:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: #08a4d4; }
span.fa-zhihu:hover { animation: shake 0.5s; animation-iteration-count: infinite; color: #2864ff; }
span.fa-envelope:hover { animation: shake 0.5s; animation-iteration-count: infinite; }

/* ============ Responsive ============ */
@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 280px; }
  .nav-links li { padding: 12px 20px; border-top: 1px solid var(--border); }
  .nav-toggle { display: flex; }

  .about { flex-direction: column; }
  .about-photo { flex: none; max-width: 240px; }
  .paper { flex-direction: column; gap: 14px; }
  .paper-media { max-width: 100%; flex: none; }
  .swap-over { display: none; }

  /* News: hide icon symbol on phones, simplify to date + text */
  .news-item {
    gap: 8px;
    padding: 10px 4px;
    flex-wrap: wrap;
  }
  .news-icon { display: none; }
  .news-date { flex: 0 0 auto; }
  .news-text { flex: 1 1 100%; text-align: left; }
  .news-toggle { width: 100%; }

  /* Tech Transfer: single column; portrait cards stack vertically */
  .tech-grid-half { grid-template-columns: 1fr; }
  .tech-card-solo { flex-direction: column; }
  /* 竖屏视频在手机上保持 9:16 比例，限制最大高度，用 contain 避免裁切 */
  .tech-card-solo .tech-media {
    flex: none;
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 70vh;
  }
  .tech-card-solo .tech-media video {
    object-fit: contain;
  }

  /* Footer: stack columns on narrow screens */
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (min-width: 761px) {
  .nav-links { display: flex !important; }
}

/* 隐藏指定论文（被作者要求不展示，但仍保留在源码中） */
.paper.hidden { display: none !important; }

/* ============ Reading progress ============ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 101;
  background: transparent;
}
.reading-progress > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #7c4dff);
  transition: width .1s linear;
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lightbox.show {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  opacity: .8;
  transition: opacity .2s;
}
.lightbox-close:hover { opacity: 1; }

/* ============ Footer ============ */
.site-footer { padding: 32px 0; text-align: left; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr;
  gap: 24px;
  align-items: start;
}
.footer-col h3 { font-size: 16px; font-weight: 700; margin: 0 0 10px; color: var(--text); }
.footer-col p { font-size: 14px; line-height: 1.6; color: var(--text-soft); margin: 0; }
.footer-col a { color: var(--link); }
.footer-col a:hover { color: var(--link-hover); }
.footer-sep { margin: 0 6px; color: var(--text-soft); }
#lastUpdated { font-weight: 600; color: var(--text); }

/* ============ Print styles ============ */
@media print {
  .site-header, .back-to-top, .reading-progress, .theme-toggle, .nav-toggle, .lightbox, .news-toggle { display: none !important; }
  .about { flex-direction: row; }
  .paper { break-inside: avoid; }
  a { text-decoration: none; color: #000 !important; }
  body { background: #fff !important; color: #000 !important; }
  section { margin-bottom: 24px; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
