/*
Theme Name: KesyIO Blog
Theme URI: https://kesyio.com/
Author: KesyIO
Author URI: https://kesyio.com/
Description: Minimal blog theme for KesyIO.
Version: 1.0.1
Text Domain: kesyio-blog
*/

/* =========================================================
   Variables
========================================================= */

:root {
    --color-bg: #ffffff;
    --color-text: #111111;
    --color-muted: #777777;
    --color-border: #e8e8e8;
    --color-soft: #f7f5fc;

    --accent: #6E56CF;
    --accent-hover: #5f48bd;

    --container: 1200px;
    --content: 760px;

    --radius: 12px;
}


/* =========================================================
   Reset
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background: var(--color-bg);
    color: var(--color-text);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    line-height: 1.7;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}


/* =========================================================
   Layout
========================================================= */

.container {
    width: min(
        var(--container),
        calc(100% - 48px)
    );

    margin-left: auto;
    margin-right: auto;
}

.site-main {
    min-height: 60vh;
}


/* =========================================================
   Header
========================================================= */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;
}


/* Logo */

.site-logo {
    flex-shrink: 0;

    color: var(--color-text);

    font-size: 22px;
    font-weight: 700;

    line-height: 1;

    letter-spacing: -0.05em;
}

.site-logo:hover {
    color: var(--accent);
}


/* Navigation */

.site-nav {
    display: flex;
    align-items: center;

    gap: 30px;

    margin-left: auto;
}

.site-nav a {
    position: relative;

    color: var(--color-text);

    font-size: 14px;
    font-weight: 500;
}

.site-nav a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -6px;

    width: 0;
    height: 1px;

    background: var(--accent);

    transition: width .2s ease;
}

.site-nav a:hover {
    color: var(--accent);
}

.site-nav a:hover::after {
    width: 100%;
}


/* Header actions */

.site-header__actions {
    display: flex;
    align-items: center;

    gap: 20px;

    flex-shrink: 0;
}

.site-header__login {
    color: var(--color-text);

    font-size: 14px;
    font-weight: 500;
}

.site-header__login:hover {
    color: var(--accent);
}


/* =========================================================
   Buttons
========================================================= */

.button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 20px;

    border: 1px solid var(--accent);
    border-radius: 8px;

    background: var(--accent);
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    line-height: 1;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.button:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);

    color: #fff;

    transform: translateY(-1px);

    box-shadow:
        0 6px 20px rgba(110, 86, 207, .18);
}


/* =========================================================
   Blog Hero
========================================================= */

.blog-hero {
    padding: 120px 0 100px;

    text-align: center;
}

.blog-hero__eyebrow {
    margin-bottom: 22px;

    color: var(--accent);

    font-size: 12px;
    font-weight: 700;

    line-height: 1.2;

    letter-spacing: .14em;
    text-transform: uppercase;
}

.blog-hero h1 {
    max-width: 900px;

    margin: 0 auto 26px;

    color: var(--color-text);

    font-size: clamp(48px, 7vw, 88px);
    font-weight: 700;

    line-height: .98;

    letter-spacing: -0.065em;
}

.blog-hero p {
    max-width: 650px;

    margin: 0 auto;

    color: var(--color-muted);

    font-size: 19px;
    line-height: 1.6;
}


/* =========================================================
   Posts Section
========================================================= */

.posts-section {
    padding: 20px 0 120px;
}


/* Section heading */

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    margin-bottom: 40px;
    padding-bottom: 18px;

    border-bottom: 1px solid var(--color-border);
}

.section-heading__label {
    color: var(--color-text);

    font-size: 12px;
    font-weight: 700;

    line-height: 1.2;

    letter-spacing: .14em;
    text-transform: uppercase;
}

.section-heading__count {
    color: var(--color-muted);

    font-size: 14px;
}


/* =========================================================
   Posts Grid
========================================================= */

.posts-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 24px;
}


/* =========================================================
   Post Card
========================================================= */

.post-card {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    background: #fff;

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.post-card:hover {
    transform: translateY(-4px);

    border-color: #d8d2ed;

    box-shadow:
        0 12px 40px rgba(0, 0, 0, .06);
}


/* Image */

.post-card__image {
    display: block;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: var(--color-soft);
}

.post-card__image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .5s ease;
}

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


