/* 1. 全局基础样式：设置背景、字体、边距等 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* 确保元素宽高计算包含内边距和边框 */
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4; /* 设置一个浅灰色背景，让页面有层次感 */
    padding: 20px; /* 给页面四周留出一些呼吸空间 */
}

/* 2. 容器样式：使用圆角矩形和阴影 */
.container {
    max-width: 1200px; /* 最大宽度，让内容在宽屏上不会无限拉长 */
    margin: 0 auto; /* 水平居中 */
    background: #fff; /* 白色背景，与页面背景形成对比 */
    border-radius: 12px; /* 圆角设置，12px 是推荐的现代圆角值 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 添加轻微阴影，让容器“浮”起来 */
    padding: 30px; /* 内边距，让内容不紧贴边缘 */
    min-height: 80vh; /* 最小高度，让页面看起来更饱满 */
}

/* 3. 导航栏样式：使用圆角按钮 */
nav {
    text-align: center; /* 导航栏居中 */
    margin-bottom: 30px; /* 与下方内容保持距离 */
    border-bottom: 1px solid #eee; /* 添加一条细线作为分割 */
    padding-bottom: 20px;
}

nav a {
    text-decoration: none; /* 去掉下划线 */
    color: #666; /* 默认颜色 */
    background: #f8f9fa; /* 浅色背景 */
    padding: 8px 20px; /* 内边距，让按钮变宽 */
    border-radius: 8px; /* 圆角 */
    margin: 0 5px; /* 按钮之间的间距 */
    display: inline-block; /* 让内边距生效 */
    transition: all 0.3s ease; /* 添加过渡动画，让交互更顺滑 */
}

/* 4. 鼠标悬停效果：让按钮有反馈 */
nav a:hover {
    background: #007bff; /* 悬停时背景变蓝 */
    color: #fff; /* 文字变白 */
    transform: translateY(-2px); /* 轻微上移，产生“点击”感 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 悬停时加深阴影 */
}

/* 5. 内容区域样式 */
h1, h2 {
    color: #2c3e50; /* 深蓝色标题，更显专业 */
    margin-bottom: 20px;
}

h2 {
    position: relative;
    padding-bottom: 18px;
}

h2::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 110px;
    height: 10px;
    background: #d5dbe3;
    border-radius: 999px;
    z-index: 1;
}

h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 90px;
    height: 10px;
    background: #35baf3;
    border-radius: 999px;
    z-index: 2;
}

p {
    margin-bottom: 15px;
    color: #666; /* 浅灰色文字，更易读 */
}

.project-button {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 8px 0 20px;
    padding: 22px var(--project-image-area, 130px) 22px 24px;
    border-radius: 12px;
    text-decoration: none;
    background: #f1f3f5;
    color: #2c3e50;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-button::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #2f80ff;
    transition: width 0.2s ease;
    z-index: 1;
}

.project-button::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: var(--project-image-area, 130px);
    background-image: var(--project-image, none);
    background-repeat: no-repeat;
    background-position-x: var(--project-image-x, right 18px);
    background-position-y: var(--project-image-y, center);
    background-size: var(--project-image-size, 92px);
    opacity: var(--project-image-opacity, 0);
    filter: grayscale(var(--project-image-grayscale, 100%));
    pointer-events: none;
    z-index: 0;
}

.project-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

.project-button:hover::before {
    width: 12px;
}

.project-name {
    display: block;
    position: relative;
    z-index: 2;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.project-desc {
    display: block;
    position: relative;
    z-index: 2;
    font-size: 1rem;
    color: #2c3e50;
    opacity: 0.95;
}

/* 6. 页脚样式 */
footer {
    text-align: center;
    margin-top: 30px;
    color: #999; /* 浅色页脚，不抢眼 */
    font-size: 0.9em;
}