
/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #000000;
    color: #ffffff;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* 主容器 */
.portfolio-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 背景图片 */
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.4) contrast(1.2);
}

/* 主要内容区域 */
.main-content {
    position: relative;
    z-index: 2;
    width: 100%;
    flex: 1;
    display: grid;
    grid-template-areas: 
        ". header . timeline"
        ". personal . timeline"
        ". personal . timeline";
    grid-template-columns: 80px 500px 1fr 400px;
    grid-template-rows: auto 1fr auto;
    padding: 60px 80px;
    gap: 40px;
}

/* 左上角标题区域 */
.header-section {
    grid-area: header;
    align-self: start;
}

.main-title {
    font-size: 2.8rem;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    letter-spacing: 0.1rem;
    min-height: 3.5rem;
}

.main-title::after {
    content: '|';
    animation: blink 1s infinite;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: #cccccc;
    margin-bottom: 2rem;
    letter-spacing: 0.15rem;
    min-height: 1.5rem;
}

.subtitle::after {
    content: '|';
    animation: blink 1s infinite;
    opacity: 0;
}

.subtitle:not(:empty)::after {
    opacity: 1;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.year-range {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.start-year,
.end-year {
    font-size: 1rem;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.1rem;
}

.year-line {
    width: 60px;
    height: 1px;
    background-color: #ffffff;
    opacity: 0.8;
}

/* 左下角个人信息区域 */
.personal-info {
    grid-area: personal;
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: -50px;
}

.portrait-container {
    width: 280px;
    height: 340px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.portrait-container:hover {
    transform: scale(1.01);
}

.portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.3s ease;
}

.info-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.name {
    font-size: 3rem;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 0.1rem;
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.phone,
.email {
    font-size: 1rem;
    font-weight: 300;
    color: #cccccc;
    letter-spacing: 0.05rem;
}

/* 右侧时间线区域 */
.timeline-section {
    grid-area: timeline;
    align-self: center;
    position: relative;
    padding-left: 2rem;
    transform: translateY(-10%);
}

/* 时间线主线（带动画效果） */
.timeline-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        #ffffff 20%,
        #ffffff 80%,
        transparent 100%
    );
    opacity: 0.6;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 8px,
        #ffffff 8px,
        #ffffff 16px
    );
    animation: timelineFlow 3s linear infinite;
}

@keyframes timelineFlow {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 -16px;
    }
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.25rem;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    z-index: 3;
    animation: dotPulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
}

@keyframes dotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.timeline-content {
    flex: 1;
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 300;
    color: #999999;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05rem;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.4;
    letter-spacing: 0.05rem;
}

/* 滚动提示 */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    opacity: 0.8;
    animation: fadeInOut 3s ease-in-out infinite;
}

.scroll-arrow {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bounce 2s ease-in-out infinite;
}

.arrow-line {
    width: 1px;
    height: 30px;
    background-color: #ffffff;
    margin-bottom: -1px;
}

.arrow-head {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #ffffff;
}

.scroll-text {
    font-size: 0.85rem;
    font-weight: 300;
    color: #cccccc;
    letter-spacing: 0.05rem;
    text-align: center;
}

/* 动画效果 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* 静态目录条（第一部分下方） */
.static-contents {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
    height: 60px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 2000;
}

.static-contents-list {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 40px;
    width: 100%;
    padding: 0 80px;
}

.static-contents-list a {
    text-decoration: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.static-contents-list a:hover {
    transform: translateY(-2px);
    color: #cccccc;
}

.static-contents-list .num {
    font: 600 1.98rem Montserrat, 'Noto Sans SC', sans-serif;
    opacity: 0.8;
}

.static-contents-list .cn {
    font-weight: 400;
    font-size: 1.71rem;
}

/* ==================== 作品展示部分 ==================== */
.works-section {
    background-color: #0f0f0f;
    min-height: 100vh;
    position: relative;
    color: #ffffff;
    padding-top: 80px;
}

/* 顶部目录条（始终悬浮） */
.contents-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    height: 60px;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.4s ease;
}

.contents-header.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.contents-list {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 40px;
    width: 100%;
    padding: 0 80px;
}

