/* ===================================================================
   The Mossy Pages — minimalist botanical theme
   Vanilla CSS only. No frameworks.
   Soft moss greens, earthy cream tones, lots of white space.
   Serif (Georgia) headings, sans-serif body text.
   =================================================================== */

:root {
  /* ---- palette ---- */
  --moss-900: #2e4b2e;   /* deep forest green */
  --moss-700: #44663f;   /* leaf green */
  --moss-500: #64865f;   /* mid moss */
  --moss-100: #e7eee3;   /* pale sage */
  --cream:     #f6f4ec;  /* warm earthy background */
  --paper:     #fdfcf8;  /* card / main background */
  --ink:       #2d3127;  /* body text */
  --muted:     #717a68;  /* secondary text */
  --bark:      #6f5a3c;  /* earthy brown accent */
  --rule:      #d8ded1;  /* hairline borders */

  /* ---- type ---- */
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans:  "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* ---- layout ---- */
  --max-width: 46rem;
  --space: clamp(1.25rem, 4vw, 2.5rem);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.75;
  border-top: 5px solid var(--moss-500);
}

::selection {
  background: var(--moss-100);
  color: var(--moss-900);
}

a {
  color: var(--moss-700);
}

/* ---------- Header ---------- */

.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  text-align: center;
  padding: calc(var(--space) * 1.3) var(--space) calc(var(--space) * 0.9);
}

.site-header h1,
.site-title-link {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--moss-900);
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.site-title-link {
  text-decoration: none;
  display: inline-block;
}

.site-title-link:hover {
  color: var(--moss-700);
}

.tagline {
  margin-top: 0.4rem;
  color: var(--muted);
  font-style: italic;
  font-size: 0.98rem;
}

/* ---------- Main layout ---------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space);
}

main {
  padding-top: calc(var(--space) * 1.2);
  padding-bottom: calc(var(--space) * 2);
}

/* ---------- Index: recent articles list ---------- */

.section-heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--moss-700);
  margin-bottom: 1.2rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule);
}

.article-list {
  list-style: none;
}

.article-list li {
  border-left: 3px solid var(--moss-100);
  padding: 0.85rem 1.05rem 0.95rem;
  margin-bottom: 0.7rem;
  border-radius: 0 8px 8px 0;
  background: var(--paper);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.article-list li:hover {
  border-left-color: var(--moss-500);
  background: #fafbf7;
}

.article-list a {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--moss-900);
  text-decoration: none;
  line-height: 1.35;
}

.article-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-date {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.empty-note {
  color: var(--muted);
  font-style: italic;
  padding: 0.5rem 0 1rem;
}

.empty-note code {
  background: var(--moss-100);
  color: var(--moss-900);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ---------- Article page ---------- */

.article {
  max-width: 40rem;
  margin: 0 auto;
}

.article h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  color: var(--moss-900);
  line-height: 1.25;
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.article-content p {
  margin-bottom: 1.15rem;
}

.article-footer {
  margin-top: 2.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

.article-footer time {
  font-style: italic;
}

/* ---------- Site footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--cream);
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
  padding: 1.7rem var(--space);
}
