:root {
    --background: 220 20% 98%;
    --foreground: 220 46% 32%;
    --card: 0 0% 100%;
    --card-foreground: 220 46% 32%;
    --popover: 0 0% 100%;
    --popover-foreground: 220 46% 32%;
    --primary: 220 90% 56%;
    --primary-foreground: 0 0% 100%;
    --secondary: 191 45% 82%;
    --secondary-foreground: 220 46% 32%;
    --muted: 220 20% 90%;
    --muted-foreground: 220 46% 50%;
    --accent: 340 82% 52%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 100%;
    --border: 220 20% 90%;
    --input: 220 20% 90%;
    --ring: 220 90% 56%;
    --radius: 0.75rem;
    --text: 220 46% 32%;
}

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

body {
    font-family: "LXGW WenKai", "Noto Serif SC", serif;
    line-height: 1.6;
    color: hsl(var(--text));
    background-color: hsl(var(--background));
}

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

/* 导航栏样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: hsl(var(--card));
    box-shadow: 0 2px 16px rgba(60, 80, 120, 0.08);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid hsl(var(--border));
    transition: all 0.3s cubic-bezier(.4,2,.6,1);
    padding: 0.5rem 0;
}

header.scrolled {
    box-shadow: 0 4px 20px rgba(74, 98, 138, 0.1);
    border-bottom: 1px solid hsl(var(--border));
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 3.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: hsl(var(--primary));
    text-decoration: none;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 8px hsla(var(--primary), 0.08);
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: hsl(var(--foreground));
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    padding-bottom: 0.25rem;
    border-radius: 0.25rem;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, 
        hsla(191, 45%, 82%, 1), 
        hsla(200, 50%, 65%, 1), 
        hsla(220, 46%, 42%, 1)
    );
    transition: width 0.3s ease;
}

nav a:hover, nav a.active {
    color: hsl(var(--primary));
    background: hsla(var(--primary), 0.08);
}

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

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: hsl(var(--foreground));
    cursor: pointer;
    padding: 0.5rem;
}

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

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: hsl(var(--background));
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        border-bottom: 1px solid hsl(var(--border));
    }

    nav.active {
        display: flex;
    }

    .header {
        position: relative;
    }
    
    .hero {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 2rem;
        padding: 0;
    }
    
    .hero-content {
        order: 2;
        padding: 0 1.5rem;
    }
    
    .hero-image {
        order: 1;
        max-width: 85%;
        margin: 0 auto;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }

    .button-group {
        flex-direction: column;
    }

    .nav-container {
        padding: 0 1.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
}

/* 主要内容区域 */
main {
    padding-top: 5rem;
    overflow-x: clip; /* 防止水平滚动条，但允许子元素突破 */
}

section {
    padding: 4rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: calc(100vh - 4rem);
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    gap: 4rem;
}

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

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-content h1 span {
    color: hsl(200, 50%, 65%);
}

.hero-content p {
    font-size: 1.35rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.button-group {
    display: flex;
    gap: 1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

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

.button:hover::before {
    left: 100%;
}

.button-primary {
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)) 90%);
    color: hsl(var(--primary-foreground));
    border: none;
}

.button-primary:hover {
    background: linear-gradient(90deg, hsl(var(--accent)), hsl(var(--primary)) 90%);
}

.button-outline {
    background: transparent;
    color: hsl(var(--primary));
    border: 2px solid hsl(var(--primary));
}

.button-outline:hover {
    background: hsla(var(--primary), 0.08);
    color: hsl(var(--accent));
    border-color: hsl(var(--accent));
}

/* 项目展示区域 */
.featured, .skills {
    padding: 8rem 0;
    position: relative;
}

.featured {
    background-color: hsl(var(--background));
}

.skills {
    background-color: hsl(var(--muted) / 0.3);
    position: relative;
    overflow: hidden;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(223, 242, 235, 0.6) 0%, 
        rgba(185, 229, 232, 0.4) 25%, 
        rgba(122, 178, 211, 0.2) 50%, 
        rgba(74, 98, 138, 0.1) 100%
    );
    z-index: -1;
}

