/* =========================
   RESET
   ========================= */

* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;
}


body {
    background: #ffffff;
    color: #111111;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 13px;
}


/* =========================
   LAYOUT
   ========================= */

.site {
    width: 100%;
    height: 100vh;

    display: grid;

    grid-template-columns: 280px 1fr;
}


/* =========================
   SIDEBAR
   ========================= */

.sidebar {
    position: relative;

    width: 280px;
    height: 100vh;

    padding: 25px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    border-right: 1px solid #e8e8e8;

    background: #ffffff;

    z-index: 20;
}


/* =========================
   NAME
   ========================= */

.name {
    display: inline-block;

    color: #111111;

    text-decoration: none;

    font-size: 13px;

    letter-spacing: 0.08em;
}


.description {
    margin: 25px 0 0;

    color: #777777;

    line-height: 1.5;
}


/* =========================
   COUNTRIES
   ========================= */

.projects {
    display: flex;

    flex-direction: column;

    gap: 22px;
}


.country {
    display: flex;

    flex-direction: column;
}


.country-title {
    width: 100%;

    padding: 0 0 7px;

    border: none;

    background: transparent;

    color: #111111;

    font-family: inherit;

    font-size: 13px;

    text-align: left;

    letter-spacing: 0.06em;

    cursor: pointer;
}


.country-title::after {
    content: "−";

    float: right;

    color: #999999;
}


.country-title.closed::after {
    content: "+";
}


/* Standalone top-level project */

.country-title.standalone::after {
    content: "";
}


/* =========================
   COUNTRY PROJECTS
   ========================= */

.country-projects {
    display: flex;

    flex-direction: column;

    gap: 3px;

    overflow: hidden;

    max-height: 300px;

    transition:
        max-height 0.3s ease,
        opacity 0.3s ease;
}


.country-projects.closed {
    max-height: 0;

    opacity: 0;
}


/* =========================
   PROJECT
   ========================= */

.project {
    width: 100%;

    padding: 4px 0 4px 10px;

    border: none;

    background: transparent;

    color: #999999;

    font-family: inherit;

    font-size: 13px;

    text-align: left;

    cursor: pointer;

    transition:
        color 0.2s ease;
}


.project:hover {
    color: #111111;
}


.project.active {
    color: #111111;
}


/* =========================
   ABOUT BUTTON
   ========================= */

#about-button {
    padding: 0;

    border: none;

    background: transparent;

    color: #777777;

    font-family: inherit;

    font-size: 13px;

    cursor: pointer;
}


#about-button:hover {
    color: #111111;
}


/* =========================
   GALLERY
   ========================= */

.gallery {
    position: relative;

    width: 100%;
    height: 100vh;

    overflow: hidden;

    background: #f5f5f5;
}


/* =========================
   HEADER
   ========================= */

.gallery-header {
    position: absolute;

    top: 22px;
    left: 30px;
    right: 30px;

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    z-index: 10;

    pointer-events: none;
}


.project-name {
    color: #111111;
}


.project-description {
    max-width: 500px;

    margin-top: 7px;

    color: #777777;

    font-size: 12px;

    line-height: 1.45;
}


#counter {
    color: #777777;

    white-space: nowrap;
}


/* =========================
   SLIDES
   ========================= */

.slides {
    position: relative;

    width: 100%;
    height: 100%;
}


.slide {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 100px 70px 50px;

    opacity: 0;

    visibility: hidden;

    transition:
        opacity 0.8s ease;

    pointer-events: none;
}


.slide.active {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


.slide img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    user-select: none;

    -webkit-user-drag: none;
}


/* =========================
   ARROWS
   ========================= */

.arrow {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 100px;
    height: 140px;

    padding: 0;

    border: none;

    background: transparent;

    color: #111111;

    font-size: 18px;

    cursor: pointer;

    z-index: 15;

    opacity: 0;

    transition:
        opacity 0.2s ease;
}


.gallery:hover .arrow {
    opacity: 1;
}


.arrow-left {
    left: 0;

    padding-left: 30px;

    text-align: left;
}


.arrow-right {
    right: 0;

    padding-right: 30px;

    text-align: right;
}


.arrow:hover {
    opacity: 0.45;
}


/* =========================
   ABOUT
   ========================= */

.about {
    position: fixed;

    top: 0;
    right: 0;

    width: calc(100% - 280px);
    height: 100vh;

    display: none;

    padding: 25px 30px;

    background: #ffffff;

    z-index: 100;
}


.about.open {
    display: block;
}


.about-close {
    position: absolute;

    top: 17px;
    right: 28px;

    width: 30px;
    height: 30px;

    padding: 0;

    border: none;

    background: transparent;

    color: #111111;

    font-size: 25px;

    font-weight: 300;

    cursor: pointer;
}


