.latest-post {
    display: flex;
    align-items: stretch;
    border-top: 1px solid var(--text-color);
    min-height: calc(42vw * var(--scale));
    margin-top: 1rem;
    position: relative;
}

.latest-post-content {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: calc(3.5vw * var(--scale)) 0 calc(2.8vw * var(--scale)) calc(2.5vw * var(--scale));
    --hero-text-rhythm-right: calc(2.35vw * var(--scale));
}

.latest-post-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: var(--hero-text-rhythm-right);
}

.latest-post-title {
    text-decoration: none;
    color: inherit;
    margin-bottom: 2rem;
}

.latest-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: calc(1.6vw * var(--scale));
}

.latest-post-tag {
    text-decoration: none;
    color: var(--background-color);
    font-family: var(--cm);
    background-color: var(--port);
    border: 1px solid var(--port);
    padding: 0.25rem 0.5rem;
    border-radius: calc(4px * var(--scale));
    display: inline-block;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-size: calc(18.7px * var(--scale));
    font-weight: 900;
    font-variation-settings: "wght" 900;
}

.latest-post-title:hover {
    text-decoration: underline;
    text-decoration-thickness: calc(3px * var(--scale));
    text-decoration-color: var(--swiss-coffee) !important;
}

.latest-post-subtitle {
    font-family: var(--etbl) !important;
    font-size: calc(50px * var(--scale));
    line-height: 108%;
    color: var(--text-color);
    margin-top: calc(-0.35vw * var(--scale));
    margin-bottom: calc(1.4vw * var(--scale));
    font-weight: 700;
}

/* Override global h4 rule for latest post subtitle */
h4.latest-post-subtitle {
    font-family: var(--edm) !important;
    font-style: italic;
    font-weight: 600 !important;
}

.latest-post-tag:hover,
.latest-post-tag:focus-visible {
    text-decoration: underline !important;
    text-decoration-style: wavy !important;
    text-decoration-color: var(--tag-hover-color) !important;
    outline: none;
}

.latest-post-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-top: calc(1.5vw * var(--scale));
    gap: calc(32px * var(--scale));
    padding-right: var(--hero-text-rhythm-right);
}

.latest-post-paragraphs {
    width: 100%;
    margin-right: 0;
    flex: 1;
    margin-bottom: calc(1.15vw * var(--scale));
    padding-right: var(--hero-text-rhythm-right);
}

/* Arrow character link positioning */
.arrow-character-link {
    position: absolute;
    bottom: 30px;
    right: 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(72px * var(--scale));
    height: calc(72px * var(--scale));
    border-radius: 999px;
    background: var(--revolver);
    border: none;
    z-index: 3;
    transition: transform var(--ease-transition), background-color var(--ease-transition), box-shadow var(--ease-transition);
}

.arrow-character-link .arrow-character {
    font-family: var(--edb);
    font-weight: 700;
    font-size: calc(48px * var(--scale));
    color: #ffffff;
    line-height: 1;
    transition: color var(--ease-transition);
}

.arrow-character-link:hover,
.arrow-character-link:focus-visible {
    transform: translateX(calc(10px * var(--scale)));
    background: var(--port);
    box-shadow: 0 0 0 calc(2px * var(--scale)) var(--swiss-coffee);
}

.arrow-character-link:hover .arrow-character,
.arrow-character-link:focus-visible .arrow-character {
    color: var(--background-color);
}

.arrow-character-link:active {
    transform: translateX(calc(6px * var(--scale)));
}

.latest-post-image-link {
    /* scale: .75; */
    width: 50%;
    cursor: pointer;
    overflow: visible;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    position: relative;
    padding-top: calc(3.5vw * var(--scale));
    padding-bottom: 0;
    margin-top: 0;
    margin-right: 0;
    padding-right: 0;
    min-height: 0;
}

.latest-post-image-figure-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    text-decoration: none;
    min-height: 0;
}

.latest-post-image-link figure {
    margin: 0;
    width: 100%;
    aspect-ratio: auto;
    max-height: none;
    overflow: visible;
}

.latest-post-image-link img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center top;
}

.homepage-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: calc(0.8rem * var(--scale));
    padding: calc(3.1vw * var(--scale));
}

.homepage-tag-cloud-tag.latest-post-tag {
    font-size: calc(23.5px * var(--scale));
    padding: calc(0.42rem * var(--scale)) calc(0.85rem * var(--scale));
    border-radius: calc(6px * var(--scale));
    margin-bottom: 0;
    border-width: calc(1.25px * var(--scale));
}

.homepage-bottom-bar {
    border-top: 1px solid var(--text-color);
    padding: calc(2.5vw * var(--scale)) calc(2.5vw * var(--scale)) 100px;
}

.homepage-bottom-nav {
    display: flex;
    flex-wrap: wrap;
    row-gap: calc(1.2vw * var(--scale));
    column-gap: calc(1.5vw * var(--scale));
    list-style: none;
    margin: 0;
    padding: 0;
}

.homepage-bottom-nav-item {
    display: flex;
    min-width: 0;
}

.homepage-bottom-nav-link {
    display: inline-block;
    line-height: 110%;
    font-size: calc(42px * var(--scale));
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
}

