/* ========================================
   BASE.CSS — Shared reset, layout, responsive
   This file is theme-agnostic.
   ======================================== */

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

/* Skip to content — accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-text);
  color: var(--color-bg);
  z-index: 200;
  border-radius: 0 0 4px 4px;
  font-size: var(--size-sm, 0.833rem);
}

.skip-link:focus {
  top: 0;
}

/* Focus visible — keyboard accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color 0.5s ease, color 0.5s ease;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

ul, ol {
  list-style: none;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.3;
  color: var(--color-text);
}

/* Theme switch — temporarily apply transition to all elements */
.theme-switching *,
.theme-switching *::before,
.theme-switching *::after {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease !important;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-nav-bg);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--color-divider);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}


.nav.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .nav.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-page-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-logo-name {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-width 0.3s ease;
  white-space: nowrap;
}

.nav-logo.scrolled .nav-logo-name {
  opacity: 1;
  max-width: 10rem;
}

.nav-toggle-input {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 0.6rem;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.nav-toggle-label span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.15s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: var(--size-sm, 0.833rem);
  font-weight: 600;
  color: var(--color-text-secondary);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 0.6rem;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
  border-radius: 4px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.theme-toggle:hover {
  color: var(--color-accent);
}

[data-theme="light"] .icon-moon,
[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-sun,
[data-theme="dark"] .icon-moon {
  display: block;
}

/* Default: show sun, hide moon */
.icon-moon { display: none; }
.icon-sun { display: block; }


/* --- Layout --- */
.section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-section) var(--space-page-x);
}

/* Alternating section backgrounds — subtle MRI-themed patterns */
#news,
#presentations {
  position: relative;
}

#news::before,
#presentations::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: -1;
  opacity: 0.03;
}

/* News — dot matrix (sampling grid) */
#news::before {
  background-image: radial-gradient(var(--color-text) 0.8px, transparent 0.8px);
  background-size: 12px 12px;
  opacity: 0.04;
}

/* Presentations — Cartesian grid (k-space grid) */
#presentations::before {
  background-image:
    repeating-linear-gradient(
      to right,
      var(--color-text) 0px, var(--color-text) 0.5px,
      transparent 0.5px, transparent 12px
    ),
    repeating-linear-gradient(
      to bottom,
      var(--color-text) 0px, var(--color-text) 0.5px,
      transparent 0.5px, transparent 12px
    );
}

.section-title {
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--size-sm, 0.833rem);
  margin-bottom: 1rem;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding-top: calc(3.5rem + var(--space-section));
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}

.hero-photo {
  flex-shrink: 0;
  position: relative;
}

.recon-label {
  display: block;
  text-align: center;
  font-family: var(--font-mono, monospace);
  font-size: var(--size-xs, 0.694rem);
  color: var(--color-text-secondary);
  margin-top: 0.4rem;
  letter-spacing: 0.04em;
  min-height: 1.2em;
}

.anim-recon-label {
  animation: reconLabel 1.4s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes reconLabel {
  0%   { opacity: 0.8; }
  70%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { opacity: 0; visibility: hidden; }
}

.profile-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--profile-radius, 12px);
  transition: box-shadow 0.3s ease;
}

