/* ==============================
   GLOBAL
============================== */

:root {
    --site-max-width: 1000px;
    --sidebar-width: 180px;
    --column-gap: 5px;
    --page-gutter: 32px;

    --gallery-thumb-size: 190px;
    --gallery-gap: 22px;

    --gallery-width: calc(
        var(--gallery-thumb-size) +
        var(--gallery-thumb-size) +
        var(--gallery-thumb-size) +
        var(--gallery-gap) +
        var(--gallery-gap)
    );
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    background: #fff;
    color: #222;
    font-family: 'Inter', sans-serif;
}


/* ==============================
   LAYOUT
============================== */

.site-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) auto;
    grid-template-rows: auto 1fr;

    column-gap: var(--column-gap);

    width: fit-content;
    max-width: 100%;
    min-height: 100vh;

    margin: 0 auto;
    padding: 0 var(--page-gutter);
}

.site-header {
    grid-column: 1 / -1;
    padding: 40px 0 20px 30px;

}

.site-logo {

    display: flex;

    align-items: baseline;

    gap: 18px;

    text-decoration: none;

    color: #222;

}

.site-name {

    font-family: 'Sora', sans-serif;

    font-size: 2.8rem;

    font-weight: 300;
 
    letter-spacing: -0.05em;

    text-transform: uppercase;

    color: #222;

}
/*padding for middle name surname*/

.middle-name {
    margin-left: 0.3em;
}

.surname {
    margin-left: 0.35em;
}



.site-art {

    font-family: 'Sora', sans-serif;

    font-size: 2.8rem;

    font-weight: 250;
  
    letter-spacing: 0.16em;

    /* text-transform: uppercase; */

    color: #666;
    

}

.sidebar {
    position: sticky;
    top: 0;

    align-self: start;

    width: 100%;
    height: 100vh;
    /*pad menu down*/
    padding: 40px 0 40px;

    background: #fff;
    border-right: none;

    overflow-y: auto;
}

.content {
    width: var(--gallery-width);
    max-width: 100%;
    min-width: 0;
    min-height: 100vh;

    padding: 0 0 40px;
}

.gallery-page-title {
    display: none;
}


/* ==============================
   SIDEBAR
============================== */

.main-navigation ul {
    margin: 0;
    padding: 0;

    list-style: none;
}

.main-navigation li {
    margin: 18px 0;
}

.main-navigation a {
    display: inline-block;

    color: #777;

    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;

    transition:
        color 0.35s ease,
        padding-left 0.35s ease;
}

.main-navigation a:hover {
    padding-left: 6px;
    color: #222;
}

.current-menu-item > a,
.current_page_item > a {
    padding-left: 0;
    color: #222;
    font-weight: 500;
}


/* ==============================
   NORMAL PAGE CONTENT
============================== */

.content p {
    max-width: 760px;
    margin-bottom: 1.2em;

    color: #555;

    font-size: 1rem;
    line-height: 1.7;
}

.content img {
    max-width: 100%;
    height: auto;
}

.content ul,
.content ol {
    max-width: 760px;

    margin: 0 0 1.2em 1.5em;
    padding-left: 1.2em;
}

.content ul {
    list-style: disc;
}

.content ol {
    list-style: decimal;
}

.content li {
    margin-bottom: 0.6em;

    color: #555;

    font-size: 1rem;
    line-height: 1.7;
}


/* ==============================
   GALLERY
============================== */

.gallery-grid {
    display: grid;

    grid-template-columns: repeat(3, var(--gallery-thumb-size));

    gap: var(--gallery-gap);

    width: fit-content;

    margin-top: 10px;
}

.painting-thumb {
    position: relative;

    width: 100%;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #f5f5f5;
    cursor: pointer;
}

.painting-thumb img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: opacity 0.35s ease;
}

.painting-thumb:hover img {
    opacity: 0.9;
}


/* ==============================
   MODAL
============================== */

.painting-modal {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    z-index: 9999;
}

.painting-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;

    background: #fff;
}

.modal-window {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100vw;
    height: 100vh;

    padding: 0;

    overflow: hidden;

    background: #fff;

    z-index: 2;
}

.modal-content {
    display: grid;
    grid-template-columns: max-content 260px;

    justify-content: center;
    align-items: start;

    column-gap: 40px;

    width: 100%;
    height: calc(100vh - 110px);

    padding: 20px 50px 40px;
}

