/* ============================================
   Dolly Yiping Pan - Artist Portfolio
   Clean Gallery Style (PDF-inspired)
   ============================================ */

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;
    --accent: #c9a96e;
    --border-color: #222222;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ============================================
   Header / Navigation (Fixed Top)
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.98);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.main-nav {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    padding: 30px 40px;
    flex-direction: column;
    gap: 25px;
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav-link {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--text-primary);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    padding: 120px 40px 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('images/artwork_09.png') center/cover no-repeat;
    opacity: 0.08;
    filter: grayscale(100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    margin-bottom: 25px;
    line-height: 1.2;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 10px;
    letter-spacing: 0.08em;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-bio {
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 60px;
    animation: fadeInUp 1s ease 0.6s both;
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: fadeInUp 1s ease 0.8s both, bounce 2s ease-in-out infinite 1.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Hero Monsters (首页小怪物装饰) */
.hero-monster {
    position: absolute;
    z-index: 2;
    opacity: 0.2;
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
    transition: opacity 0.4s ease;
}

.hero-section:hover .hero-monster {
    opacity: 0.3;
}

.hero-monster-left {
    bottom: 8%;
    left: 5%;
    width: 150px;
    height: auto;
    animation: floatLeft 8s ease-in-out infinite;
}

.hero-monster-right {
    top: 15%;
    right: 5%;
    width: 220px;
    height: auto;
    animation: floatRight 9s ease-in-out infinite 1s;
}

@keyframes floatLeft {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-10px, -15px) rotate(2deg); }
    66% { transform: translate(5px, -8px) rotate(-1deg); }
}

@keyframes floatRight {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(12px, -12px) rotate(-2deg); }
    66% { transform: translate(-8px, -6px) rotate(1deg); }
}

/* About Section Monster Feature */
.monster-feature {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin: 50px 0;
    padding: 40px;
    background: rgba(201, 169, 110, 0.03);
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 8px;
}

.monster-feature img {
    width: 150px;
    height: auto;
    filter: grayscale(20%);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.monster-feature img:hover {
    transform: scale(1.08) rotate(3deg);
    filter: grayscale(0%);
}

.monster-text {
    max-width: 500px;
}

.monster-text h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 400;
}

.monster-text p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ============================================
   Works Section (Free Gallery Style - 自由画廊)
   ============================================ */
.works-section {
    padding: 120px 40px 100px;
    max-width: 1600px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 60px;
    animation: fadeInUp 1s ease 0.6s both;
}

/* 自由画廊布局 - 瀑布流（Masonry）*/
.works-gallery {
    column-count: 4;
    column-gap: 30px;
}

/* 每个作品项 - 带随机旋转 */
.artwork-item {
    opacity: 0;
    transform: translateY(30px) rotate(calc(var(--rot, 0) * 1deg));
    transition: opacity 0.6s ease, transform 0.6s ease;
    break-inside: avoid;
    margin-bottom: 30px;
    position: relative;
}

.artwork-item.visible {
    opacity: 1;
    transform: translateY(0) rotate(calc(var(--rot, 0) * 1deg));
}

/* 悬停效果 - 浮起 + 去旋转 + 放大 */
.artwork-item:hover {
    transform: translateY(-10px) rotate(0deg) scale(1.03);
    z-index: 10;
}

.artwork-image {
    position: relative;
    overflow: hidden;
    background: var(--bg-tertiary);
    border-radius: 3px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.35);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.artwork-item:hover .artwork-image {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.artwork-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.artwork-image:hover img {
    transform: scale(1.06);
}

.artwork-info {
    padding: 12px 6px 0;
}

.artwork-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 4px;
    letter-spacing: 0.03em;
}

.artwork-title-en {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 12px;
    font-weight: 300;
}

.artwork-details {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 8px;
}

.artwork-meta {
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Year Divider - 网格布局版本 */
.year-divider {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0;
    position: relative;
}

.year-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

.year-divider span {
    position: relative;
    background: var(--bg-primary);
    padding: 0 30px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.15em;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    padding: 120px 40px 100px;
    background: var(--bg-secondary);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    margin-top: 60px;
}

.heading {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 25px;
    letter-spacing: 0.05em;
}

.artist-statement p,
.concept p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 20px;
    text-align: justify;
}

