/* Shared stylesheet for suddendeparture.com — used by the static site AND the Ghost theme.
   Served by Caddy at /style.css. Edit here, run ./deploy.sh. */

body { max-width: 38rem; margin: 4rem auto; padding: 0 1.25rem; font: 1.05rem/1.6 system-ui, sans-serif; color: #222; background: #fff; }
a { color: #0000ee; text-decoration: underline; }
a:visited { color: #551a8b; }
a:active { color: #ff0000; }

/* header + nav (same markup on every page) */
header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 3rem; }
header .site { font-weight: 600; text-decoration: none; color: inherit; }
header nav { display: flex; gap: 1rem; font-size: 0.9rem; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 0.25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 0.5rem; }
h2.minor { font-size: 1.05rem; }
time { color: #777; font-size: 0.9rem; }

/* post list (journal index + tag archives) */
.post-list article { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.6rem; margin: 0.4rem 0; }
.post-list article > time { margin-left: auto; white-space: nowrap; }
.tag-description { margin: 0 0 1.5rem; color: #555; }

/* tags: small outlined boxes. Colour comes from the tag's accent colour in Ghost admin (--tag). */
.tags { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; vertical-align: baseline; }
.tag, a.tag:visited { display: inline-block; padding: 0 0.45em; border: 1.5px solid var(--tag, #999); border-radius: 2px;
       font-size: 0.72rem; line-height: 1.5; font-weight: 600; color: var(--tag, #999); background: transparent; text-decoration: none; white-space: nowrap; }
a.tag:hover { text-decoration: none; background: color-mix(in srgb, var(--tag, #999) 10%, transparent); }
.tag-filter { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 1.75rem; }
.tag-filter .tag { font-size: 0.78rem; }
.tag-filter .tag.active, .tag-filter a.tag.active:visited { color: #fff; background: var(--tag, #999); }   /* the one selected filter is filled */
.meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; margin: 0; }
.pagination { display: flex; justify-content: space-between; margin-top: 2rem; font-size: 0.9rem; }

/* long-form content (posts, pages, static page body) */
.content { margin-top: 1.5rem; }
.content img, .content video, .content iframe { max-width: 100%; height: auto; }
.content pre { overflow-x: auto; padding: 0.75rem 1rem; background: #f4f4f4; font-size: 0.9rem; }
.content blockquote { margin: 0; padding-left: 1rem; border-left: 3px solid #ddd; color: #555; }
.content figure { margin: 1.5rem 0; }
.content figcaption { font-size: 0.85rem; color: #777; }
.content hr { border: 0; border-top: 1px solid #ddd; margin: 2rem 0; }
