/* ==========================================================================
   Sean Kriger themes: shared base
   Fonts, colour tokens, type, links, Ghost editor content and cards.
   The same file ships in sean-clarissa and sean-roman. Layout lives in
   layout.css, which is different per theme.

   Based on Solo by Ghost Foundation (MIT). See LICENSE.
   Roboto: SIL Open Font License 1.1, see assets/fonts/OFL.txt.
   ========================================================================== */

/* Fonts: Roboto, latin subset, self-hosted --------------------------------- */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/roboto-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/roboto-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/roboto-latin-700-normal.woff2") format("woff2"); }

/* Tokens ------------------------------------------------------------------
   Greyscale only, sampled from boldestimation.com on 2026-09-24.
   "Bold dark" is the default scheme. "Light" swaps the same roles.       */
:root {
    /* colour roles */
    --ground: #1b1818;        /* page background */
    --ground-raised: #1d1d1d; /* quiet panels (code, quotes) */
    --line: #3f3f3f;          /* hairlines and borders */
    --ink: #ffffff;           /* headings, name, the lead line */
    --text: #eaeaea;          /* body copy */
    --muted: #adb5b7;         /* labels, dates, footer */
    --focus: #ffffff;

    /* type */
    /* Roboto unless someone picks a font in Ghost admin (Design > Brand > Typography) */
    --font: var(--gh-font-body, "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif);
    --font-heading: var(--gh-font-heading, var(--font));
    --size-body: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem); /* 17px phone, 18px desktop */
    --size-small: 0.875rem;   /* 14px: footer, meta */
    --size-label: 0.8125rem;  /* 13px: uppercase labels and menu */
    --track-label: 0.15em;    /* about 2px at 13px */

    /* spacing: one 4px-based scale */
    --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem;
    --s5: 1.5rem;  --s6: 2rem;   --s7: 3rem;    --s8: 4rem; --s9: 6rem;

    --radius: 6px;
    --measure: 38rem;         /* comfortable line length for body text */
    --gutter: 1rem;           /* phone side gutter */
}

/* Light applies when the visitor picked Light (html.sk-light), or when they
   picked nothing and the admin setting is Light (body.scheme-light).
   A visitor Dark choice (html.sk-dark) falls back to the :root values above. */
html.sk-light body,
html:not(.sk-dark) body.scheme-light {
    --ground: #f5f5f5;
    --ground-raised: #eaeaea;
    --line: #adb5b7;
    --ink: #1b1818;
    --text: #1b1818;
    --muted: #3f3f3f;
    --focus: #1b1818;
}

@media (min-width: 700px) {
    :root { --gutter: 2rem; }
}

/* Reset + base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--size-body);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
}

img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4, h5, h6,
.wordmark, .profile-name {
    font-family: var(--font-heading);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--ink);
    line-height: 1.2;
    text-wrap: balance;
}

p, ul, ol, blockquote, figure, pre { margin: 0; }
p { text-wrap: pretty; }

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    text-decoration-color: var(--muted);
    transition: text-decoration-color 150ms ease-out, color 150ms ease-out;
}
a:hover { text-decoration-color: var(--ink); }

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    z-index: 10;
    padding: var(--s2) var(--s4);
    background: var(--ground);
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
}
.skip-link:focus { top: var(--s4); }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Small uppercase label: the only place Bold's wide tracking is used ------- */
.label,
.gh-content h2,
.site-nav .nav a,
.page-meta {
    font-size: var(--size-label);
    font-weight: 700;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
}

/* Light / Dark switch ------------------------------------------------------- */
.scheme-switch {
    display: none;                /* shown only when JavaScript runs (html.sk-js) */
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--muted);
    cursor: pointer;
    transition: color 150ms ease-out;
}
.sk-js .scheme-switch { display: inline-flex; }
.scheme-switch:hover { color: var(--ink); }
.scheme-switch:focus-visible { outline-offset: 2px; }
.scheme-switch .icon-moon { display: none; }
.scheme-light .scheme-switch .icon-sun { display: none; }
.scheme-light .scheme-switch .icon-moon { display: block; }
@media (max-width: 800px) {
    .scheme-switch { width: 2.75rem; height: 2.75rem; }   /* 44px tap target, icon stays 18px */
}
@media (prefers-reduced-motion: reduce) {
    .scheme-switch { transition: none; }
}

/* Site navigation (Ghost Navigation) -------------------------------------- */
.site-nav .nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2) var(--s5);
}
.site-nav .nav a {
    display: inline-block;
    padding: var(--s2) 0;        /* 13px text + padding = 44px-ish tap row */
    font-weight: 400;
    color: var(--muted);
    text-decoration: none;
}
.site-nav .nav a:hover,
.site-nav .nav-current a { color: var(--ink); }
.site-nav .nav-current a {
    text-decoration: underline;
    text-decoration-color: var(--ink);
    text-underline-offset: 0.5em;
}

/* Social icons (Ghost social accounts) ------------------------------------ */
.social {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2);
}
.social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;               /* 44px tap target */
    height: 2.75rem;
    margin-left: -0.875rem;       /* keep the glyph optically aligned to the text edge */
    color: var(--muted);
    text-decoration: none;
}
.social a + a { margin-left: -0.5rem; }
.social a:hover { color: var(--ink); }
.social svg { width: 1.125rem; height: 1.125rem; }
.social span { font-size: var(--size-label); letter-spacing: var(--track-label); text-transform: uppercase; }

