/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e5e7eb;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #f3f4f6 0%, #ffffff 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 6rem 0;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark mode variables */
:root[data-theme="dark"] {
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-light: #9ca3af;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-dark: #0f172a;
  --border-color: #374151;
  --gradient-secondary: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: var(--bg-secondary);
}

.dna-loader {
    width: 60px;
    height: 60px;
    position: relative;
    margin: 0 auto 1rem;
}

.dna-strand {
    position: absolute;
    width: 4px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: 2px;
    animation: dna-spin 2s infinite ease-in-out;
}

.dna-strand:nth-child(1) {
    left: 28px;
}

.dna-strand:nth-child(2) {
    right: 28px;
    animation-delay: 1s;
}

@keyframes dna-spin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition-normal);
}

/* Dark mode navbar */
:root[data-theme="dark"] .navbar {
    background: rgba(17, 24, 39, 0.95);
}

:root[data-theme="dark"] .navbar.scrolled {
    background: rgba(17, 24, 39, 0.98);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 80px; /* Account for fixed navbar and resume section */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    z-index: -1;
}

.particle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}


/* 保持 hero 左右对称对齐 */
.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* 控制文字和头像宽度比例 */
.hero-text {
    flex: 1 1 60%;
    min-width: 300px;
}

.hero-image {
    flex: 1 1 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 优化头像容器 */
.profile-container {
    position: relative;
    width: 350px;
    height: 350px;
    transform: rotate(3deg); /* 原来角度太大，可适当减少 */
}



/* 调整头像图片本身 */
.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--bg-secondary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1;
}


.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-secondary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: var(--text-light);
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* Sections */
.section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1000px; /* Limit max width */
    margin: 0 auto; /* Center the content */
}

.about-text {
    padding: 0 2rem; /* Add horizontal padding */
}

.about-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    line-height: 1.8; /* Improve line spacing */
}

.about-highlights {
    margin-bottom: 3rem;
    padding: 0 1rem; /* Add some padding to highlights */
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.highlight-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.highlight-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.highlight-item p {
    color: var(--text-secondary);
}

.skills-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-category h4 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.research-network {
    position: relative;
    width: 300px;
    height: 300px;
}

.network-node {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.network-node.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    color: var(--bg-secondary);
    border: none;
}

.network-node.node-1 {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.network-node.node-2 {
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
}

.network-node.node-3 {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.network-node.node-4 {
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
}

.network-node span {
    font-size: 0.7rem;
    margin-top: 0.25rem;
    text-align: center;
}

.network-node:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.network-node.center:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Research Section */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.research-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.research-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.research-icon i {
    font-size: 1.5rem;
    color: var(--bg-secondary);
}

.research-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.research-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.research-tags span {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.project-card.featured {
    grid-column: span 2;
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition-normal);
}

.project-image:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.project-link:hover {
    background: var(--primary-color);
    color: var(--bg-secondary);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.project-links {
    margin-bottom: 1rem;
}

.project-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-right: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Publications Section */
.publications-list {
    max-width: 800px;
    margin: 0 auto;
}

.publication-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-year {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.publication-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.venue {
    margin-bottom: 1rem;
}

.publication-links {
    display: flex;
    gap: 1rem;
}

.publication-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.publication-venues {
    margin-top: 3rem;
    text-align: center;
}

.publication-venues h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.venue-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.venue-tag {
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: var(--bg-secondary);
    border-radius: 25px;
    font-weight: 500;
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
}

/* === Contact Section Rewrite === */
.contact-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
  text-align: center;
}

/* 联系信息区域统一卡片化 */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  width: 100%;
}

.contact-item {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--transition-fast);
}

.contact-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.contact-item h4 {
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.contact-item p {
  color: var(--text-secondary);
  margin: 0.15rem 0;
}

/* 社交链接卡片 */
.social-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 800px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 15px;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--primary-color);
}

.social-link i {
  font-size: 1.25rem;
}

/* Resume Info Section */
.resume-info {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    top: 80px; /* Account for fixed navbar */
}

.resume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.resume-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
}

