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

:root {
    /* 深色科技风配色 */
    --bg-primary: #0a0e27;
    --bg-secondary: #151932;
    --bg-card: #1a1f3a;
    --bg-hover: #252b4a;
    
    /* 科技蓝色系 */
    --accent-primary: #00d4ff;
    --accent-secondary: #0099ff;
    --accent-purple: #9d4edd;
    --accent-cyan: #00ffff;
    
    /* 文字颜色 */
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --text-muted: #6b7a8f;
    
    /* 边框和阴影 */
    --border-color: #2a3150;
    --shadow-sm: 0 2px 8px rgba(0, 212, 255, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 212, 255, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 212, 255, 0.3);
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    --gradient-secondary: linear-gradient(135deg, #9d4edd 0%, #00d4ff 100%);
    --gradient-bg: linear-gradient(180deg, #0a0e27 0%, #151932 100%);
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ==================== 导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

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

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

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

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

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

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-primary);
}

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

/* ==================== 首页横幅 ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(157, 78, 221, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
    96% {
        transform: translate(-2px, -2px);
    }
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

/* ==================== 通用区块样式 ==================== */
section {
    padding: 5rem 0;
}

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

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ==================== 项目展示 ==================== */
.projects {
    background: var(--bg-secondary);
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: 12px;
}

.project-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

.tech-tag {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.project-features h4 {
    color: var(--accent-primary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.project-features ul {
    list-style: none;
    color: var(--text-secondary);
}

.project-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.project-features li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.project-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ==================== 博客文章 ==================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-secondary);
}

.blog-date {
    color: var(--accent-primary);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.blog-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.blog-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.tag {
    background: rgba(157, 78, 221, 0.1);
    color: var(--accent-purple);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.read-more {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--accent-cyan);
}

.blog-card-link {
    text-decoration: none;
    display: block;
    color: inherit;
}
.blog-card-link:hover .blog-card {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-secondary);
}

/* ==================== 关于我 ==================== */
.about {
    background: var(--bg-secondary);
}

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

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.skills-section,
.experience-section {
    margin-top: 3rem;
}

.skills-section h4,
.experience-section h4 {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

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

.skill-category {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.skill-category h5 {
    color: var(--accent-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    color: var(--text-secondary);
    padding: 0.4rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.skill-category li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.experience-list {
    list-style: none;
}

.experience-list li {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-primary);
    margin-bottom: 1.5rem;
}

.experience-list strong {
    color: var(--accent-primary);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.experience-list p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== 联系方式 ==================== */
.contact-content {
    display: flex;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.contact-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
}

.contact-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: 12px;
}

.contact-details h4 {
    color: var(--accent-primary);
    margin-bottom: 0.3rem;
}

.contact-details p {
    color: var(--text-secondary);
}

.contact-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.contact-form h3 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    width: 100%;
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    margin: 0.5rem 0;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}

.project-card-link {
    text-decoration: none;
    display: block;
    color: inherit;
}
.project-card-link:hover .project-card {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}
.project-card-link:hover .project-card::before {
    transform: scaleX(1);
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* ==================== 平滑滚动 ==================== */
html {
    scroll-behavior: smooth;
}
/* 项目滚动展示 */
.projects-showcase {
    padding: 60px 0;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1e3f 100%);
    overflow: hidden;
}

.showcase-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.projects-slider {
    overflow: hidden;
    padding: 20px 0;
}

.slider-track {
    display: flex;
    gap: 30px;
    animation: scroll 30s linear infinite;
}

.slider-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.showcase-card {
    min-width: 300px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.showcase-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.showcase-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.showcase-card h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.showcase-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.showcase-tags {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.showcase-tags span {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent-primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* 首页项目轮播 */
.hero-projects-slider {
    margin: 40px 0 30px;
    overflow: hidden;
    max-width: 900px;
}

.hero-slider-track {
    display: flex;
    gap: 20px;
    animation: heroScroll 25s linear infinite;
}

.hero-slider-track:hover {
    animation-play-state: paused;
}

@keyframes heroScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.hero-project-card {
    min-width: 200px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hero-project-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hero-project-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero-project-card h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.hero-project-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* ==================== 联系方式（新布局） ==================== */
.contact {
    background: var(--bg-secondary);
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s;
}
.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}
.contact-card .contact-icon,
.profile-avatar {
    font-size: 2.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: 16px;
    margin: 0 auto 1rem;
}
.profile-card .profile-avatar {
    background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(157,78,221,0.15));
    border: 1px solid rgba(0,212,255,0.3);
}
.contact-card h3 {
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.contact-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}
