/* 全局样式 - 现代简约风格 - Portfolio黑白配色 */
:root {
    --primary-color: #000000;
    --secondary-color: #333333;
    --dark-color: #333333;
    --light-color: #f5f5f5;
    --gray-color: #999999;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #2196f3;
    --border-radius: 0px;
    --box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
    --font-primary: 'Poppins', sans-serif;
    --content-width: 1200px;
    --text-color: #000000;
    --accent-color: #333333;
    --card-bg: #ffffff;
    --border-color: rgba(0,0,0,0.1);
    --menu-bg: rgba(255, 255, 255, 0.98);
    --bg-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    font-weight: 300;
    letter-spacing: 0.02em;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    box-shadow: var(--box-shadow);
}

.btn.primary {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 500;
}

.btn.primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn.secondary {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
    transform: translateY(-2px);
}

.btn-small {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--text-color);
    color: var(--dark-color);
    border: 1px solid var(--text-color);
    text-transform: uppercase;
}

.btn-small:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    color: var(--dark-color);
    border-color: var(--secondary-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: left;
    position: relative;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 头部导航 - 黑白简约风格 */
header {
    position: fixed;
    top: 0; /* 始终显示在顶部 */
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #ffffff;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
    opacity: 1;
    transform: none;
    will-change: transform, opacity;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

header.scrolled {
    padding: 10px 0;
}

header.visible {
    opacity: 1;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    max-width: var(--content-width);
    margin: 0 auto;
    position: relative;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.5px;
    position: relative;
    padding: 5px 0;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu li {
    margin-left: 25px;
}

.nav-menu li a {
    font-weight: 400;
    position: relative;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--text-color);
    padding: 5px 10px;
    text-transform: uppercase;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-color);
    transition: var(--transition);
}

.nav-menu li a:hover::after,
.nav-menu li.active a::after {
    width: 100%;
}

.nav-menu li.active a {
    font-weight: 500;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 头像按钮 */
.language-switch a {
    padding: 0;
    border-radius: 50%;
    background-color: var(--text-color);
    border: 2px solid var(--text-color);
    color: var(--dark-color);
    font-size: 0.75rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 头像按钮悬停效果 */
.language-switch a:hover {
    border-color: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* 标准页面布局 - 垂直滚动 */
body {
    overflow-x: hidden;
    background-color: var(--dark-color);
    min-height: 100vh;
}

/* 主内容区域 - 垂直滚动容器 */
.main-container {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    -webkit-overflow-scrolling: touch;
    padding: 80px 20px 0; /* 增加顶部内边距，避免内容被固定导航栏遮挡 */
}

/* 首页英雄区 - 全宽展示 */
.hero {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-color);
    background-image: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 80px 5vw;
    justify-content: center;
    margin-top: 0;
}

.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    max-width: var(--content-width);
    width: 100%;
    background-color: transparent;
    padding: 40px 0;
}

.hero-text {
    width: 100%;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hero-text .highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.hero-text .tagline {
    font-size: 1.3rem;
    color: var(--gray-color);
    margin-bottom: 25px;
    font-weight: 400;
}

.hero-text .description {
    font-size: 1rem;
    margin-bottom: 40px;
    max-width: 400px;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.profile-image {
    display: block;
    width: 45%;
    margin-right: 40px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.profile-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: transform 0.5s ease;
}

.profile-image img:hover {
    transform: scale(1.03);
}

/* 精选作品区 - 标准垂直布局 */
.featured-works {
    width: 100%;
    padding: 80px 0;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    max-width: var(--content-width);
    margin: 0 auto;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    margin: 0;
    padding: 0;
    max-width: var(--content-width);
}

.work-item {
    background-color: var(--card-bg);
    overflow: hidden;
    transition: var(--transition);
    height: 380px;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: none;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
}

.work-item:hover {
    transform: translateY(-5px);
}

.work-image {
    position: relative;
    overflow: hidden;
    height: 70%;
    width: 100%;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    will-change: transform;
}

.work-item:hover .work-image img {
    transform: scale(1.05);
}

.work-info {
    padding: 20px;
    color: var(--text-color);
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.work-info h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 500;
}

.work-info p {
    color: var(--gray-color);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.view-all {
    text-align: left;
    margin-top: 50px;
}

/* 技能区域 */
.skills-section {
    width: 100%;
    padding: 80px 0;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: var(--content-width);
    margin: 0 auto;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    margin-top: 50px;
    max-width: 1000px;
}

.skill-category h3 {
    margin-bottom: 30px;
    font-size: 1.3rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--text-color);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-name {
    display: block;
    margin-bottom: 10px;
    font-weight: 400;
    font-size: 0.9rem;
}

.skill-bar {
    height: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: none;
}

.skill-progress {
    height: 100%;
    background-color: var(--text-color);
    transition: width 0.8s ease-out;
    will-change: width;
    transform: translateZ(0);
}

/* 页脚区域 */
.footer-section {
    width: 100%;
    background-color: #ffffff;
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
}

footer {
    width: 100%;
    background-color: #ffffff;
    color: var(--text-color);
    padding: 40px 0 20px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
    max-width: var(--content-width);
    margin: 0 auto 40px;
    padding: 0 40px;
}

.footer-logo a {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0;
    background-color: var(--dark-color);
    color: #ffffff;
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid var(--dark-color);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-nav ul li a {
    color: var(--text-color);
    font-size: 0.85rem;
}

.footer-nav ul li a:hover {
    opacity: 0.7;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--gray-color);
    font-size: 0.8rem;
}

/* 响应式设计 - 移动端适配 */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        scroll-snap-type: y mandatory;
    }
    
    .hero, .featured-works {
        min-width: 100vw;
        height: 100vh;
        scroll-snap-align: start;
    }
    
    .hero {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .hero-content {
        align-items: flex-start;
        text-align: left;
        padding: 0 20px;
    }
    
    .featured-works {
        padding: 0;
    }
    
    .works-grid {
        height: 60vh;
    }
    
    .work-item {
        min-width: 90%;
        height: 100%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--menu-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 1000;
        padding: 50px 0;
        box-shadow: var(--box-shadow);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text .tagline {
        font-size: 1.1rem;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .works-grid {
        flex-direction: column;
        overflow-x: visible;
    }
    
    .work-item {
        min-width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        text-align: center;
    }

    .footer-nav ul {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 120px 0 80px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }
    
    .featured-works,
    .skills-section {
        padding: 60px 20px;
    }
}