:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-soft: rgba(11, 22, 38, 0.72);
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #f5f7ff;
  --text-soft: rgba(245, 247, 255, 0.72);
  --line: rgba(255, 255, 255, 0.12);
  --brand: #78c4ff;
  --brand-strong: #4c8dff;
  --accent: #8b6dff;
  --accent-warm: #ffb86c;
  --shadow: 0 28px 60px rgba(4, 12, 24, 0.38);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1200px;
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --grid-gap: clamp(1rem, 2vw, 1.5rem);
  --hero-gradient: radial-gradient(circle at top left, rgba(120, 196, 255, 0.22), transparent 36%), radial-gradient(circle at top right, rgba(139, 109, 255, 0.2), transparent 32%), linear-gradient(160deg, rgba(8, 17, 31, 0.95), rgba(6, 12, 24, 0.88));
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-soft: rgba(255, 255, 255, 0.78);
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --text: #0c1524;
  --text-soft: rgba(12, 21, 36, 0.72);
  --line: rgba(12, 21, 36, 0.08);
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --accent: #7c3aed;
  --accent-warm: #ea580c;
  --shadow: 0 24px 60px rgba(80, 107, 146, 0.18);
  --hero-gradient: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 36%), radial-gradient(circle at top right, rgba(124, 58, 237, 0.12), transparent 32%), linear-gradient(160deg, rgba(244, 247, 251, 0.96), rgba(233, 239, 248, 0.92));
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 32%), linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%);
  transition: background-color 0.35s var(--ease-premium), color 0.35s var(--ease-premium);
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}
.page-shell {
  position: relative;
  overflow: hidden;
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
}
.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.38;
  pointer-events: none;
  z-index: -1;
}
.ambient-one {
  top: -4rem;
  left: -2rem;
  width: 18rem;
  height: 18rem;
  background: rgba(76, 141, 255, 0.28);
}
.ambient-two {
  top: 22rem;
  right: -4rem;
  width: 24rem;
  height: 24rem;
  background: rgba(139, 109, 255, 0.18);
}
.ambient-three {
  bottom: 4rem;
  left: 50%;
  width: 20rem;
  height: 20rem;
  transform: translateX(-50%);
  background: rgba(255, 184, 108, 0.16);
}
.glass-panel {
  background: var(--panel);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0 1.25rem;
}
.site-header.is-scrolled {
  padding-top: 0.35rem;
}
.brand, .site-nav, .theme-switcher, .site-footer {
  border-radius: 999px;
}
.brand, .site-nav, .theme-switcher {
  padding: 0.7rem 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 14px;
}
.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--text-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.brand-name {
  margin: 0;
  font-size: 1.3rem;
}
.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.site-nav a, .theme-btn, .primary-btn, .secondary-btn, .site-footer a {
  transition: transform 0.3s var(--ease-premium), background-color 0.3s var(--ease-premium), color 0.3s var(--ease-premium), border-color 0.3s var(--ease-premium), opacity 0.3s var(--ease-premium);
}
.site-nav a {
  color: var(--text-soft);
  font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}
.theme-switcher {
  display: inline-flex;
  gap: 0.45rem;
  justify-content: flex-end;
}
.theme-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}
.theme-btn.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.section-grid, .about, .journey, .skills, .gallery, .contact {
  padding: 3rem 0;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.5rem;
  align-items: center;
  min-height: calc(100vh - 110px);
}
.hero-copy {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2rem);
  background: var(--hero-gradient);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.95rem;
}
.hero-copy h2 {
  margin: 1.2rem 0 0.9rem;
  font-size: clamp(2.4rem, 5.2vw, 5rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}
.hero-text, .section-heading p, .about-card p, .timeline-content p, .study-card p, .gallery-overlay p, .site-footer p, .portrait-content p, .floating-card li {
  color: var(--text-soft);
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}
.primary-btn, .secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}
.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
}
.secondary-btn {
  background: transparent;
  border-color: var(--line);
}
.primary-btn:hover, .secondary-btn:hover, .primary-btn:focus-visible, .secondary-btn:focus-visible {
  transform: translateY(-3px) scale(1.01);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}
