:root {
    --bg-body: #f4f5f7;
    --bg-card: #ffffff;
    --border-subtle: #e1e4ea;
    --text-main: #1f2430;
    --text-muted: #6b7280;
    --accent: #e11d48;
}

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
}

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

/* Header & Navigation */

.site-header {
    border-bottom: 1px solid var(--border-subtle);
    background: #ffffff;
    padding: 0.85rem 2rem 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header-inner,
.site-footer-inner,
.site-main {
    max-width: 1240px;
    margin: 0 auto;
}

.site-header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 1.5rem;
}

.site-header-left {
    justify-self: start;
}

.site-header-center {
    justify-self: center;
}

.site-header-right {
    justify-self: end;
}

.site-logo {
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-logo img {
    display: block;
    max-height: 50px;
    width: auto;
}

/* Navigation */

.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.site-nav a {
    padding-bottom: 0.1rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.site-nav a.is-active {
    border-bottom-color: var(--accent);
}

/* Actions (Login / Subscribe) */

.site-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
}

.btn-ghost,
.btn-solid {
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
}

.btn-ghost {
    background: #ffffff;
    color: var(--text-main);
}

.btn-solid {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    font-weight: 600;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border-subtle);
    background: #ffffff;
    padding: 1rem 2rem 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Main */

.site-main {
    padding: 2.2rem 2rem 3rem;
}

.home-hero {
    margin-bottom: 2.5rem;
}

.home-hero-media {
    margin: 0 0 2rem;
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
}

.home-hero-media img {
    display: block;
    width: 100%;
    height: auto;
}

.home-hero-media-placeholder {
    padding: 4rem 1rem;
    display: block;
    width: 100%;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--text-muted);
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
}

.home-hero-text {
    max-width: 960px;
    margin: 0 auto;
    text-align: left;
}

.home-hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    margin: 0 0 1rem;
    color: var(--accent);
}

.home-hero h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin: 0 0 1rem;
}

.home-hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0 0 2rem;
    color: var(--text-main);
}

.home-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.6rem;
    font-size: 1rem;
}

/* Post Feed – 4-column grid */

.post-feed {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.75rem;
    align-items: stretch;
}

/* Cards */

.post-card {
    background: var(--bg-card);
    border-radius: 0.75rem;
    border: 1px solid var(--border-subtle);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.08);
}

.post-card-image {
    margin: 0;
    max-height: 180px;
    overflow: hidden;
}

.post-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-header,
.post-card-excerpt,
.post-card-footer {
    padding: 0.8rem 1rem;
}

.post-card-header {
    padding-bottom: 0.3rem;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.tag-pill {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: rgba(248, 250, 252, 0.9);
}

.post-card-title {
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
}

.post-card-title a {
    font-weight: 600;
}

.post-card-excerpt p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.post-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.post-card-readmore {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--accent);
}

/* Post full */

.post-full-image {
    max-width: 960px;
    margin: 0 auto 1.75rem;
}

.post-full-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.9rem;
}

.post-full-header {
    max-width: 720px;
    margin: 0 auto 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.post-full-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.4rem;
}

.post-full-title {
    font-size: 2rem;
    margin: 0.2rem 0 0.5rem;
}

.post-full-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-full-excerpt {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-top: 0.8rem;
}

.post-full-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.7;
}

.post-full-content p {
    margin: 0 0 1.2rem;
}

/* Koenig editor width classes */

.kg-width-wide,
.kg-width-full {
    display: block;
    margin: 1.5rem auto;
}

.kg-width-wide {
    max-width: 1040px;
}

.kg-width-full {
    width: 100vw;
    max-width: 100%;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Tag / author headers */

.tag-header,
.author-header {
    max-width: 720px;
    margin: 0 auto 2rem;
}

.tag-header h1,
.author-header h1 {
    margin: 0 0 0.3rem;
}

.tag-header p,
.author-header p {
    margin: 0;
    color: var(--text-muted);
}

/* Page */

.page-full-header {
    max-width: 720px;
    margin: 0 auto 1.5rem;
}

.page-full-image {
    margin: 0 0 1rem;
}

.page-full-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

.page-full-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.page-full-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.7;
}

.page-full-content p {
    margin: 0 0 1.2rem;
}

/* Responsive */

@media (max-width: 1100px) {
    .post-feed {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .site-main {
        padding: 2rem 1.5rem 2.5rem;
    }
    .post-feed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .site-header-inner {
        grid-template-columns: 1fr;
        row-gap: 0.5rem;
        justify-items: center;
        text-align: center;
    }
    .site-header-left,
    .site-header-center,
    .site-header-right {
        justify-self: center;
    }
    .site-actions {
        justify-content: center;
    }
    .site-main {
        padding: 1.75rem 1.25rem 2.25rem;
    }
    .post-feed {
        grid-template-columns: 1fr;
    }
}
