/* --- 全局设置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #ffffff; /* 主背景色改为白色 */
    color: #333; /* 主要文字颜色改为深灰色 */
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
                 "Hiragino Sans GB", "Microsoft YaHei", "Arial", sans-serif;
    line-height: 1.7; /* 增加行高，更透气 */
    overflow-x: hidden;
}

/* 定义活力粉色变量 */
:root {
    --energetic-pink: #FF6B81; /* 一个偏珊瑚粉的活力色 */
    --soft-pink-bg: #FFF6F7; /* 更柔和的粉色背景 */
    --text-dark: #4B4B4B; /* 主要文字深灰 */
    --text-medium: #7B7B7B; /* 次要文字灰色 */
    --link-pink: #FF4757; /* 链接颜色可以更亮一点 */
    --border-light: #F0E4E6; /* 淡淡的粉灰边框 */
    --link-hover: #E75A6F; /* 链接悬停深粉 */
}

a {
    color: var(--link-pink);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}
a:hover {
    opacity: 0.8;
}

/* --- 导航栏 (浅色版) --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8); /* 白色半透明背景 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-light); /* 浅灰色边框 */
    transition: background 0.4s ease, box-shadow 0.4s ease; /* V2.0: 增加过渡 */
}
/* V2.0: 导航栏滚动时样式 */
.main-nav.scrolled {
     background: rgba(255, 255, 255, 0.9);
     box-shadow: 0 4px 15px rgba(255, 107, 129, 0.1); /* V2.0: 粉色阴影 */
}
.nav-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 25px; /* V2.0: 调整 padding */
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-brand {
    font-size: 1.1rem; /* 稍小 */
    font-weight: 600;
    color: var(--text-dark); /* 深灰色品牌名 */
    text-decoration: none;
    transition: transform 0.3s ease;
}
.nav-brand:hover {
    transform: scale(1.05); /* V2.0: 悬停放大 */
}
.nav-links {
    list-style: none;
    display: flex;
}
.nav-links li {
    margin-left: 30px;
}
.nav-links a {
    color: var(--text-medium); /* 深灰色链接 */
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease, transform 0.3s ease; /* V2.0 */
    display: inline-block; /* 允许 transform */
}
.nav-links a:hover {
    color: var(--accent-pink); /* 悬停变粉色 */
    transform: translateY(-2px); /* V2.0: 悬停轻微上浮 */
}

/* --- 主内容区 --- */
main {
    position: relative;
    z-index: 1;
}

/* --- 通用 Section 样式 --- */
section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 25px; /* 调整 padding */
    text-align: center;
    position: relative;
    overflow: hidden; /* V2.0: 隐藏动画溢出 */
}
/* 给不同 Section 交替浅粉色背景 */
section:nth-of-type(odd) {
    background-color: var(--bg-white);
}
section:nth-of-type(even):not(#hero) { /* About 和 Contact */
     background-color: var(--bg-soft-pink);
}

section h2 { /* 板块标题 */
    font-size: 2rem; /* 稍小 */
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text-dark); /* 深灰色标题 */
    /* V2.0: 标题下波浪线装饰 */
    position: relative;
    padding-bottom: 10px;
}
section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-pink-light), var(--accent-pink)); /* 粉色渐变 */
    border-radius: 2px;
}

