/* Ernest Scribbler — a warm, typed-manuscript look in Maple Mono.
   Quirk lives in the chrome (ruled title, parchment, monospace dates);
   the body stays legible because Maple Mono is a friendly, rounded mono. */

/* --- Maple Mono (self-hosted, OFL) ------------------------------------- */
@font-face {
  font-family: 'Maple Mono';
  src: url('fonts/MapleMono-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Maple Mono';
  src: url('fonts/MapleMono-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Maple Mono';
  src: url('fonts/MapleMono-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Maple Mono';
  src: url('fonts/MapleMono-BoldItalic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}

:root {
  --ink:        #2b2b2b;   /* warm near-black */
  --parchment:  #fdf8e6;   /* ivory page */
  --rule:       #d8cfa8;   /* faint aged-paper line */
  --accent:     #8a5a2b;   /* sepia/ink-brown for links */
  --code-bg:    #f4eed6;   /* slightly darker parchment for code */
  --measure:    52em;      /* comfortable line length (mono glyphs run wide) */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Maple Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-weight: 400;
  background-color: var(--parchment);
  color: var(--ink);
  line-height: 1.65;
  max-width: var(--measure);
  margin: 3rem auto;
  padding: 0 1.25rem;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
}

/* --- Title: the typed-page masthead ------------------------------------ */
h1.title {
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--ink);   /* ruled line under the title */
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; }
h2 { font-size: 1.4rem; margin: 2.2rem 0 0.8rem; }
h3 { font-size: 1.15rem; margin: 1.8rem 0 0.6rem; }

p { margin-bottom: 1.1rem; }

/* --- Links: sepia ink, underline on hover ------------------------------ */
a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
a:hover { border-bottom-style: solid; }

/* --- Lists ------------------------------------------------------------- */
ul, ol { margin: 0 0 1.1rem 1.4rem; }
li { margin-bottom: 0.35rem; }

/* --- Code: boxed on warmer parchment (matters for the Clojure post) ---- */
pre, code { font-family: 'Maple Mono', ui-monospace, Menlo, monospace; }
code {
  background-color: var(--code-bg);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.92em;
}
pre {
  background-color: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 1rem 1.1rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

/* --- Syntax highlighting (htmlize :css classes) ------------------------
   A restrained, ink-on-parchment palette — coloured like fountain-pen inks
   rather than an IDE, to stay in keeping with the typed-manuscript theme. */
.org-keyword,
.org-clojure-keyword     { color: #7a3b8f; }              /* aubergine ink */
.org-string              { color: #4f7a3a; }              /* moss green */
.org-function-name       { color: #1f5d8a; }              /* navy ink */
.org-type                { color: #8a5a2b; }              /* sepia */
.org-variable-name       { color: #9a5b1e; }              /* burnt amber */
.org-comment,
.org-comment-delimiter   { color: #9a917b; font-style: italic; }
.org-css-selector        { color: #1f5d8a; font-weight: 700; }
.org-css-property        { color: #7a3b8f; }
.org-regexp-grouping-construct { color: #b5651d; }
.org-builtin             { color: #7a3b8f; }
.org-constant            { color: #8a5a2b; }
.org-bold                { font-weight: 700; }
.org-warning             { color: #b03030; }

blockquote {
  border-left: 3px solid var(--rule);
  margin: 1.4rem 0;
  padding-left: 1rem;
  font-style: italic;
  color: #5a5446;
}

/* --- Footer: small, typed-signature feel ------------------------------- */
#postamble {
  margin-top: 3rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: #7a7363;
}
#postamble p { margin: 0.15rem 0; }
