/* ========== 设计变量 ========== */
:root {
    --bg: rgb(15, 15, 15);
    --fg: #ffffff;
    --muted: #888888;
    --accent: #f5d000;
    --accent-dim: rgba(245, 208, 0, 0.15);
    --border: rgba(255, 255, 255, 0.12);
    --card-bg: #0a0a0a;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========== 顶部导航 ========== */
.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(12px);
    background: rgba(15, 15, 15, 0.6);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

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

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--fg);
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========== 首屏 ========== */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.hero-subtitle {
    font-size: 0.85rem;
    letter-spacing: 0.4em;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 6rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.accent {
    color: var(--accent);
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--muted);
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
}

.hero-hint {
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.2em;
    animation: hint-pulse 2s ease-in-out infinite;
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(4px); }
}

/* 背景模糊球 */
.hero-balls {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ball {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.ball-1 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: 10%;
    left: -10%;
    animation: ball-float 12s ease-in-out infinite;
}

.ball-2 {
    width: 300px;
    height: 300px;
    background: #0066ff;
    bottom: 25%;
    right: -5%;
    animation: ball-float 15s ease-in-out infinite reverse;
}

@keyframes ball-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 40px) scale(0.9); }
}

/* ========== 通用 section ========== */
.section {
    padding: 8rem 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 4rem;
    letter-spacing: 0.05em;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.section-title span {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.2em;
}

/* ========== 关于我 ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
}

.about-text strong {
    color: var(--accent);
}

.about-skills {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    transition: all 0.3s;
}

.skill-item:hover {
    border-color: var(--accent);
    transform: translateX(8px);
}

.skill-num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    font-family: monospace;
}

.skill-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.skill-item h3 {
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.skill-item .skill-sub {
    font-size: 0.85rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    margin: 0;
}

.skill-item .skill-desc {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
    letter-spacing: 0.02em;
    margin-top: 0.5rem;
}

/* ========== 时间轴 ========== */
.timeline-section {
    background: var(--bg);
}

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 1rem;
    bottom: 1rem;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--border) 100%);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 2rem 0;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s, transform 0.8s;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--bg), 0 0 20px var(--accent);
    margin-left: 0;
}

.timeline-year {
    font-weight: 900;
    line-height: 1;
    flex-shrink: 0;
    min-width: 5rem;
    letter-spacing: -0.02em;
}

.timeline-year.size-xl { font-size: 6rem; color: var(--accent); }
.timeline-year.size-l  { font-size: 4.5rem; }
.timeline-year.size-m  { font-size: 3.5rem; color: var(--fg); }
.timeline-year.size-s  { font-size: 2.5rem; color: var(--muted); }

.timeline-image {
    flex: 1;
    height: 160px;
    background: var(--card-bg);
    border: 1px dashed var(--border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s;
}

.timeline-image::before {
    content: "IMG";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
}

.timeline-item:hover .timeline-image {
    border-color: var(--accent);
}

.timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-width: none;
}

.timeline-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    min-width: 0;
    position: relative;
    padding-bottom: 6rem;
}

/* 弹窗内工具 logo 区 */
.lightbox-tools {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.lightbox-tools:empty {
    display: none;
}

.lightbox-tools .tool {
    position: relative;
    display: inline-flex;
    transition: transform 0.3s ease;
    z-index: 10;
}

.lightbox-tools .tool img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.lightbox-tools .tool:hover {
    transform: translateY(-4px);
}

.lightbox-tools .tool:hover img {
    opacity: 1;
}

.lightbox-tools .tool::after {
    content: attr(data-name);
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--fg);
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 9999;
}

.lightbox-tools .tool:hover::after {
    opacity: 1;
}

/* 同年份作品并排，尺寸随年份变化 */
.timeline-item[data-year="2026"] .timeline-card { width: 300px; }
.timeline-item[data-year="2025"] .timeline-card { width: 270px; }
.timeline-item[data-year="2024"] .timeline-card { width: 240px; }
.timeline-item[data-year="2023"] .timeline-card { width: 210px; }

.timeline-cover {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: transform 0.3s, border-color 0.3s;
}

.timeline-cover-vertical {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: transform 0.3s, border-color 0.3s;
}

.timeline-cover:hover,
.timeline-cover-vertical:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}

.timeline-gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5rem;
    width: 100%;
}

.timeline-text {
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

.timeline-text h3 {
    font-size: 1.25rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.timeline-text p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* ========== 联系 ========== */
.contact-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 80px 0 0 0;
    overflow: hidden;
    border: 1px solid var(--border);
}

.contact-info {
    padding: 4rem;
    background: var(--accent);
    color: var(--bg);
}

.contact-info h3 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.contact-info > p {
    margin-bottom: 3rem;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    opacity: 0.7;
}

.contact-item span:last-child {
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-anim {
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
}

.contact-anim::before, .contact-anim::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.contact-anim::before {
    width: 250px;
    height: 250px;
    background: var(--accent);
    top: 20%;
    left: 20%;
    animation: ball-float 10s ease-in-out infinite;
}

.contact-anim::after {
    width: 200px;
    height: 200px;
    background: #0066ff;
    bottom: 20%;
    right: 20%;
    animation: ball-float 12s ease-in-out infinite reverse;
}

/* ========== 图片放大弹窗 ========== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    backdrop-filter: blur(6px);
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    width: 960px;
    max-width: 90vw;
}

/* 固定横屏媒体区 */
.lightbox-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.lightbox-media img[hidden] {
    display: none !important;
}

/* 确保 hidden 属性真正隐藏（避免被上面的 display 规则覆盖） */
.lightbox-content [hidden] {
    display: none !important;
}

.lightbox-video-wrap {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.lightbox-video-wrap iframe,
.lightbox-video-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    background: #000;
}

/* 缩略图条 */
.lightbox-thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

.lightbox-thumbs:empty {
    display: none;
}

.lightbox-thumbs .thumb {
    width: 72px;
    height: 48px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.5;
    overflow: hidden;
    transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.lightbox-thumbs .thumb:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.lightbox-thumbs .thumb.active {
    opacity: 1;
    border-color: var(--accent);
}

.lightbox-thumbs .thumb img,
.lightbox-thumbs .thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.lightbox-media-desc {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
}

.lightbox-media-desc:empty {
    display: none;
}

.lightbox-detail {
    color: var(--fg);
    font-size: 1rem;
    line-height: 1.7;
    white-space: pre-line;
    text-indent: 2em;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.75rem;
    background: none;
    border: none;
    color: var(--fg);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}

.lightbox-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

/* ========== 页脚 ========== */
footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--muted);
    transition: color 0.3s;
}

footer a:hover {
    color: var(--accent);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .topnav {
        padding: 1rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .nav-links a {
        font-size: 0.75rem;
    }

    .section {
        padding: 5rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-item {
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .timeline-item::before {
        left: -1.79rem;
        width: 14px;
        height: 14px;
    }

    .timeline-year.size-xl { font-size: 3rem; }
    .timeline-year.size-l  { font-size: 2.5rem; }
    .timeline-year.size-m  { font-size: 2rem; }
    .timeline-year.size-s  { font-size: 1.5rem; }

    .timeline-image {
        height: 100px;
    }

    .contact-box {
        grid-template-columns: 1fr;
        border-radius: 40px 0 0 0;
    }

    .contact-info {
        padding: 2.5rem;
    }

    .contact-info h3 {
        font-size: 2rem;
    }

    .contact-anim {
        height: 200px;
    }

    .ball-1 { width: 250px; height: 250px; }
    .ball-2 { width: 200px; height: 200px; }
}
