/* ==========================================================================
   Ye Zhu — site stylesheet
   Minimal, image-forward gallery layout (recreated from ye-zhu.info)
   ========================================================================== */

:root {
    --ink: #171512;
    --ink-soft: #55504a;
    --paper: #ffffff;
    --line: #e4e0d9;
    --line-strong: #171512;
    --accent: #9a3324; /* muted vermilion, used sparingly */
    --nav-h: 84px;
    --measure: 68ch;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family:
        "Neue Montreal", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    max-height: 100%;

    display: block;
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------------------------------- layout shell ------------------------ */

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 640px) {
    .wrap {
        padding: 0 22px;
    }
}

/* ---------------------------------- header / nav ------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(140%) blur(6px);
    border-bottom: 1px solid var(--line);
    transition:
        transform 0.32s var(--ease),
        box-shadow 0.32s var(--ease);
}

.site-header .wrap {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: height 0.28s var(--ease);
}

.site-header.is-scrolled .wrap {
    height: 58px;
}
.site-header.is-scrolled {
    box-shadow: 0 1px 0 rgba(23, 21, 18, 0.06);
}
.site-header.is-scrolled .brand {
    font-size: 17px;
    transition: font-size 0.28s var(--ease);
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

.brand {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-indent: 0.32em; /* balance the trailing tracking */
}

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

/* ---------------------------------- scroll reveal ------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    transition:
        opacity 0.9s var(--ease),
        transform 0.9s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    height: 1px;
    background: var(--ink);
    transition:
        transform 0.25s var(--ease),
        opacity 0.25s var(--ease),
        top 0.25s var(--ease);
}
.nav-toggle span {
    top: 19px;
}
.nav-toggle span::before {
    top: -7px;
}
.nav-toggle span::after {
    top: 7px;
}

.nav-toggle[aria-expanded="true"] span {
    background: transparent;
}
.nav-toggle[aria-expanded="true"] span::before {
    transform: rotate(45deg);
    top: 0;
}
.nav-toggle[aria-expanded="true"] span::after {
    transform: rotate(-45deg);
    top: 0;
}

.site-nav ul {
    display: flex;
    gap: 34px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 6px 1px;
    border-bottom: 1px solid transparent;
    transition:
        border-color 0.2s var(--ease),
        color 0.2s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    border-bottom-color: var(--ink);
}

@media (max-width: 780px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        inset: var(--nav-h) 0 0 0;
        background: transparent;
        pointer-events: none;
        opacity: 0;
        transform: translateY(-8px);
        transition:
            opacity 0.22s var(--ease),
            transform 0.22s var(--ease);
    }

    .site-nav.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Floating white semi-transparent card around the menu links */
    .site-nav ul {
        flex-direction: column;
        gap: 0;
        margin: 16px 20px;
        padding: 10px 24px;
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }

    .site-nav a {
        display: block;
        padding: 16px 0;
        border-bottom: 1px solid var(--line);
        font-size: 14px;
        color: var(--ink);
    }

    .site-nav li:last-child a {
        border-bottom: none;
    }
}

/* ---------------------------------- footer -------------------------------- */

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding: 46px 0;
    text-align: center;
}

.site-footer .copyright {
    font-size: 12px;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
    margin: 0 0 26px;
}

.site-footer .site-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
}

/* ---------------------------------- main / generic sections -------------- */

main {
    flex: 1;
}

.page-head {
    padding: 56px 0 8px;
}

.page-head h1 {
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0;
}

.section {
    padding: 64px 0;
    border-bottom: 1px solid var(--line);
}

.section:last-of-type {
    border-bottom: none;
}

.section-eyebrow {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 10px;
}

.section h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 600;
    margin: 0 0 6px;
    letter-spacing: 0.01em;
}

.section .venue {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0 0 30px;
}

.section .body-text {
    max-width: var(--measure);
    font-size: 16.5px;
    color: #2c2924;
}

