/* Reset & Basics */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --link-color: #000000;
    --grid-gap: 2px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000000;
        --text-color: #ffffff;
        --link-color: #ffffff;
    }
}

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

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

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

/* Layout */
.gh-viewport {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.gh-head {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 100;
    /* border-bottom: 1px solid rgba(128,128,128,0.1); Optional: subtle border */
}

.gh-head-logo {
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.gh-head-menu {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.gh-main {
    flex: 1;
}

.gh-foot {
    padding: 40px 20px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Grid Feed (Index) */
/* Grid Feed (Index) */
.post-feed {
    column-count: 3;
    column-gap: var(--grid-gap);
    padding-bottom: 40px;
}

@media (max-width: 768px) {
    .post-feed {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .post-feed {
        column-count: 1;
    }
}

.post-card {
    position: relative;
    break-inside: avoid;
    margin-bottom: var(--grid-gap);
    background: #f0f0f0;
}

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

.post-card-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

/* Single Post */
.article {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.article-header {
    margin-bottom: 20px;
    text-align: center;
}

.article-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.article-image {
    margin-bottom: 30px;
}

.article-content {
    font-size: 1rem;
    line-height: 1.6;
}

.article-content a {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 40px 0;
}

/* Ghost Required Styles - Content Cards */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin: 0 auto;
    transform: translateX(-50%);
    left: 50%;
}

.kg-width-full {
    position: relative;
    width: 100vw;
    min-width: 100%;
    margin: 0 auto;
    transform: translateX(-50%);
    left: 50%;
}

.kg-width-full img {
    width: 100%;
}

/* Ghost Galleries */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.kg-gallery-image img {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
}