/* =========================================================
   Snappish Productions — "Rands in Repose"–style theme
   ========================================================= */

:root {
  --ink:        #221f1b;   /* body text */
  --ink-soft:   #5a534c;   /* secondary text */
  --muted:      #998f84;   /* meta / dates */
  --rule:       #e6dfd3;   /* hairlines */
  --paper:      #f6f1e8;   /* page background (warmer cream) */
  --paper-2:    #ece4d6;   /* tag chips */
  --accent:     #a23a28;   /* warm brick red */
  --accent-2:   #2f6f6f;   /* teal for hover */
  --maxw:       42rem;     /* reading column ~672px */
  --gutter:     1.6rem;    /* min edge padding */

  --serif:   "Newsreader", Georgia, "Times New Roman", serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  /* faint fractal-noise grain so the paper isn't a flat void */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(162,58,40,.16); }

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

/* ---------- Masthead (left header bar) ---------- */
.masthead {
  border-top: 4px solid var(--accent);   /* accent bar anchors the top */
  border-bottom: 1px solid var(--rule);
}
.masthead-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.4rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.masthead a { text-decoration: none; color: inherit; }

.brand { display: inline-block; }
.site-title {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.025em;
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  line-height: 1.05;
  margin: 0;
  color: var(--accent);
}
.site-tagline {
  margin: 0.2rem 0 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.nav {
  flex: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 1.4rem;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:first-child { margin-left: 0; }
.nav a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 560px) {
  .masthead-inner { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
  .nav a { margin-left: 0; margin-right: 1.1rem; }
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Post list (home) ---------- */
.stream { padding-top: 3.5rem; padding-bottom: 1.5rem; }

.entry { padding: 0; margin: 0 0 3.25rem; }
.entry:last-child { margin-bottom: 0; }
.entry + .entry::before {
  content: "❧";
  display: block; text-align: center;
  color: var(--accent); font-size: 1.5rem; line-height: 1;
  margin: 0 0 3.25rem;
}

.entry-meta {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.entry-title {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-size: clamp(1.7rem, 4.5vw, 2.15rem);
  margin: 0 0 1.1rem;
}
.entry-title a { color: var(--ink); text-decoration: none; transition: color .15s; }
.entry-title a:hover { color: var(--accent); }

.entry p { margin: 0 0 1.25rem; }
.entry-body a, .post-body a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid rgba(162,58,40,.32);
  transition: color .15s, border-color .15s;
}
.entry-body a:hover, .post-body a:hover { color: var(--accent-2); border-color: var(--accent-2); }

.musicPlaying, .nowPlaying {
  font-size: 0.9rem; font-style: italic; color: var(--muted);
  border-top: 1px dotted var(--rule); padding-top: 0.7rem; margin-top: 1.4rem;
}

.tags { margin-top: 1.2rem; }
.tag {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.68rem; letter-spacing: 0.02em;
  color: var(--ink-soft); background: var(--paper-2);
  padding: 0.28rem 0.7rem; border-radius: 100px; margin: 0 0.4rem 0.4rem 0;
}

/* ---------- Single post / page ---------- */
.post-full { padding-top: 3.5rem; padding-bottom: 1rem; }
.post-full .entry-title { font-size: clamp(2.1rem, 6vw, 2.9rem); margin-bottom: 0.6rem; line-height: 1.06; }
.post-body { font-size: 1.12rem; line-height: 1.72; }
.post-body > p:first-of-type { font-size: 1.18rem; }
.post-body em { color: var(--ink-soft); }

.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.15; margin: 2.4rem 0 0.8rem; color: var(--ink);
}
.post-body h1 { font-size: clamp(1.9rem, 5vw, 2.4rem); }
.post-body h2 { font-size: 1.5rem; }
.post-body h3 { font-size: 1.2rem; }
.post-body h4 { font-size: 1.02rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* drop-cap on the opening paragraph of an article */
.post-body > p:first-of-type::first-letter,
.entry-body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 3.4em;
  line-height: 0.78;
  padding: 0.08em 0.1em 0 0;
  margin-right: 0.04em;
  color: var(--accent);
}

.post-body ul, .post-body ol, .entry-body ul, .entry-body ol { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.post-body li, .entry-body li { margin: 0 0 0.45rem; padding-left: 0.3rem; }
.post-body li::marker, .entry-body li::marker { color: var(--accent); }

.post-body blockquote, .entry-body blockquote {
  margin: 1.8rem 0; padding: 0.4rem 0 0.4rem 1.5rem;
  border-left: 3px solid var(--accent); color: var(--ink-soft);
  font-style: italic; font-size: 1.08rem;
}
.post-body pre, .entry-body pre {
  background: #2b2622; color: #f2ece3; border-radius: 6px;
  padding: 1rem 1.2rem; overflow-x: auto; font-size: 0.85rem; line-height: 1.5;
}
.post-body code, .entry-body code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em;
  background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 4px;
}
.post-body pre code, .entry-body pre code { background: none; padding: 0; }

.about-subhead {
  font-family: var(--sans); font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted); margin: 2.5rem 0 0.9rem;
}

/* ---------- Pagination ---------- */
.pagination {
  list-style: none; display: flex; justify-content: center; flex-wrap: wrap;
  gap: 0.4rem; margin: 3.5rem 0 0; padding: 0;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
}
.pagination .page-item a, .pagination .page-item.disabled span {
  display: block; padding: 0.4rem 0.7rem; color: var(--ink-soft);
  text-decoration: none; border: 1px solid var(--rule); border-radius: 6px;
}
.pagination .page-item.active a { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .page-item.disabled span { color: var(--muted); opacity: 0.5; }
.pagination .page-item a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Archives ---------- */
.archives { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.archives-title {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.025em;
  font-size: clamp(2rem, 6vw, 2.7rem); color: var(--accent); margin: 0 0 2.5rem;
}
.arch-year {
  font-family: var(--display);
  font-weight: 800; font-size: 1.7rem; letter-spacing: -0.015em;
  margin: 3rem 0 0.85rem; padding-bottom: 0.45rem; border-bottom: 2px solid var(--ink);
}
.arch-list { list-style: none; margin: 0; padding: 0; }
.arch-item {
  display: flex; gap: 1.25rem; align-items: baseline;
  padding: 0.55rem 0; border-bottom: 1px solid var(--rule);
}
.arch-date {
  flex: 0 0 4.25rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding-top: 0.2rem;
}
.arch-item a {
  color: var(--ink); text-decoration: none; font-size: 1.05rem;
  transition: color .15s;
}
.arch-item a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem; padding: 2.75rem var(--gutter) 4rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.8rem; color: var(--muted);
  line-height: 1.8;
}
.foot a { color: var(--ink-soft); text-decoration: none; margin: 0 0.5rem; transition: color .15s; }
.foot a:hover { color: var(--accent); }

@media (max-width: 640px) {
  :root { --gutter: 1.4rem; }
  body { font-size: 18px; }
  .stream, .post-full, .archives { padding-top: 2.5rem; }
  .post-body { font-size: 1.06rem; }
  .arch-item { flex-direction: column; gap: 0.15rem; }
  .arch-date { flex: none; }
}