.section blockquote {
    margin: 0 0 26px;
    max-width: var(--measure);
    font-size: 17px;
    line-height: 1.7;
    font-style: italic;
    color: #2c2924;
    border-left: 2px solid var(--line-strong);
    padding-left: 20px;
}

.press-links {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.press-links a {
    font-size: 14.5px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1px;
}

.press-links a:hover {
    border-color: var(--ink);
}

.press-links .by {
    color: var(--ink-soft);
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
    font-size: 13px;
    color: var(--ink-soft);
}

.badge-row img {
    height: 16px;
    width: auto;
}

/* ---------------------------------- hero (home) --------------------------- */

.hero {
    padding: 0 0 0;
}

.hero-parallax {
    position: relative;
    overflow: hidden;
    height: 52vh;
    min-height: 360px;
    max-height: 760px;
}

.hero-parallax img {
    position: absolute;
    top: -12%;
    left: 0;
    width: 100%;
    height: 124%;
    object-fit: cover;
    will-change: transform;
    transform: translateY(0);
}

@media (max-width: 640px) {
    .hero-parallax {
        height: 46vh;
        min-height: 260px;
    }
}

/* ---------------------------------- carousel ------------------------------ */

.carousel {
    position: relative;
    margin-bottom: 22px;
}

.carousel-viewport {
    overflow: hidden;
    background: #ffffff;
    border-radius: 2px;
    min-height: 300px;
}

@media (max-width: 640px) {
    .carousel-viewport {
        min-height: 200px;
    }
}

.carousel-track {
    display: flex;
    transition: transform 0.5s var(--ease);
}

.carousel-track img {
    width: 100%;
    flex: 0 0 100%;
    object-fit: cover;
    max-height: var(--slide-max-height, 700px);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(23, 21, 18, 0.25);
    background: rgba(251, 250, 248, 0.85);
    color: var(--ink);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.2s var(--ease),
        transform 0.2s var(--ease);
}

.carousel-nav:hover {
    background: var(--paper);
    transform: translateY(-50%) scale(1.05);
}
.carousel-nav.prev {
    left: 14px;
}
.carousel-nav.next {
    right: 14px;
}

.carousel-counter {
    position: absolute;
    right: 14px;
    bottom: 12px;
    font-size: 12px;
    letter-spacing: 0.06em;
    background: rgba(23, 21, 18, 0.55);
    color: #fff;
    padding: 3px 9px;
    border-radius: 20px;
}

.carousel[data-count="1"] .carousel-nav,
.carousel[data-count="1"] .carousel-counter {
    display: none;
}

.carousel-caption {
    margin-top: 16px;
}

.carousel-caption .title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
}

.carousel-caption .meta {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0;
    max-width: var(--measure);
}

/* ---- Vertical carousel (slides move up/down instead of left/right). Only
   the arrows' position and the track's axis change — arrows stay put on
   the left/right sides, same as the default horizontal carousel. ---- */
.carousel--vertical .carousel-viewport {
    height: 100%;
}
.carousel--vertical .carousel-track {
    flex-direction: column;
    height: 100%;
}
.carousel--vertical .carousel-track img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}

/* ---------------------------------- paintings grid ------------------------ */

.painting-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 40px 0 20px;
}

/* A "row" holds 2+ paintings placed side by side (see window.PAINTINGS in
   painting.html — wrap entries in [ ] to pair them up). Wraps to a stacked
   column automatically on narrow screens. */
.painting-row {
    display: flex;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: flex-start;
}

.painting-row .painting-card {
    max-width: none;
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 780px) {
    .painting-row {
        flex-direction: column;
        gap: 0;
    }
}

.painting-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 0;
    width: 100%;
}

.painting-card:first-child {
    padding-top: 10px;
}

.painting-card .carousel-viewport {
    position: relative;
}

.painting-card .carousel-nav,
.painting-card .carousel-counter {
    display: none;
}

