@font-face {
    font-family: Montserrat;
    src: url("/fonts/montserrat/static/Montserrat-Regular.ttf");
}
@font-face {
    font-family: "Montserrat Bold";
    src: url("/fonts/montserrat/static/Montserrat-Bold.ttf");
}
@font-face {
    font-family: "Bebas Neue";
    src: url("/fonts/bebas/BebasNeue-Regular.woff2");
}

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

:root {
    --accent: #000;
    --bg: #fff;
    --text: #15171a;
    --text-secondary: #738a94;
    --border: #e6e6e6;
    --max-width: 1200px;
    --content-width: 720px;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Montserrat, sans-serif;
    font-size: 17px;
    line-height: 1.7;
}

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

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

/* ── Header ── */

.site-header {
    border-bottom: 1px solid var(--border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 24px;
}

.site-logo img {
    display: block;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-item {
    padding: 6px 10px;
    font-family: "Bebas Neue", sans-serif;
    font-size: 16px;
    letter-spacing: 0.03em;
    color: var(--text);
    border-radius: 4px;
    transition: background 0.15s;
}

.nav-item:hover {
    background: #f5f5f5;
}

/* ── Main ── */

.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px;
}

/* ── Post feed (homepage) ── */

.post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.post-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.post-card-link {
    display: block;
    height: 100%;
    color: inherit;
}

.post-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f0f0f0;
}

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

.post-card-content {
    padding: 20px;
}

.post-card-tag {
    font-family: "Bebas Neue", sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--accent);
    padding: 2px 7px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 10px;
}

.post-card-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: 22px;
    line-height: 1.25;
    margin: 0 0 10px;
    color: var(--text);
}

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

.post-card-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ── Pagination ── */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text);
    transition: background 0.15s;
}

.pagination li a:hover {
    background: #f5f5f5;
}

/* ── Single post ── */

.post {
    max-width: var(--content-width);
    margin: 0 auto;
}

.post-header {
    margin-bottom: 32px;
}

.post-tag {
    font-family: "Bebas Neue", sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--accent);
    padding: 2px 7px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 14px;
}

.post-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
    margin: 0 0 16px;
    color: var(--text);
}

.post-meta {
    font-size: 14px;
    color: var(--text-secondary);
}

.post-image {
    margin: 0 0 40px;
    border-radius: 8px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    display: block;
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: "Bebas Neue", sans-serif;
    line-height: 1.25;
    margin-top: 2em;
}

.post-content p {
    margin: 0 0 1.5em;
}

.post-content img {
    border-radius: 6px;
    margin: 1.5em 0;
}

.post-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content blockquote {
    border-left: 4px solid var(--accent);
    margin: 1.5em 0;
    padding: 0.5em 1em;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content pre {
    background: #f5f5f5;
    border-radius: 6px;
    padding: 1em;
    overflow-x: auto;
    font-size: 15px;
}

/* ── Post navigation ── */

.post-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 15px;
}

.post-nav a {
    color: var(--text-secondary);
    transition: color 0.15s;
    max-width: 45%;
}

.post-nav a:hover {
    color: var(--text);
}

/* ── Footer ── */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.site-footer a:hover {
    color: var(--text);
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .header-inner {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
        min-height: auto;
    }

    .site-nav {
        gap: 2px;
    }

    .nav-item {
        font-size: 14px;
        padding: 4px 8px;
    }

    .site-main {
        padding: 24px 16px;
    }

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

    .post-title {
        font-size: 28px;
    }

    .post-content {
        font-size: 16px;
    }
}