.hero-name {
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.hero-name-cn {
  color: var(--color-text-secondary);
  margin-left: 0.5rem;
}

.hero-pronunciation {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.hero-bio {
  font-size: var(--size-base, 1rem);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.hero-bio a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease;
}

.hero-bio a:hover {
  text-decoration-color: currentColor;
}

.hero-bio-personal {
  color: var(--color-text-secondary);
  font-style: italic;
}

.hero-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-links a {
  color: var(--color-text-secondary);
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  padding: 0.5rem;
  margin: -0.5rem;
}

.hero-links a:hover {
  color: var(--color-accent);
  transform: scale(1.1);
}

/* Tooltip for social icons */
.hero-links a[data-tooltip] {
  position: relative;
}

.hero-links a[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -1.8rem;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-family: var(--font-body, sans-serif);
  font-size: var(--size-xs, 0.694rem);
  color: var(--color-text-secondary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-links a[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* --- Wave Divider --- */
.wave-divider {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-page-x);
  color: var(--color-divider);
}

.wave-divider svg {
  width: 100%;
  height: 30px;
}

/* --- News --- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-divider);
  position: relative;
}

.news-date {
  font-weight: 600;
  font-size: var(--size-sm, 0.833rem);
  flex-shrink: 0;
  min-width: 4rem;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

/* VISTA mask canvas fills left side of news-item, behind the date */
.news-item canvas.vista-mask {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  border-radius: 3px;
  opacity: 0.1;
  pointer-events: none;
}

/* Old news: hidden by default with animation */
.news-old {
  display: none;
  opacity: 0;
}

.news-list.news-expanded .news-old {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.news-toggle {
  display: block;
  margin-top: 0.25rem;
  padding: 0.4rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--size-sm, 0.833rem);
  color: var(--color-accent);
  transition: color 0.2s ease;
  position: relative;
  z-index: 2;
}

.news-toggle:hover {
  color: var(--color-accent-hover, var(--color-text));
}

.news-text {
  font-size: var(--size-base, 1rem);
}

.news-text a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease;
}

.news-text a:hover {
  text-decoration-color: currentColor;
}

/* --- Publications --- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pub-card {
  display: flex;
  gap: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border-radius: var(--card-radius, 8px);
  border: 1px solid var(--color-divider);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.3s ease;
}

.pub-card:hover,
.pub-card:focus-within {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.pub-content {
  flex: 1;
  min-width: 0;
}

.pub-title {
  font-size: var(--size-base, 1rem);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.pub-authors {
  font-size: var(--size-sm, 0.833rem);
  color: var(--color-text-secondary);
  margin-bottom: 0.15rem;
}

.pub-venue {
  font-size: var(--size-sm, 0.833rem);
  color: var(--color-text-secondary);
  font-style: italic;
}

.pub-tag {
  display: inline-block;
  font-size: var(--size-xs, 0.694rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-style: normal;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.pub-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.3rem;
}

.pub-links a {
  font-size: var(--size-sm, 0.833rem);
  font-weight: 600;
}

.pub-link-soon {
  font-size: var(--size-sm, 0.833rem);
  color: var(--color-text-secondary);
  font-style: italic;
}

/* --- Presentations --- */
.pres-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pres-item {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-divider);
  border-radius: 4px;
  align-items: baseline;
}

.pres-tag {
  display: inline-block;
  font-size: var(--size-xs, 0.694rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  text-align: center;
  width: fit-content;
}

.pres-date {
  font-weight: 600;
  font-size: var(--size-sm, 0.833rem);
  white-space: nowrap;
  min-width: 4rem;
  flex-shrink: 0;
}

.pres-content {
  flex: 1;
  min-width: 0;
  font-size: var(--size-base, 1rem);
  line-height: 1.6;
}

.pres-location {
  color: var(--color-text-secondary);
  font-size: var(--size-sm, 0.833rem);
}

.pres-title {
  display: block;
  color: var(--color-text-secondary);
  font-size: var(--size-sm, 0.833rem);
  margin-top: 0.15rem;
}

/* --- More section --- */
.subsection {
  margin-bottom: 2.5rem;
}

.subsection:last-child {
  margin-bottom: 0;
}

.subsection-title {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-divider);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.6rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--timeline-gradient, var(--color-divider));
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.65rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  z-index: 1;
}

.timeline-current .timeline-dot {
  background: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow, rgba(184, 92, 56, 0.2));
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.timeline-date {
  font-size: var(--size-sm, 0.833rem);
  font-weight: 600;
  color: var(--color-accent);
}

.timeline-place {
  font-size: var(--size-sm, 0.833rem);
  color: var(--color-text-secondary);
}

.timeline-detail {
  font-size: var(--size-sm, 0.833rem);
  color: var(--color-text-secondary);
  font-style: italic;
}

/* Detail list */
.detail-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--size-base, 1rem);
}

.detail-meta {
  display: block;
  font-size: var(--size-sm, 0.833rem);
  color: var(--color-text-secondary);
  margin-top: 0.2rem;
}

/* Academic Map */
.academic-map {
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: var(--card-radius, 6px);
  border: 1px solid var(--color-divider);
  margin-top: 0.75rem;
  position: relative;
  z-index: 0;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.academic-map::before {
  content: 'Loading map...';
  font-family: var(--font-mono, monospace);
  font-size: var(--size-sm, 0.833rem);
  color: var(--color-text-secondary);
  opacity: 0.4;
}

.academic-map.leaflet-container::before {
  display: none;
}

[data-theme="dark"] .academic-map {
  filter: sepia(0.15) hue-rotate(-10deg);
}

/* Leaflet controls — blend with theme */
.academic-map .leaflet-control-zoom a {
  background: var(--color-surface) !important;
  color: var(--color-text-secondary) !important;
  border-color: var(--color-divider) !important;
  width: 30px !important;
  height: 30px !important;
  line-height: 30px !important;
  font-size: 14px !important;
}

.academic-map .leaflet-control-zoom a:hover {
  background: var(--color-bg) !important;
  color: var(--color-text) !important;
}

.academic-map .leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-sm) !important;
  border-radius: 6px !important;
  overflow: hidden;
}

