:root {
    --bg: #f7f7f3;
    --surface: #ffffff;
    --text: #111111;
    --muted: #6f716c;
    --border: #dedfd9;
    --accent: #a8ff3e;
    --accent-text: #2b3d0d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, Arial, Helvetica, sans-serif;
    line-height: 1.7;
}

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

/* ===============================
   ALL POSTS LINK (post page only)
=============================== */

.all-posts-bar {
    max-width: 1100px;
    margin: auto;
    padding: 24px 25px 0;
}

.back {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.back:hover {
    color: var(--text);
}

/* ===============================
   HERO (shared)
=============================== */

.hero {
    max-width: 1100px;
    margin: auto;
    padding: 90px 25px 65px;
}

.hero--post {
    padding-top: 40px;
}

.eyebrow,
.category {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 24px;
    background: var(--accent);
    color: var(--accent-text);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h1,
.hero h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.055em;
    font-weight: 700;
}

.description,
.hero-description {
    max-width: 1000px;
    margin: 30px 0 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.55;
}

.meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 30px;
    color: var(--muted);
    font-size: 13px;
}

.dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--muted);
}

/* ===============================
   ARTICLE (post page only)
=============================== */

.article-wrapper {
    max-width: 1100px;
    margin: auto;
    padding: 0 25px 100px;
}

article {
    width: 100%;
}

article p {
    margin: 0 0 26px;
    font-size: 18px;
    line-height: 1.85;
}

article h2 {
    margin: 65px 0 22px;
    font-size: 35px;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

article h3 {
    margin: 45px 0 18px;
    font-size: 25px;
    line-height: 1.2;
}

article ul,
article ol {
    margin: 0 0 30px;
    padding-left: 28px;
}

article li {
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.7;
}

article strong {
    font-weight: 700;
}

article a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

article blockquote {
    margin: 40px 0;
    padding: 10px 0 10px 25px;
    border-left: 3px solid var(--accent);
    font-size: 21px;
    line-height: 1.6;
}

article img {
    display: block;
    width: 100%;
    height: auto;
    margin: 40px 0;
    border-radius: 6px;
}

article pre {
    overflow-x: auto;
    padding: 25px;
    margin: 35px 0;
    background: #111;
    color: #fff;
    border-radius: 6px;
}

article code {
    font-size: 14px;
}

article table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    font-size: 15px;
}

article th,
article td {
    padding: 13px 15px;
    border: 1px solid var(--border);
    text-align: left;
}

article th {
    background: #eeeeea;
    font-weight: 700;
}

article hr {
    margin: 55px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

/* ===============================
   CATEGORY FILTER (index page only)
=============================== */

.filter-bar {
    max-width: 1180px;
    margin: auto;
    padding: 0 30px 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-pill {
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.filter-pill:hover {
    border-color: var(--text);
    color: var(--text);
}

.filter-pill.active {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

/* ===============================
   FEATURED POST (index page only)
=============================== */

.featured-wrapper {
    max-width: 1180px;
    margin: auto;
    padding: 0 30px 30px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 40px;
}

.featured-image {
    width: 100%;
    aspect-ratio: 16 / 11;
    border-radius: 6px;
    background: var(--border);
    object-fit: cover;
    display: block;
}

.featured-category {
    display: inline-block;
    padding: 5px 11px;
    background: var(--accent);
    color: var(--accent-text);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 16px;
}

.featured-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 14px;
}

.featured-excerpt {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 20px;
}

.featured-meta {
    font-size: 13px;
    color: var(--muted);
}

/* ===============================
   POST GRID (index page only)
=============================== */

.grid-wrapper {
    max-width: 1180px;
    margin: auto;
    padding: 20px 30px 100px;
}

.section-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 24px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.post-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
    border-color: var(--text);
    transform: translateY(-2px);
}

.post-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--border);
    object-fit: cover;
    display: block;
}

.post-body {
    padding: 22px 22px 24px;
}

.post-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent-text);
    margin-bottom: 12px;
}

.post-title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0 0 10px;
}

.post-excerpt {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    font-size: 12px;
    color: var(--muted);
}

.state-message {
    padding: 60px 0;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    grid-column: 1 / -1;
}

/* ===============================
   MOBILE (shared)
=============================== */

@media (max-width: 900px) {

    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 700px) {

    .all-posts-bar {
        padding: 18px 20px 0;
    }

    .hero {
        padding: 65px 20px 45px;
    }

    .hero--post {
        padding-top: 30px;
    }

    h1,
    .hero h1 {
        font-size: 46px;
    }

    .description,
    .hero-description {
        font-size: 17px;
    }

    .article-wrapper {
        padding: 0 20px 70px;
    }

    article p,
    article li {
        font-size: 17px;
    }

    article h2 {
        font-size: 30px;
    }

    article h3 {
        font-size: 23px;
    }

    .filter-bar {
        padding: 0 20px 30px;
    }

    .featured-wrapper,
    .grid-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }

    .featured-card {
        padding: 24px;
    }

    .featured-title {
        font-size: 24px;
    }

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

}
