/* ========================================
   Style 4: Organic Natural
   Earthy tones, soft curves, natural feel
   ======================================== */

:root {
    /* Light Theme (Default - Natural) */
    --bg-primary: #faf8f5;
    --bg-secondary: #f5f0e8;
    --bg-tertiary: #ebe5d9;
    --bg-card: #ffffff;

    --text-primary: #2d3a2d;
    --text-secondary: #4a5a4a;
    --text-muted: #7a8a7a;

    --accent-primary: #5a8f5a;
    --accent-secondary: #8faf5a;
    --accent-tertiary: #d4a574;
    --accent-gradient: linear-gradient(135deg, #5a8f5a 0%, #8faf5a 50%, #d4a574 100%);

    --border-color: #d9d0c3;
    --border-hover: #c4b8a8;

    --shadow-sm: 0 2px 8px rgba(45, 58, 45, 0.06);
    --shadow-md: 0 4px 16px rgba(45, 58, 45, 0.08);
    --shadow-lg: 0 8px 32px rgba(45, 58, 45, 0.1);
    --shadow-glow: none;

    /* Typography - Organic & Friendly */
    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body: 'Nunito', 'Helvetica Neue', sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    --transition-fast: 200ms ease;
    --transition-base: 350ms ease;

    /* Organic Rounded Corners */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
}

/* Dark Theme - Forest Night */
[data-theme="dark"] {
    --bg-primary: #1a2118;
    --bg-secondary: #232d20;
    --bg-tertiary: #2d3a2a;
    --bg-card: #252f22;

    --text-primary: #e8efe5;
    --text-secondary: #b8c8b5;
    --text-muted: #7a8a78;

    --border-color: #3a4a38;
    --border-hover: #4a5a48;
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 17px;
    transition: background-color var(--transition-base), color var(--transition-base);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ========================================
   Navigation - Soft Pill Shape
   ======================================== */

.navbar {
    position: fixed;
    top: var(--space-md);
    left: var(--space-md);
    right: var(--space-md);
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-bracket {
    color: var(--accent-primary);
}

.logo-text {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: var(--space-sm);
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-controls {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    padding: 4px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    color: var(--accent-primary);
    background: var(--bg-card);
}

.nav-btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.nav-btn-label {
    white-space: nowrap;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 4px;
}

.sun-icon { display: block; }
.moon-icon { display: none; }

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

[data-theme="dark"] .theme-label::after { content: "Light"; }
[data-theme="light"] .theme-label::after { content: "Dark"; }

.theme-label {
    font-size: 0;
}

.theme-label::after {
    font-size: 0.85rem;
}

/* ========================================
   Hero - Organic Layout
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px var(--space-xl) var(--space-2xl);
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.grid-overlay {
    display: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    right: -150px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-tertiary);
    bottom: -100px;
    left: -100px;
    border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-3xl);
    align-items: center;
    width: 100%;
}

.hero-greeting {
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.hero-title {
    font-size: 1.15rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-lg);
    font-weight: 500;
}

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

.highlight {
    color: var(--accent-primary);
    font-weight: 600;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    row-gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
}

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

.hero-cta {
    display: flex;
    gap: var(--space-md);
}

.hero-highlight {
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    background: color-mix(in srgb, var(--accent-primary) 10%, var(--bg-card));
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
    box-shadow: var(--shadow-sm);
}

.btn {
    padding: var(--space-md) var(--space-xl);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: none;
}

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

.btn-secondary {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.image-frame {
    width: 320px;
    height: 320px;
    border-radius: 60% 40% 50% 50% / 50% 50% 40% 60%;
    overflow: hidden;
    border: 4px solid var(--accent-primary);
    padding: 0;
    background: var(--bg-secondary);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder svg {
    width: 100px;
    height: 100px;
    color: var(--accent-primary);
    opacity: 0.5;
}

/* ========================================
   Sections Base
   ======================================== */

.section {
    padding: var(--space-3xl) var(--space-xl);
}

.section-alt {
    background: var(--bg-secondary);
}

.section-container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-2xl);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.title-icon {
    color: var(--accent-primary);
}

/* ========================================
   Publications - Soft Cards
   ======================================== */

.publications-filter {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    background: var(--accent-primary);
    color: white;
}

.filter-btn.active {
    background: var(--accent-primary);
    color: white;
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.pub-card {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.pub-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.pub-year {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.pub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-xs);
}

.pub-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.pub-authors {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.pub-venue {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: var(--space-sm);
}

.pub-links {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
    white-space: nowrap;
}

.pub-link {
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    color: var(--accent-primary);
    transition: all var(--transition-fast);
}

.pub-link:hover {
    background: var(--accent-primary);
    color: white;
}

/* ========================================
   Projects - Organic Cards
   ======================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

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

.project-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.project-icon {
    width: 50px;
    height: 50px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.project-icon svg {
    width: 100%;
    height: 100%;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.project-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.project-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(94, 141, 94, 0.09);
    border-radius: var(--radius-full);
    color: var(--text-muted);
}

.project-metric strong {
    color: var(--accent-primary);
    font-weight: 700;
}

.tag {
    font-size: 0.75rem;
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    color: var(--text-muted);
}

.project-links {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.project-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.project-link:hover {
    color: var(--accent-secondary);
}

.project-link svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   News - Soft Timeline
   ======================================== */

.news-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.news-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.news-content {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.news-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--accent-primary);
    color: white;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 50px;
    text-align: center;
}

.news-badge-meeting {
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    box-shadow: var(--shadow-sm);
}

.news-badge-paper {
    background: linear-gradient(135deg, #f97316 0%, #db2777 100%);
    box-shadow: var(--shadow-sm);
}

.news-badge-lab {
    background: linear-gradient(135deg, #0f766e 0%, #16a34a 100%);
    box-shadow: var(--shadow-sm);
}

.news-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

.news-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    width: 100%;
    margin-top: var(--space-sm);
}

.news-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.news-link:hover {
    text-decoration: none;
}

.news-link-paper {
    background: linear-gradient(135deg, #f97316 0%, #db2777 100%);
    color: white;
}

.news-link-wechat {
    background: #16a34a;
    color: white;
}

/* ========================================
   Experience - Organic Grid
   ======================================== */

.experience-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
}

.exp-category {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 3px solid var(--accent-primary);
    border-radius: 2px;
}

.exp-item {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.exp-period {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-tertiary);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.exp-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.exp-org {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.exp-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========================================
   Contact - Friendly Links
   ======================================== */

.contact-content {
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.contact-item:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
    text-decoration: none;
}

.contact-item svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Footer - Simple & Warm
   ======================================== */

.footer {
    padding: var(--space-xl);
    background: var(--bg-secondary);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.visitor-stats {
    margin-top: var(--space-sm);
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
}

.visitor-stats svg {
    opacity: 0.7;
}

.stat-divider {
    color: var(--border-color);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

    .hero-image {
        order: -1;
    }

    .image-frame {
        width: 280px;
        height: 280px;
    }

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

@media (max-width: 768px) {
    .navbar {
        top: var(--space-sm);
        left: var(--space-sm);
        right: var(--space-sm);
        border-radius: var(--radius-xl);
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 100px var(--space-md) var(--space-2xl);
    }

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

    .hero-stats {
        flex-direction: column;
        gap: var(--space-md);
        align-items: center;
    }

    .section {
        padding: var(--space-2xl) var(--space-md);
    }

    .pub-card {
        grid-template-columns: 1fr;
    }

    .pub-year {
        margin-bottom: var(--space-xs);
    }

    .news-item {
        grid-template-columns: 1fr;
    }

    .news-date {
        margin-bottom: var(--space-xs);
    }

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

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-item {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

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

/* ========================================
   Hide SPA-specific elements
   ======================================== */

.spa-layout {
    display: block;
}

.sidebar {
    display: none;
}

.content-area {
    margin-left: 0;
    padding: 0;
    min-height: auto;
}

.content-section {
    display: block !important;
}

.about-cards,
.about-news-card {
    display: none;
}

/* Scroll Down Arrow */
.scroll-arrow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    animation: bounce 2s infinite;
}

.scroll-arrow:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateX(-50%) scale(1.1);
}

.scroll-arrow svg {
    width: 24px;
    height: 24px;
}

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

/* ========================================
   Organic Natural Animations
   ======================================== */

/* Gentle floating animation like leaves */
@keyframes organicFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(1deg); }
    50% { transform: translateY(-4px) rotate(-1deg); }
    75% { transform: translateY(-12px) rotate(0.5deg); }
}

/* Breathing glow effect */
@keyframes breatheGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(90, 143, 90, 0.2),
                    0 0 40px rgba(143, 175, 90, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(90, 143, 90, 0.4),
                    0 0 60px rgba(143, 175, 90, 0.2);
    }
}

/* Organic shape morph */
@keyframes organicMorph {
    0%, 100% { border-radius: 60% 40% 50% 50% / 50% 50% 40% 60%; }
    25% { border-radius: 50% 60% 40% 50% / 40% 60% 50% 50%; }
    50% { border-radius: 40% 50% 60% 40% / 50% 40% 60% 50%; }
    75% { border-radius: 50% 40% 50% 60% / 60% 50% 40% 50%; }
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Gradient shift */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Apply animations to elements */

/* Hero image with organic morph and breathing glow */
.image-frame {
    animation: organicMorph 8s ease-in-out infinite, breatheGlow 4s ease-in-out infinite;
}

/* Hero text staggered entrance */
.hero-greeting {
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.hero-name {
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-description {
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.hero-stats {
    animation: fadeInScale 0.8s ease-out forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

.hero-cta {
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 1.1s;
    opacity: 0;
}

/* Floating orbs with organic movement */
.gradient-orb {
    animation: organicFloat 6s ease-in-out infinite;
}

.orb-2 {
    animation-delay: -3s;
}

/* Card hover effects */
.pub-card,
.project-card,
.news-item,
.exp-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pub-card:hover,
.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(90, 143, 90, 0.15);
}

.news-item:hover {
    transform: translateX(8px);
    border-left: 3px solid var(--accent-primary);
}

/* Button hover with organic feel */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(90, 143, 90, 0.3);
}

/* Section title animation */
.section-title {
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-gradient);
    transition: width 0.6s ease;
}

.section:hover .section-title::after {
    width: 100px;
}

/* Tag hover effect */
.tag {
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.05);
}

/* ========================================
   Scroll-Triggered Animations
   ======================================== */

/* 基础滚动动画类 - 初始状态 */
.scroll-animate {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 可见状态 */
.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section 滚动动画 - 有机感淡入 */
.section.scroll-animate {
    transform: translateY(35px);
}

.section.scroll-animate.visible {
    transform: translateY(0);
}

/* 卡片滚动动画 - 柔和浮入 */
.pub-card.scroll-animate,
.project-card.scroll-animate {
    opacity: 0;
    transform: translateY(25px) scale(0.98);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.pub-card.scroll-animate.visible,
.project-card.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 新闻项 - 从左侧滑入 */
.news-item.scroll-animate {
    opacity: 0;
    transform: translateX(-15px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.news-item.scroll-animate.visible {
    opacity: 1;
    transform: translateX(0);
}

/* 经验项滚动动画 - 柔和淡入 */
.exp-item.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.exp-item.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 联系项滚动动画 - 弹性效果 */
.contact-item.scroll-animate {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
    transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-item.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Section 标题滚动动画 */
.section-title.scroll-animate {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.section-title.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 筛选按钮滚动动画 */
.filter-btn.scroll-animate {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.filter-btn.scroll-animate.visible {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   Navbar Scroll Effect
   ======================================== */

.navbar.scrolled {
    top: var(--space-sm);
    left: var(--space-sm);
    right: var(--space-sm);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.navbar.scrolled .nav-container {
    padding: var(--space-xs) var(--space-md);
}

.navbar.scrolled .nav-logo {
    font-size: 1rem;
}

/* ========================================
   Theme Transition Animation
   ======================================== */

.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
    transition: background-color 0.5s ease,
                color 0.5s ease,
                border-color 0.5s ease,
                box-shadow 0.5s ease !important;
}

/* ========================================
   Back to Top Button
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

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

.back-to-top:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-lg);
}
