/* 4bakker.com: quiet editorial style, orange accent, light and dark */

:root {
  --bg: #fdfcfa;
  --fg: #232220;
  --muted: #6e6a64;
  --accent: #b5562b;
  --accent-strong: #96441f;
  --on-accent: #ffffff;
  --line: #e8e3da;
  --soft: #f4f0e8;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18181a;
    --fg: #e9e6e1;
    --muted: #a19d97;
    --accent: #e08a5e;
    --accent-strong: #eda783;
    --on-accent: #18181a;
    --line: #2f2e31;
    --soft: #222124;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.125rem/1.7 var(--serif);
}
.wrap { max-width: 42rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* logo */
.logo { display: block; flex: none; }
.logo-bg { fill: var(--accent); }
.logo-glyph { stroke: var(--on-accent); }

/* header */
header.site {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-top: 2.25rem; padding-bottom: 1.25rem;
}
header.site::after {
  content: ""; flex-basis: 100%; height: 0; border-bottom: 1px solid var(--line); margin-top: .5rem;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  color: var(--fg); text-decoration: none;
  font: 700 1.5rem/1 var(--serif); letter-spacing: -.01em;
}
.brand:hover { color: var(--fg); }
nav { display: flex; gap: 1.25rem; font: 500 .95rem var(--sans); }
nav a { color: var(--muted); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--fg); }
nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

/* main */
main { padding-top: 1.5rem; padding-bottom: 3.5rem; }
.intro { margin: 0 0 1.75rem; color: var(--muted); font-size: 1.2rem; font-style: italic; }
.page-title { font-size: 2rem; margin: .5rem 0 1.5rem; }

/* post list */
ul.posts { list-style: none; margin: 0; padding: 0; }
ul.posts li { padding: 1.35rem 0; border-top: 1px solid var(--line); }
ul.posts li:first-child { border-top: 0; padding-top: .25rem; }
ul.posts a { color: var(--fg); text-decoration: none; font-size: 1.4rem; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; }
ul.posts a:hover { color: var(--accent); }
ul.posts p { margin: .35rem 0 0; color: var(--muted); }
ul.posts .empty { color: var(--muted); }

/* dates: small caps in the sans */
ul.posts time, .meta time {
  display: block; margin-bottom: .25rem;
  color: var(--muted); font: 600 .75rem var(--sans);
  letter-spacing: .09em; text-transform: uppercase;
}

/* articles */
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.01em; }
article h1 { font-size: 2.2rem; margin: .5rem 0 .25rem; }
article h2 { font-size: 1.45rem; margin: 2.25rem 0 .5rem; }
article h3 { font-size: 1.2rem; margin: 1.75rem 0 .4rem; }
.meta { margin: 0 0 1.75rem; }
article p, article ul, article ol { margin: 0 0 1.15rem; }
article li + li { margin-top: .3rem; }
blockquote {
  margin: 1.5rem 0; padding: .1rem 0 .1rem 1.1rem;
  border-left: 3px solid var(--accent); color: var(--muted); font-style: italic;
}
img { display: block; max-width: 100%; height: auto; margin: 1.75rem auto; border-radius: 6px; }
hr { border: 0; text-align: center; margin: 2.5rem 0; }
hr::before { content: "· · ·"; color: var(--muted); letter-spacing: .5em; }
code { font: .875em var(--mono); background: var(--soft); padding: .1em .35em; border-radius: 4px; }
pre { overflow-x: auto; margin: 1.5rem 0; padding: 1rem 1.15rem; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; line-height: 1.5; }
pre code { background: none; padding: 0; }
.back { margin-top: 3rem; font: 500 .95rem var(--sans); }
.back a { text-decoration: none; }
.not-found h1 { font-size: 3rem; margin-bottom: .25rem; }

/* footer */
footer.site {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem;
  padding-top: 0; padding-bottom: 3rem;
  color: var(--muted); font: .875rem var(--sans);
}
footer.site::before {
  content: ""; flex-basis: 100%; height: 0; border-top: 1px solid var(--line); margin-bottom: 1rem;
}
.footer-brand { display: inline-flex; align-items: center; gap: .5rem; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent); }

/* staging preview banner (staging environment only) */
.staging-banner {
  position: sticky; top: 0; z-index: 10; padding: .4rem 1rem;
  background: #ffd23f; color: #222; text-align: center; font: 600 .85rem var(--sans);
}

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; }
  article h1 { font-size: 1.8rem; }
  ul.posts a { font-size: 1.25rem; }
}
