/* 全局样式 */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #2c3e50;
    --bg-color: #f9f9f9;
    --section-padding: 100px 0;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a, a:hover, a:visited, a:active {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 自定义光标 */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease;
    transform-origin: center center;
}

@media (max-width: 768px) {
    .cursor {
        display: none;
    }
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 0px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

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

.logo img {
    height: 40px;
}

.menu ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.menu a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

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

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

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .menu ul {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        display: none;
    }
    
    .menu ul.active {
        display: flex;
    }
    
    .hamburger {
        display: flex;
    }
}

/* 英雄区域 */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 向上滑动提示 */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 10;
}

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

@media (max-width: 768px) {
    .scroll-down {
        display: block;
    }
}

/* 头像旋转动画 */
.avatar {
    transition: transform 0.5s ease-in-out;
    transform-origin: center center;
}

/* 旋转动画关键帧 */
@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateBack {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
    margin-bottom: 30px;
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    from {
        box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
    }
    to {
        box-shadow: 0 0 40px rgba(52, 152, 219, 0.8);
    }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #2c3e50, #3498db);
    opacity: 0.1;
    z-index: 1;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.name {
    font-size: 4rem;
    font-weight: 600;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 40px;
    background: linear-gradient(45deg, #3498db, #e74c3c, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 关于部分 */
.about {
    padding: var(--section-padding);
    background-color: white;
}

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.bio {
    font-size: 1.1rem;
    line-height: 1.8;
}

.bio p {
    margin-bottom: 20px;
}

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* 时间轴 */
.timeline {
    padding: var(--section-padding);
    background-color: #f5f6fa;
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--accent-color);
    transform: translateX(-50%);
}

/* 技能部分 */
.skills {
    padding: var(--section-padding);
    background-color: white;
    text-align: center;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

@media (max-width: 1200px) {
    .charts-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

/* 页脚 */
.footer {
    padding: 40px 0;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(52, 152, 219, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: rgba(44, 62, 80, 0.7);
    transform: translateY(-5px);
}

.social-links {
    margin-bottom: 30px;
}

.social-links a {
    color: white;
    margin: 0 15px;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: scale(1.3);
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .name {
        font-size: 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .timeline-container::after {
        left: 30px;
    }
}

/* 滚动动画类 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.wechat-icon {
    position: relative;
}

.wechat-qrcode {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: none;
}

.wechat-qrcode img {
    width: 100%;
    height: auto;
}

.wechat-icon:hover .wechat-qrcode {
    display: block;
}

.footer a {
    color: inherit;
}

.footer a:hover {
    color: inherit;
}

.scroll-down a {
    color: inherit;
}

.scroll-down a:hover,
.scroll-down a:visited,
.scroll-down a:active {
    color: inherit;
}

.hero-content {
    text-align: center;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

.contact {
    padding: 80px 0;
    background: #f9f9f9;
}

/* 修改前 */
.contact-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* 修改后 */
.contact-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 添加响应式设计 */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 20px;
    color: #4a6baf;
}

/* 导航菜单高亮效果 */
.menu ul li a {
    position: relative;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.menu ul li a.active {
    color: #4a6baf;
    font-weight: bold;
}

.menu ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 15px;
    right: 15px;
    height: 3px;
    background: #4a6baf;
    border-radius: 3px;
}

/* 修改后 */
.menu ul li {
    margin: 0 -8px;
}

@media (max-width: 768px) {
    .menu ul {
        gap: 5px;  /* 缩小菜单项间距 */
        padding: 10px 0;  /* 减小内边距 */
    }
}

.menu ul li {
    margin: 10px 0;
}

/* 现代风格滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0072ff, #00c6ff);
}
.menu ul li {
    margin: 10px 0;
}