:root {
  color-scheme: light;
  --bg: #F7F8FA;
  --page-top: #F1F3F6;
  --bg-elevated: #ffffff;
  --bg-strong: #ffffff;
  --surface: #F1F3F6;
  --surface-strong: #E5E7EB;
  --paper: rgba(255, 255, 255, 0.8);
  --paper-strong: #ffffff;
  --text-primary: #1A1A1B;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --line: #E5E7EB;
  --accent: #002FA7;
  --accent-strong: #002891;
  --accent-soft: rgba(0, 47, 167, 0.08);
  --blue: #002FA7;
  --mint: #10B981;
  --lime: #84CC16;
  --glow-a: rgba(0, 47, 167, 0.04);
  --glow-b: rgba(75, 85, 99, 0.04);
  --glow-c: rgba(0, 47, 167, 0.03);
  --blue-soft: rgba(0, 47, 167, 0.06);
  --line-strong: #D1D5DB;
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --hero-bg: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
  --hero-border: #E5E7EB;
  --hero-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
  --hero-text: #1A1A1B;
  --hero-grid-line: #000000;
  --hero-grid-opacity: 0.03;
  --hero-grid-mask: linear-gradient(180deg, rgba(0, 0, 0, 1), transparent 90%);
  --hero-glow: radial-gradient(circle, rgba(0, 47, 167, 0.03) 0%, transparent 70%);
  --hero-kicker-color: #002FA7;
  --hero-chip-text: #1A1A1B;
  --hero-chip-bg: #F3F4F6;
  --hero-chip-border: #E5E7EB;
  --hero-title: #1A1A1B;
  --hero-lead: #4B5563;
  --hero-primary-text: #ffffff;
  --hero-primary-bg: #1A1A1B;
  --hero-primary-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  --hero-secondary-text: #1A1A1B;
  --hero-secondary-bg: #ffffff;
  --hero-secondary-border: #E5E7EB;
  --hero-proof-bg: #ffffff;
  --hero-proof-border: #E5E7EB;
  --hero-proof-shadow: none;
  --hero-proof-kicker: #002FA7;
  --hero-proof-title: #1A1A1B;
  --hero-stat-bg: #F9FAFB;
  --hero-stat-border: #E5E7EB;
  --hero-stat-value: #1A1A1B;
  --hero-stat-label: #6B7280;
  --hero-strip-bg: #F9FAFB;
  --hero-strip-border: #E5E7EB;
  --hero-strip-kicker: #002FA7;
  --hero-strip-title: #1A1A1B;
  --hero-strip-text: #6B7280;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  --font-display: "Avenir Next", "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Avenir Next", "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D0D0E;
  --page-top: #151516;
  --bg-elevated: #1A1A1B;
  --bg-strong: #0D0D0E;
  --surface: #1A1A1B;
  --surface-strong: #2D2D2E;
  --paper: rgba(26, 26, 27, 0.82);
  --paper-strong: #1A1A1B;
  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --line: #2D2D2E;
  --accent: #5D8AFF;
  --accent-strong: #7AA2FF;
  --accent-soft: rgba(93, 138, 255, 0.12);
  --blue: #5D8AFF;
  --mint: #34D399;
  --lime: #BEF264;
  --glow-a: rgba(0, 0, 0, 0.6);
  --glow-b: rgba(0, 0, 0, 0.4);
  --glow-c: rgba(0, 0, 0, 0.3);
  --blue-soft: rgba(93, 138, 255, 0.08);
  --line-strong: #3F3F40;
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.3);
  --hero-bg: linear-gradient(135deg, #0D0D0E 0%, #151516 100%);
  --hero-border: #2D2D2E;
  --hero-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  --hero-text: #F9FAFB;
  --hero-grid-line: #ffffff;
  --hero-grid-opacity: 0.04;
  --hero-grid-mask: linear-gradient(180deg, rgba(0, 0, 0, 1), transparent 85%);
  --hero-glow: radial-gradient(circle, rgba(93, 138, 255, 0.06) 0%, transparent 70%);
  --hero-kicker-color: var(--accent);
  --hero-chip-text: #F9FAFB;
  --hero-chip-bg: #2D2D2E;
  --hero-chip-border: #3F3F40;
  --hero-title: #ffffff;
  --hero-lead: #9CA3AF;
  --hero-primary-text: #0D0D0E;
  --hero-primary-bg: #F9FAFB;
  --hero-primary-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --hero-secondary-text: #F9FAFB;
  --hero-secondary-bg: #1A1A1B;
  --hero-secondary-border: #2D2D2E;
  --hero-proof-bg: #1A1A1B;
  --hero-proof-border: #2D2D2E;
  --hero-proof-shadow: none;
  --hero-proof-kicker: var(--accent);
  --hero-proof-title: #ffffff;
  --hero-stat-bg: #151516;
  --hero-stat-border: #2D2D2E;
  --hero-stat-value: #ffffff;
  --hero-stat-label: #6B7280;
  --hero-strip-bg: #1A1A1B;
  --hero-strip-border: #2D2D2E;
  --hero-strip-kicker: var(--accent);
  --hero-strip-title: #ffffff;
  --hero-strip-text: #9CA3AF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(circle at 8% 8%, var(--glow-b), transparent 24%),
    radial-gradient(circle at 92% 10%, var(--glow-a), transparent 26%),
    radial-gradient(circle at 50% 100%, var(--glow-c), transparent 28%),
    linear-gradient(180deg, var(--page-top) 0%, var(--bg) 24%, var(--bg) 100%);
  line-height: 1.65;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 85%);
}

