/* =========================================================
   Soma — custom Ghost theme for gosoma.health
   Mint-on-navy editorial. Ghost v5 / Casper-compatible.
   ========================================================= */

:root {
    /* Backgrounds */
    --bg:        #0d2030;
    --surface:   #0a1a26;
    --deepest:   #081820;

    /* Brand */
    --mint:      #2dd4a8;
    --accent:    #76ffc1;
    --hover:     #5cf0c4;

    /* Text */
    --text:      #e6fff5;
    --body:      #cfe8de;
    --muted:     #9aa8a3;

    /* Lines & glow */
    --card-radius: 20px;
    --card-border: rgba(45, 212, 168, .15);
    --card-glow:   0 20px 60px -20px rgba(45, 212, 168, .25);
    --btn-glow:    0 12px 32px -10px rgba(45, 212, 168, .55);

    --font-head: 'Sora', system-ui, sans-serif;
    --font-body: 'Manrope', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

    --maxw: 1180px;
    --maxw-narrow: 720px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--body);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-image:
        radial-gradient(900px 500px at 80% -10%, rgba(45, 212, 168, .08), transparent 60%),
        radial-gradient(700px 400px at 0% 0%, rgba(118, 255, 193, .05), transparent 55%);
    background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--hover); }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 .5em;
}

/* ---------- Layout helpers ---------- */
.inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.inner-narrow { width: 100%; max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 24px; }

.mono-label {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
}
.dot { opacity: .5; margin: 0 .5em; }

/* ---------- Signature scan-line ---------- */
.soma-scanline {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    z-index: 999;
    background: linear-gradient(90deg, transparent 0%, var(--mint) 35%, var(--accent) 65%, transparent 100%);
    pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--mint);
    color: var(--deepest);
    box-shadow: var(--btn-glow);
}
.btn-primary:hover {
    background: var(--hover);
    color: var(--deepest);
    transform: translateY(-1px);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--card-border);
}
.btn-ghost:hover {
    border-color: var(--mint);
    color: var(--accent);
}

/* ---------- Site header ---------- */
.site-head {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(8, 24, 32, .72);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--card-border);
}
.site-head-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 72px;
}
.site-brand { display: flex; align-items: center; }
.site-logo { max-height: 30px; width: auto; }
.site-brand-mark {
    font-family: var(--font-head);
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 22px;
    color: var(--text);
}
.site-nav { margin-left: 8px; }
.site-nav .nav {
    list-style: none;
    display: flex;
    gap: 26px;
    margin: 0; padding: 0;
}
.site-nav .nav a {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
}
.site-nav .nav a:hover { color: var(--accent); }
.site-head-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }

/* ---------- Hero ---------- */
.hero {
    padding: 96px 0 64px;
    border-bottom: 1px solid var(--card-border);
}
.hero-inner { max-width: 860px; text-align: center; margin: 0 auto; }
.hero-eyebrow { display: inline-block; margin-bottom: 22px; color: var(--mint); }
.hero-title {
    font-size: clamp(44px, 8vw, 88px);
    background: linear-gradient(180deg, var(--text), var(--body));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}
.hero-lede {
    font-size: 20px;
    color: var(--body);
    max-width: 620px;
    margin: 0 auto 34px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Feed ---------- */
.feed { padding: 64px 0 96px; }
.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* ---------- Post card ---------- */
.post-card {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-glow);
    border-color: rgba(45, 212, 168, .35);
}
.post-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.post-card-link:hover { color: inherit; }
.post-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--deepest);
}
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card-image img { transform: scale(1.04); }
.post-card-image--empty {
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(45,212,168,.18), transparent 50%),
        linear-gradient(135deg, var(--deepest), var(--surface));
}
.post-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-card-meta { display: flex; align-items: center; }
.post-card-tag { color: var(--mint); }
.post-card-title {
    font-size: 21px;
    line-height: 1.25;
    margin: 0;
}
.post-card-excerpt { color: var(--body); font-size: 15.5px; line-height: 1.6; margin: 0; flex: 1; }
.post-card-readmore { color: var(--mint); margin-top: 4px; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-top: 56px;
}
.pagination a, .pagination .page-number {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    color: var(--muted);
}
.pagination a { color: var(--mint); }

/* ---------- Article ---------- */
.article { padding: 72px 0 80px; }
.article-head { text-align: center; margin-bottom: 36px; }
.article-meta { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.article-tag { color: var(--mint); }
.article-title { font-size: clamp(34px, 5.5vw, 56px); margin-bottom: 18px; }
.article-excerpt { font-size: 20px; color: var(--body); max-width: 600px; margin: 0 auto 26px; }
.article-byline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.author-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.author-name { color: var(--text); }

.article-image {
    max-width: 1020px;
    margin: 0 auto 48px;
    padding: 0 24px;
}
.article-image img {
    width: 100%;
    border-radius: var(--card-radius);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-glow);
}
.article-image figcaption {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 14px;
}

/* ---------- Article body typography ---------- */
.gh-content { font-size: 18.5px; line-height: 1.78; color: var(--body); }
.gh-content > * { margin-top: 0; margin-bottom: 1.5em; }
.gh-content h2 { font-size: 30px; margin-top: 1.8em; }
.gh-content h3 { font-size: 23px; margin-top: 1.6em; }
.gh-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(45,212,168,.4); }
.gh-content a:hover { text-decoration-color: var(--accent); }
.gh-content strong { color: var(--text); }
.gh-content blockquote {
    margin: 2em 0;
    padding: 4px 0 4px 24px;
    border-left: 3px solid var(--mint);
    color: var(--text);
    font-size: 21px;
    font-style: italic;
}
.gh-content ul, .gh-content ol { padding-left: 1.3em; }
.gh-content li { margin-bottom: .5em; }
.gh-content code {
    font-family: var(--font-mono);
    font-size: .86em;
    background: var(--deepest);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 2px 7px;
    color: var(--accent);
}
.gh-content pre {
    background: var(--deepest);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 20px 22px;
    overflow-x: auto;
}
.gh-content pre code { background: none; border: none; padding: 0; color: var(--body); }
.gh-content img { border-radius: 14px; }
.gh-content hr { border: none; border-top: 1px solid var(--card-border); margin: 3em 0; }

/* Ghost card alignment widths */
.gh-content .kg-width-wide { max-width: 1020px; margin-left: auto; margin-right: auto; }
.gh-content .kg-width-full { max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* ---------- Article footer ---------- */
.article-foot { margin-top: 56px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-tag {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    color: var(--muted);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 6px 14px;
}
.pill-tag:hover { border-color: var(--mint); color: var(--accent); }

.article-comments { margin-top: 64px; }

/* ---------- Footer ---------- */
.site-foot {
    border-top: 1px solid var(--card-border);
    background: var(--surface);
    padding: 56px 0;
    margin-top: 40px;
}
.site-foot-inner { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; justify-content: space-between; }
.site-foot-desc { color: var(--muted); max-width: 320px; margin: 12px 0 0; font-size: 15px; }
.site-foot-nav .nav { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-foot-nav .nav a {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    color: var(--muted);
}
.site-foot-nav .nav a:hover { color: var(--accent); }
.site-foot-meta { display: flex; flex-direction: column; gap: 6px; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .site-nav { display: none; }
    .hero { padding: 64px 0 48px; }
    .article { padding: 48px 0 64px; }
    .site-foot-inner { flex-direction: column; }
    .site-foot-meta { text-align: left; }
}
@media (max-width: 480px) {
    body { font-size: 17px; }
    .site-head-actions .btn-ghost { display: none; }
}
