:root {
  /* Light Theme Colors - Premium */
  --bg-color: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
  --surface-color: #ffffff;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --border-color: rgba(226, 232, 240, 0.8);
  --avatar-bg: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  --avatar-text: #1e40af;
  --tag-bg: rgba(241, 245, 249, 0.8);
  --header-bg: rgba(248, 250, 252, 0.7);
  --timeline-line: #e2e8f0;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

[data-theme="dark"] {
  /* Dark Theme Colors - Premium */
  --bg-color: #0b0f19;
  --bg-gradient: linear-gradient(135deg, #0b0f19 0%, #111827 100%);
  --surface-color: #1e293b;
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --primary-color: #60a5fa;
  --primary-hover: #93c5fd;
  --border-color: rgba(51, 65, 85, 0.8);
  --avatar-bg: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --avatar-text: #e2e8f0;
  --tag-bg: rgba(51, 65, 85, 0.5);
  --header-bg: rgba(11, 15, 25, 0.7);
  --timeline-line: #334155;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 15px;
  transition: background 0.5s ease, color 0.5s ease;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background-color: rgba(59, 130, 246, 0.5);
  color: var(--text-main);
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.4);
  border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(148, 163, 184, 0.6);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  min-height: 100vh;
}

/* Header & Controls */
.header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  padding: 1rem 0;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.header.scrolled {
  border-bottom-color: var(--border-color);
}

.header-controls button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.header-controls button:hover {
  background-color: var(--tag-bg);
  color: var(--text-main);
}

.header-controls svg {
  width: 20px;
  height: 20px;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  padding: 2rem 0 4rem;
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Sidebar / Profile */
.profile {
  position: sticky;
  top: 5rem;
  height: max-content;
  animation: fadeInUp 0.6s ease-out forwards;
}

@media (max-width: 768px) {
  .profile {
    position: static;
  }
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background-color: var(--avatar-bg);
  color: var(--avatar-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.name-container h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
  color: var(--text-main);
}

.chinese-name {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background-color: var(--tag-bg);
  color: var(--text-secondary);
  padding: 0.25rem 0.85rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: default;
}

.tag:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.links svg {
  width: 18px;
  height: 18px;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

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

.bullet-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--text-tertiary);
}

.bullet-list strong {
  color: var(--text-main);
  font-weight: 600;
}

.small-text li {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* Main Content */
.content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.section-block {
  background-color: var(--surface-color);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  animation: fadeInUp 0.6s ease-out both;
}

.section-block:nth-child(1) { animation-delay: 0.1s; }
.section-block:nth-child(2) { animation-delay: 0.2s; }
.section-block:nth-child(3) { animation-delay: 0.3s; }
.section-block:nth-child(4) { animation-delay: 0.4s; }

.section-block:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-main);
}

.section-title svg {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background-color: var(--timeline-line);
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  transition: transform 0.3s ease;
}

.timeline-item:hover {
  transform: translateX(6px);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--surface-color);
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
  z-index: 1;
}

.timeline-item:hover::before {
  background-color: var(--primary-color);
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.timeline-title .divider {
  color: var(--text-tertiary);
  margin: 0 0.25rem;
  font-weight: 400;
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.timeline-body p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.timeline-body p:last-child {
  margin-bottom: 0;
}

.timeline-body strong {
  color: var(--text-main);
}