/* Content */

.post-card__content {
    padding: 28px;
}


/* Category */

.post-card__meta {
    margin-bottom: 13px;

    color: var(--accent);

    font-size: 11px;
    font-weight: 700;

    line-height: 1.2;

    letter-spacing: .12em;
    text-transform: uppercase;
}


/* Title */

.post-card h2 {
    margin: 0 0 12px;

    color: var(--color-text);

    font-size: 26px;
    font-weight: 700;

    line-height: 1.15;

    letter-spacing: -0.04em;
}

.post-card h2 a:hover {
    color: var(--accent);
}


/* Excerpt */

.post-card__excerpt {
    color: var(--color-muted);

    font-size: 15px;

    line-height: 1.6;
}


/* Date */

.post-card__date {
    margin-top: 24px;

    color: var(--color-muted);

    font-size: 13px;
}


/* =========================================================
   Single Article
========================================================= */

.article-header {
    padding: 100px 0 60px;
}

.article-header__inner {
    max-width: 900px;

    margin-left: auto;
    margin-right: auto;
}


/* Category */

.article-category {
    margin-bottom: 20px;

    color: var(--accent);

    font-size: 12px;
    font-weight: 700;

    line-height: 1.2;

    letter-spacing: .14em;
    text-transform: uppercase;
}


/* Title */

.article-title {
    margin: 0 0 28px;

    color: var(--color-text);

    font-size: clamp(44px, 6vw, 76px);
    font-weight: 700;

    line-height: 1.02;

    letter-spacing: -0.06em;
}


/* Meta */

.article-meta {
    color: var(--color-muted);

    font-size: 14px;
}


/* Featured image */

.article-featured-image {
    max-width: 1100px;

    margin: 0 auto 70px;

    overflow: hidden;

    border-radius: var(--radius);
}

.article-featured-image img {
    width: 100%;
}


/* =========================================================
   Article Content
========================================================= */

.article-content {
    max-width: var(--content);

    margin-left: auto;
    margin-right: auto;

    padding-bottom: 120px;
}

.article-content > * {
    margin-top: 0;
    margin-bottom: 28px;
}


/* Paragraph */

.article-content p {
    color: var(--color-text);

    font-size: 18px;

    line-height: 1.75;
}


/* Links */

