/* 基础样式 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-size: 10px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-y: auto; /* 确保页面可以滚动 */
    background-color: #fff;
}

/* 主导航样式 */
.main-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1.7rem 3%;
    background: transparent;
    position: relative;
    z-index: 1;
}

.logo img {
    width: 70px;
    height: auto;
    margin-right: 10px;
}

.primary-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1rem;
}

.primary-nav li {
    display: list-item;
    text-align: match-parent;
    gap: 3rem;
    margin: 0;

}
.primary-nav ul {
    display: flex;
    list-style: none;
    gap: 4rem;
    margin: 0;
    margin-block-start: 1em;
    margin-block-end: 1em;
    padding-inline-start: 30px;

}

.primary-nav a {
    text-decoration: none;
    color: #333;
    font-size: 1.76rem;
    position: relative;
    padding: 0.8rem 0.9rem;
}

.primary-nav a.active {
    color: #333;
}

.primary-nav a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3.5em;
    height: 3.5em;
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    z-index: -1;
}

/* 二级导航样式 */
.secondary-nav {
    padding: 0.7rem 3%;
    background: rgba(245, 245, 245, 0.8);
    position: relative;
    z-index: 1;
}

/* 简介页面特殊的二级导航样式 */
.intro-page .secondary-nav {
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.5);
}

.secondary-nav .page-title {
    position: absolute;
    left: 4%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.6rem;
    font-weight: 500;
    color: #000;
    opacity: 0.5; /* 设置文字和背景均为半透明 */
}

.secondary-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    justify-content: center;
    margin: 0 auto;
}
.secondary-nav li {
    display: list-item;
    text-align: match-parent;
    margin: 0.3rem 0 0.3rem 1.5rem;
}

.secondary-nav a {
    text-decoration: none;
    color: #666;
    font-size: 1.44rem;
    transition: color 0.3s ease;
}

.secondary-nav a:hover {
    color: #000;
}

.secondary-nav a.active {
    color: #000;
    font-weight: 600;
}

.secondary-nav ul li a.active {
    color: #000;
    font-weight: bold;
    text-decoration: none;
}

.secondary-nav ul li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.secondary-nav ul li a:hover {
    color: #000;
}

/* 英雄区域样式 */
.hero {
    position: relative;
    height: 80vh;
    background-image: url('../img/bei-wwdc.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    height: 466px;
}

.hero-overlay {
    position: absolute;
    font-size: 24rem;
    font-weight: bold;
    color: white;
    opacity: 0.8;
}

.post-content {
    position: absolute;
    bottom: 10%;
    left: 5%;
    z-index: 2;
}

.post-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .primary-nav ul {
        gap: 2rem;
        padding-inline-start:80px;
    }

    .primary-nav a {
        font-size: 1.5rem;
        padding: 0.4rem 0.6rem;
    }

    .primary-nav a.active::after {
        width: 3.5em;
        height: 3.5em;
    }
    
    .secondary-nav ul {
        gap: 1rem;
    }
    
    .hero-overlay {
        font-size: 15rem;
    }
    
    .post-content h1 {
        font-size: 2rem;
    }
}

/* 更小屏幕的适配 */
@media (max-width: 480px) {
    .primary-nav ul {
        gap: 1rem;
        padding-inline-start: 70px;
    }
    .primary-nav li {
        display: list-item;
        text-align: match-parent;
        gap: 3rem;
        margin: 0;
        width: 5rem;
    }

    .primary-nav a {
        font-size: 1.4rem;
        padding: 0.3rem 0.5rem;
    }

    .primary-nav a.active::after {
        width: 3.2em;
        height: 3.2em;
    }

    .hero-overlay {
        font-size: 9rem;
    }
}

/* 内容页面样式 */
.content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 5%;
}

.content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.intro-content,
.works-grid,
.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content h1 {
        font-size: 2rem;
    }
}

/* 联系页面样式 */
.contact-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 2rem;
}

