/* Blog Dylan — stylesheet
   Warm, editorial, literary. Built for reading at night. */

:root {
  --paper:      #f7f4ee;
  --paper-2:    #fffdf9;
  --ink:        #211d18;
  --ink-soft:   #4a443b;
  --ink-faint:  #8a8175;
  --rule:       #e3ddd1;
  --accent:     #9a3b2e;   /* dried-brick red */
  --accent-2:   #c2553f;
  --max:        42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #18120b;
    --paper-2:   #1f1810;
    --ink:       #ece5d8;
    --ink-soft:  #c5bcab;
    --ink-faint: #8a8175;
    --rule:      #322a1f;
    --accent:    #e08a6f;
    --accent-2:  #eba88f;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Charter, Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  line-height: 1.72;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.4rem;
}

/* ---------- Masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.masthead .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem 1.2rem;
  padding-top: 1.6rem;
  padding-bottom: 1.4rem;
}
.wordmark {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  font-style: italic;
}
.wordmark span { color: var(--accent); }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .92rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-left: 1.2rem;
}
.nav a:hover { color: var(--accent); }

/* ---------- Intro / hero ---------- */
.intro {
  padding: 3.4rem 0 1.2rem;
  border-bottom: 1px solid var(--rule);
}
.intro p {
  font-size: 1.32rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  font-style: italic;
}
.kicker {
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  color: var(--ink-faint);
  margin: 0 0 1rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

/* ---------- Post list ---------- */
.entries { padding: 1rem 0 3rem; }
.entry {
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--rule);
}
.entry:last-child { border-bottom: none; }
.entry .meta {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .5rem;
}
.entry h2 {
  margin: 0 0 .5rem;
  font-size: 1.85rem;
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.entry h2 a { color: var(--ink); text-decoration: none; }
.entry h2 a:hover { color: var(--accent); }
.entry .dek { margin: 0 0 .9rem; color: var(--ink-soft); }
.entry .more {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--accent);
  text-decoration: none;
}
.entry .more:hover { text-decoration: underline; }

/* ---------- Article ---------- */
.article { padding: 3rem 0 2rem; }
.article .meta {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .8rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.article h1 {
  font-size: 2.5rem;
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 1.8rem;
}
.article p { margin: 0 0 1.4rem; }
.article p:first-of-type::first-letter {
  font-size: 3.1rem;
  line-height: .8;
  float: left;
  padding: .08em .08em 0 0;
  color: var(--accent);
  font-weight: 500;
}
.article em { color: var(--ink); }
.article hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.6rem 0;
}
.article .endnote {
  font-size: .98rem;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.6;
}

/* ---------- Post nav ---------- */
.postnav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .9rem;
}
.postnav a { color: var(--accent); text-decoration: none; }
.postnav a:hover { text-decoration: underline; }
.postnav .back { color: var(--ink-faint); }

/* ---------- About ---------- */
.page { padding: 3rem 0; }
.page h1 {
  font-size: 2.2rem; font-weight: 500; letter-spacing: -0.02em;
  margin: 0 0 1.4rem; line-height: 1.15;
}
.page p { margin: 0 0 1.3rem; }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
}
.foot .wrap {
  padding: 2rem 1.4rem 3rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .82rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem 1.2rem;
}
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 540px) {
  body { font-size: 1.08rem; }
  .article h1 { font-size: 1.95rem; }
  .intro p { font-size: 1.15rem; }
  .entry h2 { font-size: 1.5rem; }
  .wordmark { font-size: 1.45rem; }
  .nav a { margin-left: 0; margin-right: 1rem; }
}
