/* ------- Reset & base ------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a1a2e;
    background: #fafafb;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: #5b48d9; text-decoration: none; transition: color .15s ease; }
a:hover { color: #3a2bb0; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; color: #0f0f1e; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

/* ------- Header ------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid #eceaf5;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .75rem; color: inherit; }
.brand-mark {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 800; font-size: 1.2rem;
    box-shadow: 0 4px 14px rgba(102,126,234,.35);
}
.brand-text strong { display: block; font-size: 1.1rem; }
.brand-text small { display: block; font-size: .75rem; color: #6b6b80; }
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
    color: #2c2c45;
    font-weight: 500;
    font-size: .95rem;
    position: relative;
}
.site-nav a::after {
    content: '';
    position: absolute; left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: #5b48d9;
    transition: width .2s ease;
}
.site-nav a:hover::after { width: 100%; }
.nav-toggle {
    display: none;
    flex-direction: column; gap: 4px;
    background: none; border: 0; cursor: pointer; padding: .4rem;
}
.nav-toggle span {
    display: block; width: 24px; height: 2px;
    background: #1a1a2e; border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

/* ------- Hero ------- */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    background:
        radial-gradient(60% 60% at 50% 0%, rgba(102,126,234,.18) 0%, rgba(102,126,234,0) 60%),
        linear-gradient(180deg, #fafafb 0%, #fafafb 100%);
}
.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .72rem;
    font-weight: 700;
    color: #5b48d9;
    margin-bottom: .9rem;
}
.hero h1 { max-width: 880px; margin: 0 auto 1rem; }
.hero-sub {
    max-width: 660px; margin: 0 auto 2rem;
    color: #4a4a63; font-size: 1.1rem;
}
.btn-primary {
    display: inline-block;
    padding: .9rem 1.7rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 10px 26px rgba(102,126,234,.35);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(102,126,234,.45);
}

/* ------- Featured ------- */
.featured { padding: 3rem 1.5rem; }
.featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(20,20,50,.06);
    border: 1px solid #eceaf5;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}
.featured-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 60px rgba(20,20,50,.12);
    color: inherit;
}
.featured-image {
    min-height: 340px;
    position: relative;
}
.featured-body { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.featured-body h2 { margin-top: .4rem; }

/* ------- Section header ------- */
.section-header { text-align: center; margin: 4rem 0 2rem; }
.section-header p { color: #6b6b80; max-width: 600px; margin: 0 auto; }

/* ------- Post grid / cards ------- */
.latest, .categories, .related { padding: 1rem 1.5rem 4rem; }
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eceaf5;
    color: inherit;
    display: flex; flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(20,20,50,.10);
    border-color: #d9d4f0;
    color: inherit;
}
.post-thumb {
    height: 170px;
    position: relative;
}
.category-pill {
    position: absolute;
    top: 1rem; left: 1rem;
    background: rgba(255,255,255,.92);
    color: #1a1a2e;
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.post-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.post-body h3 { font-size: 1.15rem; }
.post-body p {
    color: #4a4a63;
    font-size: .95rem;
    flex: 1;
}
.meta {
    margin-top: .8rem;
    color: #8888a0;
    font-size: .85rem;
    display: flex; gap: .5rem; flex-wrap: wrap;
}
.meta.light { color: rgba(255,255,255,.85); }

/* ------- Categories ------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.category-card {
    background: #fff;
    border: 1px solid #eceaf5;
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    transition: transform .15s ease, border-color .15s ease;
}
.category-card:hover { transform: translateY(-2px); border-color: #c9c2ee; }
.category-card h3 { margin-bottom: .25rem; font-size: 1rem; }
.category-card p { margin: 0; color: #8888a0; font-size: .85rem; }

/* ------- Post page ------- */
.post-hero {
    padding: 5rem 1.5rem 3.5rem;
    color: #fff;
}
.post-hero h1 { color: #fff; max-width: 880px; margin-top: 1rem; }
.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 3rem;
    padding: 3rem 1.5rem 4rem;
}
.post-content { font-size: 1.06rem; max-width: 720px; }
.post-content .lead {
    font-size: 1.25rem;
    color: #2c2c45;
    border-left: 4px solid #5b48d9;
    padding-left: 1rem;
    margin-bottom: 2rem;
}
.post-content h2 {
    margin-top: 2.4rem;
    font-size: 1.6rem;
}
.post-content p { margin-bottom: 1.2em; color: #2c2c45; }
.post-content ul { padding-left: 1.4rem; margin-bottom: 1.4em; }
.post-content li { margin-bottom: .5em; color: #2c2c45; }
.tag-list { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
    background: #efeaff;
    color: #5b48d9;
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
}
.post-sidebar { display: flex; flex-direction: column; gap: 1.2rem; }
.sidebar-card {
    background: #fff;
    border: 1px solid #eceaf5;
    border-radius: 14px;
    padding: 1.2rem;
}
.sidebar-card h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: #8888a0; }
.sidebar-card p { font-size: .92rem; color: #2c2c45; margin: 0; }
.share-row a { font-weight: 600; }

/* ------- Footer ------- */
.site-footer {
    background: #0f0f1e;
    color: #c5c5d8;
    margin-top: 4rem;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.4fr;
    gap: 2.5rem;
    padding: 3.5rem 1.5rem 2rem;
}
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.footer-col p { color: #9494b0; font-size: .92rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a { color: #c5c5d8; }
.footer-col a:hover { color: #fff; }
.newsletter { display: flex; gap: .5rem; margin-top: .8rem; }
.newsletter input {
    flex: 1;
    padding: .65rem .9rem;
    border-radius: 8px;
    border: 1px solid #2a2a44;
    background: #1a1a2e;
    color: #fff;
    font-size: .9rem;
    min-width: 0;
}
.newsletter input::placeholder { color: #6b6b80; }
.newsletter button {
    padding: .65rem 1rem;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.footer-bottom {
    border-top: 1px solid #1f1f33;
    padding: 1.2rem 0;
    font-size: .85rem;
    color: #6b6b80;
}

/* ------- Responsive ------- */
@media (max-width: 860px) {
    .featured-card { grid-template-columns: 1fr; }
    .featured-image { min-height: 220px; }
    .post-layout { grid-template-columns: 1fr; gap: 2rem; }
    .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
    .site-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: #fff;
        padding: 1rem 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid #eceaf5;
        box-shadow: 0 8px 20px rgba(0,0,0,.06);
    }
    .site-nav.open { display: flex; }
    .nav-toggle { display: flex; }
    .hero { padding: 3.5rem 0 2.5rem; }
    .section-header { margin-top: 2.5rem; }
}