.painting-card .carousel-track img {
    cursor: zoom-in;
    max-height: 720px;
    width: 100%;
    object-fit: contain;
    background: #ffffff;
}

/* Caption is hidden by default and springs up from the bottom of the image
   on hover / keyboard focus — white text over a dark translucent scrim. */
.painting-card .carousel-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 20px 24px;
    background: rgba(15, 13, 11, 0.68);
    transform: translateY(100%);
    opacity: 0;
    transition:
        transform 0.32s var(--ease),
        opacity 0.32s var(--ease);
    pointer-events: none;
}

.painting-card .carousel:hover .carousel-caption,
.painting-card .carousel:focus-within .carousel-caption,
.painting-card .carousel.is-caption-visible .carousel-caption {
    transform: translateY(0);
    opacity: 1;
}

.painting-card .carousel-caption .title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
}

.painting-card .carousel-caption .meta {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13.5px;
    margin: 0;
    max-width: none;
}

.exhibition-note {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    font-size: 14.5px;
    color: var(--ink-soft);
    font-style: italic;
    padding: 0 0 40px;
}

@media (max-width: 640px) {
    .painting-card {
        padding: 22px 0;
    }
}

/* ---- Split layout: image on the left, everything else on the right ---- */
.exhibit-section {
    display: grid;
    grid-template-columns: minmax(280px, 580px) 1fr;
    gap: 56px;
    align-items: start;
}
.exhibit-media {
    width: 100%;
}
.exhibit-media .carousel-viewport {
    height: var(--slide-max-height, 640px);
    min-height: 0;
}

.exhibit-media .carousel-track img {
    height: 100%;
    max-height: none;
    object-fit: cover;
}

.exhibit-content .eyebrow-title {
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 14px;
}
.exhibit-content .venue-block {
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 34px;
    line-height: 1.6;
}
.exhibit-content .venue-block span {
    display: block;
}

@media (max-width: 900px) {
    .exhibit-section {
        grid-template-columns: 1fr;
    }
    .exhibit-media .carousel-viewport {
        height: 420px;
    }
}

/* ---------------------------------- 3 img row ------------------------------ */

.three-image-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}

.three-image-row img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------------------------------- lightbox ------------------------------ */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 9, 8, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 40px;
}

.lightbox.is-open {
    display: flex;
}

.lightbox-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 100%;
    max-height: 100%;
}

.lightbox-stage img {
    max-width: 88vw;
    max-height: 76vh;
    margin: 0 auto;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lightbox-close {
    top: 24px;
    right: 24px;
}
.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}
.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-caption {
    color: #f1efe9;
    font-size: 13.5px;
    letter-spacing: 0.02em;
    text-align: center;
    max-width: 70vw;
}

/* ---------------------------------- blur-up image loading ------------------ */
/* Images render blurred while downloading, then sharpen once loaded — mirrors
   the progressive-load effect on the live site. */

img.img-blur {
    filter: blur(10px);
    transform: scale(1.015);
    transition:
        filter 0.45s var(--ease),
        transform 0.45s var(--ease);
}

img.img-blur.is-loaded {
    filter: blur(0);
    transform: scale(1);
}

/* ---------------------------------- about page ----------------------------- */

.about-hero {
    padding: 56px 0 10px;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    align-items: start;
}

@media (max-width: 860px) {
    .about-hero {
        grid-template-columns: 1fr;
    }
}

.about-hero .degrees {
    font-size: 13.5px;
    color: var(--ink-soft);
    margin: 0 0 26px;
    letter-spacing: 0.02em;
}

.about-hero p {
    max-width: var(--measure);
    margin: 0 0 20px;
    font-size: 16px;
}

.about-photo .carousel-caption {
    text-align: center;
}

.social-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin: 30px 0 6px;
}

.social-row img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.catalogue-block {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 36px;
    align-items: center;
    padding: 54px 0;
    border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
    .catalogue-block {
        grid-template-columns: 1fr;
    }
}

