/* Inter — closest open-source match to Notion typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #FFFFFF;
    --card-bg: #F5F5F4;       /* Notion's slightly warm gray */
    --text-color: #1A1A19;
    --text-secondary: #9B9A97; /* Notion's muted gray */
    --accent-blue: #007AFF;
    --border-radius: 20px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    --max-width: 700px;
    --tag-bg: #EFEFED;
    --tag-color: #6B6B68;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.65;
    margin: 0;
    padding: 0;
    letter-spacing: -0.011em; /* Notion's subtle tight tracking */
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    width: 100%;
}

/* Header */
.gh-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding-bottom: 2rem;
}

.gh-head-logo {
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--text-color);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.gh-head-logo img {
    height: 48px;
    width: auto;
    display: block;
}

.gh-head-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.25rem;
}

.gh-head-menu a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.15s ease;
}

.gh-head-menu a:hover {
    color: var(--text-color);
}

/* About Section */
.gh-about {
    margin-bottom: 2.5rem;
}

.gh-about p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    color: var(--text-color);
}

.gh-social-links {    margin-top: 1rem;    display: flex;    gap: 0.5rem;    font-size: 0.8rem;    flex-wrap: wrap;}.gh-social-links a.social-link {    text-decoration: none;    padding: 4px 12px;    background: var(--card-bg);    border-radius: 100px;    font-weight: 500;    color: var(--text-secondary);    transition: background 0.15s ease, color 0.15s ease;    display: inline-flex;    align-items: center;    gap: 6px;    line-height: 1.4;}.gh-social-links a.social-link:hover {    background: var(--tag-bg);    color: var(--text-color);}.social-icon {    width: 16px;    height: 16px;    flex-shrink: 0;}.social-icon-img {    width: 16px;    height: 16px;    flex-shrink: 0;    object-fit: contain;}

.gh-social-links a {
    text-decoration: none;
    padding: 4px 12px;
    background: var(--card-bg);
    border-radius: 100px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
}

.gh-social-links a:hover {
    background: var(--tag-bg);
    color: var(--text-color);
}

/* Tag Filter Bar */
.tag-filters {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.tag-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 100px;
    border: none;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    letter-spacing: -0.005em;
    white-space: nowrap;
}

.tag-filter-btn:hover {
    background: #E8E8E6;
    color: var(--text-color);
}

.tag-filter-btn.active {
    background: var(--text-color);
    color: #FFFFFF;
}

/* Post Card List */

.post-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-card {
    background: transparent;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    gap: 1rem;
    position: relative;
    text-decoration: none;
    transition: background 0.15s ease;
}

.post-card:hover {
    background: var(--card-bg);
}

.post-card:active {
    transform: scale(0.99);
}

.post-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #E8E8E5;
}

.post-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.post-card-title {
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    padding-right: 3.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.post-card-date {
    position: absolute;
    top: 0.85rem;
    right: 1rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.post-card-date::before {
    content: "✓";
    color: #4CAF50;
    font-weight: 700;
}

.post-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.2rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* Post Tags on Cards */
.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.post-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--tag-color);
    background: var(--tag-bg);
    border-radius: 4px;
    padding: 1px 7px;
    letter-spacing: 0;
    line-height: 1.6;
}

.post-card-more {
    display: none;
}

/* ==========================================
   Article / Post Page — Notion Typography
   ========================================== */

h1.gh-article-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: var(--text-color);
}

.gh-article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.gh-article-meta .bull {
    color: #D3D2CF;
}

.post-date,
.reading-time {
    font-weight: 500;
}

.post-tags a {
    color: var(--text-secondary);
    text-decoration: none;
}

.post-tags a:hover {
    color: var(--text-color);
}

/* Notion-like content typography */
.gh-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-color);
}

.gh-content p {
    margin: 0 0 1.25em;
}

.gh-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 2em 0 0.5em;
}

.gh-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.35;
    margin: 1.75em 0 0.4em;
}

.gh-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.5em 0 0.3em;
}

.gh-content a {
    color: var(--text-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #C7C6C2;
    text-decoration-thickness: 1px;
    transition: text-decoration-color 0.15s ease;
}

.gh-content a:hover {
    text-decoration-color: var(--text-color);
}

.gh-content strong {
    font-weight: 600;
}

.gh-content blockquote {
    border-left: 3px solid #E8E8E5;
    padding-left: 1rem;
    margin: 1.5em 0;
    color: var(--text-secondary);
    font-style: normal;
}

.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--card-bg);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: #EB5757;
}

.gh-content pre {
    background: #F7F6F3;
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5em 0;
    border: 1px solid #E8E6E0;
}

.gh-content pre code {
    background: none;
    padding: 0;
    color: var(--text-color);
    font-size: 0.875rem;
}

.gh-content ul,
.gh-content ol {
    padding-left: 1.5rem;
    margin: 0.5em 0 1.25em;
}

.gh-content li {
    margin-bottom: 0.3em;
}

.gh-content hr {
    border: none;
    border-top: 1px solid #E8E6E0;
    margin: 2.5em 0;
}

.gh-content img {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    margin: 1em 0;
}

/* Ghost Koenig */
.kg-width-wide { width: 100%; }
.kg-width-full { width: 100%; }
.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; justify-content: center; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; }

/* Post navigation */
.gh-article-footer {
    margin-top: 3rem;
}

.gh-post-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E8E6E0;
}

.post-nav-card {
    display: flex;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.15s ease;
    background: transparent;
}

.post-nav-card:hover {
    background: var(--card-bg);
}

/* Pagination */
.gh-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 4rem 0 2rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.gh-pagination a {
    text-decoration: none;
    padding: 6px 14px;
    background: var(--card-bg);
    border-radius: 100px;
    color: var(--text-color);
    transition: background 0.15s ease;
}

.gh-pagination a:hover {
    background: #E8E8E5;
}

/* Footer */
.gh-foot {
    margin-top: auto;
    padding: 2.5rem 1.5rem;
    border-top: 1px solid #E8E6E0;
    text-align: left;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .gh-head { gap: 1rem; }
    h1.gh-article-title { font-size: 1.65rem; }
    .post-card-title { font-size: 0.925rem; }
}


/* Full width images in post content */
.gh-content .kg-image,
.gh-content figure img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Force full-width for all post images */
.gh-content .kg-image-card {
    width: 100%;
    margin: 0;
}
.gh-content .kg-image-card img,
.gh-content .kg-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    border-radius: 12px;
}
.gh-content figure {
    width: 100% !important;
    margin: 1em 0;
}