body::after {
  background:
    radial-gradient(circle at 80% 14%, var(--glow-c) 0%, transparent 18%, transparent 22%),
    radial-gradient(circle at 16% 76%, var(--glow-a) 0%, transparent 15%, transparent 20%);
  filter: blur(12px);
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img,
svg {
  display: block;
}

strong {
  font-weight: 800;
}

.page-shell {
  width: min(calc(100% - 44px), 1320px);
  margin: 0 auto;
  padding: 20px 0 32px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 26px;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.nav-avatar {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.92), transparent 45%),
    linear-gradient(135deg, var(--accent-soft), var(--surface-strong));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}



.brand-lockup {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.brand-copy strong {
  font-size: 0.98rem;
  line-height: 1;
}

.brand-copy span {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1;
}

.topbar-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.topbar-nav a {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.topbar-nav a:hover,
.topbar-nav a.active {
  color: var(--text-primary);
  background: var(--paper);
  transform: translateY(-1px);
}

:root:not([data-theme="dark"]) .topbar-nav a.active {
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 
    inset 0 1px 2px rgba(0, 0, 0, 0.03),
    0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .topbar-nav a.active {
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 4px 12px rgba(93, 138, 255, 0.2);
}

.topbar-nav a:focus-visible,
.theme-toggle:focus-visible,
.button-primary:focus-visible,
.button-secondary:focus-visible,
.media-link:focus-visible,
.project-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-primary);
  background: var(--paper-strong);
  box-shadow: 0 10px 22px rgba(26, 42, 87, 0.08);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(42, 99, 255, 0.32);
}

.toggle-icon {
  width: 15px;
  height: 15px;
}

.sun {
  display: none;
}

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

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

.toggle-text {
  display: none;
}

.content-flow {
  display: grid;
  gap: 64px;
  padding-top: 28px;
}

.hero-section,
.content-section {
  scroll-margin-top: 120px;
}

.hero-section {
  position: relative;
  margin-bottom: 0;
  padding: clamp(40px, 5vw, 72px);
  background: var(--hero-bg);
  border: 1px solid var(--hero-border);
  border-radius: 28px;
  box-shadow: var(--hero-shadow);
  overflow: hidden;
  color: var(--hero-text);
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--hero-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: var(--hero-grid-opacity);
  mask-image: var(--hero-grid-mask);
  pointer-events: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -18%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: var(--hero-glow);
  pointer-events: none;
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 40px 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}

.highlight-card,
.experience-panel,
.project-card-modern {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
              box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-metric:hover,
.experience-panel:hover,
.project-card-modern:hover:not(.enterprise-project-card),
.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.hero-intro {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  max-width: 800px;
}

/*Persona Card Visuals */
.hero-visual {
  display: flex;
  justify-content: flex-end;
  perspective: 1000px;
}

.persona-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--hero-proof-border);
  border-radius: 32px;
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.1),
    inset 0 0 0 1px rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  transform: rotateY(-5deg) rotateX(5deg);
  transition: transform 0.4s ease;
}

.persona-card:hover {
  transform: rotateY(0deg) rotateX(0deg) translateY(-5px);
}

