/* Solarpunk theme for Notes on Soul Mountain
   Palette: earthy greens + off-whites + electric accents (blue/purple/pink)
   Aesthetic: minimal, text-focused, nature-meets-future */

/* ── Palette ─────────────────────────────────────────────────────────────── */
:root {
  --bg:           #f5f0e8;   /* warm off-white, like aged paper */
  --bg-alt:       #ede8da;   /* slightly darker parchment */
  --text:         #2d2a1e;   /* dark warm brown, easy to read */
  --text-muted:   #7a7060;   /* muted brown for metadata */
  --green-dark:   #2d5a3d;   /* deep forest green — headings */
  --green-mid:    #4a8c5c;   /* mid green — links */
  --green-light:  #a8c5a0;   /* pale green — borders, accents */
  --electric:     #5b4fcf;   /* electric indigo — active/accent */
  --electric-alt: #c45f9e;   /* fuchsia — secondary accent */
  --glow:         #3bb8c3;   /* teal glow — code, subtle highlights */
  --border:       #c8b89a;   /* warm tan — dividers */
}

/* ── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 18px;
  background: var(--bg);
  color: var(--text);
}

body {
  /* Palatino is narrower and more elegant than Georgia */
  font-family: "Palatino Linotype", "Palatino", "Book Antiqua", Georgia, serif;
  line-height: 1.65;       /* slightly tighter than before (was 1.75) */
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: "Palatino Linotype", "Palatino", "Book Antiqua", Georgia, serif;
  font-style: italic;
  color: var(--green-dark);
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  border-bottom: 2px solid var(--green-light);
  padding-bottom: 0.3rem;
  color: var(--electric);  /* fallback for browsers without gradient support */
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  h1 {
    background: linear-gradient(90deg, var(--electric), var(--electric-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

h2 {
  font-size: 1.25rem;
  font-weight: 450;
  color: var(--green-dark);
}

h3 {
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--electric-alt);
}

p { margin-bottom: 1.2rem; }

a {
  color: var(--green-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--green-light);
  transition: color 0.15s, border-color 0.15s;
}
a:hover {
  color: var(--electric);
  border-color: var(--electric);
}

em { font-style: italic; }
strong { font-weight: bold; color: var(--green-dark); }

blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--electric);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-style: italic;
}

code {
  font-family: "Menlo", "Monaco", monospace;
  font-size: 0.85em;
  color: var(--glow);
  background: var(--bg-alt);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

pre {
  background: #1e1e2e;  /* dark background for code blocks */
  color: #cdd6f4;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 3px solid var(--glow);
}

pre code { background: none; color: inherit; padding: 0; font-size: 0.85rem; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Header & nav ───────────────────────────────────────────────────────── */
.site-header {
  margin-bottom: 3rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--green-dark);
  border: none;
  letter-spacing: 0.02em;
}

.site-title:hover { color: var(--electric); }

.nav-sep { color: var(--text-muted); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a { color: var(--text-muted); border-color: var(--border); }
.site-footer a:hover { color: var(--electric); }

/* ── Post list ──────────────────────────────────────────────────────────── */
.post-list { margin-top: 1rem; }

.post-summary {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border);
}

.post-summary:last-child { border-bottom: none; }

.post-summary time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: "Menlo", monospace;
  letter-spacing: 0.05em;
}

.post-title {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  font-size: 1.7rem;
  font-weight: 400;
  font-style: italic;
}

.post-title a {
  color: var(--electric);
  border: none;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--green-light);
  text-underline-offset: 3px;
}

.post-title a:hover {
  color: var(--electric);
  text-decoration-color: var(--glow);
  font-weight: 550;
}

/* ── Single post ────────────────────────────────────────────────────────── */
.post-header { margin-bottom: 2rem; }

.post-header h1 { font-size: 1.8rem; }

.post-date {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: "Menlo", monospace;
}

.post-tags {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ── Tags — add glow on hover ───────────────────────────────────────────── */
.tag {
  font-size: 0.75rem;
  background: var(--bg-alt);
  color: var(--electric-alt);
  border: 1px solid var(--electric-alt);
  border-radius: 3px;
  padding: 0.1em 0.5em;
  font-family: "Menlo", monospace;
  letter-spacing: 0.04em;
  transition: box-shadow 0.2s;
}

.tag:hover {
  box-shadow: 0 0 6px var(--electric-alt);
}

/* ── Home ───────────────────────────────────────────────────────────────── */
.home-intro {
  margin-bottom: 2.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-left: 3px solid var(--electric);
  /* box-shadow adds a faint colored glow to the left edge of the box */
  box-shadow: -4px 0 12px -4px var(--electric);
}

.tagline {
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  body { padding: 1.25rem 1rem 3rem; }
  h1 { font-size: 1.6rem; }
}

/* ── Footnotes ──────────────────────────────────────────────────────────── */
.footnotes {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2.5rem;
  padding-top: 1rem;
}

/* Remove the decorative underline from footnote links — at this size
   it looks cluttered */
.footnotes a {
  border-bottom: none;
}
