/*
Theme Name: Ada Matylda
Author: Ada Matylda
Description: Minimal editorial photography portfolio.
Version: 1.2
*/

:root {
    --sidebar-width: 18%;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: white;
    color: #111;
    font: 11px Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: .55; }

.site-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
    z-index: 10;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.site-navigation {
    display: flex;
    flex-direction: column;
}

.copyright { font-size: 10px; }

.site-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    min-height: 500px;
}

.hero-text {
    display: flex;
    align-items: flex-end;
    padding: 25px;
}

.hero-image { overflow: hidden; }

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.works-container { padding: 8px; }

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 4.5%;
    row-gap: 135px;
}

.project { text-align: center; }

.project-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f4f4f4;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.project:hover img { transform: scale(1.015); }

.project-caption {
    padding-top: 7px;
    font-size: 10px;
}

.info-container {
    max-width: 650px;
    padding: 35px 25px;
    line-height: 1.6;
}

.info-section { margin-top: 55px; }

@media(max-width:900px) {
    :root { --sidebar-width: 16%; }
    .works-grid { column-gap: 3%; row-gap: 80px; }
}

@media(max-width:600px) {
    .site-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 12px;
        flex-direction: row;
        align-items: flex-start;
    }

    .sidebar-bottom { text-align: right; gap: 8px; }
    .site-navigation { align-items: flex-end; }

    .site-content {
        margin: 0;
        width: 100%;
    }

    .hero {
        height: auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .hero-image { height: 75vh; }
    .hero-text { min-height: 150px; padding: 15px; }

    .works-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 55px 12px;
    }

    .info-container { padding: 25px 15px; }
}

.site-sidebar {
    justify-content: space-between;
}

.sidebar-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* Project image layout: one centred image per row */
.single-project {
    padding: 8px;
}

.single-project .project-title {
    margin: 0 0 26px;
    padding: 0;
    font: 400 11px/1.3 Arial, sans-serif;
}

.project-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 34px;
}

.project-gallery > figure.wp-block-image,
.project-gallery > .wp-block-image,
.project-gallery figure.wp-block-image {
    display: block;
    width: 52%;
    max-width: 680px;
    margin: 0 auto;
    padding: 0;
}

.project-gallery figure.wp-block-image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0;
}

.project-gallery figure.wp-block-image figcaption {
    position: static;
    display: block;
    margin: 6px 0 0;
    padding: 0;
    background: none;
    color: #777;
    font: 400 8px/1.25 Arial, sans-serif;
    text-align: left;
}

@media (max-width: 900px) {
    .project-gallery > figure.wp-block-image,
    .project-gallery > .wp-block-image,
    .project-gallery figure.wp-block-image {
        width: 68%;
    }
}

@media (max-width: 600px) {
    .project-gallery > figure.wp-block-image,
    .project-gallery > .wp-block-image,
    .project-gallery figure.wp-block-image {
        width: 92%;
    }
}

/* Homepage: one restrained image, selected via the page's Featured image */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    height: auto;
    padding: 30px 8px;
}

.hero-image {
    width: 52%;
    max-width: 680px;
    overflow: visible;
}

.hero-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
}

@media (max-width: 600px) {
    .hero { min-height: 70vh; }
    .hero-image { width: 88%; }
}

/* Footer signature */
.copyright {
    font-size: 10px;
}


/* Homepage image: centred, restrained, and never cropped */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    height: auto;
    padding: 30px 8px;
}
.hero-image {
    width: 52%;
    max-width: 680px;
    overflow: visible;
}
.hero-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
}
.hero-image-empty {
    width: 52%;
    max-width: 680px;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #bbb;
    color: #777;
    padding: 20px;
    text-align: center;
}
@media (max-width: 600px) {
    .hero { min-height: 70vh; }
    .hero-image, .hero-image-empty { width: 88%; }
}