.profile-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.profile-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    overflow: hidden;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-container h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.contact-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.contact-thanks {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 响应式设计补充 */
@media (max-width: 768px) {
    .profile-image {
        width: 150px;
        height: 150px;
    }

    .profile-container h1 {
        font-size: 1.8rem;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .profile-image {
        width: 120px;
        height: 120px;
    }

    .profile-container h1 {
        font-size: 1.5rem;
    }

    .social-links {
        gap: 1rem;
    }

    .social-icon {
        width: 30px;
        height: 30px;
    }
}

/* 作品页面样式 */
.works-hero {
    background-color: #FFECB1;
    text-align: center;
    position: relative;
    overflow: hidden;
    font-size: 0; /* 消除图片间的空白间隙 */
}

.works-hero-content,
.works-hero-content1 {
    margin: 0;
    padding: 0;
    position: relative;
    display: block;
}

.works-hero-content {
    background-image: url('img/duckbg1.png');
}

.works-hero-content1 {
    background-color: #FFECB1;
}

.hero-duck {
    width: 1000px;
    height: auto;
    display: block; /* 消除图片底部的空白间隙 */
    margin: 0 auto; 
    vertical-align: top; /* 确保图片顶部对齐 */
}

.works-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.text-transparent {
    color: rgba(0, 0, 0, 0.1);
}

.text-yellow {
    color: #FFB800;
}

.works-detail {
    background-color: #FFECB1;
    padding: 0 0 4rem 0;
}

.app-showcase {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    gap: 4rem;
}

.phone-mockup {
    flex: 0 0 40%;
    text-align: center;
}

.phone-mockup img {
    max-width: 100%;
    height:651px ;
}

.app-description {
    flex: 0 0 50%;
}

.app-description h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 2rem;
}

.description-text {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.reason-text {
    font-size: 1.6rem;
    color: #333;
    margin: 2rem 0;
    line-height: 1.5;
}

.app-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.app-store-button, .privacy-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.app-store-button {
    background-color: #000;
    color: white;
}

.privacy-button {
    background-color: #FFE183;
    color: #333;
    border: 1px solid #FCD24E;
}

.app-store-button:hover, .privacy-button:hover {
    transform: translateY(-2px);
}

.app-buttons img {
    width: auto;
    height: 24px;
}

/* 响应式设计补充 */
@media (max-width: 968px) {
    .app-showcase {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .phone-mockup, .app-description {
        flex: 0 0 100%;
    }

    .app-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .works-hero h1 {
        font-size: 2.5rem;
    }

    .hero-duck {
        max-width: 100%;
        height: auto;
    }

    .app-description h2 {
        font-size: 2rem;
    }

    .description-text {
        font-size: 1rem;
    }
}
.primary-nav li {
    display: list-item;
    text-align: match-parent;
    gap: 3rem;
    margin: 0;
    width: 6rem;
}
@media (max-width: 480px) {
    .works-hero h1 {
        font-size: 2rem;
    }

    .hero-duck {
        max-width: 150px;
    }

    .app-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 1.44rem;
    background-color: transparent;
    position: relative;
    z-index: 1;
    margin-top: 5rem;
}

.footer p {
    margin: 0;
}

/* 确保页脚始终在底部 */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
    overflow-y: visible; /* 确保内容可以滚动 */
}

/* 简介页面样式 */
.intro-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background: url('img/beipro.jpg') no-repeat center top;
    background-size: cover;
    display: flex;
    flex-direction: column;
    z-index: 0; /* 确保背景在最底层 */
}

.intro-hero {
    height: 466px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.intro-title {
    position: relative;
    z-index: 2;
    height: 15rem; /* 设置与原文字相同的高度 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-title img {
    height: 100%; /* 让图片填充容器高度 */
    width: auto; /* 保持图片比例 */
    object-fit: contain; /* 确保图片完整显示 */
}

/* 移除原来的文字样式 */
.intro-title h1 {
    display: none;
}

.intro-content-section {
    position: relative;
    z-index: 1;
    padding: 2rem 0;
    background: transparent;
    flex: 1;
    text-align: center;
    min-height: 100vh; /* 确保内容区域有足够的高度 */
}

.intro-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3%;
    position: relative;
    z-index: 2;
}

.personal-intro {
    margin-bottom: 4rem;
}

.personal-intro h2,
.work-experience h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

.personal-intro p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
    text-align: center;
}

.work-experience {
    margin-top: 4rem;
    text-align: center;
}

.experience-item {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.year {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.company {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.company img {
    height: 40px;
    margin-bottom: 1.2rem;
}

.roles {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.2rem;
    justify-content: center;
}

.roles span {
    font-size: 1.1rem;
    color: #333;
}

.projects {
    display: inline-flex;
    gap: 2rem;
    margin-bottom: 2rem;
    margin-left: 0.5rem;
    background-color: #000;
    padding: 0.5rem 2.5rem;
    border-radius: 25px;
    justify-content: center;
    color: #fff;
}

.projects span {
    color: #fff;
    font-size: 0.9rem;
}

.project-images {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.project-images img {
    width: 300px;
    height: auto;
    border-radius: 8px;
}

.project-images1 {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.project-images1 img {
    width: 965px;
    height: auto;
    border-radius: 8px;
}

/* 响应式设计补充 */
@media (max-width: 768px) {
    .intro-title h1 {
        font-size: 8rem;
    }

    .personal-intro h2,
    .work-experience h2 {
        font-size: 1.8rem;
    }

    .year {
        font-size: 1.8rem;
    }

    .project-images {
        flex-direction: column;
        gap: 1rem;
    }

    .project-images img {
        width: 500px;
        margin: 0 auto;
    }

    .intro-title img {
        height: 70%; /* 让图片填充容器高度 */
        width: auto; /* 保持图片比例 */
        object-fit: contain; /* 确保图片完整显示 */
    }
    .intro-content-section {
        position: relative;
        z-index: 1;
        background: transparent;
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .intro-title h1 {
        font-size: 5rem;
    }

    .roles, .projects {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* 移除重复的page-background */
.page-background {
    display: none;
}

/* 添加平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 为锚点添加偏移，防止被导航栏遮挡 */
#personal-intro,
#work-experience {
    scroll-margin-top: 150px; /* 增加偏移量，确保内容不被导航栏遮挡 */
    position: relative; /* 确保定位正确 */
}

.hero-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.hero-link:hover {
    opacity: 0.9;
} 