/* --- Section 1: Hero (V2.0 重构) --- */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #FFF9FA 0%, #FFE9EC 100%); /* 更柔和的粉色渐变 */
    color: var(--text-dark);
    z-index: 2;
    padding-top: 60px; /* 留出导航栏空间 */
}
.hero-content { /* 内容居中 */
     display: flex;
     flex-direction: column;
     align-items: center;
     position: relative;
     z-index: 1;
}
.hero-title { /* 姓名 */
    font-size: clamp(3rem, 12vw, 5.5rem); /* 调整字号 */
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    line-height: 1; /* 行高紧凑 */
}
.hero-title .char { /* V2.0: 更有活力的逐字动画 */
    display: inline-block;
    opacity: 0;
    transform: translateY(50%) rotate(10deg);
    animation: bounceInChar 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.hero-title .char:nth-child(1) { animation-delay: 0.2s; }
.hero-title .char:nth-child(2) { animation-delay: 0.3s; }
.hero-title .char:nth-child(3) { animation-delay: 0.4s; }

.hero-subtitle { /* 职位 */
    font-size: clamp(1rem, 4vw, 1.4rem);
    font-weight: 400;
    color: var(--text-medium);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInSlideUp 1s 0.6s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-slogan { /* Slogan */
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--accent-pink); /* 活力粉 */
    max-width: 450px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInSlideUp 1s 0.8s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* 滚动提示 (心形) */
.scroll-down-prompt {
    position: absolute;
    bottom: 30px;
    color: rgba(255, 107, 129, 0.4);
    font-size: 1.8rem;
    animation: heartbeat 1.5s infinite ease-in-out;
}
/* V2.0 动画定义 */
@keyframes bounceInChar {
    from { opacity: 0; transform: translateY(50%) rotate(10deg) scale(0.8); }
    to { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}
@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

/* --- Section 2: About Me (V2.0 重构 - 左图右文) --- */
.about { background-color: var(--bg-white); }
.about-content-wrapper {
    display: grid;
    grid-template-columns: 1fr; /* 手机单列 */
    gap: 30px;
    max-width: 900px;
    width: 100%;
    align-items: center;
}
.about-visual { /* 自拍区域 */
    text-align: center;
}
.about-visual img {
    max-width: 280px;
    width: 70%; /* 控制图片大小 */
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; /* 不规则圆角/水滴形 */
    box-shadow: 0 10px 30px rgba(255, 107, 129, 0.2);
    transition: transform 0.5s ease, border-radius 0.5s ease;
}
.about-visual img:hover {
    transform: scale(1.05) rotate(3deg);
    border-radius: 50%; /* 悬停变圆 */
}
.about-text {
    text-align: left;
    color: var(--text-medium);
    line-height: 1.8;
}
.about-text h2 { text-align: left; margin-bottom: 20px; }
.about-text h2::after { left: 0; transform: translateX(0); } /* 标题线左对齐 */
.about-text p { margin-bottom: 1em; font-size: 1rem; }
.skills { margin-top: 25px; text-align: left; }
.skills span {
    display: inline-block;
    background: var(--bg-soft-pink);
    color: var(--accent-pink);
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 15px;
    margin: 3px;
    font-weight: 500;
}
/* 桌面端改为两列 */
@media (min-width: 768px) {
    .about-content-wrapper { grid-template-columns: 1fr 1.5fr; gap: 60px; }
    .about-visual { order: 1; } /* 图片在左 */
    .about-text { order: 2; } /* 文字在右 */
}


/* --- Section 3: Project (V2.0 卡片重构) --- */
.project { background-color: var(--bg-soft-pink); }
.project-card {
    display: block; /* 改为 block 方便内部布局 */
    max-width: 700px; /* 调整卡片宽度 */
    background: var(--bg-white);
    border-radius: 20px; /* 更大圆角 */
    box-shadow: 0 8px 25px rgba(255, 107, 129, 0.1);
    overflow: hidden;
    text-align: left;
    position: relative; /* 为光泽效果 */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 12px 35px rgba(255, 107, 129, 0.2);
}
/* V2.0: 悬停光泽效果 */
.card-shine-effect {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 3;
}
.project-card:hover .card-shine-effect {
    opacity: 0.1;
    animation: shine 1.5s ease;
}
@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

.project-link { display: block; }
.project-visual img { display: block; width: 100%; }
.project-details { padding: 25px; position: relative; z-index: 2; }
.project-details h3 { font-size: 1.5rem; color: #333; margin-bottom: 5px; }
.project-details h4 { font-size: 0.9rem; color: #888; margin-bottom: 15px; font-weight: 400; }
.project-contribution { font-size: 0.95rem; color: #555; margin-bottom: 20px; font-style: italic; }
.project-cta {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--link-pink);
    display: inline-block;
    transition: transform 0.3s ease;
}
.project-card:hover .project-cta { transform: translateX(5px); } /* 箭头轻移 */

.project-team-link { text-align: center; margin-top: 30px; font-size: 0.9rem; }
.project-team-link a { color: #888; }


/* --- Section 4: Contact (V2.0 重构) --- */
.contact { min-height: auto; padding-bottom: 80px; background-color: var(--bg-white); }
.contact h2 { color: var(--text-dark); }
.contact-intro { color: var(--text-medium); margin-bottom: 30px; max-width: 500px; }
.contact-methods { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 30px; }
.contact-email a { font-size: 1.2rem; font-weight: 500; color: var(--text-dark); transition: color 0.3s ease; }
.contact-email a:hover { color: var(--accent-pink); }

/* 社交链接图标 (V2.0) */
.social-links { margin-top: 10px; display: flex; gap: 18px; }
.social-icon {
    display: inline-block;
    width: 42px;
    height: 42px;
    background: var(--bg-soft-pink);
    border-radius: 50%;
    color: var(--accent-pink);
    text-align: center;
    line-height: 42px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.social-icon:hover {
    background: var(--accent-pink);
    color: #fff;
    transform: scale(1.15) rotate(-10deg); /* 悬停放大旋转 (活力感) */
}

.team-contact-link { color: #aaa; font-size: 0.85rem; margin-top: 20px; }
.team-contact-link a { color: var(--text-medium); text-decoration: underline; }


/* --- Footer (V2.0 浅粉版) --- */
.footer {
    padding: 25px 20px;
    text-align: center;
    background: var(--bg-soft-pink); /* 浅粉页脚 */
    color: #C0A8AD; /* 粉灰色 */
    font-size: 0.85rem;
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--border-light);
}
.footer p { margin: 3px 0; }
.footer a { color: #C0A8AD; }
.footer a:hover { color: var(--accent-pink); }

/* --- V2.0 滚动淡入动画 (更活泼) --- */
.fade-in {
    opacity: 0;
    transform: translateY(25px) scale(0.98); /* 加入轻微缩放 */
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}


/* --- 响应式设计 --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-title { font-size: clamp(2.5rem, 15vw, 4rem); }
    .hero-subtitle { font-size: clamp(0.9rem, 4vw, 1.2rem); }
    .hero-slogan { font-size: clamp(0.9rem, 3.5vw, 1.1rem); }
    section h2 { font-size: 1.6rem; }
    .about-content-wrapper { grid-template-columns: 1fr; gap: 30px; }
    .about-visual { order: 1; } /* 手机端图片在上 */
    .about-text { order: 2; text-align: center; } /* 手机端文本居中 */
    .about-text h2 { text-align: center; }
    .about-text h2::after { left: 50%; transform: translateX(-50%); }
    .skills { text-align: center; }
    .project-visual img { height: 250px; }
    .project-details { padding: 20px; }
    .project-details h3 { font-size: 1.3rem; }
}