/* ============================================
   Author — Bold Contemporary Ghost Theme
   Sans-serif, card-based, modern author theme
   ============================================ */

/* --- Fonts --- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    src: url('../fonts/inter.woff2') format('woff2');
    font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--ghost-font-body, 'Inter'), -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    background: #fff;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* --- Container --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* --- Page Layout --- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; }

/* --- Header --- */
.header {
    background: #0f172a;
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.header-logo-img { height: 32px; }

.header-nav { display: flex; gap: 24px; }

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover { color: #fff; }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.2s;
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
    display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0;
    border-radius: 1px; transition: 0.2s;
}

/* --- Hero --- */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 12px; }

.hero-body { margin-bottom: 24px; }
.hero-body p { color: #64748b; line-height: 1.6; }

.hero-image-wrap {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ghost-font-body, 'Inter'), sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #0f172a;
    border-color: #cbd5e1;
}

.btn-outline:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* --- Sections --- */
.section { padding: 80px 0; }

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1rem;
    color: #64748b;
}

.section-footer {
    text-align: center;
    margin-top: 48px;
}

/* --- Books Grid (Showcase) --- */
.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.book-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.book-card:hover {
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    transform: translateY(-6px);
}

.book-card-image {
    height: 280px;
    overflow: hidden;
    background: #f1f5f9;
}

.book-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.book-card:hover .book-card-image img { transform: scale(1.05); }

.book-card-body { padding: 24px; }

.book-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.book-card-description {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 12px;
}

.book-card-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

.book-card-links { display: flex; gap: 10px; }
.book-card-links .btn { padding: 8px 16px; font-size: 0.8rem; }

/* --- Post Card --- */
.posts-grid {
    display: grid;
    gap: 32px;
}

.posts-grid-3col { grid-template-columns: repeat(3, 1fr); }

.post-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.post-card:hover {
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    transform: translateY(-4px);
}

.post-card-image-wrap {
    height: 200px;
    overflow: hidden;
    background: #f1f5f9;
}

.post-card-image-link { display: block; width: 100%; height: 100%; }

.post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.post-card:hover .post-card-image { transform: scale(1.06); }

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

.post-card-tags { margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

.post-card-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 4px;
}

.post-card-tag:hover { background: #dbeafe; color: #2563eb; }

.post-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 8px;
}

.post-card-title a:hover { color: #3b82f6; }

.post-card-excerpt {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 16px;
}

.post-card-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    gap: 12px;
}

/* --- Ghost Editor Classes --- */
.kg-width-wide { max-width: 880px; margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* --- Home Page Content Section --- */
.page-content-section {
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.page-content-section .post-content {
    max-width: 720px;
    margin: 0 auto;
}

.page-content-section .post-content h2 {
    font-size: 1.8rem;
    margin-top: 0;
    padding-top: 24px;
    text-align: center;
}

.page-content-section .post-content h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: #3b82f6;
    border-radius: 2px;
    margin: 12px auto 0;
}

.page-content-section .post-content h3 {
    font-size: 1.25rem;
    margin-top: 32px;
}

.page-content-section .post-content p:last-child {
    margin-bottom: 0;
}

/* --- CTA Section --- */
.cta-section { padding: 0; }

.cta-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 64px;
    text-align: center;
    color: #fff;
    margin: 80px 0;
}

.cta-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-description {
    color: #94a3b8;
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cta-input-group {
    display: flex;
    gap: 12px;
    max-width: 440px;
    margin: 0 auto;
}

.cta-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1e293b;
    color: #fff;
    font-family: var(--ghost-font-body, 'Inter'), sans-serif;
    font-size: 0.9rem;
    outline: none;
}