.painting-viewer {
    display: grid;
    grid-template-columns: 56px minmax(0, 900px) 56px;
    align-items: center;
    justify-content: center;
    gap: 18px;

    width: 100%;
    max-width: 1050px;
    height: auto;

    align-self: start;
    justify-self: center;

    min-width: 0;
    min-height: 0;
}
.painting-image-area {
    display: flex;
    align-items: flex-start;
    justify-content: center;

    width: 100%;
    height: auto;

    min-width: 0;
    min-height: 0;
}

.viewer-navigation {
    align-self: center;
    justify-self: center;
}

#modal-image {
    display: block;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: min(70vh, 700px);

    object-fit: contain;

    opacity: 0;

    transition: opacity 0.35s ease;

    will-change: opacity;
}
#modal-image.is-visible {
    opacity: 1;
}

.painting-info {
    width: 260px;

    align-self: start;
/* padding info from top of modal */
    margin-top: 12vh;

    color: #555;
    font-family: 'Inter', sans-serif;
    text-align: left;
}

.painting-info h2 {
    margin-bottom: 18px;

    color: #222;

    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.3;
}

.painting-info p {
    margin: 10px 0;

    color: #666;

    font-size: 0.9rem;
    line-height: 1.8;
}

#modal-description {
    margin: 18px 0;

    color: #555;

    font-size: 0.9rem;
    line-height: 1.7;

     font-style: italic;
}

body.modal-open {
    overflow: hidden;
}



/* ==============================
   VIEWER TOOLBAR
============================== */

.viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;

    width: 100%;
    min-height: 110px;

    padding: 40px 50px 0;
}

.viewer-left,
.viewer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.viewer-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;

    padding: 0;
    border: 0;

    background: transparent;
    color: #777;

    cursor: pointer;

    transition: color 0.25s ease;
}

.viewer-button:hover {
    color: #111;
}

.viewer-button svg {
    width: 34px;
    height: 34px;

    stroke-width: 1.75;
}

.modal-close {
    position: static;
}

/* ==============================
   BLOG
============================== */

.blog-page,
.single-post-page {
    width: var(--gallery-width);
    max-width: 100%;
}

.blog-list {
    display: grid;
    gap: 50px;
}

.blog-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.blog-card-image {
    display: block;
    overflow: hidden;
}

.blog-card-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0;
    object-fit: cover;
}

.blog-card-content {
    min-width: 0;
}

.blog-date {
    margin-bottom: 10px !important;

    color: #888 !important;

    font-size: 0.8rem !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-card-title {
    margin: 0 0 14px;

    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.3;
}

.blog-card-title a {
    border: 0;

    color: #222;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: #666;
}

.blog-excerpt p {
    margin-bottom: 16px;
}

.blog-read-more {
    display: inline-block;

    border-bottom: 1px solid #bbb;

    color: #555;
    font-size: 0.9rem;
    text-decoration: none;
}

.blog-read-more:hover {
    border-color: #222;
    color: #222;
}

.blog-pagination {
    margin-top: 60px;
}

.blog-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.blog-pagination a,
.blog-pagination span {
    padding: 8px 12px;

    border: 1px solid #ddd;

    color: #555;
    text-decoration: none;
}

.blog-pagination .current {
    border-color: #222;
    color: #222;
}

.single-post-header {
    margin-bottom: 35px;
}

.single-post-title {
    display: block !important;

    margin: 0;

    color: #222;

    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.25;
}

.single-post-image img {
    display: block;

    width: 100%;
    height: auto;

    margin: 0 0 40px;
}

.single-post-content {
    max-width: 700px;
}


/* ==============================
   TABLET
============================== */

@media (max-width: 1050px) {

    :root {
        --page-gutter: 28px;
    }

    .site-layout {
        display: block;

        width: 100%;
        max-width: 100%;

        margin: 0;
        padding: 0 var(--page-gutter);
    }

    .site-header {
        padding: 38px 0 25px;
    }

    .site-logo {
        display: flex;
        flex-direction: column;
        align-items: center;

        gap: 2px;

        width: fit-content;

        margin: 0 auto;
    }

    .site-name {
        font-size: 2.5rem;
        line-height: 1.1;

        text-align: center;
    }

    .site-art {
        font-size: 2.2rem;
        line-height: 1.1;

        text-align: center;
    }

    .sidebar {
        position: relative;
        top: auto;

        width: 100%;
        height: auto;

        padding: 10px 0 32px;

        overflow: visible;
    }

    .main-navigation {
        width: 100%;
        padding-right: 0;
    }

    .main-navigation ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 12px 28px;
}

    .main-navigation li {
        margin: 0;
    }

    .main-navigation a:hover {
        padding-left: 0;
    }

    .content {
        width: calc(
            var(--gallery-thumb-size) +
            var(--gallery-thumb-size) +
            var(--gallery-gap)
        );

        max-width: 100%;
        min-height: auto;

        margin: 0 auto;
        padding: 0 0 50px;
    }

    .gallery-grid {
        grid-template-columns: repeat(
            2,
            var(--gallery-thumb-size)
        );

        gap: var(--gallery-gap);

        margin-top: 10px;
    }

    .modal-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;

    width: 100%;
    height: calc(100vh - 110px);

    padding: 20px 50px;
    }

    .painting-viewer {
    grid-template-columns: 48px minmax(0, 760px) 48px;
    gap: 8px;

    width: 100%;
    max-width: 880px;
    height: auto;
    }

    .painting-info {
        width: 220px;
    }
    .blog-page,
    .single-post-page {
        width: 100%;
    }

    .blog-list {
        justify-items: center;
    }

    .blog-card {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 24px;

        max-width: 700px;
    }
}
/* ==============================
   MOBILE
============================== */