.stat-card, .portrait-card, .floating-card, .about-card, .timeline-card, .skills-panel, .study-card, .gallery-card, .site-footer, .contact-link {
  border-radius: var(--radius-lg);
}
.stat-card, .about-card, .timeline-card, .study-card, .skills-panel, .site-footer, .contact-link {
  padding: 1.3rem;
}
.stat-card span, .timeline-tag, .gallery-overlay span {
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 700;
}
.stat-card strong {
  display: block;
  margin: 0.3rem 0 0.45rem;
  font-size: 1.15rem;
}
.stat-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}
.hero-visual {
  display: grid;
  gap: 1rem;
}
.portrait-card {
  padding: 1rem;
}
.portrait-frame {
  position: relative;
  aspect-ratio: 0.88;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 10px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
}
.portrait-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}
.portrait-content {
  padding: 1rem 0.35rem 0.2rem;
}
.portrait-content h3, .study-card h3, .about-card h3, .timeline-content h3, .gallery-overlay h3, .contact-link h3 {
  margin: 0.2rem 0 0.5rem;
}
.floating-card {
  padding: 1.2rem 1.3rem;
}
.floating-card ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}
.section-heading {
  max-width: 760px;
  margin-bottom: 1.4rem;
}
.section-heading h2 {
  margin: 0.35rem 0 0.65rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
}
.about-layout, .skills-layout, .contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.quote-card {
  position: relative;
  overflow: hidden;
}
.quote-mark {
  position: absolute;
  top: -1rem;
  right: 1rem;
  font-size: 7rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.09);
}
.quote-card p {
  position: relative;
  font-size: 1.08rem;
}
.quote-author {
  display: inline-block;
  margin-top: 1rem;
  color: var(--brand);
}
.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.timeline-card {
  display: grid;
  gap: 1rem;
}
.timeline-media {
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 10px);
}
.timeline-media img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.65s var(--ease-premium);
}
.timeline-card:hover .timeline-media img, .gallery-card:hover img {
  transform: scale(1.05);
}
.timeline-content {
  display: grid;
  gap: 0.2rem;
}
.skills-layout {
  align-items: start;
}
.skills-panel {
  grid-column: span 1;
}
.skill-item + .skill-item {
  margin-top: 1rem;
}
.skill-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  font-weight: 600;
}
.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.study-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.study-tags span {
  display: inline-flex;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 0.92rem;
}
.study-card ol {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-soft);
  line-height: 1.75;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.gallery-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  grid-column: span 4;
}
.gallery-card.large {
  grid-column: span 8;
  min-height: 420px;
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-premium), filter 0.8s var(--ease-premium);
}
.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 14, 24, 0.05), rgba(7, 14, 24, 0.84));
}
.gallery-overlay {
  position: absolute;
  inset: auto 1.1rem 1.1rem;
  z-index: 1;
}
.gallery-overlay h3, .gallery-overlay p, .gallery-overlay span {
  position: relative;
  color: var(--text);
}
.gallery-overlay span {
  font-weight: 700;
}
.gallery-overlay h3 {
  font-size: 1.1rem;
  font-weight: 700;
}
.gallery-overlay p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
}
/* 联系栏样式 */
.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.25s ease, border-color 0.2s;
  text-decoration: none;
  color: inherit;
}
.contact-link:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
}
.contact-icon {
  font-size: 2.2rem;
}
.contact-link p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}
.contact-url {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  font-family: monospace;
  opacity: 0.7;
}
/* 悬浮导航栏 */
.floating-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 12px 8px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}
.floating-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 30px;
  background: transparent;
  color: var(--text-soft);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
}
.floating-nav a:hover {
  background: rgba(120, 196, 255, 0.2);
  color: var(--brand);
  transform: scale(1.08);
}
.floating-nav a.active {
  background: var(--brand);
  color: white;
  box-shadow: 0 0 10px rgba(76, 141, 255, 0.5);
}
.floating-nav a::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 54px;
  background: var(--bg-soft);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  border: 1px solid var(--line);
  color: var(--text);
}
.floating-nav a:hover::after {
  opacity: 1;
}
@media (max-width: 768px) {
  .floating-nav { display: none; }
}
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0;
  background: var(--bg-soft);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
}
.site-footer p {
  margin: 0;
}
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition: opacity 0.7s var(--ease-premium), transform 0.7s var(--ease-premium);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.magnetic {
  will-change: transform;
}
/* 浅色主题下兴趣卡片文字白色 */
:root[data-theme="light"] .gallery-overlay h3,
:root[data-theme="light"] .gallery-overlay p,
:root[data-theme="light"] .gallery-overlay span {
  color: #ffffff;
}
:root[data-theme="light"] .gallery-overlay {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
@media (max-width: 1080px) {
  .site-header { grid-template-columns: 1fr; justify-items: stretch; }
  .site-nav, .theme-switcher { justify-content: center; }
  .hero, .about-layout, .timeline, .skills-layout, .contact-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-stats { grid-template-columns: 1fr; }
  .gallery-card, .gallery-card.large { grid-column: span 6; }
}
@media (max-width: 720px) {
  .page-shell { width: min(100% - 1rem, var(--max-width)); padding-top: 0.75rem; }
  .brand, .site-nav, .theme-switcher, .site-footer { border-radius: 24px; }
  .site-nav { gap: 0.75rem; }
  .site-nav a, .theme-btn { font-size: 0.88rem; }
  .hero-copy, .timeline-card, .about-card, .study-card, .skills-panel, .site-footer, .contact-link { padding: 1.1rem; }
  .hero-copy h2 { font-size: clamp(2.2rem, 13vw, 3.5rem); }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card, .gallery-card.large { grid-column: auto; min-height: 280px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}