/* Round portrait ------------------------------------------------------------- */
.portrait {
    margin: 0;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ground-raised);
}
.portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 35%;
}
body.portrait-mono .portrait img { filter: grayscale(1); }

/* The lead: the first paragraph on the home page shows as a large statement */
.lead-first > p:first-child,
.home-lead,
.page-title {
    font-weight: 300;
    color: var(--ink);
    line-height: 1.22;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

/* Ghost editor content --------------------------------------------------------- */
.gh-content { color: var(--text); }
.gh-content > * + * { margin-top: var(--s5); }

.gh-content h2 {
    margin-top: var(--s8);
    color: var(--ink);
}
.gh-content h2 + * { margin-top: var(--s4); }
.gh-content h3 {
    margin-top: var(--s7);
    font-size: 1.25rem;
    font-weight: 700;
}
.gh-content h4, .gh-content h5, .gh-content h6 {
    margin-top: var(--s6);
    font-size: 1rem;
    font-weight: 700;
}
.gh-content strong { font-weight: 700; color: var(--ink); }

.gh-content ul, .gh-content ol { padding-left: 1.25em; }
.gh-content li + li { margin-top: var(--s2); }
.gh-content li::marker { color: var(--muted); }

/* Lists on the home page read as a ledger: one line of name, one of detail */
.gh-content.ledger-lists ul {
    list-style: none;
    padding: 0;
    border-bottom: 1px solid var(--line);
}
.gh-content.ledger-lists ul li {
    margin: 0;
    padding: var(--s3) 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
}
.gh-content.ledger-lists ul li a,
.gh-content.ledger-lists ul li strong { color: var(--ink); }

.gh-content blockquote:not([class]) {
    padding-left: var(--s5);
    border-left: 2px solid var(--line);
    font-style: italic;
}
.gh-content blockquote.kg-blockquote-alt {
    font-size: 1.375rem;
    font-weight: 300;
    font-style: normal;
    text-align: center;
    color: var(--ink);
}

.gh-content hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin-top: var(--s7);
    margin-bottom: var(--s7);
}

.gh-content code {
    font-size: 0.9em;
    padding: 0.1em 0.35em;
    background: var(--ground-raised);
    border-radius: 3px;
}
.gh-content pre {
    padding: var(--s4);
    overflow-x: auto;
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.875rem;
}
.gh-content pre code { padding: 0; background: none; }

.gh-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    display: block;
    overflow-x: auto;
}
.gh-content th, .gh-content td {
    padding: var(--s2) var(--s3);
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.gh-content figcaption {
    margin-top: var(--s2);
    font-size: var(--size-small);
    color: var(--muted);
}

.gh-content iframe { display: block; margin-left: auto; margin-right: auto; }

/* Editor cards: Ghost loads the card styles itself (card_assets: true).
   These rules only set the widths and keep cards inside the Bold palette. */
.kg-width-wide,
.kg-width-full { max-width: none; }

.kg-width-full img { width: 100%; }

.gh-content .kg-card { color: inherit; }

.kg-button-card .kg-btn,
.kg-product-card .kg-product-card-button,
.kg-header-card .kg-header-card-button {
    background: transparent !important;
    color: var(--ink) !important;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: var(--size-label);
    font-weight: 400;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    text-decoration: none;
}

.kg-callout-card { border-radius: var(--radius); }
.kg-toggle-card, .kg-file-card-container, .kg-bookmark-container { border-radius: var(--radius) !important; }
.kg-bookmark-container { color: var(--text) !important; border-color: var(--line) !important; }
.kg-bookmark-title { color: var(--ink) !important; }
.kg-bookmark-description, .kg-bookmark-metadata { color: var(--muted) !important; }

/* Page and post headers ----------------------------------------------------- */
.page-header { margin-bottom: var(--s7); }
.page-title { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem); }
.page-excerpt {
    margin-top: var(--s4);
    font-size: 1.125rem;
    color: var(--muted);
}
.page-meta { margin-top: var(--s4); font-weight: 400; color: var(--muted); }
.page-image { margin-top: var(--s6); }
.page-image img { width: 100%; border-radius: var(--radius); }
.page-image figcaption { margin-top: var(--s2); font-size: var(--size-small); color: var(--muted); }

/* Post list (only shown if someone writes posts later) ------------------------- */
.post-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.post-list li { padding: var(--s4) 0; border-top: 1px solid var(--line); }
.post-list a { font-size: 1.25rem; text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
.post-list time { display: block; margin-top: var(--s1); font-size: var(--size-small); color: var(--muted); }
.pagination { margin-top: var(--s6); display: flex; gap: var(--s5); font-size: var(--size-small); color: var(--muted); }

/* Footer ------------------------------------------------------------------- */
.site-footer {
    font-size: var(--size-small);
    line-height: 1.6;
    color: var(--muted);
}
.site-footer p + p,
.site-footer p + .footer-links,
.footer-links + p { margin-top: var(--s3); }
.footer-links .nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--s1) var(--s5);
}
.footer-links a { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* Home opening line: default size (each layout sets its own in layout.css) */
.home-lead { font-size: clamp(1.75rem, 1.35rem + 1vw, 2.125rem); }