.contents-list a {
    text-decoration: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.contents-list a:hover {
    transform: translateY(-2px);
    color: #cccccc;
}

.contents-list a.active .cn {
    font-weight: 900;
}

.contents-list a.active .num {
    font-weight: 900;
}

.contents-list .num {
    font: 600 1.98rem Montserrat, 'Noto Sans SC', sans-serif;
    opacity: 0.8;
}

.contents-list .cn {
    font-weight: 400;
    font-size: 1.71rem;
}

/* 作品容器 */
.works-container {
    padding: 120px 0;
    max-width: 1360px;
    margin: 0 auto;
}

.work-section {
    margin-bottom: 140px;
    padding: 0 40px;
}

/* 简化引导标题 */
.intro-simple {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 60px 0 40px;
    margin-left: 10%;
}

.intro-simple .intro-number {
    font: 700 4rem Montserrat, 'Noto Sans SC', sans-serif;
    color: #666666;
    opacity: 0.8;
}

.intro-simple .intro-title {
    font-size: 2.4rem;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.05rem;
}

/* 右侧内容 */
.section-content {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

/* 重新设计作品卡片 */
.work-card {
    display: flex;
    margin: 60px 0;
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
    align-items: flex-start;
    min-height: 200px;
}

.work-info {
    width: 25%;
    margin-left: 15%;
    padding-right: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}


.work-title {
    font-size: 1.8rem;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.04rem;
    margin-bottom: 8px;
}

.work-subtitle {
    color: #999999;
    font-weight: 300;
    font-size: 0.95rem;
}

/* 重新设计画廊区域 */
.work-gallery {
    width: 45%;
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: flex-start;
}

.work-gallery.single {
    width: 45%;
    margin-left: auto;
}

.gallery-main {
    flex: 2;
    min-width: 0;
}

.gallery-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
    align-items: stretch;
    min-width: 0;
}


.gallery-image {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-image:hover {
    transform: translateY(-2px);
}

.gallery-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
    flex-shrink: 0;
}

.gallery-thumb:hover {
    opacity: 1;
    transform: scale(1.01);
}


/* 图片放大浮层 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close {
    position: absolute;
    top: 10%;
    right: calc(-80px - 5vw);
    color: #ffffff;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #cccccc;
}

#modal-image {
    max-width: 100%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: calc(-80px - 3vw);
    right: calc(-80px - 3vw);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 1.5rem;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* 右下角缩放提示 */
.zoom-hint {
    position: absolute;
    bottom: 30px;
    right: 30px;
    opacity: 0.6;
    animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-icon {
    width: 24px;
    height: 40px;
    border: 2px solid #ffffff;
    border-radius: 12px;
    position: relative;
}

.scroll-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: #ffffff;
    border-radius: 1px;
    animation: scrollMove 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

@keyframes scrollMove {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* PDF预览样式 */
.pdf-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 200px;
}

.pdf-preview:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.pdf-icon {
    font-size: 2rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 12px;
    background: rgba(255, 107, 107, 0.1);
    padding: 12px 20px;
    border-radius: 6px;
}

.pdf-name {
    color: #ffffff;
    font-size: 0.95rem;
    text-align: center;
    opacity: 0.9;
}

/* PDF查看器 */
.pdf-modal {
    background-color: rgba(0, 0, 0, 0.95);
}

.pdf-viewer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdf-controls {
    background: #2c2c2c;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.pdf-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pdf-close {
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.pdf-close:hover {
    color: #cccccc;
}

#pdf-frame {
    flex: 1;
    width: 100%;
    border: none;
}

/* 版权信息 */
.copyright {
    background: #000000;
    color: #666666;
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 80px;
}

.copyright p {
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.05rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.copyright-note {
    font-size: 1rem !important;
    font-weight: 500 !important;
    opacity: 0.85 !important;
    margin-bottom: 0 !important;
    color: #999999 !important;
    margin-top: 8px !important;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 5% 350px 1fr 350px;
        padding: 40px 60px;
    }
    
    .main-title {
        font-size: 2.4rem;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .portrait-container {
        width: 240px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-areas: 
            "header"
            "personal"
            "timeline";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        padding: 30px 20px;
        gap: 30px;
    }
    
    .header-section {
        text-align: center;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .personal-info {
        align-self: start;
        align-items: center;
        text-align: center;
    }
    
    .portrait-container {
        width: 200px;
        height: 250px;
    }
    
    .timeline-section {
        padding-left: 1.5rem;
    }
    
    .timeline-dot {
        left: -1.75rem;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
    
    .intro-simple {
        margin-left: 0;
        justify-content: center;
    }
    
    .work-card {
        flex-direction: column;
        gap: 30px;
    }
    
    .work-info {
        width: 100%;
        margin-left: 0;
        text-align: center;
    }
    
    .work-gallery {
        width: 100%;
        margin-left: 0;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