.resume-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.resume-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.resume-icon i {
    font-size: 1.2rem;
    color: var(--bg-secondary);
}

.resume-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.resume-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.resume-content p.year {
    color: var(--text-light);
    font-style: italic;
}

.resume-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.resume-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition-fast);
}

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

.resume-links i {
    font-size: 0.8rem;
}

/* Adjust hero section to account for resume info */
.hero {
    margin-top: 80px; /* Account for fixed navbar and resume section */
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--bg-secondary);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left, .footer-right {
    flex: 1;
    text-align: center;
}

.footer-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.footer-logo {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: transform 0.2s;
}

.footer-logo:hover {
    transform: scale(1.1);
}

.footer-content p {
    font-size: 0.9rem;
    color: #d1d5db;
}

/* Resume card additional styling */
.resume-content small {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* Enhanced responsive design for resume section */
@media (max-width: 1024px) {
    .resume-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2rem;
        justify-content: center;
    }

    .profile-container {
        width: 300px;
        height: 300px;
    }

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

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

    .social-links {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .resume-info {
        top: 60px;
    }

    .hero {
        margin-top: 60px;
    }

    .resume-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .resume-icon {
        margin-bottom: 0.5rem;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .project-card.featured {
        grid-column: span 1;
    }

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

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* .hero-content is already handled at 1024px */

    .hero-title {
        font-size: 2.5rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2rem;
        justify-content: center;
    }

    .profile-container {
        width: 300px;
        height: 300px;
    }

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

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

    .social-links {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

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

    .publication-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .publication-year {
        text-align: center;
    }
}

/* Animation utilities */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Particles animation */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Dark mode support for cards and elements */
:root[data-theme="dark"] .research-card,
:root[data-theme="dark"] .project-card,
:root[data-theme="dark"] .contact-item,
:root[data-theme="dark"] .social-link,
:root[data-theme="dark"] .resume-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

:root[data-theme="dark"] .network-node {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

:root[data-theme="dark"] .project-link {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

:root[data-theme="dark"] .profile-image {
    border-color: var(--border-color);
}

/* Dark mode support for resume-info section */
:root[data-theme="dark"] .resume-info {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Theme toggle button styles */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    margin-left: 1rem;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

:root[data-theme="dark"] .theme-toggle {
    border-color: var(--border-color);
    color: var(--text-primary);
}

:root[data-theme="dark"] .theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ====== 暗色模式覆盖 ====== */
[data-theme="dark"] body {
  background-color: #121212 !important;
  color: #e0e0e0 !important;
}

/* 如果你有全屏区块，比如 .section/.hero/.footer */
[data-theme="dark"] .section,
[data-theme="dark"] .hero,
[data-theme="dark"] .footer {
  background-color: #1e1e1e !important;
}

/* Stats Overview 区块单独提一下 */
[data-theme="dark"] .stats-overview,
[data-theme="dark"] .stats-overview .card {
  background-color: #2a2a2a !important;
}

/* Footer Logo & Overlay */
.footer-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
}
.footer-logo {
    height: 48px;
    width: auto;
    transition: transform 0.2s;
}
.footer-logo:hover {
    transform: scale(1.1);
}
.footer-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30,30,30,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.footer-overlay-text {
    font-size: 3rem;
    color: #fff;
    background: rgba(0,0,0,0.2);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-family: 'JetBrains Mono', 'Inter', sans-serif;
    letter-spacing: 0.2em;
}
.footer-overlay {
    cursor: pointer;
}

/* Profile icons under hero bio */
.profile-icons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0 1.5rem;
}
.profile-icons a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}
.profile-icons a:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--bg-secondary);
  transform: translateY(-2px);
}
.profile-icons i {
  font-size: 1rem;
}
:root[data-theme="dark"] .profile-icons a {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}
