/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 🌈 活力四射配色方案 */
    --primary-color: #6c5ce7;           /* 鲜艳紫色 - 主色调，充满活力 */
    --secondary-color: #00cec9;         /* 青绿色 - 辅助色，清新现代 */
    --accent-color: #fd79a8;            /* 亮粉色 - 强调色，吸引眼球 */
    --background-color: #fdfdff;        /* 纯净白 - 背景色，突出色彩 */
    --surface-color: #f1f2f6;           /* 浅灰蓝 - 表面色，柔和过渡 */
    --text-color: #2d3436;              /* 深灰 - 主文字，清晰易读 */
    --text-light: #636e72;              /* 中灰 - 浅色文字，层次分明 */
    --text-secondary: #74b9ff;          /* 亮蓝 - 次要文字，活力点缀 */
    --border-color: #ddd;               /* 浅边框 - 分割线，简洁明快 */
    --hover-color: #f8f9ff;             /* 淡紫 - 悬浮背景，呼应主色 */
    --success-color: #00b894;           /* 鲜绿 - 成功色，生机勃勃 */
    --warning-color: #fdcb6e;           /* 亮黄 - 警告色，温暖友好 */
    --danger-color: #e17055;            /* 橙红 - 危险色，温和警示 */
    --info-color: #74b9ff;              /* 天蓝 - 信息色，清新活泼 */
    --shadow-light: 0 4px 20px rgba(108, 92, 231, 0.15);      /* 紫色轻阴影 */
    --shadow-medium: 0 8px 40px rgba(108, 92, 231, 0.25);     /* 紫色中阴影 */
    --border-light: rgba(108, 92, 231, 0.1);                  /* 紫色轻边框 */
    
    /* 字体 */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* 尺寸 */
    --header-height: 80px;
    --container-max-width: 1200px;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: -2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

.nav-social {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

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

/* Hero区域 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background: linear-gradient(135deg, 
        rgba(108, 92, 231, 0.1) 0%, 
        rgba(0, 206, 201, 0.1) 50%, 
        var(--background-color) 100%);
}

.hero-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.title-line {
    display: block;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

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

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

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

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

/* 区域样式 */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 关于区域 */
.about {
    padding: 6rem 0;
    background: var(--background-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    margin-bottom: 3rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.tech-stack h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    background: var(--surface-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.tech-tag:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    transform: translateY(-3px) scale(1.05);
}

/* 项目区域 */
.work {
    padding: 6rem 0;
    background: var(--surface-color);
}

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

.project-card {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: var(--surface-color);
    color: var(--text-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-link {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* 博客区域 */
.blog {
    padding: 8rem 0;
    position: relative;
    background: linear-gradient(135deg, 
        rgba(253, 121, 168, 0.1) 0%, 
        var(--background-color) 40%, 
        rgba(116, 185, 255, 0.1) 100%);
    overflow: hidden;
}

.blog-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-elements::before,
.floating-elements::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    opacity: 0.1;
    animation: floatMove 6s ease-in-out infinite;
}

.floating-elements::before {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-elements::after {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 15%;
    animation-delay: 3s;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, rgba(253, 121, 168, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0, 206, 201, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 50% 90%, rgba(108, 92, 231, 0.08) 0%, transparent 50%);
}

.blog-content {
    position: relative;
    z-index: 2;
    text-align: center;
   
    margin: 0 auto;
    padding: 4rem 2rem;
}

.blog-header {
    margin-bottom: 3rem;
}

.blog-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    position: relative;
}

.blog-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 2px;
}

.blog-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    line-height: 1.6;
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto;
}

.blog-action {
    margin-top: 3rem;
}

.blog-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
    position: relative;
    overflow: hidden;
}

.blog-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.blog-btn:hover::before {
    left: 100%;
}

.blog-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.4);
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color), var(--primary-color));
}

.blog-btn:active {
    transform: translateY(-1px);
}

.blog-btn i {
    transition: transform 0.3s ease;
    font-size: 1rem;
}

.blog-btn:hover i {
    transform: translateX(5px);
}

.btn-text {
    position: relative;
    z-index: 2;
}

@keyframes floatMove {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-10px) rotate(-2deg);
    }
    75% {
        transform: translateY(-15px) rotate(3deg);
    }
}

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

/* 联系区域 */
.contact {
    padding: 6rem 0;
    background: var(--surface-color);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

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

.contact-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-light);
}

.contact-item h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-light);
}

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

/* 博客区域优化样式 */
.section-subtitle {
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 1.1rem;
    text-align: center;
}

.blog-more {
    text-align: center;
    margin-top: 3rem;
}

