/* 核心样式系统 */
:root {
    --bg-color: #f8f9fa;
    --text-color: #1d1d1f;
    --primary-color: #007AFF;
    --border-color: #d2d2d7;
    --card-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
    --bg-color: #1d1d1f;
    --text-color: #f5f5f7;
    --border-color: #424245;
    --card-bg: rgba(28, 28, 30, 0.9);
}

/* 布局系统 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "SF Pro Display", "Segoe UI", sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 30px;
    position: relative;
    min-height: 100vh;
}

/* 侧边栏系统 */
.sidebar {
    border-right: 1px solid var(--border-color);
    padding-right: 20px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.avatar-link {
    display: block;
    width: fit-content;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-left: auto;
    margin-right: auto;
}

.avatar-link:hover {
    transform: scale(1.05);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
}

/* 导航系统 */
.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 8px 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    letter-spacing: -0.2px;
}

.nav-item:hover {
    background: rgba(0, 122, 255, 0.1);
    transform: translateX(4px);
}

.nav-item::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-right: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-item:hover::before {
    opacity: 1;
}

/* 主内容系统 */
.main-content {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    position: relative;
    z-index: 200;
}

/* 视差装饰系统 */
.parallax-box {
    position: fixed ;
    width: 160px;
    display: flex;
    flex-direction: column;
    gap: 360px; /* 增大gif之间的间隔 */
    z-index: 100;
    pointer-events: none;
}

#left-box {
    left: calc(240px + 5.2%);
    top: 50%;
    transform: translateY(-50%);
}

#right-box {
    right: 3.5%;
    top: 50%;
    transform: translateY(-50%);
}

.parallax-gif {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 项目卡片系统 */
.textbox-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px 0;
}

.nav-item {
    font-family: "SF Pro Text", -apple-system, sans-serif; /* 苹果官方字体 */
    font-weight: 500; /* 中等字重 */
    letter-spacing: 0.2px; /* 优化字间距 */
}

.project-card {
    display: flex;
    gap: 30px;
    width: 100%;
    padding: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    text-decoration: none;
    margin: 0; /* 恢复项目卡片的外边距设置 */
}

.project-card:hover {
    transform: translateY(-2px);
}

.project-image {
    width: 280px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.project-content {
    flex: 1;
    min-width: 300px;
}

.project-title {
    font-size: 1.6em;
    margin: 0 0 15px 0;
    font-family: "SF Pro Text", -apple-system, sans-serif;

    /* 关键部分：渐变文字 */
    background: linear-gradient(45deg, #FF5733, #007AFF); /* 渐变背景 */
    -webkit-background-clip: text; /* 兼容 WebKit 浏览器 */
    background-clip: text; /* 裁剪背景到文字区域 */
    color: transparent; /* 隐藏默认文字颜色 */
}

.project-description {
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.9;
}

/* 响应式系统 */
@media (max-width: 1280px) {
    .parallax-box {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 20px;
        position: static;
    }

    .project-card {
        flex-direction: column;
        padding: 20px;
        margin: 30px 0;
    }

    .project-image {
        width: 100%;
        height: auto;
        max-height: 250px;
    }
}

