@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

:root {
    --bg: #faf9f7;
    --surface: #fff;
    --text: #1c1917;
    --text-soft: #57534e;
    --text-muted: #a8a29e;
    --border: #e7e5e4;
    --accent: #e11d48;
    --accent-hover: #be123c;
    --accent-soft: #fff1f2;
    --radius: 16px;
    --shadow-sm: 0 1px 3px rgba(28,25,23,.06);
    --shadow-md: 0 8px 30px rgba(28,25,23,.08);
    --shadow-lg: 0 20px 50px rgba(28,25,23,.12);
    --transition: .25s cubic-bezier(.4,0,.2,1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.site-header {
    padding: 3rem 2rem 2rem;
    text-align: center;
    position: relative;
}
.site-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 1.6rem auto 0;
    border-radius: 2px;
}
.site-header .logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text);
}
.site-header .logo a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}
.site-header .logo a:hover { color: var(--accent) }
.site-header .subtitle {
    font-size: .95rem;
    color: var(--text-muted);
    margin-top: .5rem;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

/* Compact header for post page */
body.page-post .site-header { padding: 2rem 2rem 1.2rem }
body.page-post .site-header .logo { font-size: 1.8rem }
body.page-post .site-header::after { width: 40px; margin-top: 1rem }

/* ── Nav ── */
nav {
    display: flex;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250,249,247,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
nav a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: .45rem 1rem;
    border-radius: 100px;
    transition: all var(--transition);
}
nav a:hover {
    color: var(--accent);
    background: var(--accent-soft);
}
nav a.active {
    color: #fff;
    background: var(--accent);
}

/* ── Main ── */
main {
    max-width: 1100px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

/* ── Post Grid ── */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* ── Post Card ── */
.post-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.post-card .card-img {
    position: relative;
    overflow: hidden;
}
.post-card .card-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.post-card:hover .card-img img {
    transform: scale(1.04);
}
.post-card .card-body {
    padding: 1.5rem 1.6rem 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-card .card-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .75rem;
    color: var(--text-muted);
    margin-bottom: .75rem;
    flex-wrap: wrap;
}
.tag {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 3px 10px;
    border-radius: 100px;
}
.post-card .card-body h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: .6rem;
    color: var(--text);
}
.post-card .card-body h2 a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}
.post-card .card-body h2 a:hover { color: var(--accent) }
.post-card .card-body .excerpt {
    color: var(--text-soft);
    font-size: .9rem;
    line-height: 1.65;
    flex: 1;
}
.read-more {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none;
    transition: gap var(--transition), color var(--transition);
}
.read-more:hover { gap: .6rem; color: var(--accent-hover) }
.read-more svg { width: 16px; height: 16px; flex-shrink: 0 }

/* ── Featured card (first post) ── */
.post-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}
.post-card.featured .card-img img { height: 100%; min-height: 320px }
.post-card.featured .card-body { padding: 2.5rem 2.5rem; justify-content: center }
.post-card.featured .card-body h2 { font-size: 1.8rem }
.post-card.featured .card-body .excerpt { font-size: .95rem }

/* ── Single Article ── */
.article-wrap {
    max-width: 740px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}
.hero-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
    margin-bottom: 2.2rem;
    box-shadow: var(--shadow-md);
}
.article-wrap .meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: .6rem;
    flex-wrap: wrap;
}
.article-wrap h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: .8rem;
}
.article-wrap .description {
    font-size: 1.15rem;
    color: var(--text-soft);
    line-height: 1.75;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.article-wrap .content {
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.8;
}
.article-wrap .content p { margin-bottom: 1.4rem }
.article-wrap .content strong { color: var(--text) }
.article-wrap .content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
}
.article-wrap .content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
}
.article-wrap .content blockquote {
    border-left: 3px solid var(--accent);
    padding: .8rem 1.2rem;
    margin: 1.5rem 0;
    background: var(--accent-soft);
    border-radius: 0 8px 8px 0;
    color: var(--text-soft);
    font-style: italic;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 3rem;
    padding: .7rem 1.4rem;
    color: var(--accent);
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none;
    border: 2px solid var(--accent);
    border-radius: 100px;
    transition: all var(--transition);
}
.back-link:hover {
    background: var(--accent);
    color: #fff;
}

/* ── Category Header ── */
.category-header {
    text-align: center;
    padding: 0 1rem 2rem;
}
.category-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}
.category-header h2 span { color: var(--accent) }

/* ── Empty state ── */
.empty {
    text-align: center;
    padding: 5rem 1.5rem;
    color: var(--text-muted);
}
.empty h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 6rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: .5rem;
    line-height: 1;
}
.empty p { font-size: 1.05rem; margin-bottom: .5rem }

/* ── Footer ── */
footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-muted);
    font-size: .8rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}
footer .footer-name {
    font-weight: 700;
    color: var(--text-soft);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .site-header .logo { font-size: 2rem }
    .post-card.featured { grid-template-columns: 1fr }
    .post-card.featured .card-img img { height: 220px; min-height: unset }
    .post-card.featured .card-body { padding: 1.5rem 1.6rem 1.8rem }
    .post-card.featured .card-body h2 { font-size: 1.35rem }
    .post-grid { grid-template-columns: 1fr }
}

@media (max-width: 480px) {
    .site-header { padding: 2rem 1rem 1.5rem }
    .site-header .logo { font-size: 1.7rem }
    nav { gap: .3rem; padding: .6rem 1rem }
    nav a { font-size: .72rem; padding: .4rem .7rem }
    main { padding: 0 1rem; margin: 1.5rem auto }
    .post-card .card-img img { height: 180px }
    .post-card .card-body { padding: 1.2rem 1.3rem 1.4rem }
    .post-card .card-body h2 { font-size: 1.15rem }
    .article-wrap h2 { font-size: 1.5rem }
    .hero-img { border-radius: 12px }
}
