:root{
    --bg:#f4f7fb;
    --surface:#ffffff;
    --border:#e2e8f0;
    --text:#172033;
    --muted:#64748b;
    --primary:#2563eb;
    --primary-dark:#1d4ed8;
    --shadow:0 8px 28px rgba(15,23,42,.07);
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

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

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

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

.container{
    width:min(1180px,calc(100% - 40px));
    margin:0 auto;
}

.site-header{
    background:#111827;
    color:#fff;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.header-inner{
    min-height:76px;
    display:flex;
    align-items:center;
    gap:28px;
}

.site-logo{
    font-size:21px;
    font-weight:800;
    white-space:nowrap;
}

.main-nav{
    display:flex;
    align-items:center;
    gap:18px;
    flex:1;
}

.main-nav a{
    color:#cbd5e1;
    font-size:14px;
    font-weight:600;
}

.main-nav a:hover{
    color:#fff;
}

.search-form{
    display:flex;
    gap:8px;
}

.search-form input{
    width:190px;
    height:40px;
    border:1px solid #334155;
    background:#1e293b;
    color:#fff;
    border-radius:8px;
    padding:0 12px;
    outline:none;
}

.search-form input::placeholder{
    color:#94a3b8;
}

.search-form button,
.button{
    border:0;
    background:var(--primary);
    color:#fff;
    border-radius:8px;
    padding:10px 15px;
    font-weight:700;
    cursor:pointer;
}

.search-form button:hover,
.button:hover{
    background:var(--primary-dark);
}

.button-light{
    background:var(--surface);
    color:var(--text);
    border:1px solid var(--border);
}

.button-light:hover{
    background:#f8fafc;
}

.home-hero{
    margin:42px 0 28px;
    padding:34px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow);
}

.eyebrow,
.card-category,
.article-category{
    color:var(--primary);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.06em;
}

.home-hero h1,
.listing-header h1{
    margin:5px 0;
    font-size:34px;
    line-height:1.2;
}

.home-hero p,
.listing-header p{
    color:var(--muted);
    margin:8px 0 0;
}

.post-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px;
    margin-bottom:45px;
}

.post-card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:14px;
    overflow:hidden;
    box-shadow:var(--shadow);
    display:flex;
    flex-direction:column;
    min-width:0;
}

.card-image-link{
    display:block;
    background:#e2e8f0;
}

.card-image{
    width:100%;
    height:210px;
    object-fit:cover;
}

.card-body{
    padding:21px;
    display:flex;
    flex-direction:column;
    flex:1;
}

.post-card h2{
    margin:8px 0;
    font-size:21px;
    line-height:1.3;
}

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

.post-card p{
    color:var(--muted);
    margin:0 0 18px;
}

.card-footer{
    margin-top:auto;
    padding-top:14px;
    border-top:1px solid var(--border);
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    color:var(--muted);
    font-size:12px;
}

.card-footer a{
    color:var(--primary);
    font-weight:800;
}

.listing-header{
    padding:42px 0 25px;
}

.breadcrumbs{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
    color:var(--muted);
    font-size:13px;
    margin-bottom:17px;
}

.breadcrumbs a:hover{
    color:var(--primary);
}

.article-page{
    width:min(860px,100%);
    margin:42px auto 55px;
}

.article-header h1{
    font-size:42px;
    line-height:1.18;
    margin:8px 0 14px;
}

.article-meta{
    display:flex;
    flex-wrap:wrap;
    gap:9px;
    color:var(--muted);
    font-size:13px;
}

.article-image{
    width:100%;
    max-height:520px;
    object-fit:cover;
    border-radius:14px;
    margin:30px 0;
}

.article-lead{
    font-size:19px;
    font-weight:600;
    color:#475569;
    padding:20px 0;
    border-top:1px solid var(--border);
    border-bottom:1px solid var(--border);
}

.article-content{
    padding:28px 0;
    font-size:17px;
    overflow-wrap:anywhere;
}

.article-content h1,
.article-content h2,
.article-content h3{
    line-height:1.3;
    margin-top:30px;
}

.article-content p{
    margin:0 0 18px;
}

.article-content img{
    border-radius:10px;
    margin:20px 0;
}

.article-content a{
    color:var(--primary);
    text-decoration:underline;
}

.article-content ul,
.article-content ol{
    padding-left:25px;
}

.article-bottom{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    border-top:1px solid var(--border);
    padding-top:20px;
}

.empty-site,
.not-found{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:14px;
    padding:55px 30px;
    text-align:center;
    margin:30px 0 50px;
}

.not-found-code{
    font-size:70px;
    line-height:1;
    font-weight:900;
    color:#cbd5e1;
}

.not-found h1{
    margin:15px 0 5px;
}

.not-found p{
    color:var(--muted);
    margin-bottom:25px;
}

.site-footer{
    background:#111827;
    color:#94a3b8;
    margin-top:60px;
}

.footer-inner{
    min-height:72px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:13px;
}

@media(max-width:1000px){
    .header-inner{
        flex-wrap:wrap;
        padding:15px 0;
    }

    .main-nav{
        order:3;
        flex-basis:100%;
        overflow:auto;
        padding-bottom:3px;
    }

    .search-form{
        margin-left:auto;
    }

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

@media(max-width:650px){
    .container{
        width:min(100% - 24px,1180px);
    }

    .site-logo{
        flex:1;
    }

    .search-form{
        width:100%;
    }

    .search-form input{
        flex:1;
        width:auto;
    }

    .home-hero{
        padding:25px;
        margin-top:24px;
    }

    .home-hero h1,
    .listing-header h1{
        font-size:28px;
    }

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

    .article-page{
        margin-top:25px;
    }

    .article-header h1{
        font-size:31px;
    }

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

    .footer-inner{
        flex-direction:column;
        justify-content:center;
        gap:4px;
    }
}
