/* ============================================
   Custom styles for Matthew Sakhno
   Discord-like dark theme + compact archive cards
   ============================================ */

:root {
    --contrast: #333333;
    --contrast-2: #666666;
    --contrast-3: #888888;
    --base: #ffffff;
    --base-2: #ffffff;
    --base-3: #ffffff;
    --accent: #4e4bec;
}

html, body {
    background-color: #ffffff !important;
    color: #333333 !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "avenir next", avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif !important;
}

/* Hide byline / categories / comments / footer credit */
.byline,
.author.vcard,
.cat-links,
.category-links,
.entry-meta .cat-links,
.post-meta .cat-links,
article .cat-links,
.comments-link,
.entry-meta .comments-link,
.post-meta .comments-link,
article .comments-link,
.comment-reply-title,
.comment-form,
#respond,
.comments-area,
#comments,
.commentlist,
.comment-list,
.comment-respond,
.site-info,
.footer-credits,
.copyright-powered-by,
.generatepress-credit,
[class*="credit"],
[class*="powered"],
.site-footer .inside-footer-widgets p:last-child {
    display: none !important;
}

/* Move logo slightly up */
.custom-logo {
    margin-top: -10px;
}

.newsletter {
    margin-top: 10px !important;
}

/* Light minimalist palette inspired by kenp.io */
.site-header {
    background-color: transparent !important;
}

.inside-header,
.main-navigation,
.main-navigation ul ul,
.mobile-menu-control-wrapper .menu-toggle,
.main-navigation .menu-toggle,
.has-inline-mobile-toggle #site-navigation.toggled,
.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.one-container .container,
.separate-containers .paging-navigation,
.inside-page-header,
.site-content .content-area .site-main article {
    background-color: var(--base) !important;
    color: var(--contrast) !important;
    border: none !important;
    box-shadow: none !important;
}

/* Align the site title with the homepage content column */
.inside-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: min(832px, calc(100% - 32px)) !important;
    max-width: 832px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

.site-branding,
.main-title,
.main-title a {
    text-align: left !important;
}

.main-title a {
    font-size: 22px !important;
    line-height: 1.1 !important;
}