.statement-en {
    font-style: italic !important;
    opacity: 0.75;
    font-size: 0.9rem !important;
}

.concept {
    margin-top: 50px;
}

/* Sidebar */
.sidebar-block {
    margin-bottom: 40px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-block:last-child {
    border-bottom: none;
}

.sidebar-heading {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
    padding-left: 18px;
    position: relative;
}

.sidebar-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.sidebar-list li strong {
    color: var(--text-primary);
    font-weight: 500;
}

.sidebar-list li em {
    font-style: italic;
    color: var(--text-muted);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    padding: 120px 40px 100px;
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-top: 60px;
}

/* Contact信息居中布局（无表单版本） */
.contact-info-centered {
    max-width: 600px;
    margin: 60px auto 0;
    text-align: center;
}

.contact-info-centered .contact-intro {
    margin-bottom: 40px;
}

.contact-info-centered .contact-details {
    display: inline-block;
    text-align: left;
    margin-bottom: 30px;
}

.contact-info-centered .social-links {
    justify-content: center;
}

.contact-intro {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    margin-bottom: 25px;
}

.label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.value {
    font-size: 1rem;
    color: var(--text-primary);
}

a.value {
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 25px;
}

.social-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.05em;
    position: relative;
    transition: color 0.3s ease;
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.social-link:hover {
    color: var(--text-primary);
}

.social-link:hover::after {
    width: 100%;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.form-input:focus {
    border-color: var(--accent);
    background: rgba(201, 169, 110, 0.05);
}

textarea.form-input {
    resize: vertical;
    min-height: 130px;
}

.submit-btn {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #d4b87d;
    transform: translateY(-2px);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

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

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.lightbox-prev:active,
.lightbox-next:active {
    transform: translateY(-50%) scale(0.92);
    background: rgba(201, 169, 110, 0.2);
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border: 1px solid var(--border-color);
    opacity: 0; /* 初始隐藏，由JS控制淡入 */
    transform: scale(0.95); /* 初始轻微缩小 */
}

.lightbox-caption {
    margin-top: 25px;
    text-align: center;
    color: var(--text-primary);
    opacity: 0; /* 初始隐藏 */
    transform: translateY(15px); /* 初始向下偏移 */
}

.lightbox-caption h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.lightbox-caption p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .works-gallery {
        column-count: 3;
        column-gap: 25px;
    }

    .artwork-item {
        margin-bottom: 25px;
    }

    /* 移动端也显示小怪物，适当缩小但保持可见 */
    .hero-monster-left {
        width: 120px;
        bottom: 5%;
        left: 3%;
    }

    .hero-monster-right {
        width: 150px;
        top: 10%;
        right: 3%;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .main-nav {
        display: none;
    }

    .header-content {
        padding: 15px 25px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .works-section,
    .about-section,
    .contact-section {
        padding: 100px 25px 80px;
    }

    .works-gallery {
        column-count: 2;
        column-gap: 20px;
    }

    .artwork-item {
        margin-bottom: 20px;
    }

    .artwork-title {
        font-size: 1.15rem;
    }

    .monster-feature {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .lightbox {
        padding: 30px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .footer {
        padding: 30px 25px;
    }

    /* 768px以下屏幕的小怪物适配 */
    .hero-monster-left {
        width: 100px;
        bottom: 3%;
        left: 2%;
    }

    .hero-monster-right {
        width: 130px;
        top: 8%;
        right: 2%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 0.06em;
    }

    .works-gallery {
        column-count: 1;
        column-gap: 0;
    }

    .artwork-item {
        margin-bottom: 35px;
    }

    .year-divider span {
        font-size: 1.3rem;
    }

    .monster-feature img {
        width: 120px;
    }

    /* 480px以下屏幕的小怪物适配（超小屏） */
    .hero-monster-left {
        width: 90px;
        bottom: 2%;
        left: 2%;
    }

    .hero-monster-right {
        width: 110px;
        top: 5%;
        right: 2%;
    }
}

/* ============================================
   Scrollbar & Selection
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}