.catalogue-block img {
    border: 1px solid var(--line);
}

.catalogue-block h2 {
    font-size: 20px;
    margin: 0 0 10px;
}
.catalogue-block p {
    color: var(--ink-soft);
    margin: 0 0 14px;
    max-width: 46ch;
}
.catalogue-block a.link {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------------------------------- CV page --------------------------------- */

.cv-degrees {
    font-size: 15px;
    margin: 0 0 8px;
}

.cv-section {
    padding: 46px 0;
    border-top: 1px solid var(--line);
}
.cv-section:first-of-type {
    border-top: none;
}

.cv-section h2 {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin: 0 0 26px;
}

.cv-entry {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 18px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.cv-entry:first-child {
    border-top: none;
}

.cv-entry .year {
    font-size: 13.5px;
    color: var(--ink-soft);
    padding-top: 2px;
}

.cv-entry .details a {
    border-bottom: 1px solid var(--line);
}
.cv-entry .details a:hover {
    border-color: var(--ink);
}

.cv-entry .work {
    font-size: 15.5px;
    font-weight: 600;
    margin: 0 0 3px;
}
.cv-entry .venue-line {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0;
}
.cv-entry .venue-line + .venue-line {
    margin-top: 1px;
}

.cv-entry.press .work {
    font-weight: 500;
}

@media (max-width: 560px) {
    .cv-entry {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .cv-entry .year {
        font-weight: 600;
        color: var(--ink);
    }
}

/* ---------------------------------- contact page ---------------------------- */

.contact-wrap {
    padding: 60px 0 90px;
    display: grid;
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
}

.form-field label {
    font-size: 12.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.form-field input,
.form-field textarea {
    border: none;
    border-bottom: 1px solid var(--line-strong);
    background: transparent;
    font: inherit;
    font-size: 15.5px;
    padding: 8px 2px;
    color: var(--ink);
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.form-field .error {
    font-size: 12.5px;
    color: var(--accent);
    min-height: 16px;
}

.btn-send {
    align-self: flex-start;
    margin-top: 10px;
    background: var(--ink);
    color: var(--paper);
    border: none;
    padding: 13px 34px;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition:
        background 0.2s var(--ease),
        transform 0.15s var(--ease);
}

.btn-send:hover {
    background: var(--accent);
}
.btn-send:active {
    transform: scale(0.98);
}

.form-status {
    margin-top: 20px;
    font-size: 14.5px;
    padding: 12px 0;
    display: none;
}

.form-status.is-visible {
    display: block;
}

/* ---------------------------------- projects page --------------------------- */

.project-entry {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 40px;
    padding: 50px 0;
    border-top: 1px solid var(--line);
    align-items: start;
}

.project-entry:first-of-type {
    border-top: none;
}

@media (max-width: 780px) {
    .project-entry {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.project-entry img {
    border-radius: 2px;
}

.project-entry .thumb-link {
    display: block;
    overflow: hidden;
    border-radius: 2px;
}
.project-entry .thumb-link img {
    transition: transform 0.5s var(--ease);
}
.project-entry .thumb-link:hover img {
    transform: scale(1.04);
}

.project-entry h2 {
    font-size: 19px;
    margin: 0 0 10px;
}

.project-entry h2 a {
    border-bottom: 1px solid var(--ink);
}

.project-entry p {
    color: #2c2924;
    font-size: 15.5px;
    margin: 0 0 10px;
}

.project-entry .mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.project-entry .verse {
    font-style: italic;
    color: var(--ink-soft);
}

.project-media-carousel .carousel-nav,
.project-media-carousel .carousel-counter {
    display: none;
}
.project-media-carousel .carousel-track img {
    cursor: pointer;
    border-radius: 2px;
}
.project-media-carousel .carousel {
    margin-bottom: 0;
}
.project-media-carousel .carousel-viewport {
    min-height: 0;
}