.btn-outline {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
    background: transparent;
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.25);
}

/* 博客卡片增强效果已合并到主要定义中 */

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.blog-tag {
    background: var(--surface-color);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-read-time {
    color: var(--text-light);
    font-size: 0.9rem;
}

.no-posts {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-style: italic;
    grid-column: 1 / -1;
}

/* 背景动画效果样式 */
.hero-bg-animation,
.about-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero {
    position: relative;
}

.about {
    position: relative;
}

.hero-container,
.about .container {
    position: relative;
    z-index: 1;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.15;
    }
}

.interactive-mesh canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.floating-particles,
.gradient-orbs,
.wave-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-social {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .blog {
        padding: 6rem 0;
    }
    
    .blog-content {
        padding: 2rem 1rem;
    }
    
    .blog-title {
        font-size: 2.5rem;
    }
    
    .blog-subtitle {
        font-size: 1.1rem;
    }
    
    .blog-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        gap: 0.8rem;
    }
    
    .floating-elements::before,
    .floating-elements::after {
        display: none;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }

    /* 背景效果移动端优化 */
    .floating-particles .particle {
        display: none;
    }
    
    .gradient-orb {
        opacity: 0.5 !important;
    }

    .interactive-mesh {
        display: none;
    }

    .hero-bg-animation,
    .about-bg-animation {
        opacity: 0.7;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        gap: 0.75rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .project-card,
    .blog-card {
        padding: 1.5rem;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .blog-subtitle {
        font-size: 1rem;
    }
    
    .blog-btn {
        padding: 0.9rem 1.8rem;
        font-size: 0.95rem;
    }
}

/* === 🌙 深色模式活力配色 === */
.dark-mode {
    --primary-color: #a29bfe;           /* 浅紫 - 深色下的主色调，柔和活力 */
    --secondary-color: #55efc4;         /* 薄荷绿 - 深色下的辅助色，清新护眼 */
    --accent-color: #ff7675;            /* 珊瑚粉 - 深色下的强调色，温暖吸睛 */
    --background-color: #2d3436;        /* 深灰 - 主背景，舒适护眼 */
    --surface-color: #636e72;           /* 中灰 - 表面背景，层次分明 */
    --text-color: #ddd;                 /* 浅灰 - 主文字，清晰易读 */
    --text-light: #b2bec3;              /* 淡灰 - 辅助文字，柔和平衡 */
    --text-secondary: #81ecec;          /* 浅青 - 次要文字，活力点缀 */
    --border-color: #74b9ff;            /* 亮蓝 - 边框色，活力分割 */
    --hover-color: #474b52;             /* 深灰蓝 - 悬浮背景，交互反馈 */
    --success-color: #00b894;           /* 鲜绿 - 成功色，生机活力 */
    --warning-color: #fdcb6e;           /* 亮黄 - 警告色，温暖提醒 */
    --danger-color: #e84393;            /* 品红 - 危险色，强烈警示 */
    --info-color: #74b9ff;              /* 天蓝 - 信息色，清新明快 */
    --shadow-light: 0 4px 20px rgba(162, 155, 254, 0.2);
    --shadow-medium: 0 8px 40px rgba(162, 155, 254, 0.3);
    --border-light: rgba(162, 155, 254, 0.2);
}

/* 深色模式下的导航栏 */
.dark-mode .nav {
    background: rgba(26, 29, 41, 0.95);
    border-bottom: 1px solid var(--border-color);
}

/* 深色模式下的Hero区域 */
.dark-mode .hero {
    background: linear-gradient(135deg, 
        rgba(162, 155, 254, 0.1) 0%, 
        var(--background-color) 50%, 
        rgba(85, 239, 196, 0.08) 100%);
}

/* 深色模式下的项目卡片 */
.dark-mode .project-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.dark-mode .project-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium);
}

/* 深色模式下的博客区域 */
.dark-mode .blog {
    background: linear-gradient(135deg, 
        rgba(255, 118, 117, 0.1) 0%, 
        var(--background-color) 40%, 
        rgba(129, 236, 236, 0.08) 100%);
}

/* 深色模式下的按钮 */
.dark-mode .btn-primary {
    background: var(--primary-color);
    color: var(--background-color);
}

.dark-mode .btn-primary:hover {
    background: var(--secondary-color);
}

.dark-mode .btn-secondary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.dark-mode .btn-secondary:hover {
    background: var(--primary-color);
    color: var(--background-color);
}

/* 深色模式下的联系区域 */
.dark-mode .contact {
    background: var(--surface-color);
}

.dark-mode .contact-item {
    background: var(--background-color);
    border: 1px solid var(--border-color);
} 