.section-header {
    margin-bottom: 4rem;
    position: relative;
    padding: 0 0.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 3rem;
    height: 3px;
    background: linear-gradient(to right, 
        hsla(191, 45%, 82%, 1), 
        hsla(200, 50%, 65%, 1)
    );
}

.section-header p {
    font-size: 1.2rem;
    color: hsl(var(--muted-foreground));
    max-width: 600px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.featured-card {
    background: hsl(var(--card));
    border-radius: var(--radius);
    padding: 2rem;
    transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 16px rgba(60, 80, 120, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid hsl(var(--border));
}

.featured-card:hover {
    box-shadow: 0 8px 32px rgba(60, 80, 120, 0.16);
    transform: translateY(-4px) scale(1.03);
    border-color: hsl(var(--primary));
}

.featured-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: hsl(220, 46%, 42%);
}

.featured-card .date {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    color: hsl(var(--muted-foreground));
}

.featured-card .summary {
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.7;
}

.featured-card .read-more {
    color: hsl(200, 50%, 55%);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    margin-top: auto;
}

.featured-card .read-more::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.featured-card .read-more:hover::after {
    transform: translateX(4px);
}

/* 技能展示区域 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.skill-card {
    background: hsl(var(--card));
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 16px rgba(60, 80, 120, 0.08);
    position: relative;
    overflow: hidden;
    border: 1px solid hsl(var(--border));
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, 
        hsla(154, 36%, 85%, 1) 0%, 
        hsla(191, 45%, 82%, 1) 40%, 
        hsla(200, 50%, 65%, 1) 70%, 
        hsla(220, 46%, 42%, 1) 100%
    );
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.skill-card:hover {
    box-shadow: 0 8px 32px rgba(60, 80, 120, 0.16);
    transform: translateY(-4px) scale(1.03);
    border-color: hsl(var(--primary));
}

.skill-card:hover::before {
    transform: scaleY(1);
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
    color: hsl(200, 50%, 65%);
}

.skill-icon {
    font-size: 2.5rem;
    color: hsla(200, 50%, 65%, 0.9);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.skill-card p {
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
}

/* 简历区域 */
.resume-section {
    background: hsl(var(--muted));
    border-radius: var(--radius);
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.resume-content {
    filter: blur(10px);
    transition: all 0.5s ease;
    opacity: 0.7;
}

.resume-content.unlocked {
    filter: none;
    opacity: 1;
}

.unlock-form {
    background: hsl(var(--background));
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.unlock-form:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.unlock-form input {
    width: 100%;
    padding: 0.75rem;
    margin: 1rem 0;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.unlock-form input:focus {
    outline: none;
    border-color: hsl(200, 50%, 65%);
    box-shadow: 0 0 0 2px hsla(200, 50%, 65%, 0.2);
}

/* 添加平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid hsla(200, 50%, 65%, 0.3);
    border-radius: 50%;
    border-top-color: hsl(200, 50%, 65%);
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

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

/* 页脚样式 */
footer {
    background: linear-gradient(to right, hsla(154, 36%, 91%, 0.9), hsla(191, 45%, 82%, 0.9));
    padding: 2rem 0;
    margin-top: 4rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: hsl(200, 50%, 65%);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: hsl(var(--muted-foreground));
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: hsl(200, 50%, 65%);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-post {
        padding: 1rem;
    }
    
    .blog-post h1 {
        font-size: 2rem;
    }
    
    .blog-post h2 {
        font-size: 1.5rem;
    }
}

/* 主要内容区域 */
.hero-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, hsla(191, 45%, 82%, 0.4), hsla(200, 50%, 65%, 0.2));
    z-index: 1;
}

.hero-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* 博客文章样式 */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-post h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: hsl(200, 50%, 65%);
}

.blog-post h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
}

.blog-post p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.blog-post ul, .blog-post ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-post li {
    margin-bottom: 0.5rem;
}


/* 博客列表样式 */
.blog-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-list-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid hsl(var(--border));
}

.blog-list-item:last-child {
    border-bottom: none;
}

.blog-list-item h2 {
    color: hsl(200, 50%, 65%);
    margin-bottom: 0.5rem;
}

.blog-list-item .meta {
    color: hsl(var(--text) / 0.6);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-list-item .summary {
    margin-bottom: 1rem;
}

/* ========================================
   文章页样式 - 与主页风格统一
   ======================================== */

/* 返回首页链接 */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--foreground));
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-home:hover {
    color: hsl(200, 50%, 65%);
}

