/* ——— sisyphus ghost theme ——— */

/* reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ——— base ——— */
:root {
    --bg: #0f1923;
    --text: #e8e0d8;
    --muted: #6b7394;
    --accent: #d46a8a;
    --border: rgba(107, 115, 148, 0.25);
    --hover-bg: rgba(212, 106, 138, 0.08);
    --font: 'Space Mono', monospace;
}

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    font-weight: 400;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    letter-spacing: 0.02em;
    min-height: 100vh;
}

a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ——— layout ——— */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 3rem;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding: 2rem 0 4rem;
}

/* ——— header ——— */
.site-header {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.site-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    text-transform: lowercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

.site-title:hover {
    color: var(--text);
}

.site-logo {
    display: inline-block;
}

.site-logo img {
    max-height: 40px;
    width: auto;
}

.site-cover {
    display: none; /* hidden by default — minimal aesthetic */
}

/* blinking cursor */
.cursor {
    display: inline-block;
    width: 0.8ch;
    height: 1.2em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.site-nav {
    margin-top: 0;
    flex-shrink: 0;
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.site-nav a {
    font-size: 0.85rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.site-nav a:hover {
    color: var(--accent);
}

.site-nav .nav-current a {
    color: var(--accent);
}

.site-description {
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--muted);
    font-style: italic;
    letter-spacing: 0.02em;
}

/* ——— post cards (index) ——— */
.post-card {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.post-card:last-child:not(.post-card-hero) {
    border-bottom: none;
}

.post-date {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.post-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
}

.post-card-meta .post-meta-sep {
    opacity: 0.3;
}

.post-card-meta .post-reading-time {
    color: var(--muted);
    text-transform: lowercase;
}

.post-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: var(--text);
}

.post-title a:hover {
    color: var(--accent);
}

.post-excerpt {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.post-card-image {
    display: block;
    margin-bottom: 1rem;
}

.post-card-image img {
    width: 100%;
    border-radius: 2px;
    transition: opacity 0.15s ease;
}

.post-card-image:hover img {
    opacity: 0.85;
}

.post-tag {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

/* ——— hero card (latest post) ——— */
.post-card-hero {
    padding-top: 0;
    padding-bottom: 3rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.post-card-hero .hero-image {
    margin-bottom: 1.5rem;
}

.post-card-hero .hero-image img {
    width: 100%;
    border-radius: 2px;
    aspect-ratio: 21/9;
    object-fit: cover;
}

.hero-title {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.post-card-hero .post-excerpt {
    font-size: 1rem;
    line-height: 1.7;
}

/* ——— post grid (index, posts 2+) ——— */
.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding-top: 0.5rem;
}

.grid-card {
    padding: 0;
    border-bottom: none;
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.grid-card:hover {
    border-color: rgba(212, 106, 138, 0.4);
}

.grid-card .post-card-image {
    margin-bottom: 0;
}

.grid-card .post-card-image img {
    aspect-ratio: 16/10;
    object-fit: cover;
}

.grid-card-content {
    padding: 1.2rem;
}

.grid-card .post-title {
    font-size: 1.15rem;
    line-height: 1.3;
    margin-bottom: 0.4rem;
}

.grid-card .post-card-meta {
    margin-bottom: 0.5rem;
}

.grid-card .post-excerpt {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* ——— index signup ——— */
.index-signup {
    margin-top: 3rem;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    text-align: left;
}

.index-signup .post-signup-form {
    max-width: 480px;
}

/* ——— full post ——— */
.post-full {
    padding-bottom: 3rem;
}

.post-header {
    margin-bottom: 2.5rem;
}

.post-header .post-title {
    font-size: 2.4rem;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.post-header .post-tag {
    display: inline-block;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
}

.post-meta .post-date {
    font-size: 0.8rem;
    margin-bottom: 0;
    color: var(--accent);
}

.post-meta-sep {
    opacity: 0.3;
}

.post-reading-time {
    color: var(--muted);
    text-transform: lowercase;
}

.post-author {
    color: var(--muted);
    text-transform: lowercase;
}

.post-custom-excerpt {
    font-size: 0.9rem;
    color: var(--muted);
    font-style: italic;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.post-author-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.post-author-card .author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 0;
}

.author-info {
    flex: 1;
}

.author-info .author-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    text-transform: lowercase;
}

.author-info .author-bio {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.2rem;
    line-height: 1.5;
}

/* feature image — see breakout section below */

/* ——— post content (the ghost editor output) ——— */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    max-width: 720px;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.03em;
    margin: 2.5rem 0 1rem;
    color: var(--text);
}

.post-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.03em;
    margin: 2rem 0 0.8rem;
    color: var(--text);
}

.post-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: lowercase;
    margin: 1.5rem 0 0.6rem;
}

.post-content a {
    color: var(--accent);
    border-bottom: 1px solid rgba(212, 106, 138, 0.3);
}

.post-content a:hover {
    border-bottom-color: var(--accent);
}

.post-content strong {
    font-weight: 700;
    color: var(--text);
}

.post-content em {
    font-style: italic;
}

.post-content blockquote {
    border-left: 2px solid var(--accent);
    padding-left: 1.2rem;
    margin: 1.5rem 0;
    color: var(--muted);
    font-style: italic;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content code {
    font-family: var(--font);
    font-size: 0.85em;
    background: rgba(107, 115, 148, 0.1);
    padding: 0.15em 0.4em;
    border-radius: 2px;
}

.post-content pre {
    background: rgba(107, 115, 148, 0.08);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 1.2rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 0.8rem;
    line-height: 1.6;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

.post-content figure {
    margin: 2rem 0;
}

.post-content figure img {
    width: 100%;
}

.post-content figcaption {
    font-size: 0.7rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
    opacity: 0.7;
}

/* ghost cards (bookmark, gallery, etc) */
.post-content .kg-image-card,
.post-content .kg-gallery-card {
    margin: 2rem 0;
}

.post-content .kg-image-card figcaption,
.post-content .kg-gallery-card figcaption {
    font-size: 0.7rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
}

.post-content .kg-bookmark-card {
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.post-content .kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: var(--text);
}

.post-content .kg-bookmark-content {
    flex: 1;
    padding: 1rem;
}

.post-content .kg-bookmark-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.post-content .kg-bookmark-description {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-content .kg-bookmark-metadata {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-content .kg-bookmark-icon {
    width: 16px;
    height: 16px;
}

.post-content .kg-bookmark-thumbnail {
    width: 160px;
    min-height: 100%;
}

.post-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* gallery */
.post-content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-content .kg-gallery-row {
    display: flex;
    gap: 0.5rem;
}

.post-content .kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ——— post signup ——— */
.post-signup {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    max-width: 720px;
}

.post-signup-form {
    display: flex;
    gap: 0.8rem;
}

.post-signup-input {
    flex: 1;
    font-family: var(--font);
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--text);
    letter-spacing: 0.02em;
    outline: none;
    transition: border-color 0.15s ease;
}

.post-signup-input:focus {
    border-color: var(--accent);
}

.post-signup-input::placeholder {
    color: var(--muted);
    opacity: 0.5;
}

.post-signup-button {
    font-family: var(--font);
    font-size: 0.8rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    background: transparent;
    border: 1px solid rgba(212, 106, 138, 0.3);
    padding: 0.6rem 1.5rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.post-signup-button:hover {
    border-color: var(--accent);
    background: var(--hover-bg);
}

@media (max-width: 480px) {
    .post-signup-form {
        flex-direction: column;
    }
}

/* ——— tag & author pages ——— */
.tag-header,
.author-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tag-title,
.author-name {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.tag-description,
.author-bio {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
    opacity: 0.9;
}

/* ——— pagination ——— */
.pagination {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8rem;
}

.pagination a {
    color: var(--accent);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(212, 106, 138, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 2px;
    transition: all 0.15s ease;
}

.pagination a:hover {
    border-color: var(--accent);
    background: var(--hover-bg);
}

.pagination .page-number {
    color: var(--muted);
    font-size: 0.75rem;
}

/* ——— subscribe form (ghost portal overrides) ——— */
.gh-portal-triggerbtn-iframe {
    /* tuck the default ghost button to bottom-right */
}

/* ——— footer ——— */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.site-footer .container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.7rem;
}

.footer-text {
    color: var(--muted);
    opacity: 0.5;
}

.footer-sep {
    color: var(--muted);
    opacity: 0.3;
}

.footer-link {
    color: var(--muted);
    opacity: 0.5;
}

.footer-link:hover {
    color: var(--accent);
    opacity: 1;
}

/* ——— responsive ——— */
@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .site-header {
        padding: 2rem 0 1.5rem;
    }

    .site-header-row {
        flex-direction: column;
        gap: 0.8rem;
    }

    .site-title {
        font-size: 1.3rem;
    }

    .site-nav {
        margin-top: 0;
    }

    .site-nav ul {
        gap: 0.8rem;
    }

    .post-title {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-header .post-title {
        font-size: 1.6rem;
    }

    .post-content {
        font-size: 0.9rem;
    }

    .post-nav {
        flex-direction: column;
        gap: 1.5rem;
    }

    .post-nav-link.next {
        text-align: left;
    }

    .post-content .kg-bookmark-container {
        flex-direction: column;
    }

    .post-content .kg-bookmark-thumbnail {
        width: 100%;
        min-height: 160px;
    }
}

/* ——— ghost-specific utility ——— */
.gh-content > * + * {
    margin-top: 1.5rem;
}

/* members/subscribe CTA styling */
.post-content .kg-callout-card {
    border: 1px solid var(--border);
    padding: 1.2rem;
    margin: 1.5rem 0;
    border-radius: 2px;
    background: rgba(107, 115, 148, 0.05);
}

.post-content .kg-button-card a {
    display: inline-block;
    font-family: var(--font);
    font-size: 0.8rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    border: 1px solid rgba(212, 106, 138, 0.3);
    padding: 0.6rem 1.2rem;
    border-radius: 2px;
    transition: all 0.15s ease;
    background: transparent;
}

.post-content .kg-button-card a:hover {
    border-color: var(--accent);
    background: var(--hover-bg);
}

/* override ghost default member forms */
.kg-signup-card {
    background: var(--bg) !important;
    border: 1px solid var(--border);
    border-radius: 2px;
}

/* ghost width classes */
.kg-width-wide {
    width: 100%;
}

.kg-width-full {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
}

/* ——— feature image ——— */
.post-feature-image {
    margin-bottom: 2.5rem;
}

.post-feature-image img {
    width: 100%;
    border-radius: 2px;
}

.post-feature-image figcaption {
    font-size: 0.7rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* ——— read more (bottom of post) ——— */
.read-more {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.read-more-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.read-more-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.read-more-card {
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.read-more-card:hover {
    border-color: rgba(212, 106, 138, 0.4);
}

.read-more-card-image {
    display: block;
}

.read-more-card-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    transition: opacity 0.15s ease;
}

.read-more-card:hover .read-more-card-image img {
    opacity: 0.85;
}

.read-more-card-content {
    padding: 1rem;
}

.read-more-card-content .post-date {
    font-size: 0.65rem;
    margin-bottom: 0.3rem;
}

.read-more-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    line-height: 1.4;
    margin-bottom: 0.3rem;
}

.read-more-card-title a {
    color: var(--text);
}

.read-more-card-title a:hover {
    color: var(--accent);
}

.read-more-card-excerpt {
    font-size: 0.7rem;
    color: var(--muted);
    line-height: 1.5;
}

@media (max-width: 480px) {
    .read-more-feed {
        grid-template-columns: 1fr;
    }
}

/* make sure embeds behave */
.post-content iframe {
    max-width: 100%;
    margin: 1.5rem 0;
}

/* selection color */
::selection {
    background: rgba(212, 106, 138, 0.25);
    color: var(--text);
}
