/* =============================================================================
   Typography - Page headers, post content, headings (front-porch retheme)
   ============================================================================= */

/* Page Header — big serif hero like the front porch */
.page-header {
    margin-bottom: 2.5rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 3.4vw, 3.1rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.025em;
    text-transform: uppercase;
    color: var(--char);
    margin: 0;
    position: relative;
}

.page-title:has(.thread-nav-wrapper) {
    padding-right: 5.5rem;
}

.page-tagline {
    display: block;
    margin-top: 0.65rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    color: var(--text-muted);
    line-height: 1.4;
}

.page-tagline a {
    color: var(--text-muted);
    text-decoration: none;
}

.page-tagline a:hover {
    color: var(--rust-dark);
}

/* Home Typewriter Effect — own line below the title so growing text
   doesn't reflow the page. Script font = "scribbled into a ledger". */
.home-view .page-tagline--typewriter {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    white-space: nowrap;
    font-family: var(--font-script);
    font-size: 1.45rem;
    font-weight: 500;
}

.home-view .typewriter__prefix {
    color: var(--text-muted);
}

.home-view .typewriter {
    display: inline-flex;
    align-items: baseline;
}

.home-view .typewriter__text {
    flex: none;
    display: inline-block;
    white-space: nowrap;
}

.home-view .typewriter__cursor {
    display: none;
}

@keyframes homeCursorBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 8px rgba(178, 58, 43, 0.45);
    }
    50% {
        opacity: 0.2;
        box-shadow: 0 0 2px rgba(178, 58, 43, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-view .typewriter__cursor {
        animation: none;
        opacity: 0.6;
    }
}

@media (max-width: 899px) {
    .home-view .page-tagline--typewriter {
        white-space: normal;
        display: block;
    }
    .home-view .typewriter {
        display: inline;
    }
    .home-view .typewriter__text {
        white-space: normal;
    }
    .home-view .typewriter__cursor {
        display: none;
    }
}

/* Bio Section */
.bio {
    margin-bottom: 3rem;
    font-family: var(--font-body, inherit);
    font-size: var(--font-size-content, 16px);
    line-height: var(--line-height-content, 1.8);
    display: flow-root; /* contain floats from .bio-badge */
}

.bio .bio-badge {
    float: right;
    width: clamp(180px, 38%, 360px);
    height: auto;
    margin: 0.25rem 0 1rem 1.75rem;
    transform: rotate(-3deg);
    filter: drop-shadow(0 24px 36px rgba(15, 15, 16, 0.22));
    user-select: none;
    shape-outside: circle(50%);
}

@media (max-width: 600px) {
    .bio .bio-badge {
        float: none;
        display: block;
        width: min(70%, 240px);
        margin: 0 auto 1.5rem;
        transform: rotate(-2deg);
    }
}

.bio p {
    margin-bottom: 1rem;
}

.bio a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid rgba(178, 58, 43, 0.32);
}

.bio a:hover {
    color: var(--rust);
    border-bottom-color: var(--rust);
}

.bio h1, .bio h2, .bio h3, .bio h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.bio h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.bio h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.bio h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Post Content */
.post-content {
    font-family: var(--font-body, inherit);
    font-size: var(--font-size-content, 16px);
    line-height: var(--line-height-content, 1.8);
    overflow-wrap: break-word;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: rgba(178, 58, 43, 0.5);
    text-underline-offset: 2px;
}

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

.post-content a.autolink {
    word-break: break-all;
}

.post-content a.mention {
    color: var(--ink);
    font-weight: 500;
    background: var(--color-mention);
    padding: 0 0.4rem;
    border-radius: 4px;
    text-decoration: none;
}

.post-content a.mention:hover {
    filter: brightness(0.95);
    text-decoration: none;
}

.post-content a.hashtag {
    color: var(--ink);
    font-weight: 500;
    background: var(--color-mention);
    padding: 0 0.4rem;
    border-radius: 4px;
    text-decoration: none;
}

.post-content a.hashtag:hover {
    filter: brightness(0.95);
    text-decoration: none;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: var(--font-headline, var(--font-sans));
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h2 {
    font-size: 1rem;
}

.post-content h2::before {
    content: 'h2.';
    color: var(--accent);
    margin-right: 0.5em;
    font-weight: 400;
    font-family: var(--font-mono, monospace);
}

.post-content h3,
.post-content h4 {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.post-content h3::before {
    content: 'h3.';
    color: var(--accent);
    margin-right: 0.5em;
    font-weight: 400;
    font-family: var(--font-mono, monospace);
}

.post-content h4::before {
    content: 'h4.';
    color: var(--accent);
    margin-right: 0.5em;
    font-weight: 400;
    font-family: var(--font-mono, monospace);
}

.post-content pre {
    background: rgba(15, 15, 16, 0.06);
    border: 1px solid rgba(15, 15, 16, 0.12);
    padding: 1rem;
    overflow-x: auto;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
}

.post-content code {
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.9em;
}

.post-content blockquote {
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    border-left: 3px solid rgba(178, 58, 43, 0.5);
    color: var(--text-muted);
    font-style: italic;
}

.post-content ul {
    margin-bottom: 1em;
}

.post-content ol li,
.post-content ul li {
    margin-left: 1rem;
}

.post-content::after {
    content: "";
    display: table;
    clear: both;
}

code {
    background-color: var(--code-background);
    border: 1px solid var(--code-border);
    padding: 2px 0.3em;
    border-radius: 5px;
}

/* Handwritten margin notes — *text*{.script} or <em class="script">text</em> */
em.script {
    font-family: var(--font-script);
    font-style: normal;
    font-size: 1.4em;
    color: var(--rust-dark);
    line-height: 1;
}

/* Asterism dividers — <hr> in markdown body / wiki / bio */
.post-content hr,
.bio hr,
.wiki-page-content hr {
    border: none;
    height: auto;
    text-align: center;
    margin: 2.5rem 0;
    overflow: visible;
}
.post-content hr::before,
.bio hr::before,
.wiki-page-content hr::before {
    content: "* * *";
    display: inline-block;
    font-family: var(--font-typewriter);
    font-size: 1.05rem;
    letter-spacing: 0.5em;
    color: var(--ash);
}

/* Callout Boxes - {info}, {info warn}, {info good}, {info neutral} */
.callout {
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 14px;
    border: 1.5px solid;
}

.callout p:last-child {
    margin-bottom: 0;
}

.callout--info {
    background: rgba(244, 220, 130, 0.30);
    border-color: rgba(180, 140, 30, 0.55);
}

.callout--warn {
    background: rgba(178, 58, 43, 0.10);
    border-color: rgba(178, 58, 43, 0.55);
}

.callout--good {
    background: rgba(95, 142, 95, 0.18);
    border-color: rgba(95, 142, 95, 0.55);
}

.callout--neutral {
    background: rgba(15, 15, 16, 0.06);
    border-color: rgba(15, 15, 16, 0.30);
}

@media (max-width: 800px) {
    .page-title {
        font-size: clamp(1.85rem, 7vw, 2.4rem);
    }
}
