
:root {
    --bg: #ffffff;
    --text: #101010;
    --muted: #767676;
    --line: #e9e9e9;
    --soft: #f6f6f4;
    --max: 760px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

.site-shell {
    width: min(calc(100% - 40px), var(--max));
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 42px 0 34px;
    border-bottom: 1px solid var(--line);
}

.profile-main {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    gap: 18px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 96px;
}

.profile-avatar-fallback {
    display: grid;
    place-items: center;
    background: #eee;
    font-size: 32px;
    font-weight: 700;
}

.profile-copy h1 {
    margin: 2px 0 8px;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.profile-desc {
    max-width: 470px;
    margin: 0;
    color: #555;
    font-size: 17px;
    line-height: 1.7;
    white-space: pre-line;
}

.profile-meta {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    padding-top: 2px;
}

.icon-button {
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.icon-button svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
}

.subscribe-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.post-feed { padding: 4px 0 0; }

.post-row {
    border-bottom: 1px solid var(--line);
}

.post-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 27px 0 26px;
}

.post-content { min-width: 0; }

.post-content time,
.article-header time {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}

.post-content h2 {
    margin: 0;
    font-size: 25px;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.post-content p {
    margin: 7px 0 0;
    color: #4d4d4d;
    font-size: 16px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-chevron {
    color: #aaa;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    flex: 0 0 auto;
}

.more-posts {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin: 26px 0 30px;
    padding: 15px 20px;
    background: var(--soft);
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
}

.minimal-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0 34px;
    color: #777;
    font-size: 14px;
}

.minimal-footer nav {
    display: flex;
    gap: 18px;
}

.simple-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
}

.brand-link img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.article {
    padding: 54px 0 26px;
}

.article-header {
    max-width: 700px;
    margin: 0 auto 34px;
}

.article-header h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 52px);
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.article-deck {
    margin: 14px 0 0;
    color: #666;
    font-size: 19px;
    line-height: 1.7;
}

.article-body {
    max-width: 700px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.9;
}

.article-body p { margin: 0 0 1.5em; }
.article-body h2 { margin: 2em 0 .8em; font-size: 1.65em; }
.article-body h3 { margin: 1.7em 0 .7em; font-size: 1.32em; }
.article-body img { max-width: 100%; height: auto; }
.article-body figure { margin: 2em 0; }
.article-body blockquote {
    margin: 1.8em 0;
    padding-left: 1.1em;
    border-left: 3px solid #ddd;
    color: #555;
}
.article-body a { text-decoration: underline; text-underline-offset: 3px; }

.pagination-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 0;
    color: #555;
}

@media (max-width: 640px) {
    .site-shell {
        width: min(calc(100% - 32px), var(--max));
    }

    .profile-header {
        position: relative;
        display: block;
        padding: 30px 0 24px;
    }

    .profile-main {
        display: grid;
        grid-template-columns: 82px 1fr;
        gap: 16px;
        padding-right: 0;
    }

    .profile-avatar {
        width: 82px;
        height: 82px;
        flex-basis: 82px;
    }

    .profile-copy h1 {
        margin-top: 0;
        padding-right: 116px;
        font-size: 31px;
    }

    .profile-desc {
        font-size: 15px;
        line-height: 1.6;
    }

    .profile-meta {
        grid-column: 2;
        margin-top: 7px;
        font-size: 14px;
    }

    .profile-actions {
        position: absolute;
        top: 28px;
        right: 0;
        gap: 7px;
    }

    .icon-button {
        width: 38px;
        height: 38px;
    }

    .subscribe-button {
        min-height: 38px;
        padding: 0 16px;
        font-size: 14px;
    }

    .post-link {
        gap: 12px;
        padding: 22px 0 21px;
    }

    .post-content h2 {
        font-size: 22px;
    }

    .post-content p {
        margin-top: 5px;
        font-size: 15px;
        line-height: 1.6;
    }

    .post-chevron {
        font-size: 29px;
    }

    .minimal-footer {
        padding: 12px 0 30px;
        font-size: 12px;
    }

    .minimal-footer nav { gap: 12px; }

    .article {
        padding-top: 38px;
    }

    .article-header h1 {
        font-size: 34px;
    }

    .article-body {
        font-size: 17px;
        line-height: 1.85;
    }
}

@media (max-width: 440px) {
    .profile-main {
        grid-template-columns: 74px 1fr;
        gap: 14px;
    }

    .profile-avatar {
        width: 74px;
        height: 74px;
    }

    .profile-copy h1 {
        font-size: 28px;
        padding-right: 104px;
    }

    .profile-desc {
        font-size: 14.5px;
    }

    .profile-meta {
        font-size: 13.5px;
    }

    .subscribe-button {
        padding: 0 14px;
    }

    .post-content h2 {
        font-size: 21px;
    }
}


/* Ghost editor wide/full image support */
.gh-content .kg-width-wide {
    width: min(120%, 900px);
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.gh-content .kg-width-full {
    width: 100vw;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 760px) {
    .gh-content .kg-width-wide,
    .gh-content .kg-width-full {
        width: calc(100vw - 32px);
        max-width: none;
        margin-left: 50%;
        transform: translateX(-50%);
    }
}


.comments-section {
    max-width: 700px;
    margin: 48px auto 0;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}