@media (max-width: 700px) {

    :root {
        --page-gutter: 22px;
    }

    .site-layout {
        display: block;

        max-width: none;
        padding: 0 var(--page-gutter);
    }

    .sidebar {
        position: relative;

        height: auto;

        padding: 30px 0 25px;

        border-right: 0;
        border-bottom: none;

        overflow: visible;
    }

    .site-title {
        max-width: none;

        margin-bottom: 25px;
        padding-right: 0;

        font-size: 1.65rem;
    }
    .site-name {

        white-space: normal;

        text-align: center;

        line-height: 1.1;
        }
    
    .main-navigation {
        padding-right: 0;
    }

    .main-navigation ul {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 22px;
    }

    .main-navigation li {
        margin: 0;
    }

    .main-navigation a:hover {
        padding-left: 0;
    }

    .content {
    width: 100%;
    min-height: auto;

    margin: 0 auto;
    padding: 25px 0 60px;
    }

    .content h1 {
        margin-bottom: 36px;
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: var(--gallery-thumb-size);
        gap: 10px;

        margin: 10px auto 0;
    }

    .viewer-toolbar {
        min-height: 20px;
        padding: 45px 16px 0;
    }

    .viewer-left,
    .viewer-right {
        gap: 4px;
    }

    .viewer-button {
        width: 44px;
        height: 44px;
    }

    .viewer-button svg {
        width: 28px;
        height: 28px;
    }

    .modal-content {
    display: block;

    height: calc(100vh - 82px);

    padding: 0px 16px 35px;

    overflow-y: auto;
    }

    .painting-viewer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "image image"
        "previous next";

    row-gap: 4px;
    column-gap: 14px;

    width: 100%;
    height: auto;
    min-height: 0;
    }

    .painting-image-area {
    grid-area: image;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    width: 100%;
    height: auto;
    min-height: 0;

    margin-bottom: 25px;
    }
    .viewer-navigation {
    width: 100%;
    height: 2px;

    justify-self: stretch;
    }

    .viewer-prev {
    grid-area: previous;
    }

    .viewer-next {
        grid-area: next;
    }

    #modal-image {
    display: block;

    width: 100%;
    height: auto;

    max-width: 100%;
    max-height: 62vh;

    margin: 0 auto;

    object-fit: contain;
    }

    .painting-info {
    width: 100%;
    margin-top: 15px;

    text-align: center;
}
    
    body h1.site-title {
    display: none !important;
    }

    .blog-card {
    display: block;

    max-width: 650px;

    margin: 0 auto;

    text-align: center;
}

    .blog-card-image {
        margin: 0 auto 24px;
    }

    .blog-card-image img {
        display: block;

        width: 100%;

        aspect-ratio: 16 / 10;

        margin: 0 auto;
    }

    .blog-card-content {
        text-align: center;
    }

    .blog-excerpt {
        max-width: 600px;

        margin: 0 auto;
    }

    .blog-read-more {
        display: inline-block;

        margin-top: 12px;
    }

    .single-post-title {
        font-size: 1.65rem;

        text-align: center;
    }

    .single-post-image img {
        margin: 0 auto 40px;
    }

    .single-post-content {
        max-width: 650px;

        margin: 0 auto;

        text-align: left;
}
}

/* ==============================
   FOOTER
============================== */

.site-footer {
    width: 100%;

    margin-top: 20px;
    padding: 20px 0 30px;

    color: #888;

    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-align: center;
}

.site-footer,
.site-footer a {
    color: #888;
}

.site-footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #222;
}

.footer-divider {
    margin: 0 10px;
    color: #bbb;
}
