:root {
    --primary-color: #4f46e5;
    --secondary-color: #10b981;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --light-text: #64748b;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 进度条 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 1001;
    transition: width 0.1s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', "Microsoft YaHei", "PingFang SC", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 10px;
    border-radius: 10px;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.2));
}

.logo:hover .logo-img {
    transform: rotate(5deg) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(79, 70, 229, 0.3));
}

.logo-text {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.nav-links a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8%;
    background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

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

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.highlight {
    color: var(--primary-color);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    opacity: 0.3;
    border-radius: 4px;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-buttons {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-buttons .btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    margin-right: 1rem;
    position: relative;
    overflow: hidden;
}

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

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

.btn.primary {
    background-color: var(--primary-color);
    color: var(--white);
    z-index: 1;
}

.btn.primary:hover {
    background-color: #4338ca;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

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

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.hero-image {
    position: relative;
    z-index: 2;
}

.hero-image .blob {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blobAnim 10s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.2);
    filter: blur(1px);
    position: relative;
}

.hero-image .blob::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

@keyframes blobAnim {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
}

/* 公众号悬浮按钮 */
.floating-wechat {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #07c160 0%, #06ae56 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(7, 193, 96, 0.4);
    z-index: 999;
    transition: var(--transition);
}

.floating-wechat:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(7, 193, 96, 0.5);
}

.floating-wechat i {
    font-size: 1.8rem;
    color: var(--white);
}

.wechat-tooltip {
    position: absolute;
    right: 70px;
    background: var(--text-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition);
    pointer-events: none;
}

.wechat-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid var(--text-color);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.floating-wechat:hover .wechat-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Section Common */
section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 10px auto;
    border-radius: 2px;
}

/* About Section */
.about {
    background-color: var(--white);
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.about-text > p {
    margin-bottom: 1.5rem;
}

.skills {
    margin-top: 2rem;
}

.skills h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.skill-tags {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.skill-tags span {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: var(--primary-color);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: default;
}

.skill-tags span:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.2);
}

/* Projects Section */
.projects {
    background: linear-gradient(to bottom, var(--bg-color) 0%, #f1f5f9 100%);
}

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

.project-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
    transition: left 0.5s;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.project-card h3 {
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

.project-card p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    transition: var(--transition);
    font-size: 0.9rem;
}

.project-link i {
    transition: var(--transition);
}

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

.project-link:hover i {
    transform: translateX(5px);
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.contact::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.contact .section-title {
    color: var(--white);
    margin-bottom: 2.5rem;
}

.contact .section-title::after {
    background: var(--white);
}

.contact-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.contact-content p {
    margin-bottom: 1.5rem;
}

.contact-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 微信二维码模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    text-align: center;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.1);
    transform: rotate(90deg);
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.qrcode-container {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    display: inline-block;
}

.qrcode-img {
    width: 250px;
    height: 250px;
    display: block;
    border-radius: 10px;
}

.qrcode-tip {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: #111;
    color: #888;
}

/* Mobile Responsive */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* 元素入场动画类 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .burger {
        display: block;
    }
    
    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 0 5%;
        height: 80vh;
        min-height: 500px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 0.6rem;
    }

    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 1.2rem;
    }

    .hero-image {
        margin-top: 2rem;
    }

    .hero-image .blob {
        width: 200px;
        height: 200px;
    }

    .logo-img {
        height: 40px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    section {
        padding: 3.5rem 0;
    }

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

    .about-text {
        font-size: 1rem;
    }

    .skills h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .skill-tags {
        gap: 0.6rem;
    }

    .skill-tags span {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .project-grid {
        gap: 1.2rem;
    }

    .project-card {
        padding: 1.2rem;
    }

    .project-card h3 {
        font-size: 1.1rem;
    }

    .project-card p {
        font-size: 0.9rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .contact-links a {
        width: 100%;
        max-width: 250px;
        justify-content: center;
        padding: 0.7rem 1.2rem;
        font-size: 1rem;
    }

    .wechat-qrcode-box {
        flex-direction: column;
        gap: 2rem;
    }

    .qrcode-image {
        width: 220px;
        height: 220px;
    }

    .wechat-tips {
        text-align: center;
    }

    .wechat-tips h3 {
        font-size: 1.5rem;
    }
}