.academic-map .leaflet-control-attribution {
  background: color-mix(in srgb, var(--color-bg) 80%, transparent) !important;
  color: var(--color-text-secondary) !important;
  font-size: 0.6rem !important;
  padding: 2px 6px !important;
}

.academic-map .leaflet-control-attribution a {
  color: var(--color-text-secondary) !important;
}

.map-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
  font-size: var(--size-sm, 0.833rem);
  color: var(--color-text-secondary);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* Service & Personal */
.service-text,
.personal-text {
  font-size: var(--size-base, 1rem);
  line-height: 1.6;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* --- Footer --- */
.footer {
  margin-top: 0;
  transition: border-color 0.3s ease;
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem var(--space-page-x);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer-links a {
  font-size: var(--size-sm, 0.833rem);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-visitors {
  margin-top: 0.5rem;
  text-align: center;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.footer-visitors:hover {
  opacity: 0.8;
}

.footer-visitors-label {
  font-size: var(--size-xs, 0.694rem);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.footer-clustrmaps {
  display: inline-block;
}

.footer-clustrmaps img {
  width: 140px;
  border-radius: 4px;
}


/* Theme picker — hidden in footer */
.theme-picker {
  margin-top: 0.5rem;
  text-align: center;
}

.theme-picker-toggle {
  font-family: var(--font-mono, monospace);
  font-size: var(--size-xs, 0.694rem);
  color: var(--color-text-secondary);
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s ease;
  list-style: none;
}

.theme-picker-toggle::-webkit-details-marker {
  display: none;
}

.theme-picker-toggle:hover {
  opacity: 0.8;
}

.theme-picker-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.theme-btn {
  font-family: var(--font-mono, monospace);
  font-size: var(--size-xs, 0.694rem);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--color-divider);
  border-radius: 3px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.theme-btn.active {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.footer-easter-egg {
  font-size: var(--size-xs, 0.694rem);
  color: var(--color-divider);
  margin-bottom: 0.5rem;
  cursor: default;
  transition: color 0.3s ease;
  user-select: none;
}

.footer-easter-egg:hover {
  color: var(--color-accent);
}

.footer-copy {
  font-size: var(--size-sm, 0.833rem);
  color: var(--color-text-secondary);
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-divider);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--size-base, 1rem);
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --- Animations --- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.6s ease forwards;
}

.anim-delay-1 { animation-delay: 0.15s; }
.anim-delay-2 { animation-delay: 0.3s; }
.anim-delay-3 { animation-delay: 0.45s; }

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MRI reconstruction animation — k-space progressive filling */
@keyframes reconstruct {
  0%   { filter: blur(12px) saturate(0.4); opacity: 0.3; }
  25%  { filter: blur(6px) saturate(0.6);  opacity: 0.5; }
  55%  { filter: blur(2px) saturate(0.85); opacity: 0.8; }
  100% { filter: blur(0) saturate(1);      opacity: 1; }
}

.anim-reconstruct {
  animation: reconstruct 1.4s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* Scroll-triggered fade (progressive enhancement) */
@supports (animation-timeline: view()) {
  .section-title,
  .pub-card,
  .pres-item,
  .timeline-item,
  .news-item:not(.news-old),
  .subsection {
    opacity: 0;
    transform: translateY(80px);
    animation: fadeSlideUp 1s ease forwards;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

/* --- Responsive --- */

/* Tablet */
@media (max-width: 768px) {
  :root {
    --space-section: 2.5rem;
  }

  .nav-toggle-label {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    padding: 4.5rem var(--space-page-x) 1.5rem;
    gap: 0.5rem;
    z-index: -1;
    transform: translateY(-100%);
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.35s ease-in, visibility 0s linear 0.35s;
  }

  .nav-toggle-input:checked ~ .nav-links {
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition: transform 0.35s ease-out, visibility 0s linear 0s;
  }

  .nav-toggle-input:checked ~ .nav-toggle-label span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle-input:checked ~ .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle-input:checked ~ .nav-toggle-label span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .profile-img {
    width: 140px;
    height: 140px;
  }

  .hero-name {
    font-size: 2rem;
  }

  .hero-links {
    justify-content: center;
  }

  .pub-card {
    flex-direction: column;
  }

  .pres-item {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .pres-date {
    min-width: auto;
    order: -1;
  }

  .pres-content {
    flex-basis: 100%;
  }
}

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

  .hero-bg-pattern {
    display: none;
  }

}

/* Mobile */
@media (max-width: 480px) {
  .hero-name {
    font-size: 1.6rem;
  }

  .hero-name-cn {
    display: block;
    margin-left: 0;
    margin-top: 0.2rem;
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .news-item {
    flex-direction: column;
    gap: 0.2rem;
  }

  .news-date {
    min-width: auto;
  }

  .map-legend {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  .hero-links a[data-tooltip]::after {
    display: none;
  }
}