/* 文章页主体 */
.post-article {
    padding: 2rem 0 4rem;
    min-height: calc(100vh - 200px);
}

.post-article .container {
    max-width: 800px;
}

/* 文章头部 */
.post-article .post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
}

.post-article .post-header h1 {
    font-size: 2.25rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

/* 文章正文容器 - 玻璃效果 */
.post-body {
    padding: 2.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

/* 文章底部 */
.post-article .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border));
    flex-wrap: wrap;
    gap: 1rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.post-article .share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-article .share-buttons span {
    color: hsl(var(--muted-foreground));
    font-size: 0.9rem;
}

/* 简化页脚 */
.site-footer {
    background: linear-gradient(to right, hsla(154, 36%, 91%, 0.9), hsla(191, 45%, 82%, 0.9));
    padding: 1.5rem 0;
    text-align: center;
}

.site-footer p {
    color: hsl(var(--muted-foreground));
    font-size: 0.9rem;
}

html.dark .site-footer {
    background: linear-gradient(to right, hsla(220, 46%, 20%, 0.95), hsla(217, 28%, 25%, 0.95));
}

/* 移动端文章页适配 */
@media (max-width: 768px) {
    .post-article .post-header h1 {
        font-size: 1.75rem;
    }
    
    .post-body {
        padding: 1.5rem;
    }
    
    .post-article .post-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 原有博客样式保留兼容 */

.post-header {
    margin-bottom: 2rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    color: hsl(var(--muted-foreground));
}

.post-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword {
    background-color: hsla(191, 45%, 82%, 0.4);
    color: hsl(220, 46%, 42%);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

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

.post-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
}

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

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

.post-content blockquote {
    border-left: 4px solid hsl(200, 50%, 65%);
    padding-left: 1rem;
    margin-left: 0;
    color: hsl(var(--muted-foreground));
    font-style: italic;
}

.post-content pre {
    background-color: hsl(var(--muted));
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-content code {
    background-color: hsl(var(--muted));
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

.table-of-contents {
    background-color: hsl(var(--secondary));
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents li.h3 {
    padding-left: 1rem;
}

.table-of-contents a {
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: color 0.3s;
}

.table-of-contents a:hover {
    color: hsl(200, 50%, 65%);
}

.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border));
}

.share-buttons {
    margin-bottom: 3rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: hsl(var(--muted));
    color: hsl(var(--foreground));
    transition: all 0.3s;
}

.share-btn:hover {
    background-color: hsl(200, 50%, 65%);
    color: hsl(var(--primary-foreground));
    transform: translateY(-2px);
}

.related-posts {
    margin-top: 2rem;
}

.related-post-item {
    border-bottom: 1px solid hsl(var(--border));
    padding: 1rem 0;
}

.related-post-item:last-child {
    border-bottom: none;
}

.related-post-item h4 {
    margin-bottom: 0.5rem;
}

.related-post-item h4 a {
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: color 0.3s;
}

.related-post-item h4 a:hover {
    color: hsl(200, 50%, 65%);
}

.related-post-item .date {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* 移动端适配 */
@media (max-width: 768px) {
    .blog-post {
        padding: 1rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-header h1 {
        font-size: 1.75rem;
    }
    
    .table-of-contents {
        padding: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .social-buttons {
        justify-content: center;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --background: 220 46% 17%;
        --foreground: 154 36% 91%;
        --card: 220 46% 17%;
        --card-foreground: 154 36% 91%;
        --popover: 220 46% 17%;
        --popover-foreground: 154 36% 91%;
        --primary: 200 50% 65%;
        --primary-foreground: 220 46% 17%;
        --secondary: 217 28% 25%;
        --secondary-foreground: 154 36% 91%;
        --muted: 217 28% 25%;
        --muted-foreground: 191 45% 82%;
        --accent: 191 45% 70%;
        --accent-foreground: 220 46% 17%;
        --destructive: 0 70% 45%;
        --destructive-foreground: 154 36% 91%;
        --border: 217 28% 25%;
        --input: 217 28% 25%;
        --ring: 200 70% 55%;
        --text: 154 20% 85%;
    }
    
    header {
        background: rgba(30, 40, 65, 0.95);
    }
    
    header.scrolled {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }
}

/* 一些动画效果 */
.button, .project-card, .skill-card, .featured-card, .blog-list-item, .share-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.button:hover, .project-card:hover, .skill-card:hover, .featured-card:hover, .blog-list-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 图片样式优化 */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 2rem 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

/* 错误信息样式 */
.error-message {
    text-align: center;
    padding: 4rem 1rem;
    color: hsl(var(--destructive));
}

.error-message h2 {
    margin-bottom: 1rem;
}

.error-message .back-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: hsl(200, 50%, 65%);
    color: hsl(var(--primary-foreground));
    text-decoration: none;
    border-radius: var(--radius);
    transition: background-color 0.3s;
}

.error-message .back-link:hover {
    background-color: hsl(200, 50%, 60%);
}

/* 联系部分样式 */
#contact {
    padding: 8rem 0;
    background-color: hsl(var(--background));
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem;
    background-color: hsla(154, 36%, 91%, 0.7);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(74, 98, 138, 0.08);
    border: 1px solid hsla(191, 45%, 82%, 0.4);
}

.contact-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: hsl(var(--foreground));
}

/* 滚动动画效果 */
.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

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

.section-header, .skill-card, .featured-card, .resume-section, .contact-content {
    opacity: 0;
}

/* 每个元素的延迟时间 */
.skill-card:nth-child(1) { animation-delay: 0.1s; }
.skill-card:nth-child(2) { animation-delay: 0.2s; }
.skill-card:nth-child(3) { animation-delay: 0.3s; }
.skill-card:nth-child(4) { animation-delay: 0.4s; }

.featured-card:nth-child(1) { animation-delay: 0.1s; }
.featured-card:nth-child(2) { animation-delay: 0.2s; }
.featured-card:nth-child(3) { animation-delay: 0.3s; }

/* ========================================
   UI现代化样式 - 2025-12-12
   ======================================== */

/* === 1. Hero流动渐变背景 === */
.hero {
    position: relative;
    overflow: visible;
}

/* 背景突破父容器限制，实现全屏宽度 */
.hero-background {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: linear-gradient(
        -45deg,
        hsla(154, 36%, 91%, 0.8),
        hsla(191, 45%, 82%, 0.6),
        hsla(200, 50%, 75%, 0.7),
        hsla(220, 46%, 85%, 0.5)
    );
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    z-index: 0;
}

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

.hero-content, .hero-image {
    position: relative;
    z-index: 1;
}

.hero-content .highlight {
    color: hsl(200, 50%, 55%);
    background: linear-gradient(120deg, hsl(200, 50%, 55%), hsl(var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === 2. 玻璃拟态效果（轻度） === */
.card-glass {
    background: hsla(0, 0%, 100%, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid hsla(0, 0%, 100%, 0.4);
    box-shadow: 
        0 4px 24px rgba(60, 80, 120, 0.08),
        inset 0 0 0 1px hsla(0, 0%, 100%, 0.1);
    transition: all 0.3s ease;
}

.card-glass:hover {
    background: hsla(0, 0%, 100%, 0.85);
    box-shadow: 
        0 8px 32px rgba(60, 80, 120, 0.12),
        inset 0 0 0 1px hsla(200, 50%, 65%, 0.2);
}

/* === 3. 主题切换按钮 === */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: hsla(var(--muted), 0.5);
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    transform: rotate(15deg);
}

/* === 4. 最新动态区样式 === */
.latest {
    padding: 6rem 0;
    background-color: hsl(var(--background));
}

/* 横向滚动容器 */
.latest-scroll-container {
    position: relative;
    margin-top: 2rem;
}

.latest-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0.5rem 1.5rem;
    margin: 0 -0.5rem;
    /* 隐藏滚动条但保持功能 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.latest-scroll::-webkit-scrollbar {
    display: none;
}

/* 滚动箭头按钮 */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, hsl(200, 50%, 65%), hsl(var(--accent)));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(60, 80, 120, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.scroll-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(60, 80, 120, 0.3);
}

.scroll-arrow-right {
    right: -0.5rem;
}

.scroll-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 暗色模式箭头 */
html.dark .scroll-arrow {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.latest-card {
    flex: 0 0 320px;
    min-width: 280px;
    max-width: 350px;
    background: hsl(var(--card));
    border-radius: var(--radius);
    padding: 1.75rem;
    border: 1px solid hsl(var(--border));
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.latest-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(60, 80, 120, 0.12);
    border-color: hsl(200, 50%, 65%);
}

.latest-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.latest-card h3 a {
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: color 0.3s;
}

.latest-card h3 a:hover {
    color: hsl(200, 50%, 55%);
}

.latest-card .date {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

.latest-card .summary {
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.latest-card .read-more {
    color: hsl(200, 50%, 55%);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    transition: gap 0.3s;
}

.latest-card .read-more:hover {
    gap: 0.75rem;
}

/* === 5. 项目区样式 === */
.projects {
    padding: 6rem 0;
    background: linear-gradient(135deg, 
        hsla(154, 36%, 95%, 0.5) 0%, 
        hsla(191, 45%, 90%, 0.3) 100%
    );
    position: relative;
}

/* 网格背景图案 */
.projects::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(hsla(200, 50%, 65%, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, hsla(200, 50%, 65%, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

.projects .container {
    position: relative;
    z-index: 1;
}

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

.project-card {
    padding: 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.project-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, hsl(200, 50%, 65%), hsl(var(--accent)));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
}

.project-icon i {
    font-size: 1.75rem;
    color: white;
}

/* 不同项目的图标渐变色 */
.project-icon.icon-hr {
    background: linear-gradient(135deg, hsl(280, 50%, 55%), hsl(320, 60%, 50%));
}

.project-icon.icon-fitness {
    background: linear-gradient(135deg, hsl(150, 50%, 45%), hsl(180, 60%, 45%));
}

.project-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: hsl(var(--foreground));
}

.project-card p {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-link {
    color: hsl(200, 50%, 55%);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.project-card:hover .project-link {
    gap: 0.75rem;
}

/* 敬请期待样式 */
.project-card.coming-soon {
    opacity: 0.7;
    cursor: default;
}

.project-card.coming-soon .project-icon {
    background: linear-gradient(135deg, hsl(var(--muted)), hsl(var(--border)));
}

.project-card.coming-soon:hover {
    transform: none;
}

.coming-soon-text {
    color: hsl(var(--muted-foreground));
    font-style: italic;
}

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

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
    }
}

.about-intro {
    padding: 2.5rem;
    border-radius: var(--radius);
}

.about-text {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

.about-text:last-of-type {
    margin-bottom: 2rem;
}

/* 技能标签 */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, hsla(200, 50%, 65%, 0.15), hsla(191, 45%, 82%, 0.2));
    border: 1px solid hsla(200, 50%, 65%, 0.3);
    border-radius: 2rem;
    font-size: 0.9rem;
    color: hsl(220, 46%, 35%);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: linear-gradient(135deg, hsla(200, 50%, 65%, 0.25), hsla(191, 45%, 82%, 0.3));
    transform: translateY(-2px);
}

.skill-tag i {
    font-size: 0.85rem;
    color: hsl(200, 50%, 55%);
}

/* 时间线样式 */
.timeline-container {
    padding: 1rem 0;
}

.timeline-title {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: hsl(var(--foreground));
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        hsl(200, 50%, 65%), 
        hsla(191, 45%, 82%, 0.5)
    );
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    padding-left: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -1.5rem;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: hsl(var(--card));
    border: 2px solid hsl(200, 50%, 65%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.15);
    box-shadow: 0 4px 12px hsla(200, 50%, 65%, 0.3);
}

.timeline-content {
    background: hsl(var(--card));
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    border-color: hsl(200, 50%, 65%);
    box-shadow: 0 4px 16px rgba(60, 80, 120, 0.08);
}

.timeline-date {
    display: inline-block;
    font-size: 0.85rem;
    color: hsl(200, 50%, 55%);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

.timeline-content p {
    font-size: 0.95rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
}

/* === 7. 暗色模式手动切换 === */
html.dark {
    --background: 220 46% 17%;
    --foreground: 154 36% 91%;
    --card: 220 46% 20%;
    --card-foreground: 154 36% 91%;
    --popover: 220 46% 17%;
    --popover-foreground: 154 36% 91%;
    --primary: 200 50% 65%;
    --primary-foreground: 220 46% 17%;
    --secondary: 217 28% 25%;
    --secondary-foreground: 154 36% 91%;
    --muted: 217 28% 25%;
    --muted-foreground: 191 45% 82%;
    --accent: 191 45% 70%;
    --accent-foreground: 220 46% 17%;
    --destructive: 0 70% 45%;
    --destructive-foreground: 154 36% 91%;
    --border: 217 28% 30%;
    --input: 217 28% 25%;
    --ring: 200 70% 55%;
    --text: 154 20% 85%;
}

html.dark header {
    background: rgba(30, 40, 65, 0.95);
}

html.dark .hero-background {
    background: linear-gradient(
        -45deg,
        hsla(220, 46%, 20%, 0.9),
        hsla(217, 28%, 25%, 0.8),
        hsla(200, 50%, 25%, 0.7),
        hsla(191, 45%, 20%, 0.6)
    );
    background-size: 400% 400%;
}

html.dark .card-glass {
    background: hsla(220, 46%, 20%, 0.7);
    border: 1px solid hsla(200, 50%, 65%, 0.15);
}

html.dark .card-glass:hover {
    background: hsla(220, 46%, 22%, 0.8);
    border-color: hsla(200, 50%, 65%, 0.3);
}

html.dark .skill-tag {
    background: linear-gradient(135deg, hsla(200, 50%, 65%, 0.2), hsla(191, 45%, 50%, 0.15));
    border-color: hsla(200, 50%, 65%, 0.3);
    color: hsl(191, 45%, 82%);
}

html.dark .projects {
    background: linear-gradient(135deg, 
        hsla(220, 46%, 15%, 0.8) 0%, 
        hsla(217, 28%, 20%, 0.6) 100%
    );
}

html.dark .projects::before {
    background-image: 
        linear-gradient(hsla(200, 50%, 65%, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, hsla(200, 50%, 65%, 0.05) 1px, transparent 1px);
}

html.dark .timeline-icon {
    background: hsl(220, 46%, 20%);
}

html.dark footer {
    background: linear-gradient(to right, hsla(220, 46%, 20%, 0.95), hsla(217, 28%, 25%, 0.95));
}

html.dark .contact-content {
    background-color: hsla(220, 46%, 22%, 0.8);
    border-color: hsla(200, 50%, 65%, 0.2);
}

/* === 8. 微交互动效增强 === */

/* 导航悬停光晕 */
nav a:hover {
    text-shadow: 0 0 20px hsla(200, 50%, 65%, 0.4);
}

/* 按钮点击效果 */
.button:active {
    transform: scale(0.98);
}

/* 头像悬停光环 */
.hero-image::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: linear-gradient(45deg, 
        hsla(200, 50%, 65%, 0), 
        hsla(154, 36%, 85%, 0)
    );
    z-index: -1;
    transition: all 0.5s ease;
    opacity: 0;
}

.hero-image:hover::after {
    background: linear-gradient(45deg, 
        hsla(200, 50%, 65%, 0.3), 
        hsla(154, 36%, 85%, 0.3)
    );
    filter: blur(15px);
    opacity: 1;
}

/* 卡片动画延迟 */
.latest-card:nth-child(1) { animation-delay: 0.1s; }
.latest-card:nth-child(2) { animation-delay: 0.2s; }
.latest-card:nth-child(3) { animation-delay: 0.3s; }

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

/* 新区块的滚动动画 */
.latest-card, .project-card, .about-intro, .timeline-item {
    opacity: 0;
}

/* 移动端适配补充 */
@media (max-width: 768px) {
    .latest-scroll {
        gap: 1rem;
    }
    
    .latest-card {
        flex: 0 0 280px;
        min-width: 260px;
    }
    
    .scroll-arrow {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .scroll-arrow-right {
        right: 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-icon {
        left: -1.25rem;
        width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
    }
    
    .timeline-item {
        padding-left: 1rem;
    }
    
    .about-intro {
        padding: 1.5rem;
    }
    
    .theme-toggle {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }
    
    nav {
        gap: 1rem;
    }
}