/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f0f8f0;
    line-height: 1.6;
}

/* 头部样式 */
header {
    background-color: #2c5f2d;
    color: white;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 导航栏样式 */
nav {
    background-color: #97bc62;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    transition: all 0.3s;
}

nav a:hover {
    background-color: #2c5f2d;
    transform: scale(1.05);
}

/* 主要内容容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 个人介绍区域 */
.profile {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    background: rgba(255,255,255,0.9);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid #2c5f2d;
    transition: transform 0.3s;
}

.avatar:hover {
    transform: rotate(5deg);
}

/* 作品展示区域 - 已添加跳转功能 */
.works {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.work-card {
    display: block; /* 修改为块级元素实现全卡片点击 */
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.work-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #eee;
}

.work-card h3 {
    color: #2c5f2d;
    margin: 1rem 0;
    font-size: 1.2em;
}

.work-card p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

/* 新增交互提示效果 */
.work-card::after {
    content: "点击查看详情 →";
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    padding: 0.8rem;
    background: rgba(44, 95, 45, 0.9);
    color: white;
    text-align: center;
    transition: bottom 0.3s ease;
}

.work-card:hover::after {
    bottom: 0;
}

/* 页脚样式 */
footer {
    background-color: #2c5f2d;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .work-card::after {
        display: none; /* 移动端隐藏提示文字 */
    }
}