/* Xiangyi Fan - FOREST THEME */
/* Natural greens with warm cream tones */

:root {
    --primary: #1a3c2a;
    --secondary: #2d5a3f;
    --accent: #4ade80;
    --accent-dark: #22c55e;
    --background: #fefdf8;
    --surface: #f5f3eb;
    --surface-dark: #e8e4d9;
    --text: #1a3c2a;
    --text-muted: #5a7d6a;
    --text-bright: #0f2318;
    --gradient: linear-gradient(135deg, #1a3c2a 0%, #2d5a3f 100%);
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(26, 60, 42, 0.1);
    --shadow-lg: 0 10px 40px rgba(26, 60, 42, 0.15);
    --border-radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', Georgia, serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.7;
}

h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; color: var(--text-bright); }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }

p { color: var(--text-muted); margin-bottom: 1rem; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-dark); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--surface-dark);
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-radius: 8px;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
.nav-links a:hover { color: var(--primary); }

.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.menu-toggle span { width: 22px; height: 2px; background: var(--primary); border-radius: 2px; }

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 6rem;
    background: linear-gradient(180deg, var(--surface) 0%, var(--background) 100%);
}

.hero-content { max-width: 650px; }
.hero-subtitle {
    color: var(--accent-dark);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hero-subtitle::before {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--accent-dark);
}

.hero h1 { margin-bottom: 0.5rem; color: var(--primary); }
.hero h2 { color: var(--text-muted); font-weight: 400; font-size: 1.35rem; margin-bottom: 1.5rem; }
.hero-description { font-size: 1.1rem; margin-bottom: 2.5rem; line-height: 1.8; }

.cta-buttons { display: flex; gap: 1rem; }
.btn {
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--secondary); border-color: var(--secondary); }
.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.hero-visual { display: none; }

/* Sections */
section { padding: 6rem 0; }
.section-alt { background: var(--surface); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { color: var(--primary); display: inline-flex; align-items: center; gap: 1rem; }
.section-header h2::before, .section-header h2::after {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--accent);
}

/* About */
.about-content h3 { color: var(--accent-dark); margin-bottom: 1.5rem; }

.education-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.edu-card {
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    transition: var(--transition);
}
.edu-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.edu-icon {
    width: 48px;
    height: 48px;
    background: var(--surface);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}
.edu-info h4 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.edu-info p { font-size: 0.8rem; margin-bottom: 0.25rem; }
.edu-year { font-size: 0.75rem; color: var(--accent-dark); font-weight: 600; }

/* Timeline */
.timeline { max-width: 750px; margin: 0 auto; }
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--surface-dark);
    border-radius: 3px;
}
.timeline-item { padding-left: 35px; margin-bottom: 2.5rem; position: relative; }
.timeline-marker {
    position: absolute;
    left: -5px;
    top: 5px;
    width: 13px;
    height: 13px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--background);
}
.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.timeline-header h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.timeline-header .company { color: var(--accent-dark); font-weight: 500; }
.timeline-header .date { color: var(--text-muted); font-size: 0.85rem; }
.timeline-details { padding-left: 1.25rem; margin-top: 1rem; }
.timeline-details li { margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.95rem; }

/* Research */
.research-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.research-card {
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
    transition: var(--transition);
}
.research-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.research-icon {
    width: 55px;
    height: 55px;
    background: var(--surface);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}
.research-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.research-venue { color: var(--accent-dark); font-size: 0.85rem; font-weight: 500; margin-bottom: 1rem; }
.research-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.research-tags span {
    background: var(--surface);
    color: var(--primary);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Publications */
.publications-list { max-width: 750px; margin: 0 auto; }
.pub-category h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}
.pub-category h3 i { color: var(--accent); }
.pub-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 3px solid transparent;
    transition: var(--transition);
}
.pub-item:hover { border-left-color: var(--accent); }
.pub-content h4 { font-size: 0.95rem; margin-bottom: 0.5rem; line-height: 1.5; }
.pub-journal { color: var(--accent-dark); font-size: 0.85rem; font-style: italic; }

.conferences-section { margin-top: 4rem; }
.conferences-section h3 { color: var(--primary); margin-bottom: 1.5rem; font-size: 1rem; }
.conferences-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.conf-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.conf-year {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}
.conf-name { font-size: 0.85rem; color: var(--text-muted); }

/* Skills */
.skills-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.skill-category {
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.skill-category:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.skill-icon {
    width: 55px;
    height: 55px;
    background: var(--surface);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}
.skill-category h3 { margin-bottom: 1rem; color: var(--primary); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
    background: var(--surface);
    color: var(--text);
    padding: 0.4rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}
.skill-tag:hover { background: var(--primary); color: white; }

/* Contact */
.contact-content { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; max-width: 900px; margin: 0 auto; }
.contact-info h3 { color: var(--primary); margin-bottom: 1.5rem; }
.contact-links { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    color: var(--text-muted);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.contact-link:hover { color: var(--primary); transform: translateX(5px); }
.contact-link i { color: var(--accent-dark); }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; display: block; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 2px solid var(--surface-dark);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { min-height: 120px; resize: vertical; }

/* Footer */
footer { padding: 3rem 0; text-align: center; background: var(--surface); }
.social-links { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.social-link {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.social-link:hover { background: var(--primary); color: white; transform: translateY(-3px); }
footer p { font-size: 0.85rem; color: var(--text-muted); }

/* Animations */
.animate { animation: fadeInUp 0.6s ease-out forwards; opacity: 0; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* About Image */
.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-toggle { display: flex; }
    .education-cards, .research-grid, .skills-container, .contact-content { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr !important; }
    .about-image { max-width: 250px; margin: 0 auto 2rem; }
}
