/* =============================
   🌈 Apple Design Enhanced Edition
   保留原有结构 + 优化视觉体验
   ============================= */

:root {
    /* 颜色体系 */
    --bg-color: #f5f5f7;
    --card-bg-color: rgba(255, 255, 255, 0.65);
    --primary-color: #f7931a;
    --text-color: #1c1c1e;
    --text-secondary: #6e6e73;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.1);

    /* 圆角体系 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* =============================
   🎨 全局基础样式
   ============================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    letter-spacing: 0.02em;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-color);
}

/* =============================
   🧭 容器与布局
   ============================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1rem, 5vw, 4rem);
}

/* =============================
   💫 头部区域（Hero）
   ============================= */
.hero-header {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(245, 245, 247, 1) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.hero-header h1 {
    font-size: 2.4rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* =============================
   🧱 项目展示区（Projects）
   ============================= */
.projects-hub {
    margin: 4rem auto;
    text-align: center;
}

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

.project-card {
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-bg-color);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    background: rgba(255, 255, 255, 0.75);
}

.project-card .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.project-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* CTA 按钮 */
.cta-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: linear-gradient(to bottom, #fff, #f9f9f9);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 1.2rem;
    transition: all 0.25s ease;
}

.cta-link:hover {
    transform: translateY(-1px);
    background: linear-gradient(to bottom, #fff8f0, #fff);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* =============================
   ⏳ 时间线（Timeline）
   ============================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem 0;
}

.timeline::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.08);
    transform: translateX(-50%);
}

.timeline-item {
    padding: 1.5rem 3rem;
    position: relative;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    right: -6px;
    background-color: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    top: 20px;
    box-shadow: 0 0 6px rgba(247, 147, 26, 0.3);
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

/* =============================
   🌙 自动暗色模式
   ============================= */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1c1c1e;
        --card-bg-color: rgba(44, 44, 46, 0.6);
        --text-color: #f5f5f7;
        --text-secondary: #a1a1a3;
        --border-color: rgba(255, 255, 255, 0.08);
        --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.5);
    }

    .project-card {
        background: rgba(44, 44, 46, 0.65);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .hero-header {
        background: linear-gradient(180deg, rgba(44, 44, 46, 0.9) 0%, rgba(28, 28, 30, 1) 100%);
        color: var(--text-color);
    }

    .cta-link {
        background: linear-gradient(to bottom, #2c2c2e, #3a3a3c);
        color: var(--primary-color);
    }
}
/* ===================================
   🍎 Apple-Style Responsive Footer
   =================================== */
.main-footer {
    background-color: rgba(0, 0, 0, 0.9);
    color: #ccc;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-footer div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    max-width: 800px;
    margin: 0 auto;
}

.main-footer span,
.main-footer a {
    color: #d4a15f;
    /* 温润金调 */
    text-decoration: none;
    transition: color 0.25s ease, transform 0.25s ease;
}

.main-footer a:hover {
    color: #ffb347;
    transform: translateY(-1px);
}

/* 在较小屏幕自动改为垂直堆叠 */
@media (max-width: 640px) {
    .main-footer div {
        flex-direction: column;
        gap: 0.5rem;
    }

    .main-footer a {
        display: inline-block;
        padding: 0.25rem 0;
        font-size: 1rem;
    }
}