.article-content a {
    color: var(--accent);

    text-decoration: underline;

    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.article-content a:hover {
    color: var(--accent-hover);
}


/* Headings */

.article-content h2 {
    margin-top: 65px;
    margin-bottom: 24px;

    color: var(--color-text);

    font-size: 34px;
    font-weight: 700;

    line-height: 1.15;

    letter-spacing: -0.04em;
}

.article-content h3 {
    margin-top: 45px;
    margin-bottom: 20px;

    color: var(--color-text);

    font-size: 26px;
    font-weight: 700;

    line-height: 1.2;

    letter-spacing: -0.03em;
}

.article-content h4 {
    margin-top: 35px;

    font-size: 21px;
    line-height: 1.3;
}


/* Lists */

.article-content ul,
.article-content ol {
    margin-bottom: 32px;

    padding-left: 26px;
}

.article-content li {
    margin-bottom: 8px;
}


/* Blockquote */

.article-content blockquote {
    margin: 50px 0;

    padding: 28px 30px;

    border-left: 3px solid var(--accent);

    background: var(--color-soft);

    color: var(--color-text);

    font-size: 20px;

    line-height: 1.6;
}

.article-content blockquote p {
    margin-bottom: 0;
}


/* Images */

.article-content img {
    margin: 45px 0;

    border-radius: 8px;
}


/* Code */

.article-content code {
    padding: 3px 6px;

    border-radius: 4px;

    background: var(--color-soft);

    font-size: .9em;
}

.article-content pre {
    overflow-x: auto;

    margin: 40px 0;

    padding: 24px;

    border-radius: 8px;

    background: #111;
    color: #fff;

    line-height: 1.6;
}


/* =========================================================
   WordPress Gutenberg
========================================================= */

.wp-block-image {
    margin-top: 40px;
    margin-bottom: 40px;
}

.wp-block-image img {
    border-radius: 10px;
}

.wp-block-separator {
    margin: 60px 0;

    border: 0;
    border-top: 1px solid var(--color-border);
}

.wp-block-button__link {
    border-radius: 8px;

    background: var(--accent);

    font-size: 14px;
    font-weight: 600;

    transition:
        background .2s ease,
        transform .2s ease;
}

.wp-block-button__link:hover {
    background: var(--accent-hover);

    transform: translateY(-1px);
}


/* =========================================================
   Article CTA
========================================================= */

.article-cta {
    margin: 70px 0;

    padding: 42px;

    border-radius: var(--radius);

    background: var(--color-soft);
}

.article-cta h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.article-cta p {
    margin-bottom: 24px;
}


/* =========================================================
   Pagination
========================================================= */

.pagination {
    display: flex;

    justify-content: center;

    margin-top: 60px;
}

.pagination .page-numbers {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 42px;
    height: 42px;

    border: 1px solid var(--color-border);
    border-radius: 6px;

    color: var(--color-text);

    font-size: 14px;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.pagination .page-numbers + .page-numbers {
    margin-left: 6px;
}

.pagination .page-numbers:hover {
    border-color: var(--accent);

    color: var(--accent);
}

.pagination .current {
    border-color: var(--accent);

    background: var(--accent);
    color: #fff;
}


/* =========================================================
   Footer
========================================================= */

.site-footer {
    border-top: 1px solid var(--color-border);

    background: #fff;
}

.site-footer__inner {
    min-height: 180px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.site-footer__brand {
    color: var(--color-text);

    font-size: 20px;
    font-weight: 700;

    line-height: 1;

    letter-spacing: -0.05em;
}

.site-footer__brand:hover {
    color: var(--accent);
}

.site-footer__description {
    margin-top: 9px;

    color: var(--color-muted);

    font-size: 13px;
}

.site-footer__copyright {
    color: var(--color-muted);

    font-size: 13px;
}


/* =========================================================
   WordPress Admin / Accessibility
========================================================= */

.screen-reader-text {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


/* =========================================================
   Mobile
========================================================= */

@media (max-width: 900px) {

    .site-nav {
        display: none;
    }

    .site-header__actions {
        margin-left: auto;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .article-header__inner {
        max-width: 100%;
    }
}


@media (max-width: 768px) {

    .container {
        width: min(
            var(--container),
            calc(100% - 32px)
        );
    }


    /* Header */

    .site-header__inner {
        min-height: 70px;

        gap: 15px;
    }

    .site-header__login {
        display: none;
    }

    .site-header__actions {
        gap: 10px;
    }

    .site-header__actions .button {
        min-height: 40px;

        padding: 0 14px;

        font-size: 13px;
    }


    /* Hero */

    .blog-hero {
        padding: 80px 0 70px;
    }

    .blog-hero__eyebrow {
        margin-bottom: 18px;
    }

    .blog-hero h1 {
        font-size: 48px;

        letter-spacing: -0.06em;
    }

    .blog-hero p {
        font-size: 17px;
    }


    /* Posts */

    .posts-section {
        padding-bottom: 80px;
    }

    .section-heading {
        margin-bottom: 28px;
    }

    .post-card__content {
        padding: 22px;
    }

    .post-card h2 {
        font-size: 24px;
    }


    /* Article */

    .article-header {
        padding: 70px 0 40px;
    }

    .article-title {
        margin-bottom: 22px;

        font-size: 44px;

        letter-spacing: -0.055em;
    }

    .article-featured-image {
        margin-bottom: 50px;

        border-radius: 8px;
    }

    .article-content {
        padding-bottom: 80px;
    }

    .article-content p {
        font-size: 17px;
    }

    .article-content h2 {
        margin-top: 50px;

        font-size: 29px;
    }

    .article-content h3 {
        font-size: 24px;
    }

    .article-content blockquote {
        padding: 22px;

        font-size: 18px;
    }


    /* CTA */

    .article-cta {
        margin: 50px 0;

        padding: 28px 24px;
    }


    /* Footer */

    .site-footer__inner {
        min-height: auto;

        padding: 40px 0;

        flex-direction: column;

        align-items: flex-start;
    }
}


@media (max-width: 480px) {

    .blog-hero h1 {
        font-size: 42px;
    }

    .article-title {
        font-size: 38px;
    }

    .site-header__actions .button {
        padding: 0 12px;
    }
}