.persona-image {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: var(--paper-strong);
}

.persona-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.6s ease;
}

.persona-card:hover .persona-image img {
  scale: 1.05;
}

.persona-tag {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.4;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Typography & Core Styles */
.hero-kicker,
.hero-strip-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow,
.section-kicker,
.card-index,
.experience-date,
.experience-company,
.project-impact {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-kicker {
  color: var(--hero-kicker-color);
  letter-spacing: 0.08em;
}

.hero-intro h1,
.section-heading h2,
.hero-metric-value,
.project-card-modern h3 {
  font-family: var(--font-display);
  letter-spacing: -0.045em;
}

.hero-intro h1 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.05;
  font-weight: 900;
  text-wrap: pretty;
  color: var(--hero-title);
}

.hero-lead {
  max-width: 52ch;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--hero-lead);
  margin-top: 4px;
}

.hero-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--hero-proof-border);
  background: var(--hero-proof-bg);
  backdrop-filter: blur(10px);
}

.hero-metric-value {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  line-height: 1;
  font-weight: 900;
  color: var(--hero-stat-value);
}

.hero-metric-label {
  color: var(--hero-stat-label);
  font-size: 0.8rem;
  line-height: 1.35;
  font-weight: 600;
}

.project-tags span,
.project-impact,
.media-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px; /* 从 32px 减小 */
  padding: 0 10px;  /* 从 12px 减小 */
  border-radius: 6px; /* 使用更干练的圆角而非完全胶囊形 */
  border: 1px solid var(--line);
  font-size: 0.76rem; /* 减小字号 */
  font-weight: 500;   /* 减小字重 */
  transition: all 0.2s ease;
}

.project-impact {
  background: var(--surface);
  border-color: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

[data-theme="dark"] .project-impact {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text-primary);
}

.achievement-list {
  list-style: none;
}

.achievement-list li {
  position: relative;
  max-width: none;
  padding-left: 24px;
  line-height: 1.78;
}

.achievement-list li + li {
  margin-top: 0;
}

.achievement-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.74em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.project-tags span,
.project-impact,
.media-chip {
  background: var(--surface);
  color: var(--text-secondary);
}

.media-chip,
.project-tags span {
  border-color: var(--line);
  color: var(--text-secondary);
}

.content-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 0;
}

.section-heading {
  display: grid;
  align-content: start;
  gap: 10px;
  margin-bottom: 0;
  padding-top: 6px;
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 32px;
}

.section-kicker {
  color: var(--accent-strong);
  font-weight: 800;
}

.section-heading h2 {
  max-width: 800px;
  font-size: clamp(1.88rem, 2.2vw, 2.35rem);
  line-height: 1.08;
  font-weight: 900;
  text-wrap: pretty;
}

.section-intro {
  max-width: 760px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.75;
}



.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.highlight-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.highlight-card-featured {
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(42, 99, 255, 0.08), var(--bg-elevated));
  border-color: rgba(42, 99, 255, 0.12);
}

.highlight-card:not(.highlight-card-featured) {
  background: var(--bg-elevated);
}

.card-index {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--blue);
  opacity: 0.9;
  font-weight: 800;
}

.highlight-card h3 {
  font-size: 1.16rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.highlight-card p {
  color: var(--text-secondary);
  opacity: 1;
  font-size: 0.95rem;
  line-height: 1.75;
}

.experience-list {
  display: grid;
  gap: 0;
}

.experience-panel {
  display: grid;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(26, 42, 87, 0.05);
  background: linear-gradient(180deg, var(--bg-elevated), var(--paper-strong));
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.experience-entry {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px 28px;
  align-items: start;
  padding: 28px clamp(40px, 5vw, 72px);
}

.experience-entry + .experience-entry {
  position: relative;
}

.experience-entry + .experience-entry::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(40px, 5vw, 72px);
  right: clamp(40px, 5vw, 72px);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line) 15%, var(--line) 85%, transparent);
}

.experience-meta {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 0;
}

.experience-meta::before {
  display: none;
}

.experience-date {
  color: var(--blue);
  font-weight: 800;
  font-size: 0.96rem;
}

.experience-company {
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.55;
}

.experience-main {
  --experience-content-width: min(100%, 108ch);
  max-width: none;
  min-width: 0;
}

