/* Project portfolio overrides for the London theme. */

body {
    background: #f8f8f5;
}

.site-wrapper {
    padding: 0 clamp(18px, 3.4vw, 56px);
}

.gh-head {
    height: 92px;
    background: transparent;
}

.gh-head-logo {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 0;
}

.gh-head-menu,
.gh-head-actions {
    font-size: 1.45rem;
    font-weight: 600;
}

.post-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 3vw, 56px);
}

.home-template .post-feed {
    margin-top: clamp(12px, 2vw, 32px);
}

.post-card,
.post-card-large {
    display: block;
    flex: none;
    height: auto;
    overflow: hidden;
    background: #e8e6df;
}

.post-card-link {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.post-card-link img {
    transition: transform 0.45s ease;
}

.post-card-link::after {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    content: "";
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.58));
}

.post-card-link:hover img {
    transform: scale(1.035);
}

.post-card-content {
    top: auto;
    right: clamp(18px, 2vw, 30px);
    bottom: clamp(18px, 2vw, 30px);
    left: clamp(18px, 2vw, 30px);
    display: block;
    color: #fff;
    background: transparent;
    opacity: 1;
    z-index: 1;
}

.post-card:not(.no-image) .post-card-content {
    opacity: 1;
}

.post-card-title {
    max-width: 92%;
    font-size: clamp(2rem, 2vw, 3.2rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0;
    text-align: left;
}

.post-card-meta {
    margin: 8px 0 0;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.88);
}

.post-card.no-image .post-card-link {
    min-height: 34vw;
    aspect-ratio: 16 / 10;
}

.post-card.no-image .post-card-content {
    inset: auto clamp(18px, 2vw, 30px) clamp(18px, 2vw, 30px);
    padding: 0;
}

.post-card.no-image .post-card-title {
    color: #fff;
    text-decoration: none;
}

.project-content {
    max-width: min(100%, 1180px);
    padding: 8px 0 0;
    margin: 0 auto;
}

.project-gallery {
    display: block;
    column-count: 2;
    column-gap: 12px;
    margin-top: 0;
    font-size: 0;
    letter-spacing: 0;
}

.project-gallery > * {
    display: inline-block;
    width: 100%;
    margin: 0 0 12px;
    break-inside: avoid;
}

.project-gallery > * + * {
    margin-top: 0;
}

.project-gallery img,
.project-gallery .kg-image {
    width: 100%;
    height: auto;
    margin: 0;
    object-fit: cover;
}

.project-gallery .kg-image-card,
.project-gallery .kg-gallery-card,
.project-gallery .kg-width-wide,
.project-gallery .kg-width-full,
.project-feature-image {
    grid-column: auto;
}

.project-gallery .kg-gallery-container,
.project-gallery .kg-gallery-row {
    display: contents;
}

.project-gallery .kg-gallery-image {
    margin: 0;
}

.project-gallery :is(p, h2, h3, h4, blockquote, ul, ol) {
    display: block;
    column-span: all;
    max-width: 720px;
    margin: clamp(34px, 5vw, 72px) auto;
    font-size: 1.7rem;
    line-height: 1.65;
}

.project-details {
    max-width: min(100%, 1180px);
    padding: clamp(38px, 5vw, 76px) 0 0;
    margin: 0 auto;
    color: #111;
    text-transform: uppercase;
}

.project-title {
    margin: 0;
    font-size: clamp(1.8rem, 1.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.04em;
}

.project-meta {
    max-width: 620px;
    margin: 8px 0 0;
    font-size: clamp(1.4rem, 1.1vw, 1.7rem);
    font-weight: 600;
    line-height: 1.55;
    letter-spacing: 0.03em;
    white-space: pre-line;
}

.project-back-link {
    display: inline-flex;
    margin-top: 28px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #111;
    text-transform: uppercase;
    border-bottom: 1px solid currentColor;
}

.project-content .gh-comments {
    max-width: 760px;
    margin: 64px auto 0;
}

@media (max-width: 850px) {
    .site-wrapper {
        padding: 0 12px;
    }

    body:not(.is-head-open) .gh-head {
        margin: 0;
    }

    .post-feed {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .project-content {
        padding-top: 16px;
    }
}

@media (max-width: 560px) {
    .post-card-link,
    .post-card.no-image .post-card-link {
        aspect-ratio: 3 / 2;
    }

    .project-gallery {
        gap: 6px;
    }

    .project-details {
        padding-top: 32px;
    }
}
