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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

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

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

/* ========================
   Header
   ======================== */
.site-header {
    border-bottom: 1px solid #eee;
}

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

.site-logo img {
    height: 32px;
    width: auto;
}

.logo-text {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
}

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

.site-nav a {
    font-size: 15px;
    font-weight: 500;
    color: #555;
    transition: color 0.15s;
}

.site-nav a:hover {
    color: #1a1a1a;
}

.nav-external svg {
    vertical-align: -1px;
    margin-left: 2px;
}

.btn-primary {
    background: #1a1a1a;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: #333;
}

/* ========================
   Post Grid (home)
   ======================== */
.post-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 32px;
}

.post-card {
    display: flex;
    flex-direction: column;
}

.post-card-image-link {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 20px;
    aspect-ratio: 16 / 10;
}

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

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

.post-card-content {
    flex: 1;
}

.post-card-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.post-card-title a {
    transition: color 0.15s;
}

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

.post-card-excerpt {
    font-size: 15px;
    line-height: 1.5;
    color: #666;
}

/* ========================
   Pagination
   ======================== */
.pagination {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 64px;
    display: flex;
    justify-content: space-between;
}

.pagination a {
    font-size: 15px;
    font-weight: 600;
    color: #555;
    transition: color 0.15s;
}

.pagination a:hover {
    color: #1a1a1a;
}

/* ========================
   Post (single)
   ======================== */
.post-full {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

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

.post-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.post-subtitle {
    font-size: 20px;
    color: #555;
    line-height: 1.4;
}

.post-meta {
    margin-top: 16px;
    font-size: 14px;
    color: #999;
}

.post-cover {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.post-content {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-size: 19px;
    line-height: 1.5;
    color: #1a1a1a;
}

.post-content h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 48px 0 16px;
}

.post-content h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    margin: 36px 0 12px;
}

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

.post-content p:first-child {
    margin-top: 0;
}

.post-content a {
    color: #0369a1;
    text-decoration: underline;
    text-decoration-color: #bae6fd;
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}

.post-content a:hover {
    text-decoration-color: #0369a1;
}

.post-content img {
    border-radius: 8px;
    margin: 24px 0;
}

.post-content blockquote {
    border-left: 3px solid #1a1a1a;
    padding-left: 20px;
    margin: 1.5em 0 0;
    font-style: italic;
    color: #555;
}

.post-content ul, .post-content ol {
    margin: 1em 0 0;
    padding-left: 1.5em;
}

.post-content li {
    margin-bottom: 0.25em;
}

.post-content pre {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
    font-size: 15px;
}

.post-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* ========================
   Footer
   ======================== */
.site-footer {
    border-top: 1px solid #eee;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    text-align: center;
}

.footer-inner a {
    font-size: 14px;
    color: #999;
    transition: color 0.15s;
}

.footer-inner a:hover {
    color: #555;
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 900px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 24px;
        padding: 32px 20px;
    }

    .post-card-title {
        font-size: 20px;
    }

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

@media (max-width: 560px) {
    .post-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 24px 16px;
    }

    .header-inner {
        padding: 16px;
    }

    .site-nav {
        gap: 16px;
    }

    .site-nav a:not(.btn-primary) {
        display: none;
    }

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

    .post-full {
        padding: 32px 16px 60px;
    }

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

/* ========================
   Ghost-specific: hide members/subscribe
   ======================== */
/* ========================
   Cookie Banner
   ======================== */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 14px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    max-width: calc(100% - 32px);
}

.cookie-banner p {
    margin: 0;
    line-height: 1.4;
}

.cookie-banner a {
    color: #999;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner button {
    background: #fff;
    color: #1a1a1a;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.cookie-banner button:hover {
    background: #e5e5e5;
}

@media (max-width: 560px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        bottom: 16px;
    }
}

/* ========================
   Ghost-specific: hide members/subscribe
   ======================== */
.gh-portal-triggerbtn-container,
.gh-head-actions,
.footer-cta,
.subscribe-form {
    display: none !important;
}