.experience-header {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.experience-header h3 {
  font-size: clamp(1.28rem, 1.5vw, 1.56rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.experience-header p {
  max-width: var(--experience-content-width);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.72;
}

.achievement-list {
  color: var(--text-primary);
  display: grid;
  gap: 12px;
  padding-left: 0;
  max-width: var(--experience-content-width);
  font-size: 0.95rem;
}

.media-group {
  display: grid;
  gap: 10px;
  align-items: start;
  margin-top: 22px;
  padding-top: 16px;
  width: 100%;
  max-width: var(--experience-content-width);
  border-top: 1px solid var(--line);
}

.media-label {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.media-items,
.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
}

.media-items {
  min-width: 0;
}

.media-group .project-tags {
  gap: 10px 12px;
}

.media-link {
  font-size: 0.88rem;
}

.projects-panel {
  display: grid;
  gap: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.projects-grid,
.side-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(320px, 45%, 520px), 1fr));
  gap: 24px;
  justify-content: center;
  width: 100%;
}

.side-project-grid {
  align-items: stretch;
}

.side-project-card {
  background: linear-gradient(180deg, var(--bg-elevated), var(--paper-strong));
}

[data-theme="dark"] .side-project-card {
  background: linear-gradient(180deg, var(--bg-elevated), var(--paper-strong));
}

.project-card-modern {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 48px 36px;
  border-radius: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  height: 100%;
  max-width: 640px;
  position: relative;
  overflow: hidden;
}

/* 即使在 auto-fit 下，如果只有 1-2 个卡片，也确保它们在容器中居中 */
.projects-grid:has(> :last-child:nth-child(2)) {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
}

.side-project-grid:has(> :last-child:nth-child(2)) {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
}

@media (max-width: 1024px) {
  .projects-grid:has(> :last-child:nth-child(2)),
  .side-project-grid:has(> :last-child:nth-child(2)) {
    grid-template-columns: 1fr;
  }
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.project-card-top h3 {
  flex: 1;
  font-size: 1.15rem;
  line-height: 1.4;
}

.project-client {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

[data-theme="dark"] .project-client {
  color: var(--text-muted);
}

.enterprise-project-card .project-card-top {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.project-card-modern h3 {
  font-size: 1.14rem;
  line-height: 1.22;
  font-weight: 900;
}

.project-origin {
  justify-self: end;
  align-self: start;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.project-card-modern p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.78;
  max-width: 38ch;
}

.enterprise-project-card p {
  max-width: none;
}

.side-project-card p {
  max-width: none;
}

.experience-panel,
.project-card-modern,
.highlight-card {
  position: relative;
}

.project-card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  align-content: start;
}

.project-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  transition: all 0.2s ease;
}

/* 针对第一个标签（来源标签）进行特殊强化 */
.project-meta span:not(.project-impact):first-child {
  color: var(--text-primary);
  border-color: var(--line-strong);
  font-weight: 700;
}

/* 如果 impact 是第一个，那么第二个通常是来源标签 */
.project-impact + span {
  color: var(--text-primary);
  border-color: var(--line-strong);
  font-weight: 700;
}

.project-impact {
  border-color: var(--blue-soft) !important;
  color: var(--blue) !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em;
}

[data-theme="dark"] .project-impact {
  background: rgba(42, 99, 255, 0.1) !important;
  border-color: rgba(42, 99, 255, 0.3) !important;
  color: #9fb7ff !important;
}

.enterprise-project-card .project-tags,
.side-project-card .project-tags,
.project-tags {
  display: none; /* 结构已扁平化，移除旧命名空间 */
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--blue);
  font-weight: 600; /* 从 800 减小 */
  font-size: 0.84rem; /* 从 0.9rem 减小 */
  text-align: right;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.project-link:hover {
  opacity: 0.85;
  transform: translateX(3px);
}

.project-link-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.84rem;
  text-align: right;
  opacity: 0.75;
  cursor: default;
}

.project-link-placeholder svg {
  width: 1rem;
  height: 1rem;
}

.project-note {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  width: fit-content;
}

.project-link svg {
  width: 1rem;
  height: 1rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1040px) {
  .page-shell {
    width: min(calc(100% - 28px), 1320px);
  }

  .topbar {
    gap: 14px;
    border-radius: 28px;
  }

  .nav-avatar {
    width: 38px;
    height: 38px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .topbar-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .topbar-nav::-webkit-scrollbar {
    display: none;
  }

  .hero-section {
    padding: 22px 20px;
  }

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

  .hero-proof {
    max-width: none;
    padding: 20px;
  }

  .hero-proof h2 {
    max-width: none;
  }

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

  .hero-strip {
    grid-template-columns: 1fr;
  }

  .content-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-heading {
    max-width: 720px;
  }

  .section-heading h2,
  .section-intro {
    max-width: none;
  }

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

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

  .side-project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .content-section .section-heading {
    padding-top: 0;
  }

  .content-section .section-heading h2,
  .content-section .section-intro {
    max-width: none;
  }

  .experience-entry {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 22px;
  }

  .experience-meta {
    gap: 8px;
  }

  .experience-header {
    gap: 10px;
  }
}

@media (max-width: 720px) {
  body::after {
    opacity: 0.7;
  }

  body::before {
    background-size: 22px 22px;
  }

  .page-shell {
    width: min(calc(100% - 32px), 1320px);
    padding-top: 10px;
  }

  .topbar {
    position: sticky;
    top: 10px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 22px;
  }

  .brand-lockup {
    display: none;
  }

  .nav-avatar {
    width: 34px;
    height: 34px;
  }

  .toggle-text {
    display: none;
  }

  .topbar-nav {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 4px 0 0;
    overflow-x: auto;
    white-space: nowrap;
    mask-image: linear-gradient(to right, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent);
  }

  .topbar-nav a {
    padding: 7px 10px;
    font-size: 0.84rem;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .content-flow {
    gap: 58px;
    padding-top: 18px;
  }

  .hero-section {
    padding: 20px 16px;
    border-radius: 22px;
  }

  .hero-metric,
  .experience-panel,
  .highlight-card,
  .project-card-modern {
    border-radius: 22px;
  }

  .hero-section::after {
    width: 220px;
    height: 220px;
    right: -22%;
    top: -8%;
  }

  .hero-intro {
    gap: 14px;
  }

  .hero-intro h1 {
    max-width: none;
    font-size: clamp(1.5rem, 7vw, 2rem);
    line-height: 1.08;
  }

  .hero-lead {
    max-width: none;
    font-size: 0.9rem;
    line-height: 1.62;
  }

  .hero-stage {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-visual {
    display: none; /* 移动端为了节省空间暂且隐藏，或缩小展示 */
  }

  .hero-metrics {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
  }

  .hero-metric {
    padding: 14px 12px;
  }

  .section-heading {
    padding-left: 0;
    padding-right: 0;
  }

  .section-heading h2 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

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

  .highlight-card {
    min-height: auto;
  }

  .experience-entry {
    padding: 20px 16px;
  }

  .projects-panel {
    padding: 24px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 10px 26px rgba(26, 42, 87, 0.05);
  }

  .projects-grid,
  .side-project-grid {
    gap: 0;
  }

  .project-card-modern {
    gap: 16px;
    padding: 24px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .projects-grid .project-card-modern,
  .side-project-grid .project-card-modern {
    border-bottom: 1px solid var(--line);
  }

  .projects-grid .project-card-modern:last-child,
  .side-project-grid .project-card-modern:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .projects-grid .project-card-modern:first-child,
  .side-project-grid .project-card-modern:first-child {
    padding-top: 0;
  }

  .project-card-modern h3 {
    font-size: 1.04rem;
    line-height: 1.24;
  }

  .project-card-modern p {
    font-size: 0.92rem;
    line-height: 1.72;
  }

  .project-meta {
    gap: 10px;
  }

  .project-tags {
    gap: 8px 10px;
  }

  .project-tags span,
  .project-impact,
  .media-chip {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.8rem;
  }

  .project-card-footer {
    gap: 10px;
  }

  .achievement-list li {
    max-width: none;
    padding-left: 24px;
  }

  .media-group,
  .project-meta {
    align-items: flex-start;
  }

  .project-card-top {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-origin {
    justify-self: start;
  }

  .enterprise-project-card .project-card-top {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .project-card-footer {
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }

  .topbar-nav a {
    padding: 8px 11px;
    font-size: 0.84rem;
  }

  .content-section,
  .hero-section {
    margin-bottom: 0;
  }
}

/* --- Footer --- */
.footer-simple {
  margin-top: 28px;
  padding: 8px 0 0;
  border-top: none; /* 移除横线，减少视觉高度 */
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 6px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}
