/* ---------------------------------------------------------------
   the yonder — minimal serif blog
   Layout/type values mirror the reference design: 780px column,
   18px serif body at 1.6, monospace dates in a fixed right-aligned
   gutter beside each title.
   --------------------------------------------------------------- */

:root {
  --main-width: 780px;
  --main-padding: 1.4em;

  --font-body: Literata, Georgia, Cambria, "Noto Serif", ui-serif, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --content-primary-light: rgb(36, 36, 36);
  --content-primary-dark: rgb(218, 218, 218);
  --content-secondary-light: rgb(117, 117, 117);
  --content-secondary-dark: rgb(140, 140, 140);
  --theme-light: rgb(255, 255, 255);
  --theme-dark: rgb(24, 24, 27);

  --content-primary: var(--content-primary-light);
  --content-secondary: var(--content-secondary-light);
  --theme: var(--theme-light);
}

@media (prefers-color-scheme: dark) {
  :root {
    --content-primary: var(--content-primary-dark);
    --content-secondary: var(--content-secondary-dark);
    --theme: var(--theme-dark);
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  max-width: var(--main-width);
  margin: 0 auto;
  padding: 0 var(--main-padding) 3rem;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--content-primary);
  background: var(--theme);
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

/* --- header ----------------------------------------------------- */

.site-header { padding-top: 2rem; }

.site-title {
  font-size: 2.6em;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.site-title-small {
  font-size: 1em;
  font-weight: 700;
  margin: 0 0 2.5rem;
}

.tagline {
  color: var(--content-secondary);
  margin: 0 0 0.5rem;
}

/* --- post listing (the home page) ------------------------------- */

.post-list { margin-top: 2.5rem; }

.post-line {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.post-line p {
  margin-top: 0;
  margin-bottom: 0;
}

.line-date {
  font-family: var(--font-mono);
  font-size: small;
  color: var(--content-secondary);
  min-width: 120px;
  max-width: 120px;
  text-align: right;
  padding-right: 1rem;
  flex-shrink: 0;
}

.line-title { margin: 0; }

/* Stack the date above the title once the gutter stops fitting. */
@media (max-width: 520px) {
  .post-line {
    display: block;
    margin-bottom: 1.1rem;
  }
  .line-date {
    min-width: 0;
    max-width: none;
    text-align: left;
    padding-right: 0;
  }
}

/* --- single post ------------------------------------------------ */

.post-title {
  font-size: 2em;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.4rem;
}

.post-date {
  font-family: var(--font-mono);
  font-size: small;
  color: var(--content-secondary);
  margin: 0 0 2.5rem;
}

.post-content p { margin: 0 0 1.4rem; }

.post-content h2 { font-size: 1.4em; margin: 2.2rem 0 0.6rem; }
.post-content h3 { font-size: 1.3em; margin: 1.8rem 0 0.6rem; }

.post-content a { text-decoration: underline; }

.post-content blockquote {
  margin: 0 0 1.4rem;
  padding-left: 1.2rem;
  border-left: 2px solid var(--content-secondary);
  color: var(--content-secondary);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.post-content img {
  max-width: 100%;
  height: auto;
}

.post-content hr {
  border: 0;
  border-top: 1px solid var(--content-secondary);
  margin: 2.5rem 0;
  opacity: 0.4;
}