.cta-input::placeholder { color: #64748b; }
.cta-input:focus { border-color: #3b82f6; }

.cta-card .btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
}

.cta-card .btn-primary:hover { background: #2563eb; border-color: #2563eb; }

/* --- Blog Page --- */
.blog-page { padding: 64px 0; }

.page-header {
    text-align: center;
    margin-bottom: 56px;
}

.page-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.page-description {
    font-size: 1.05rem;
    color: #64748b;
}

/* --- Post Page --- */
.post-page { padding: 0 0 64px; }

.post-image {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
}

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

.post-content-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 0;
}

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

.post-meta-top { margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

.post-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-tag:hover { background: #dbeafe; color: #2563eb; }

.post-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.post-meta {
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    gap: 8px;
    align-items: center;
}

.post-content { font-size: 1.05rem; line-height: 1.8; }

.post-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin: 40px 0 16px;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 32px 0 12px;
}

.post-content p { margin-bottom: 24px; }

.post-content a { color: #3b82f6; border-bottom: 1px solid transparent; }
.post-content a:hover { border-bottom-color: #3b82f6; }

.post-content blockquote {
    border-left: 4px solid #3b82f6;
    margin: 32px 0;
    padding: 8px 24px;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}

.post-content ul, .post-content ol { margin: 16px 0; padding-left: 24px; }
.post-content li { margin-bottom: 8px; }

.post-content img { border-radius: 8px; margin: 32px 0; }
.post-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-footer { margin-top: 48px; padding-top: 32px; border-top: 1px solid #e2e8f0; }

.subscribe-cta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 32px;
}

.subscribe-cta h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.subscribe-cta p { color: #64748b; margin-bottom: 20px; }

.subscribe-cta .btn-primary { background: #0f172a; border-color: #0f172a; }
.subscribe-cta .btn-primary:hover { background: #1e293b; border-color: #1e293b; }

.post-author { display: flex; gap: 24px; }

.post-author-card { display: flex; gap: 16px; align-items: flex-start; }

.post-author-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.post-author-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
}

.post-author-bio {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

/* --- Page Template --- */
.page-template { padding: 64px 0; }

.page-article { max-width: 740px; margin: 0 auto; }

.page-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.page-content-wrap { padding: 0 24px; }

/* --- Archive Pages --- */
.archive-page { padding: 64px 0; }

.archive-header {
    text-align: center;
    margin-bottom: 56px;
}

.archive-image {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 auto 24px;
}

.archive-image img { width: 100%; height: 100%; object-fit: cover; }

.archive-author-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 24px;
    border: 3px solid #e2e8f0;
}

.archive-author-image img { width: 100%; height: 100%; object-fit: cover; }

.archive-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.archive-description {
    font-size: 1rem;
    color: #64748b;
    max-width: 560px;
    margin: 0 auto;
}

.archive-meta {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 12px;
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* --- Error Page --- */
.error-page { padding: 120px 0; text-align: center; }

.error-code {
    font-size: 5rem;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1;
    display: block;
    margin-bottom: 8px;
}

.error-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.error-message {
    color: #64748b;
    margin-bottom: 32px;
}

/* --- Pagination --- */
.pagination { padding: 48px 0; }

.pagination-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.pagination-prev,
.pagination-next {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.pagination-prev:hover,
.pagination-next:hover { color: #3b82f6; }

.pagination-page { font-size: 0.85rem; color: #94a3b8; font-weight: 500; }

/* --- Footer --- */
.footer {
    padding: 40px 0;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-social { display: flex; gap: 16px; }

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #64748b;
    transition: all 0.2s;
}

.social-link:hover {
    background: #3b82f6;
    color: #fff;
}

.footer-copy { font-size: 0.8rem; color: #94a3b8; }
.footer-copy a { color: #64748b; font-weight: 500; }
.footer-copy a:hover { color: #0f172a; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-grid { gap: 40px; }
    .books-grid { grid-template-columns: repeat(2, 1fr); }
    .posts-grid-3col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero { padding: 48px 0; }
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-title { font-size: 2rem; }
    .hero-image-wrap { display: none; }
    .hero-actions { flex-direction: column; }

    .header-nav { display: none; }
    .header-nav.is-open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #0f172a; padding: 16px 24px 24px; border-top: 1px solid #1e293b; z-index: 10; }
    .nav-toggle { display: block; }

    .books-grid { grid-template-columns: 1fr; gap: 24px; }
    .posts-grid-3col { grid-template-columns: 1fr; gap: 24px; }

    .section { padding: 48px 0; }
    .section-title { font-size: 1.6rem; }

    .cta-card { padding: 32px 24px; margin: 48px 0; }
    .cta-input-group { flex-direction: column; }

    .post-title { font-size: 1.8rem; }
    .post-content-wrap { padding: 32px 24px 0; }

    .footer-inner { flex-direction: column; gap: 16px; text-align: center; }

    .post-author { flex-direction: column; }
}
