/* ===== Tokens ===== */
:root {
    --cream: #F9F1E1;
    --sand: #F3E4C4;
    --accent: #FF6B1F;
    --ink: #222222;
    --text: #3a352e;
    --muted: #8a7d68;
    --line: #E8D6AF;
    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--text);
    font-family: var(--sans);
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.narrow { max-width: 856px; }

/* ===== Header ===== */
.site-header { padding: 40px 0 16px; }
.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1.5fr;   /* nav sits just left of centre */
    align-items: center;
    gap: 48px;
}

.site-logo {
    position: relative;
    display: inline-block;
    max-width: 320px;
    padding-bottom: 14px;
    font-weight: 700;
    font-size: 30px;
    line-height: 1.2;
    color: var(--ink);
    text-decoration: none;
}
.site-logo::after {
    content: "";
    position: absolute;
    left: 16px;
    right: -16px;
    bottom: 0;
    height: 4px;
    background: var(--accent);
}

.site-logo { justify-self: start; }
.site-nav { display: flex; align-items: center; }

.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 44px; }
.nav a {
    font-size: 18px;
    color: var(--ink);
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--accent); }
/* Active page markers */
.home-template .site-logo::after { left: 0; right: 0; }
.home-template .site-logo,
.paged .nav-blog a,
.index-template .nav-blog a,
.post-template .nav-blog a,
.tag-template .nav-blog a,
.page-reading .nav-reading a,
.page-contact .nav-contact a { color: var(--ink); }
.index-template .nav-blog a,
.post-template .nav-blog a,
.tag-template .nav-blog a,
.page-reading .nav-reading a,
.page-contact .nav-contact a { border-bottom-color: var(--accent); }

/* ===== Shared type ===== */
.page-head { padding: 72px 0 24px; }
.eyebrow {
    position: relative;
    display: inline-block;
    margin: 0 0 24px;
    padding-bottom: 8px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink);
}
.eyebrow::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 36px; height: 2px;
    background: var(--accent);
}
.page-title {
    margin: 0 0 24px;
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(44px, 6vw, 80px);
    line-height: 1.05;
    letter-spacing: -.01em;
    color: var(--ink);
}

/* ===== Post list ===== */
.post-list { padding-bottom: 100px; }
.post-item { padding: 32px 0; border-top: 1px solid var(--line); }
.post-item a { text-decoration: none; }
.post-item-title {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 34px;
    line-height: 1.15;
    color: var(--ink);
    transition: color .15s;
}
.post-item a:hover .post-item-title { color: var(--accent); }
.post-item-meta {
    margin: 0 0 12px;
    font-size: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}
.post-item-excerpt { margin: 0; }

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    color: var(--muted);
}
.pagination a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--ink); }
.pagination a:hover { color: var(--accent); border-color: var(--accent); }

/* ===== Article / page ===== */
.article { padding-bottom: 100px; }
.feature-image { margin: 0 0 48px; }
.feature-image img { display: block; width: 100%; }
.feature-image figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; }

.gh-content { font-size: 20px; line-height: 1.75; }
.gh-content > * { margin: 0 0 1.2em; }
.gh-content h2, .gh-content h3, .gh-content h4 {
    font-family: var(--serif);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.15;
    margin: 1.6em 0 .5em;
}
.gh-content h2 { font-size: 40px; }
.gh-content h3 { font-size: 30px; }
.gh-content h4 { font-size: 24px; }
.gh-content blockquote { margin: 1.5em 0; padding-left: 24px; border-left: 3px solid var(--accent); font-style: italic; }
.gh-content figure { margin: 2em 0; }
.gh-content figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; }
.gh-content pre { overflow: auto; padding: 20px; background: var(--sand); font-size: 15px; }
.gh-content code { font-size: .9em; }
.gh-content hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.gh-content ul, .gh-content ol { padding-left: 1.3em; }

/* Ghost editor card widths */
.kg-width-wide { position: relative; width: min(1100px, 92vw); left: 50%; transform: translateX(-50%); }
.kg-width-full { position: relative; width: 100vw; left: 50%; transform: translateX(-50%); }
.kg-image-card img { display: block; margin: 0 auto; }

/* ===== Footer ===== */
.site-footer { margin-top: 40px; padding: 40px 0; background: var(--ink); color: var(--sand); font-size: 14px; }

/* ===== Mobile ===== */
@media (max-width: 760px) {
    body { font-size: 17px; }
    .container { padding: 0 20px; }
    .site-header { padding: 28px 0 8px; }
    .header-inner { grid-template-columns: auto 1fr; gap: 24px; }
    .header-spacer { display: none; }
    .site-nav { justify-content: flex-end; }
    .site-logo { font-size: 24px; }
    .nav { gap: 8px 28px; }
    .nav a { font-size: 16px; }
    .page-head { padding: 48px 0 16px; }
    .gh-content { font-size: 18px; }
    .post-item-title { font-size: 28px; }
}

::selection { background: var(--accent); color: #fff; }
.gh-content blockquote { background: var(--sand); padding: 20px 24px; }

/* ===== Link highlight animation =====
   Every text link: charcoal underline; on hover a soft orange
   highlight rises from the underline to fill behind the text. */
:root { --highlight: rgba(255, 107, 31, 0.28); }

.gh-content a,
.home-content a,
.post-item-excerpt a,
.site-footer a {
    color: inherit;
    text-decoration: none;
    border-bottom: 2px solid currentColor;
    padding: 0 2px 1px;
    margin: 0 -2px;
    background-image: linear-gradient(var(--highlight), var(--highlight));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 0;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-size .25s ease-out, border-color .25s ease-out;
}
.gh-content a:hover,
.home-content a:hover,
.post-item-excerpt a:hover,
.site-footer a:hover,
.gh-content a:focus-visible,
.home-content a:focus-visible {
    background-size: 100% 100%;
    border-bottom-color: var(--accent);
    outline: none;
}
/* Don't highlight image/bookmark cards that are links */
.gh-content .kg-card a,
.gh-content a:has(img) {
    border-bottom: 0;
    background-image: none;
    padding: 0; margin: 0;
}