@media (max-width: 768px) {
    .inside-header {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .site-branding {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
    }

    .main-title,
    .main-title a {
        text-align: left !important;
    }

    .main-title a {
        font-size: 22px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .inside-header,
    .home-intro,
    .home .inside-article {
        width: min(832px, calc(100% - 32px)) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }

    .inside-header,
    .home-intro,
    .home .inside-article {
        padding-left: 40px !important;
        padding-right: 40px !important;
    }

    body.single .inside-header {
        padding-left: 40px !important;
        padding-right: 40px !important;
        box-sizing: border-box !important;
    }

    .home-projects {
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        content-visibility: auto;
        contain-intrinsic-size: 1200px;
    }

    .home-projects h2,
    .portfolio-heading h2 {
        margin: 0 0 1.5rem !important;
        padding: 0 !important;
        font-size: 22px !important;
        line-height: 1.1 !important;
    }
}

.site-header .main-title {
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
}

.site-header .main-title a {
    font-weight: 700 !important;
}

.home .entry-title,
.home .entry-title a {
    font-weight: 400 !important;
    font-size: 22px !important;
    line-height: 1.1 !important;
}

/* Remove divider lines between cards and under the header */
.home .inside-article + .inside-article,
.blog .inside-article + .inside-article,
.archive .inside-article + .inside-article,
.site-header,
.inside-header,
.page-header,
.separate-containers .page-header,
.separate-containers .inside-article {
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.site-header a,
.main-navigation a,
.menu-toggle,
.menu-toggle:hover,
.menu-toggle:focus,
.site-branding a,
.site-branding a:hover,
.site-title a,
.site-title a:hover,
.main-title a,
.main-title a:hover {
    color: var(--contrast) !important;
}

.entry-title a,
h1, h2, h3, h4, h5, h6,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: var(--contrast) !important;
}

a {
    color: var(--accent) !important;
}

a:hover,
a:focus,
a:active,
.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
.main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a,
.main-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a,
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
.entry-title a:hover {
    color: #5eead4 !important;
}

.home-intro,
.home-intro p,
.home-intro h1,
.home-intro h2,
.home-intro h3,
.home-intro h4,
.home-intro h5,
.home-intro h6,
.home-intro a,
.entry-meta,
.entry-meta a,
.posted-on,
.posted-on a,
.cat-links,
.cat-links a {
    color: var(--contrast) !important;
}

/* Hide empty nav / hamburger */
.main-navigation,
.main-navigation .main-nav,
.main-navigation .inside-navigation,
.main-navigation .menu-toggle,
.mobile-menu-control-wrapper,
.nav-aligned-right .main-navigation,
.nav-aligned-left .main-navigation {
    display: none !important;
}

/* Archive/home cards: image right of title, small squircle */
.archive .inside-article,
.blog .inside-article,
.home .inside-article {
    display: grid !important;
    grid-template-columns: 1fr 92px;
    grid-template-areas:
        "header image";
    gap: 14px 16px;
    align-items: center;
    padding: 18px !important;
    border-radius: 18px;
    background-color: var(--base) !important;
    border: none !important;
}

.home .inside-article {
    max-width: 52rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: 1fr 136px;
    column-gap: 28px;
    content-visibility: auto;
    contain-intrinsic-size: 220px;
}

.archive .entry-header,
.blog .entry-header,
.home .entry-header {
    grid-area: header;
    padding: 0 16px 0 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.home .entry-header {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home .entry-meta,
.home .posted-on,
.home .posted-on a,
.home .byline,
.home .byline a {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.archive .entry-summary,
.blog .entry-summary,
.home .entry-summary,
.archive .entry-summary p,
.blog .entry-summary p,
.home .entry-summary p,
.archive .entry-content,
.blog .entry-content,
.home .entry-content {
    display: none !important;
}

.archive .post-image,
.blog .post-image {
    grid-area: image;
    justify-self: end;
    align-self: center;
    width: 92px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 24px !important;
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.03);
}

.home .post-image {
    grid-area: image;
    justify-self: end;
    align-self: center;
    width: 136px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 24px !important;
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.03);
}

.archive .post-image img,
.blog .post-image img,
.home .post-image img,
.archive .wp-post-image,
.blog .wp-post-image,
.home .wp-post-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 24px !important;
}

.archive .entry-title,
.blog .entry-title,
.home .entry-title {
    margin: 0 0 0.15em !important;
    line-height: 1.25;
}

.home .entry-title {
    padding-right: 128px !important;
    box-sizing: border-box !important;
}


.archive .entry-title a,
.blog .entry-title a,
.home .entry-title a {
    color: var(--contrast) !important;
}

.archive .entry-title a:hover,
.blog .entry-title a:hover,
.home .entry-title a:hover {
    color: var(--accent) !important;
}

img,
picture,
video,
iframe,
.wp-block-image img,
.featured-image img,
.post-image img,
.entry-content img,
.site-logo img {
    border-radius: 18px !important;
}

/* Single posts: keep content readable and images constrained */
.single-post .entry-content,
.single-post .entry-content .wp-block-group__inner-container {
    max-width: none !important;
    line-height: 1.58 !important;
}

.single-post .entry-content p,
.single-post .entry-content li {
    line-height: 1.58 !important;
    margin-bottom: 1.1em !important;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    line-height: 1.22 !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.7em !important;
}

.single-post .entry-title {
    margin-bottom: 0.6em !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
    font-size: 22px !important;
    line-height: 1.16 !important;
    text-align: left !important;
}

.single-post .entry-meta {
    margin-top: 0 !important;
}

.single-post .entry-meta time.entry-date {
    display: block;
    padding-top: 0 !important;
}

.single-post .entry-content img,
.single-post .entry-content .wp-block-image img,
.single-post .entry-content .featured-image img,
.single-post .entry-content figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
}

@media (max-width: 768px) {
    .single-post .entry-header,
    .single-post .entry-content,
    .single-post .entry-meta {
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }

    .single-post .post-navigation {
        margin-top: 2rem !important;
        padding-top: 0.5rem !important;
    }
}

@media (min-width: 769px) {
    .single-post .site.grid-container.container.hfeed,
    .single-post .site-content,
    .single-post .content-area,
    .single-post .site-content .content-area,
    .single-post .site-content .content-area .site-main,
    .single-post .site-content .content-area .site-main article,
    .single-post .inside-article {
        width: min(52rem, calc(100% - 80px)) !important;
        max-width: 52rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
    }

    .single-post .inside-article {
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    .single-post .entry-header,
    .single-post .entry-content {
        padding-left: 40px !important;
        padding-right: 40px !important;
        box-sizing: border-box !important;
    }

    .single-post .entry-content figure,
    .single-post .entry-content .wp-block-image {
        max-width: 560px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 1.5em !important;
        margin-bottom: 1.5em !important;
    }

    .single-post .entry-content img,
    .single-post .entry-content .wp-block-image img,
    .single-post .entry-content .featured-image img,
    .single-post .entry-content figure img {
        width: auto !important;
        max-width: 560px !important;
        height: auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* No sidebar */
.site-content .content-area,
.site-content .content-area .site-main,
.site-content .content-area .site-main article {
    width: 100% !important;
    max-width: 100% !important;
}

.separate-containers .inside-article,
.separate-containers .page-header,
.separate-containers .comments-area,
.separate-containers .paging-navigation,
.inside-page-header {
    padding-left: 40px !important;
    padding-right: 40px !important;
}

.is-right-sidebar,
.is-left-sidebar {
    display: none !important;
}

/* Main article spacing */
.separate-containers .site-main > *:last-child {
    margin-bottom: 0;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .archive .inside-article,
    .blog .inside-article,
    .home .inside-article {
        grid-template-columns: minmax(0, 1fr) 100px;
        gap: 18px;
        padding: 16px !important;
    }

    .home .inside-article {
        grid-template-columns: minmax(0, 1fr) 60px;
        gap: 10px 12px;
        padding: 14px !important;
    }

    .home .entry-header,
    .home .entry-title,
    .home .post-25 .entry-title,
    .home .post-39 .entry-title,
    .home .post-5 .entry-title,
    .home .post-6 .entry-title,
    .home .post-77 .entry-header,
    .home .post-77 .entry-title {
        padding-right: 0 !important;
    }

    .home .post-image {
        width: 60px !important;
    }

    .archive .entry-header,
    .blog .entry-header,
    .home .entry-header {
        min-width: 0;
    }

    .archive .entry-title,
    .blog .entry-title,
    .home .entry-title {
        font-size: clamp(1.55rem, 6vw, 2rem);
        line-height: 1.08;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .home .entry-title,
    .home .entry-title a,
    .home .entry-content h1,
    .home .entry-content h2,
    .home .entry-content h3,
    .home .entry-content h4,
    .home .entry-content h5,
    .home .entry-content h6,
    .single-post .entry-title,
    .single-post .entry-title a,
    .single-post .entry-content h1,
    .single-post .entry-content h2,
    .single-post .entry-content h3,
    .single-post .entry-content h4,
    .single-post .entry-content h5,
    .single-post .entry-content h6 {
        font-size: 22px !important;
        line-height: 1.1 !important;
    }

    .site-content .content-area,
    .site-content .content-area .site-main,
    .site-content .content-area .site-main article {
        width: 100% !important;
        max-width: 100% !important;
    }

    .separate-containers .inside-article,
    .separate-containers .page-header,
    .separate-containers .comments-area,
    .separate-containers .paging-navigation,
    .inside-page-header {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .single-post .inside-article,
    .single-post .entry-content,
    .single-post .entry-content .wp-block-group__inner-container {
        padding-left: 4px !important;
        padding-right: 4px !important;
        max-width: none !important;
    }

    .single-post .entry-content img,
    .single-post .entry-content .wp-block-image img,
    .single-post .entry-content .featured-image img,
    .single-post .entry-content figure img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .archive .post-image,
    .blog .post-image {
        width: 64px !important;
        border-radius: 20px !important;
        margin-left: 8px !important;
    }

    .home .entry-title {
        padding-right: 0 !important;
    }

    .home .post-image {
        width: 112px !important;
        border-radius: 18px !important;
        margin-left: 0 !important;
        justify-self: end;
    }
}


@media (min-width: 769px) and (max-width: 1024px) {
    .home.separate-containers .inside-article {
        padding-left: 40px !important;
        padding-right: 40px !important;
    }
}

@media (min-width: 1025px) {
    .home.separate-containers .inside-article {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ============================================
   DARK MODE
   ============================================ */

/* Dark mode color scheme */
html[data-theme="dark"] {
    --contrast: #dcddde;
    --contrast-2: #b9bbbe;
    --contrast-3: #72767d;
    --base: #1e2124;
    --base-2: #1e2124;
    --base-3: #23272a;
    --accent: #14b8a6;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    background-color: var(--base) !important;
    color: var(--contrast) !important;
}

html[data-theme="dark"] .site-header {
    background-color: transparent !important;
}

html[data-theme="dark"] .inside-header,
html[data-theme="dark"] .main-navigation,
html[data-theme="dark"] .main-navigation ul ul,
html[data-theme="dark"] .separate-containers .inside-article,
html[data-theme="dark"] .separate-containers .page-header,
html[data-theme="dark"] .separate-containers .comments-area,
html[data-theme="dark"] .one-container .container,
html[data-theme="dark"] .separate-containers .paging-navigation,
html[data-theme="dark"] .inside-page-header,
html[data-theme="dark"] .site-content .content-area .site-main article,
html[data-theme="dark"] .sidebar .widget,
html[data-theme="dark"] .footer-widgets,
html[data-theme="dark"] .site-info {
    background-color: var(--base) !important;
    color: var(--contrast) !important;
}

html[data-theme="dark"] a,
html[data-theme="dark"] .entry-title a,
html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus,
html[data-theme="dark"] a:active,
html[data-theme="dark"] .entry-title a:hover,
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6,
html[data-theme="dark"] h1 a, html[data-theme="dark"] h2 a, html[data-theme="dark"] h3 a,
html[data-theme="dark"] h4 a, html[data-theme="dark"] h5 a, html[data-theme="dark"] h6 a,
html[data-theme="dark"] .main-title a,
html[data-theme="dark"] .main-title a:hover,
html[data-theme="dark"] .site-branding a,
html[data-theme="dark"] .site-branding a:hover,
html[data-theme="dark"] .home-intro p,
html[data-theme="dark"] .entry-meta,
html[data-theme="dark"] .posted-on,
html[data-theme="dark"] .posted-on a,
html[data-theme="dark"] .entry-content,
html[data-theme="dark"] .entry-content p,
html[data-theme="dark"] .entry-content li,
html[data-theme="dark"] .entry-content span,
html[data-theme="dark"] .home .entry-summary,
html[data-theme="dark"] .home .entry-summary p,
html[data-theme="dark"] .byline,
html[data-theme="dark"] .byline a,
html[data-theme="dark"] .author-name,
html[data-theme="dark"] .entry-header,
html[data-theme="dark"] .inside-article,
html[data-theme="dark"] .site-main article,
html[data-theme="dark"] .site-main article *,
html[data-wp-dark-mode-active] .site-branding a,
html[data-wp-dark-mode-active] .site-branding a:hover,
html[data-wp-dark-mode-active] .main-title a,
html[data-wp-dark-mode-active] .main-title a:hover,
html[data-wp-dark-mode-active] .entry-title,
html[data-wp-dark-mode-active] .entry-title a,
html[data-wp-dark-mode-active] .entry-title a:hover,
html[data-wp-dark-mode-active] .entry-header,
html[data-wp-dark-mode-active] .entry-meta,
html[data-wp-dark-mode-active] .posted-on,
html[data-wp-dark-mode-active] .posted-on a,
html[data-wp-dark-mode-active] .byline,
html[data-wp-dark-mode-active] .byline a,
html[data-wp-dark-mode-active] .author-name,
html[data-wp-dark-mode-active] .home-intro p,
html[data-wp-dark-mode-active] .entry-content,
html[data-wp-dark-mode-active] .entry-content p,
html[data-wp-dark-mode-active] .entry-content li,
html[data-wp-dark-mode-active] .entry-content span,
html[data-wp-dark-mode-active] .home .entry-summary,
html[data-wp-dark-mode-active] .home .entry-summary p,
html[data-wp-dark-mode-active] .site-main article,
html[data-wp-dark-mode-active] .site-main article *,
html.wp-dark-mode-theme-darkmode .site-branding a,
html.wp-dark-mode-theme-darkmode .site-branding a:hover,
html.wp-dark-mode-theme-darkmode .main-title a,
html.wp-dark-mode-theme-darkmode .main-title a:hover,
html.wp-dark-mode-theme-darkmode .entry-title,
html.wp-dark-mode-theme-darkmode .entry-title a,
html.wp-dark-mode-theme-darkmode .entry-title a:hover,
html.wp-dark-mode-theme-darkmode .entry-header,
html.wp-dark-mode-theme-darkmode .entry-meta,
html.wp-dark-mode-theme-darkmode .posted-on,
html.wp-dark-mode-theme-darkmode .posted-on a,
html.wp-dark-mode-theme-darkmode .byline,
html.wp-dark-mode-theme-darkmode .byline a,
html.wp-dark-mode-theme-darkmode .author-name,
html.wp-dark-mode-theme-darkmode .home-intro p,
html.wp-dark-mode-theme-darkmode .entry-content,
html.wp-dark-mode-theme-darkmode .entry-content p,
html.wp-dark-mode-theme-darkmode .entry-content li,
html.wp-dark-mode-theme-darkmode .entry-content span,
html.wp-dark-mode-theme-darkmode .home .entry-summary,
html.wp-dark-mode-theme-darkmode .home .entry-summary p,
html.wp-dark-mode-theme-darkmode .site-main article,
html.wp-dark-mode-theme-darkmode .site-main article * {
    color: #dcddde !important;
}

/* WP Dark Mode floating switch - pin to top-right of viewport */

@media (max-width: 768px) {
}

/* Forced Home Title Size */
@media (min-width: 769px) {
    .home .entry-title, 
    .home .entry-title a, 
    .home .entry-header h2, 
    .home .entry-header h1 {
        font-size: 22px !important;
        line-height: 1.1 !important;
    }
}

/* ============================================
   Homepage harmony pass
   Principles used:
   - readable measure (narrower line length)
   - consistent 8pt spacing rhythm
   - Gestalt proximity/common region for project cards
   - clearer hierarchy between section headings, card titles, and metadata
   ============================================ */
body.home {
    --home-measure: 52rem;
    --home-card-max: 52rem;
    --home-card-image: 112px;
    --home-card-gap: 20px;
    --home-card-padding: 20px;
    --home-left-inset: 40px;
    --home-right-inset: 40px;
}

body.home .home-intro-spacer {
    height: 1rem;
}

body.home .home-intro {
    width: min(var(--home-card-max), calc(100% - 32px)) !important;
    max-width: var(--home-measure) !important;
    margin: 0 auto 1rem !important;
    padding-left: var(--home-left-inset) !important;
    padding-right: var(--home-right-inset) !important;
    box-sizing: border-box !important;
}

body.home .home-about {
    margin: 0 0 1.5rem !important;
}

body.home .home-about h2,
body.home .home-section-heading h2,
body.home .home-section-label h2 {
    margin-bottom: 0.5rem !important;
}

body.home .home-intro p {
    max-width: var(--home-measure) !important;
    line-height: 1.72 !important;
}

body.home .home-section-heading {
    width: min(var(--home-card-max), calc(100% - 32px)) !important;
    max-width: var(--home-card-max) !important;
    margin: 0.5rem auto 0.75rem !important;
    padding-left: var(--home-left-inset) !important;
    padding-right: var(--home-right-inset) !important;
    box-sizing: border-box !important;
}

body.home .portfolio-heading {
    margin-top: 0.25rem !important;
}

body.home .personal-projects-heading {
    margin-top: 0.5rem !important;
    margin-bottom: 0.75rem !important;
}

body.home .site-main > article {
    margin-bottom: 1rem !important;
}

body.home .site-main > article:last-of-type {
    margin-bottom: 0 !important;
}

body.home .inside-article {
    width: min(var(--home-card-max), calc(100% - 32px)) !important;
    max-width: var(--home-card-max) !important;
    grid-template-columns: minmax(0, 1fr) var(--home-card-image) !important;
    column-gap: var(--home-card-gap) !important;
    row-gap: 12px !important;
    align-items: center !important;
    padding: var(--home-card-padding) var(--home-right-inset) var(--home-card-padding) var(--home-left-inset) !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

body.home .entry-header,
body.home .entry-title,
body.home .post-25 .entry-title,
body.home .post-39 .entry-title,
body.home .post-5 .entry-title,
body.home .post-6 .entry-title,
body.home .post-77 .entry-header,
body.home .post-77 .entry-title {
    padding-right: 0 !important;
}

body.home .entry-title,
body.home .entry-title a,
body.home .entry-header h2,
body.home .entry-header h1 {
    font-size: clamp(1.3rem, 1.15rem + 0.55vw, 1.55rem) !important;
    line-height: 1.18 !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
}

body.home .entry-meta,
body.home .posted-on,
body.home .posted-on a {
    font-size: 0.92rem !important;
    line-height: 1.35 !important;
    color: var(--contrast-2) !important;
}

body.home .post-image {
    width: var(--home-card-image) !important;
    border-radius: 20px !important;
}

body.home .post-image img,
body.home .wp-post-image {
    border-radius: 20px !important;
}

html[data-theme="dark"] body.home .inside-article,
html[data-wp-dark-mode-active] body.home .inside-article,
html.wp-dark-mode-theme-darkmode body.home .inside-article {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    body.home {
        --home-card-image: 92px;
        --home-card-gap: 14px;
        --home-card-padding: 14px;
        --home-left-inset: 16px;
        --home-right-inset: 16px;
    }

    body.home .home-intro-spacer {
        height: 0.75rem !important;
    }

    body.home .home-intro {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        margin: 0 16px 1rem !important;
        padding-left: var(--home-left-inset) !important;
        padding-right: var(--home-right-inset) !important;
    }

    body.home .home-about {
        margin-bottom: 1.25rem !important;
    }

    body.home .home-section-heading {
        width: calc(100% - 32px) !important;
        margin: 0.28rem 16px 0.5rem !important;
        max-width: none !important;
        padding-left: var(--home-left-inset) !important;
        padding-right: var(--home-right-inset) !important;
        box-sizing: border-box !important;
    }

    body.home .site-main > article {
        margin-bottom: 0.5rem !important;
    }

    body.home .inside-article {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        grid-template-columns: minmax(0, 1fr) var(--home-card-image) !important;
        gap: 12px var(--home-card-gap) !important;
        padding: var(--home-card-padding) 0 var(--home-card-padding) 0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
    }

    body.home .entry-header,
    body.home .entry-title,
    body.home .post-25 .entry-title,
    body.home .post-39 .entry-title,
    body.home .post-5 .entry-title,
    body.home .post-6 .entry-title,
    body.home .post-77 .entry-header,
    body.home .post-77 .entry-title {
        padding-right: 0 !important;
    }

    body.home .entry-title,
    body.home .entry-title a,
    body.home .entry-header h2,
    body.home .entry-header h1 {
        font-size: 1.24rem !important;
        line-height: 1.14 !important;
    }

    body.home .entry-meta,
    body.home .posted-on,
    body.home .posted-on a {
        font-size: 0.84rem !important;
    }

    body.home .post-image,
    body.home .post-image img,
    body.home .wp-post-image {
        width: var(--home-card-image) !important;
        border-radius: 16px !important;
    }
}

/* Homepage final shared left-edge alignment override */
body.home {
    --home-shared-shell: min(52rem, calc(100% - 80px));
    --home-header-right-reserve: 72px;
}

body.home .inside-header,
body.home .home-intro,
body.home .home-section-heading {
    width: var(--home-shared-shell) !important;
    max-width: var(--home-card-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: var(--home-right-inset) !important;
    box-sizing: border-box !important;
}

body.home .inside-article {
    width: var(--home-shared-shell) !important;
    max-width: var(--home-card-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--home-left-inset) !important;
    padding-right: var(--home-right-inset) !important;
    box-sizing: border-box !important;
}

body.home .inside-header {
    padding-left: 0 !important;
    padding-right: var(--home-right-inset) !important;
}

body.home .site-branding,
body.home .main-title,
body.home .main-title a,
body.home .home-about,
body.home .home-intro p,
body.home .home-section-heading h2,
body.home .entry-title,
body.home .entry-title a,
body.home .entry-meta {
    text-align: left !important;
}

@media (max-width: 768px) {
    body.home {
        --home-header-right-reserve: 60px;
    }

    body.home .inside-header,
    body.home .home-intro,
    body.home .home-section-heading {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: var(--home-right-inset) !important;
    }

    body.home .inside-article {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.home .inside-header {
        margin-left: 16px !important;
        margin-right: 16px !important;
        padding-left: 0 !important;
        padding-right: var(--home-right-inset) !important;
    }
}




@media (min-width: 1025px) {
    body.home .inside-article {
        width: min(52rem, calc(100% - 80px)) !important;
        max-width: 52rem !important;
        grid-template-columns: minmax(0, 1fr) 176px !important;
        column-gap: 18px !important;
    }

    body.home .post-image,
    body.home .post-image img,
    body.home .wp-post-image {
        width: 176px !important;
        border-radius: 22px !important;
    }
}

@media (max-width: 768px) {
    body.home .inside-article {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        grid-template-columns: minmax(0, 1fr) var(--home-card-image) !important;
        column-gap: var(--home-card-gap) !important;
    }

    body.home .post-image,
    body.home .post-image img,
    body.home .wp-post-image {
        width: var(--home-card-image) !important;
        border-radius: 16px !important;
    }
}

/* Homepage premium editorial pass 2026-06-27 */
body.home {
    --home-copy-measure: 56ch;
}

@media (min-width: 769px) {
    body.home .home-intro-spacer {
        height: 1.5rem;
    }

    body.home .home-intro {
        margin: 0 auto 2rem;
    }

    body.home .home-about {
        margin: 0 0 3rem;
    }

    body.home .home-about p {
        max-width: var(--home-copy-measure);
        font-size: 18px !important;
        line-height: 1.65 !important;
        color: var(--contrast-2) !important;
    }

    body.home .home-section-heading {
        margin: 0 auto 1rem;
    }

    body.home .portfolio-heading {
        margin-top: 0;
    }

    body.home .personal-projects-heading {
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    body.home .home-section-heading h2 {
        font-size: 24px !important;
        line-height: 1.1 !important;
        letter-spacing: -0.005em;
        text-wrap: balance;
    }

    body.home .inside-article {
        padding-top: 28px !important;
        padding-bottom: 28px !important;
        row-gap: 10px;
    }

    body.home h2.entry-title,
    body.home h2.entry-title a {
        font-size: 26px !important;
        line-height: 1.1 !important;
        font-weight: 600 !important;
        letter-spacing: -0.01em;
        text-wrap: balance;
    }
}

@media (max-width: 768px) {
    body.home .home-intro {
        margin: 0 16px 1.5rem;
    }

    body.home .home-about {
        margin: 0 0 2.25rem;
    }

    body.home .home-section-heading {
        margin-bottom: 0.75rem;
    }

    body.home .portfolio-heading {
        margin-top: 0;
    }

    body.home .personal-projects-heading {
        margin-top: 1.5rem;
    }

    body.home .home-section-heading h2 {
        font-size: 22px !important;
        line-height: 1.15 !important;
        letter-spacing: -0.005em;
    }

    body.home .inside-article {
        row-gap: 10px;
    }

    body.home h2.entry-title,
    body.home h2.entry-title a {
        font-size: 21px !important;
        line-height: 1.1 !important;
        font-weight: 600 !important;
        letter-spacing: -0.01em;
        text-wrap: balance;
    }
}
