/* RoutingState — warm editorial overrides, loaded after screen.css.
   Palette: cream paper, warm ink, burgundy accent. Serif titles come from
   the theme's "Elegant serif" title font (EB Garamond). */

:root {
    --rs-paper: #faf7f2;
    --rs-card: #fffdf9;
    --rs-ink: #24211c;
    --rs-muted: #6e675c;
    --rs-faint: #b0a795;
    --rs-rule: #e7dfd0;
    --rs-accent: #9c2b2b;

    /* Re-point Source's palette so post pages, tag pages and About match */
    --color-primary-text: var(--rs-ink);
    --color-secondary-text: var(--rs-muted);
    --color-border: var(--rs-rule);
    --color-lighter-gray: #f1ece2;
    --color-light-gray: var(--rs-rule);
    --color-darker-gray: var(--rs-ink);
    --background-color: var(--rs-paper);
}

body {
    background-color: var(--rs-paper);
    color: var(--rs-ink);
}

/* ---------- Navigation ---------- */

.gh-navigation {
    border-bottom: 1px solid var(--rs-rule);
}

.gh-navigation .gh-navigation-menu a:hover,
.gh-navigation-members a:not(.gh-button):hover {
    color: var(--rs-accent);
}

.gh-button,
.gh-portal-btn-main {
    background-color: var(--rs-accent);
}

.gh-button:hover {
    background-color: #7e2222;
}

/* ---------- Landing page ---------- */

.rs-intro {
    padding: 44px 0 40px;
    border-bottom: 1px solid var(--rs-rule);
}

.rs-intro-title {
    font-family: var(--gh-font-heading, var(--font-serif));
    font-size: clamp(3rem, 2.2rem + 1.6vw, 3.8rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0 0 10px;
}

.rs-intro-bio {
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.6rem;
    line-height: 1.55;
    color: var(--rs-muted);
    max-width: 640px;
    margin: 0;
}

.rs-intro-bio strong {
    color: var(--rs-ink);
}

.rs-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 56px;
    padding: 40px 0 48px;
}

.rs-seclabel {
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--rs-accent);
    margin-bottom: 16px;
}

/* Featured article */

.rs-featured {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rs-rule);
    margin-bottom: 8px;
}

.rs-featured-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.rs-featured-tags {
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rs-faint);
    margin-bottom: 8px;
}

.rs-featured-title {
    font-size: clamp(2.4rem, 2rem + 0.9vw, 2.9rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}

.rs-featured-link:hover .rs-featured-title {
    color: var(--rs-accent);
}

.rs-featured-standfirst {
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--rs-muted);
    margin: 0 0 10px;
}

.rs-featured-meta {
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.2rem;
    color: var(--rs-faint);
}

/* Recent list */

.rs-post-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    padding: 15px 0;
    border-bottom: 1px solid var(--rs-rule);
    color: inherit;
    text-decoration: none;
}

.rs-post-row-title {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.rs-post-row:hover .rs-post-row-title {
    color: var(--rs-accent);
}

.rs-post-row-date {
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.2rem;
    color: var(--rs-faint);
    white-space: nowrap;
}

.rs-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--rs-accent);
    text-decoration: none;
}

.rs-all-link svg {
    width: 14px;
    height: 14px;
}

.rs-all-link:hover {
    text-decoration: underline;
}

/* Projects rail */

.rs-proj {
    display: block;
    background: var(--rs-card);
    border: 1px solid var(--rs-rule);
    border-radius: 6px;
    padding: 16px 18px;
    margin-bottom: 12px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.rs-proj:hover {
    border-color: var(--rs-accent);
}

.rs-proj-title {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.rs-proj-title small {
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rs-faint);
    margin-left: 6px;
}

.rs-proj-desc {
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--rs-muted);
    margin: 0;
}

/* ---------- Footer ---------- */

.rs-footer {
    border-top: 1px solid var(--rs-rule);
    background: var(--rs-card);
    margin-top: 0;
}

.rs-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px 0;
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.3rem;
    color: var(--rs-muted);
}

.rs-footer-links a {
    color: var(--rs-muted);
    text-decoration: none;
    margin-left: 18px;
}

.rs-footer-links a:first-child {
    margin-left: 0;
}

.rs-footer-links a:hover {
    color: var(--rs-accent);
}

/* ---------- Site-wide consistency ---------- */

.gh-content a {
    color: var(--rs-accent);
}

/* Inline social icon links (used at the bottom of the About page) */

.gh-content .rs-social {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
    margin-top: 8px;
}

.gh-content .rs-social a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rs-muted);
    text-decoration: none;
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 1.5rem;
    font-weight: 600;
}

.gh-content .rs-social a:hover {
    color: var(--rs-accent);
}

.rs-social svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.gh-card {
    background: transparent;
}

.gh-post-upgrade-cta-content,
.gh-header.is-highlight {
    background-color: var(--rs-card);
}

/* ---------- Mobile ---------- */

@media (max-width: 991px) {
    .rs-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .rs-intro {
        padding: 32px 0 28px;
    }

    .rs-footer-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}
