/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #1a2e1a;
    background: #f4faf4;
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== 主题色变量（绿色） ===== */
:root {
    --primary: #10b981;
    --primary-dark: #047857;
    --primary-light: #34d399;
    --gradient: linear-gradient(135deg, #10b981, #047857);
    --gradient-light: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(16, 185, 129, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

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

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

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

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

.hamburger span {
    width: 25px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
}

/* ===== 首页 Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 100px 2rem 50px;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 700px;
}

/* 头像 */
.hero-avatar {
    width: 160px;
    height: 160px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
    position: relative;
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-greeting {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-name {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #064e3b, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-title {
    font-size: 1.3rem;
    color: #444;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
}

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

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

/* Hero 装饰圆 */
.hero-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: var(--primary-dark);
    bottom: -50px;
    left: -50px;
    animation: float 8s ease-in-out infinite reverse;
}

.circle-3 {
    width: 200px;
    height: 200px;
    background: var(--primary-light);
    top: 50%;
    left: 60%;
    animation: float 7s ease-in-out infinite;
}

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

/* ===== 通用 Section ===== */
.section {
    padding: 100px 2rem;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #064e3b, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: #888;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ===== 关于我 ===== */
.about {
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1rem;
    color: #555;
    font-size: 1.05rem;
}

.about-text strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #f0fdf4;
    border-radius: 12px;
    border: 1px solid #d1fae5;
}

.info-label {
    font-weight: 600;
    color: #333;
}

.info-value {
    color: var(--primary-dark);
    font-weight: 500;
}

/* ===== 教育背景 ===== */
.education {
    background: #f0fdf4;
}

.edu-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 5px 25px rgba(16, 185, 129, 0.08);
    border-left: 5px solid var(--primary);
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.edu-header h3 {
    font-size: 1.6rem;
    color: #064e3b;
}

.edu-date {
    color: var(--primary);
    font-weight: 500;
    background: #d1fae5;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.edu-major {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.course-title {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.6rem;
}

.course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #d1fae5;
    font-size: 0.92rem;
}

.course-item .score {
    background: var(--gradient);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

/* ===== 科研实习 ===== */
.research {
    background: white;
}

.project-card-large {
    background: #f9fdf9;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid #d1fae5;
    transition: all 0.3s ease;
}

.project-card-large:hover {
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.15);
    transform: translateY(-3px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.project-header h3 {
    font-size: 1.4rem;
    color: #064e3b;
    flex: 1;
    min-width: 280px;
}

.role {
    background: var(--gradient);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.project-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.project-section {
    margin-bottom: 1.2rem;
}

.project-section h4 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.project-section p,
.project-section li {
    color: #555;
    line-height: 1.8;
    font-size: 0.98rem;
}

.project-section ul {
    padding-left: 1.5rem;
}

.project-section ul li {
    margin-bottom: 0.5rem;
}

.project-section strong {
    color: var(--primary-dark);
}

/* ===== 我的项目 ===== */
.projects {
    background: #f0fdf4;
}

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

.project-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #d1fae5;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.project-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.2);
    border-color: var(--primary);
}

.project-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-light);
    position: relative;
    overflow: hidden;
}

.project-emoji {
    font-size: 5rem;
    transition: transform 0.4s ease;
}

.project-item:hover .project-emoji {
    transform: scale(1.2) rotate(10deg);
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.3rem;
    color: #064e3b;
    margin-bottom: 0.7rem;
}

.project-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    flex: 1;
}

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

.proj-tag {
    background: #d1fae5;
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid #d1fae5;
}

.proj-link {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.proj-link:hover {
    color: var(--primary-dark);
    transform: translateX(3px);
}

/* 占位卡片样式 */
.project-placeholder-card {
    background: repeating-linear-gradient(
        45deg,
        #f0fdf4,
        #f0fdf4 10px,
        #ecfdf5 10px,
        #ecfdf5 20px
    );
    border: 2px dashed var(--primary-light);
}

.placeholder-content {
    text-align: center;
    justify-content: center;
    align-items: center;
    min-height: 280px;
}

.placeholder-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    opacity: 0.6;
}

.placeholder-content h3 {
    color: var(--primary-dark);
    opacity: 0.8;
}

.placeholder-content p {
    color: #888;
    flex: none;
}

/* ===== 奖励荣誉 ===== */
.awards {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.awards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.award-column {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 25px rgba(16, 185, 129, 0.08);
}

.award-column h3 {
    color: #064e3b;
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #d1fae5;
}

.award-column ul {
    list-style: none;
}

.award-column ul li {
    padding: 0.7rem 0;
    color: #555;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    padding-left: 1.5rem;
}

.award-column ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.award-column ul li:last-child {
    border-bottom: none;
}

.award-column ul li strong {
    color: var(--primary-dark);
}

.award-column ul li.highlight {
    background: #f0fdf4;
    border-radius: 8px;
    padding: 0.7rem 0.7rem 0.7rem 2rem;
    margin: 0.3rem 0;
    border-left: 3px solid var(--primary);
}

.award-column ul li.highlight::before {
    left: 0.7rem;
}

/* ===== 联系我 ===== */
.contact {
    background: white;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: #f0fdf4;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #d1fae5;
    transition: all 0.3s ease;
    display: block;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
    border-color: var(--primary);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.contact-card p {
    color: #888;
    font-size: 0.9rem;
}

/* ===== 页脚 ===== */
.footer {
    background: #064e3b;
    color: white;
    text-align: center;
    padding: 2rem;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.85;
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        box-shadow: 0 10px 30px rgba(16, 185, 129, 0.1);
    }

    .nav-menu.active {
        transform: translateY(0);
    }

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

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

    .hero-avatar {
        width: 130px;
        height: 130px;
    }

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

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

    .contact-cards {
        grid-template-columns: 1fr;
    }

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

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

    .edu-card,
    .project-card-large,
    .award-column {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

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

    .section {
        padding: 60px 1rem;
    }
}
