/* ===== 基础样式 ===== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --accent: #764ba2;
    --text: #2d3748;
    --text-light: #718096;
    --bg: #ffffff;
    --bg-alt: #f7fafc;
    --border: #e2e8f0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 导航栏 ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.nav-logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 96px 0;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.hero-greeting {
    font-size: 1.1rem;
    opacity: 0.85;
}

.hero-name {
    font-size: 3.2rem;
    font-weight: 800;
    margin: 8px 0;
}

.hero-title {
    font-size: 1.4rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 16px;
}

.hero-desc {
    max-width: 520px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: #fff;
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

.avatar-placeholder {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 4px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* ===== 通用 Section ===== */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    margin: 12px auto 0;
}

/* ===== 关于我 ===== */
.about-content {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-light);
    font-size: 1.05rem;
}

.about-content p {
    margin-bottom: 16px;
}

/* ===== 技能 ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.25s;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.12);
    border-color: var(--primary);
}

.skill-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
}

.skill-card h3 {
    margin-bottom: 8px;
}

.skill-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== 作品集 ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.project-cover {
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 8px;
}

.project-info p {
    color: var(--text-light);
    font-size: 0.92rem;
    margin-bottom: 12px;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ===== 联系我 ===== */
.contact-content {
    text-align: center;
    color: var(--text-light);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.contact-item {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.contact-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 32px 0;
    font-size: 0.9rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-menu { gap: 16px; }
    .hero { padding: 64px 0; }
    .hero-content { flex-direction: column-reverse; text-align: center; }
    .hero-name { font-size: 2.4rem; }
    .hero-buttons { justify-content: center; }
    .avatar-placeholder { width: 140px; height: 140px; font-size: 2.5rem; }
    .skills-grid, .projects-grid { grid-template-columns: 1fr; }
    .section { padding: 56px 0; }
}
