@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&display=swap');
@import url('https://fonts.cdnfonts.com/css/caughe');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: white;
    font-family: 'Microsoft YaHei', sans-serif;
    overflow-x: hidden;
}

.header {
    text-align: center;
    padding: 40px 0 20px 0;
}

.name {
    font-family: 'Caughe', serif;
    font-size: 26pt;
    font-weight: 600;
    letter-spacing: 0.2em;
    /* text-transform: uppercase; */
    margin-bottom: 30px;
    cursor: pointer;
    text-decoration: none;
    color: black;
    display: inline-block;
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.nav-column {
    display: flex;
    gap: 40px;
}

.nav a {
    font-family: 'Microsoft YaHei Light', sans-serif;
    font-size: 12pt;
    font-weight: 300;
    color: black;
    text-decoration: none;
    transition: opacity 0.3s ease;
    line-height: 1.1;
    display: inline-block;
}

.nav a:hover {
    opacity: 0.5;
}

.nav a.active {
    font-weight: bold;
}

.nav-link--stack {
    display: inline;
    line-height: 1.1;
}

.nav-link--stack span {
    display: inline;
}

/* Portfolio Grid */
.gallery {
    column-count: 4;
    column-gap: 55px;
    padding: 0;
    margin-bottom: 80px;
}

.gallery-item {
    width: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    break-inside: avoid;
    margin-bottom: 55px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.gallery-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.8s ease;
}

.gallery-item:hover::after {
    opacity: 0.6;
}

/* Polaroids Grid */
.polaroids-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 55px;
    padding: 0;
    margin-bottom: 60px;
}

.polaroids-grid .gallery-item {
    width: 100%;
    opacity: 1;
    transform: none;
    margin-bottom: 20px;
}

/* Measurements */
.measurements-container {
    max-width: 800px;
    margin: 0 auto 80px auto;
    padding: 40px;
    border: 1px solid #ddd;
    position: relative;
}

.unit-switch {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    background-color: #e0e0e0;
    border-radius: 20px;
    padding: 5px;
    cursor: pointer;
    width: 125px;
    height: 35px;
}

.switch-slider {
    position: absolute;
    background-color: white;
    border-radius: 15px;
    width: 55px;
    height: 25px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-slider.cm {
    transform: translateX(60px);
}

.unit-label {
    flex: 1;
    text-align: center;
    font-size: 11px;
    z-index: 1;
    font-weight: 500;
}

.measurements-text {
    font-family: 'Nirmala UI', sans-serif;
    font-size: 12pt;
    font-weight: 300;
    line-height: 1.8;
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(4, auto);
    column-gap: 40px;
    row-gap: 20px;
    justify-content: center;
    align-content: center;
    text-align: left;
    width: fit-content;
    margin: 0 auto;
}

.measurements-text strong {
    font-weight: 600;
}

/* Contact Page */
.contact-container {
    display: flex;
    height: calc(100vh - 250px);
    margin-bottom: 80px;
}

.contact-image {
    width: 50%;
    overflow: hidden;
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-info {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.contact-info h2 {
    font-family: 'Microsoft YaHei', sans-serif;
    font-size: 16pt;
    font-weight: bold;
    margin-bottom: 30px;
}

.contact-info p {
    font-family: 'Microsoft YaHei Light', sans-serif;
    font-size: 12pt;
    margin-bottom: 15px;
}

.contact-info a {
    color: black;
    text-decoration: none;
    transition: opacity 0.5s ease;
}

.contact-info a:hover {
    opacity: 0.5;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 80px;
}

.footer-name {
    font-family: 'Libre Baskerville', serif;
    font-size: 13pt;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-icons a {
    color: black;
    font-size: 20px;
    transition: opacity 0.3s ease;
}

.social-icons a:hover {
    opacity: 0.5;
}

.copyright {
    font-size: 8pt;
    color: #666;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lightbox-content::-webkit-scrollbar {
    display: none;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    cursor: zoom-in;
}

.lightbox-content img.zoomed {
    cursor: zoom-out;
    max-width: none;
    max-height: none;
    width: auto;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Placeholder for images */
.placeholder {
    background: linear-gradient(135deg, #f5f5f5 25%, #e0e0e0 25%, #e0e0e0 50%, #f5f5f5 50%, #f5f5f5 75%, #e0e0e0 75%);
    background-size: 40px 40px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* Vary placeholder sizes to mimic mixed portrait/landscape */
.gallery .gallery-item:nth-child(6n + 1) .placeholder {
    min-height: 360px;
}

.gallery .gallery-item:nth-child(6n + 2) .placeholder {
    min-height: 280px;
}

.gallery .gallery-item:nth-child(6n + 3) .placeholder {
    min-height: 420px;
}

.gallery .gallery-item:nth-child(6n + 4) .placeholder {
    min-height: 320px;
}

.gallery .gallery-item:nth-child(6n + 5) .placeholder {
    min-height: 460px;
}

.gallery .gallery-item:nth-child(6n + 6) .placeholder {
    min-height: 300px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .header {
        padding: 20px 15px;
    }

    .name {
        font-size: 20pt;
        margin-bottom: 20px;
    }

    .nav {
        flex-direction: row;
        gap: 20px;
        align-items: center;
        flex-wrap: nowrap;
        margin-bottom: 40px;
    }

    .nav-column {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .nav-link--stack {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-link--stack span {
        display: block;
    }

    .nav a {
        font-size: 11pt;
    }

    /* Portfolio Grid - Two Columns */
    .gallery {
        column-count: 2;
        column-gap: 40px;
        padding: 0;
        margin-bottom: 60px;
    }

    .gallery-item {
        margin-bottom: 40px;
    }

    /* Polaroids Grid - Single Column */
    .polaroids-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0;
        margin-bottom: 40px;
    }

    .polaroids-grid .gallery-item {
        margin-bottom: 15px;
    }

    /* Measurements */
    .measurements-container {
        margin: 0 15px 60px 15px;
        padding: 50px 20px;
    }

    .measurements-text {
        font-size: 9pt;
        line-height: 1.6;
        column-gap: 50px;
        row-gap: 15px;
        text-align: left;
        width: fit-content;
        margin: 0 auto;
        grid-auto-flow: row;
        grid-template-columns: repeat(2, auto);
    }

    .unit-switch {
        top: 10px;
        right: 10px;
        width: 105px;
        height: 30px;
    }

    .switch-slider {
        width: 45px;
        height: 20px;
    }

    .switch-slider.cm {
        transform: translateX(50px);
    }

    .unit-label {
        font-size: 10px;
    }

    /* Contact Page - Stack Vertically */
    .contact-container {
        flex-direction: column;
        height: auto;
        margin-bottom: 60px;
    }

    .contact-image,
    .contact-info {
        width: 100%;
    }

    .contact-image {
        min-height: 400px;
    }

    .contact-info {
        padding: 40px 20px;
    }

    .contact-info h2 {
        font-size: 14pt;
    }

    .contact-info p {
        font-size: 11pt;
    }

    /* Footer */
    .footer {
        padding: 30px 15px;
        margin-top: 60px;
    }

    .footer-name {
        font-size: 11pt;
    }

    .social-icons a {
        font-size: 18px;
    }

    /* Lightbox */
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }

}