.homepage-bottom-nav-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* Styles for XXL (large desktop ≥1200px) */
@media (min-width: 1200px) {
    .latest-post-paragraph {
        margin-right: calc(2.2vw * var(--scale));
    }

    .latest-post-title:hover {
        text-decoration-thickness: calc(0.2vw * var(--scale));
    }
}

/* Styles for mobile (≤768px) */
@media (max-width: 768px) {
    .latest-post {
        flex-direction: column-reverse;
        height: auto;
        min-height: 0;
    }

    .latest-post-content {
        width: 100%;
        padding: calc(36px * var(--scale)) calc(30px * var(--scale)) calc(30px * var(--scale));
    }

    .latest-post-top {
        padding-right: 0;
        margin-bottom: 0;
    }

    .latest-post-tags {
        gap: calc(8px * var(--scale));
        margin-bottom: calc(18px * var(--scale));
    }

    .latest-post-tag {
        margin-bottom: 0;
        font-size: clamp(12px, calc(3.3vw * var(--scale)), 14px);
        line-height: 1.2;
        padding: calc(0.28rem * var(--scale)) calc(0.54rem * var(--scale));
    }

    .latest-post-title h1 {
        font-size: clamp(34px, calc(8.1vw * var(--scale)), 46px);
        line-height: 1;
        margin-bottom: calc(14px * var(--scale));
    }

    .latest-post-subtitle {
        font-size: clamp(22px, calc(5.4vw * var(--scale)), 30px);
        margin-top: calc(-2px * var(--scale));
        margin-bottom: calc(14px * var(--scale));
        line-height: 1.15;
    }

    .latest-post-bottom {
        column-gap: 0;
        padding-right: 0;
        margin-top: calc(12px * var(--scale));
    }

    .latest-post-paragraph,
    .latest-post-paragraphs {
        max-width: 100%;
        width: 100%;
        margin-right: 0px;
        padding-right: 0;
    }

    .latest-post-paragraphs > p,
    .latest-post-paragraphs > blockquote {
        margin-bottom: calc(12px * var(--scale));
    }

    .latest-post-image-link {
        border-left: none;
        border-bottom: 1px solid var(--text-color);
        height: auto;
        width: 100%;
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0;
        aspect-ratio: auto;
        align-items: flex-start;
        overflow: visible;
    }

    .latest-post-image-link figure {
        max-height: none;
        height: auto;
        overflow: visible;
    }

    .latest-post-image-link img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
        object-position: center top;
    }

    .homepage-tag-cloud {
        padding: 30px;
        gap: 12px;
    }

    .homepage-tag-cloud-tag.latest-post-tag {
        font-size: clamp(14px, calc(4.1vw * var(--scale)), 19px);
        padding: calc(0.32rem * var(--scale)) calc(0.66rem * var(--scale));
        line-height: 1.22;
    }

    .latest-post-title:hover, .latest-post-tag:hover {
        text-decoration: none;
    }

    .arrow-character-link:hover,
    .arrow-character-link:focus-visible,
    .arrow-character-link:active {
        transform: translateX(calc(8px * var(--scale)));
    }

    .arrow-character-link .arrow-character {
        font-size: calc(40px * var(--scale));
    }

    .arrow-character-link {
        width: calc(56px * var(--scale));
        height: calc(56px * var(--scale));
        right: 30px;
        bottom: 30px;
    }

    .homepage-bottom-bar {
        padding: 30px 30px 100px;
    }

    .homepage-bottom-nav {
        gap: 16px;
        row-gap: 18px;
    }

    .homepage-bottom-nav-item {
        flex: 1 1 calc(50% - 8px);
    }

    .homepage-bottom-nav-link {
        font-size: clamp(20px, calc(5.4vw * var(--scale)), 26px);
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.12;
    }
}

@media (max-width: 479px) {
    .homepage-tag-cloud {
        padding: 18px;
        gap: 8px;
    }

    .homepage-tag-cloud-tag.latest-post-tag {
        font-size: clamp(13px, calc(4.2vw * var(--scale)), 16px);
    }

    .homepage-bottom-bar {
        padding: 18px 18px 100px;
    }

    .latest-post-content {
        padding: calc(30px * var(--scale)) calc(18px * var(--scale)) calc(24px * var(--scale));
    }

    .latest-post-title h1 {
        font-size: clamp(36px, calc(9.6vw * var(--scale)), 38px);
    }

    .latest-post-subtitle {
        font-size: clamp(20px, calc(6.4vw * var(--scale)), 26px);
    }

    .arrow-character-link {
        width: calc(50px * var(--scale));
        height: calc(50px * var(--scale));
        right: 18px;
        bottom: 18px;
    }

    .arrow-character-link .arrow-character {
        font-size: calc(34px * var(--scale));
    }

    .homepage-bottom-nav-item {
        flex: 1 1 100%;
    }

    .homepage-bottom-nav-link {
        font-size: clamp(18px, calc(6.8vw * var(--scale)), 22px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .arrow-character-link,
    .arrow-character-link .arrow-character {
        transition: none;
    }
}