.about-close:hover {
    opacity: 0.5;
}


.about-content {
    max-width: 600px;

    margin-top: 20vh;
    margin-left: 10%;
}


.about-content h2 {
    margin: 0 0 40px;

    font-size: 13px;

    font-weight: 400;

    text-transform: uppercase;

    letter-spacing: 0.08em;
}


.about-content p {
    max-width: 520px;

    margin: 0 0 25px;

    font-size: 20px;

    line-height: 1.5;
}


/* =========================
   CONTACT
   ========================= */

.contact {
    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-top: 50px;
}


.contact a {
    color: #111111;

    text-decoration: none;

    font-size: 14px;
}


.contact a:hover {
    opacity: 0.5;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {

    html,
    body {

        margin: 0;
        padding: 0;

        width: 100%;
        height: auto;

        min-height: 100%;

        overflow-x: hidden;
        overflow-y: auto;

        -webkit-overflow-scrolling: touch;

    }


    .site {

        display: block;

        width: 100%;

        height: auto;

        min-height: 100vh;

        overflow: visible;

    }


    .sidebar {

        width: 100%;

        height: auto;

        padding: 18px;

        border-right: none;

        border-bottom: 1px solid #e8e8e8;

    }


    .description {

        margin-top: 15px;

        margin-bottom: 25px;

    }


    .projects {

        gap: 15px;

        margin-bottom: 25px;

    }


    .gallery {

        width: 100%;

        height: 100vh;

        min-height: 100vh;

        overflow: hidden;

    }


    .gallery-header {

        top: 18px;

        left: 18px;

        right: 18px;

    }


    .project-description {

        max-width: 70vw;

    }


    .slide {

        padding:
            90px
            18px
            30px;

    }


    .arrow {

        opacity: 1;

        width: 50px;

    }


    .arrow-left {

        padding-left: 10px;

    }


    .arrow-right {

        padding-right: 10px;

    }


    .about {

        width: 100%;

        padding: 18px;

        overflow-y: auto;

        -webkit-overflow-scrolling: touch;

    }


    .about-close {

        top: 10px;

        right: 15px;

    }


    .about-content {

        margin-top: 20vh;

        margin-left: 0;

    }


    .about-content p {

        font-size: 18px;

    }

}

/* =========================
   ABOUT PHOTO
   ========================= */

.about-photo {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 24px;
}

/* Smaller About photo */
.about-photo {
    width: 50%;
    height: auto;
}


/* =========================
   PUBLICATIONS LINK
   ========================= */

#publications-button {
    margin-bottom: 12px;
}



/* =========================
   PUBLICATIONS LIST
   ========================= */

.publications-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
}

.publication-link {
    color: #111111;
    text-decoration: none;
}

.publication-link:hover {
    opacity: 0.5;
}



/* Nested Music folder under Projects */
.country-title.music-folder {
    padding-left: 10px;
}

.country-projects.music-submenu {
    margin-left: 10px;
}


/* BOOKS — shared cover selection, existing gallery for spreads */
.books-page[hidden], .books-back[hidden] { display: none !important; }
.books-page {
    position: absolute;
    inset: 0;
    z-index: 17;
    overflow-y: auto;
    padding: 22px 50px 55px;
    background: #f5f5f5;
}
.books-page-title { font-size: 13px; margin-bottom: 6vh; }
.books-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(22px, 5vw, 90px);
    max-width: 860px;
    margin: 0 auto;
    align-items: start;
}
.books-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    border: 0;
    padding: 0;
    text-align: left;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
.books-card img {
    display: block;
    width: 100%;
    height: min(55vh, 520px);
    object-fit: contain;
    object-position: center bottom;
    margin-bottom: 19px;
}
.books-card-title { font-size: 13px; margin-bottom: 6px; }
.books-card-year { color: #777; font-size: 12px; }
.books-card:hover { opacity: 0.7; }
.books-landing .gallery-header,
.books-landing .arrow { visibility: hidden; pointer-events: none; }
.books-back {
    position: absolute;
    top: 78px;
    left: 30px;
    z-index: 16;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 12px;
    color: #777;
    cursor: pointer;
}
.books-back:hover { color: #111; }
.books-detail .slide { padding-top: 120px; }
@media (max-width: 700px) {
    .books-page { padding: 18px 18px 40px; }
    .books-page-title { margin-bottom: 32px; }
    .books-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
    .books-card img { height: 34vh; margin-bottom: 13px; }
    .books-card-title { font-size: 12px; }
    .books-back { top: 67px; left: 18px; }
    .books-detail .slide { padding-top: 113px; }
}
