* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e5e5e5;
    --hover-bg: #f8f8f8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #fafafa;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero Section */
.hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    text-align: center;
    background: #fafafa;
}

.hero-content {
    max-width: 600px;
}

.name {
    font-size: clamp(48px, 8vw, 72px);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.title {
    font-size: clamp(20px, 3vw, 28px);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 24px;
}

.hero-info {
    font-size: clamp(14px, 2vw, 16px);
    color: var(--text-secondary);
    margin-bottom: 0;
}

.divider {
    margin: 0 8px;
    color: var(--border-color);
}

.intro {
    font-size: clamp(14px, 2vw, 16px);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 48px;
}

.cta-button {
    background: var(--text-primary);
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.cta-button:active {
    transform: translateY(0);
}

/* Section Common Styles */
section {
    padding: 100px 20px;
    max-width: 1400px;
    margin: 0 auto;
    background: #fafafa;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 300;
    text-align: center;
    margin-bottom: 80px;
    letter-spacing: -0.02em;
}

/* Works Section */
.works {
    background: #fafafa;
    padding: 60px 20px 120px;
}

.works-grid {
    column-count: 3;
    column-gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .works-grid {
        column-count: 2;
    }
}

.work-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    break-inside: avoid;
    margin-bottom: 24px;
    display: inline-block;
    width: 100%;
}

.work-item.image {
    cursor: pointer;
}

.work-item.image:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.work-item.image:active {
    transform: translateY(-2px);
}

.work-item img,
.work-item video {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.work-item.video::after {
    display: none;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000; /* 黑色背景，视频加载前显示 */
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    background: #000; /* 视频背景色 */
}

.video-expand-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.video-expand-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.video-expand-btn:active {
    transform: scale(0.95);
}

/* Experience Section */
.experience-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 48px;
    max-width: 1000px;
    margin: 0 auto;
}

.experience-item h3 {
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 500;
    margin-bottom: 16px;
}

.experience-item p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: clamp(14px, 2vw, 16px);
}

/* Skills Section */
.skills {
    background: #fafafa;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.skill-card h3 {
    font-size: clamp(18px, 2.5vw, 20px);
    font-weight: 500;
    margin-bottom: 24px;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-list span {
    background: var(--hover-bg);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Education Section */
.education-content {
    max-width: 800px;
    margin: 0 auto;
}

.education-content h3 {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 500;
    margin-bottom: 8px;
}

.degree {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.date {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.education-details {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.education-details p {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: clamp(14px, 2vw, 16px);
}

/* Contact Section */
.contact {
    background: #fafafa;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 600px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.contact-item:active {
    transform: translateY(0);
}

.contact-label {
    font-weight: 500;
    font-size: clamp(14px, 2vw, 16px);
}

.contact-value {
    color: var(--text-secondary);
    font-size: clamp(14px, 2vw, 16px);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.lightbox-content video {
    display: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 16px;
    transition: background 0.3s ease;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close:active,
.lightbox-prev:active,
.lightbox-next:active {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Performance Optimizations */
img {
    content-visibility: auto;
}

video {
    content-visibility: auto;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    section {
        padding: 60px 20px;
    }

    .works {
        padding: 80px 20px;
    }

    .works-grid {
        column-count: 1;
        column-gap: 0;
    }

    .work-item {
        margin-bottom: 16px;
    }

    .section-title {
        margin-bottom: 48px;
    }

    .experience-content,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .skill-card {
        padding: 24px;
    }

    .contact-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 48px;
        height: 48px;
        font-size: 32px;
    }

    .lightbox-close {
        width: 48px;
        height: 48px;
        font-size: 32px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 20px 30px;
        min-height: 30vh;
    }

    .works {
        padding: 40px 20px 80px;
    }
}
