/* ─────────────────────────────────────────────────────────────
   Titania Blesh — blog stylesheet
   Sepia palette as the page default; volcanic masthead/footer.
   Reading-first: comfortable measure, generous leading, sober accents.
   ───────────────────────────────────────────────────────────── */

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

:root {
  --bg:         #f5ede0;
  --bg-2:       #ece2cf;
  --bg-3:       #ddd0b6;
  --rule:       #ddd0b6;
  --rule-soft:  rgba(31,24,21,0.08);

  --txt:        #1f1815;
  --txt-mid:    #4a3d33;
  --txt-lt:     #8a7c6c;

  --accent:     #7a2e2e;
  --accent-dk:  #5b2020;
  --accent-lt:  #a14545;

  --gold:       #b88a3a;
  --gold-lt:    #d8b87a;

  --display:    'Lato', 'Nunito', system-ui, sans-serif;
  --body:       'Nunito', system-ui, -apple-system, sans-serif;
}

.volcanic {
  --bg:        #0d0908;
  --bg-2:      #14110f;
  --bg-3:      #1d1814;
  --rule:      rgba(240,230,212,0.16);
  --rule-soft: rgba(240,230,212,0.07);
  --txt:       #f0e6d4;
  --txt-mid:   #c5b89d;
  --txt-lt:    #847964;
  --accent:    #e85d2c;
  --accent-dk: #b8431b;
  --accent-lt: #f08855;
  --gold:      #d8a64a;
  --gold-lt:   #ebc77b;
}

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ─── NAV (volcanic, lifted from index.html) ─────────────── */
nav.masthead {
  position: sticky; top: 0; z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 3rem 1.2rem;
  background-color: var(--bg);
  background-image: linear-gradient(to right,
    rgba(240,230,212,0)   0%, rgba(240,230,212,0.15) 8%, rgba(240,230,212,0.55) 16%,
    rgba(240,230,212,0.92) 24%, rgba(240,230,212,1)    32%, rgba(240,230,212,1)    68%,
    rgba(240,230,212,0.92) 76%, rgba(240,230,212,0.55) 84%, rgba(240,230,212,0.15) 92%,
    rgba(240,230,212,0)   100%);
  background-position: bottom; background-size: 100% 2px; background-repeat: no-repeat;
}
.brand { grid-column: 1; display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand-logo {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
}
.brand-logo::before {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(255,230,210,0.92) 0%, rgba(248,150,100,0.70) 22%, rgba(232,93,44,0.42) 40%,
    rgba(232,93,44,0.22) 58%, rgba(232,93,44,0.10) 74%, rgba(232,93,44,0.03) 88%, rgba(232,93,44,0) 100%);
  z-index: 0; filter: blur(3px);
  animation: halo-pulse 4s ease-in-out infinite alternate;
}
@keyframes halo-pulse {
  from { opacity: 0.75; transform: scale(0.96); }
  to   { opacity: 1;    transform: scale(1.06); }
}
.brand-logo img { position: relative; z-index: 1; height: 32px; width: auto; transform: translateY(-6px); }
.brand-text {
  font-family: 'Lato', var(--body), system-ui, sans-serif;
  text-transform: uppercase; font-size: 1rem; color: var(--txt); letter-spacing: 0;
}
.nav-links {
  display: flex; gap: 2.2rem; list-style: none; align-items: center;
  justify-content: center; grid-column: 2;
}
.nav-links a {
  font-family: var(--body); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--txt-mid); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover, .nav-links a.current {
  color: var(--accent); border-bottom-color: var(--accent);
}
.nav-cta {
  grid-column: 3;
  font-family: var(--body); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none;
  background-color: var(--accent); color: var(--bg);
  border: 1.5px solid var(--accent);
  padding: 0.55rem 1.1rem;
  transition: background 0.2s, color 0.2s, transform 0.15s, border-color 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { background-color: transparent; color: var(--accent); transform: translateY(-1px); }
.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--txt); border-radius: 2px; transition: all 0.3s; }

/* ─── BLOG HERO ────────────────────────────────── */
.blog-hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  max-width: 720px;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}
.hero-eyebrow {
  font-family: var(--body); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.2rem;
}
.hero-title {
  font-family: var(--display); font-style: italic; font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.05; letter-spacing: -0.015em;
  margin-bottom: 1rem;
}
.hero-title em { color: var(--accent); font-style: italic; }
.hero-rule {
  display: flex; align-items: center; justify-content: center;
  gap: 0.9rem; margin: 1.4rem 0 2rem;
}
.hero-rule .line { flex: 0 0 4rem; height: 1px; background: var(--txt); }
.hero-rule .star { color: var(--gold); font-size: 1rem; }
.hero-quote {
  font-family: var(--display); font-style: italic;
  color: var(--txt-mid);
  border-left: 3px solid var(--gold);
  padding: 0.4rem 0 0.4rem 1.4rem;
  margin: 0 auto 2.4rem;
  max-width: 28rem;
  text-align: left;
}
.hero-quote cite {
  display: block; margin-top: 0.6rem;
  font-style: normal; font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent);
}
.hero-prose p { margin-bottom: 1.2rem; color: var(--txt-mid); text-align: left; }
.hero-prose strong { color: var(--txt); font-weight: 700; }
.hero-prose em { font-style: italic; }
.hero-cta {
  display: inline-block; margin-top: 1rem;
  font-family: var(--body); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.2s, transform 0.15s;
}
.hero-cta:hover { opacity: 0.7; transform: translateY(-1px); }

/* ─── INDEX: CATEGORIES ───────────────────────── */
.cat-grid {
  max-width: 1100px; margin: 0 auto; padding: 5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem 3rem;
}
.section-eyebrow {
  grid-column: 1 / -1;
  font-family: var(--body); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.4rem;
  text-align: center;
}
.cat-block { padding: 0.4rem 0; }
.cat-title {
  font-family: var(--display); font-weight: 700; font-style: italic;
  font-size: 1.4rem;
  color: var(--txt);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.cat-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.cat-list li {
  position: relative;
  padding-left: 1rem;
}
.cat-list li::before {
  content: '✦';
  position: absolute; left: 0; top: 0.05em;
  color: var(--gold); font-size: 0.75rem;
}
.cat-list a {
  text-decoration: none; color: var(--txt-mid);
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.cat-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── INDEX: RECENT POSTS ─────────────────────── */
.recent {
  background: var(--bg-2);
  border-top: 1px solid var(--bg-3);
  padding: 5rem 1.5rem 6rem;
}
.recent-grid {
  max-width: 1100px; margin: 2rem auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.post-card {
  background: var(--bg);
  border: 1px solid var(--bg-3);
  padding: 1.8rem 1.6rem;
  display: flex; flex-direction: column; gap: 0.7rem;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(31,24,21,0.10);
  border-color: var(--gold-lt);
}
.post-card-meta {
  font-family: var(--body); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--txt-lt);
}
.post-card-title {
  font-family: var(--display); font-style: italic; font-weight: 700;
  font-size: 1.35rem; line-height: 1.2;
}
.post-card-title a {
  text-decoration: none; color: var(--txt);
  transition: color 0.18s;
}
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt { color: var(--txt-mid); font-size: 0.95rem; line-height: 1.55; }
.post-card-link {
  font-family: var(--body); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  margin-top: auto;
  border-bottom: 1.5px solid transparent;
  align-self: flex-start;
  transition: border-color 0.18s;
}
.post-card-link:hover { border-bottom-color: var(--accent); }

/* ─── POST PAGE ──────────────────────────────── */
.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
}
.post-header { text-align: center; margin-bottom: 3rem; }
.post-cat {
  display: inline-block;
  font-family: var(--body); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.4rem;
}
.post-title {
  font-family: var(--display); font-style: italic; font-weight: 700;
  font-size: clamp(2rem, 5.2vw, 3.2rem);
  line-height: 1.1; letter-spacing: -0.015em;
  color: var(--txt);
  margin-bottom: 1rem;
}
.post-date {
  font-family: var(--body); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--txt-lt);
}
.post-rule {
  display: flex; align-items: center; justify-content: center;
  gap: 0.9rem; margin: 1.6rem auto 0; max-width: 200px;
}
.post-rule .line { flex: 1; height: 1px; background: var(--gold); opacity: 0.7; }
.post-rule .star { color: var(--gold); font-size: 1rem; }

.post-body { font-size: 1.05rem; color: var(--txt); }
.post-body p { margin-bottom: 1.4rem; }
.post-body p:last-child { margin-bottom: 0; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 {
  font-family: var(--display); font-weight: 700; font-style: italic;
  color: var(--txt); letter-spacing: -0.01em;
  margin: 2.4rem 0 1rem;
  line-height: 1.2;
}
.post-body h2 { font-size: 1.7rem; }
.post-body h3 { font-size: 1.4rem; }
.post-body h4 { font-size: 1.2rem; }
.post-body h5, .post-body h6 { font-size: 1.05rem; }
.post-body strong { font-weight: 700; color: var(--txt); }
.post-body em { font-style: italic; }
.post-body a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--accent-lt);
  transition: color 0.18s, border-color 0.18s;
}
.post-body a:hover { color: var(--accent-dk); border-bottom-color: var(--accent-dk); }
.post-body ul, .post-body ol { margin: 0 0 1.4rem 1.4rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body ul li::marker { color: var(--gold); }
.post-body blockquote {
  margin: 1.6rem 0;
  padding: 0.6rem 0 0.6rem 1.4rem;
  border-left: 3px solid var(--gold);
  font-style: italic; color: var(--txt-mid);
}
.post-body img {
  margin: 1.8rem auto;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  max-width: 100%;
  height: auto;
}
.post-body figure { margin: 2rem 0; text-align: center; }
.post-body figure img { margin: 0 auto; }
.post-body figcaption {
  font-family: var(--display); font-style: italic;
  font-size: 0.88rem; color: var(--txt-lt);
  margin-top: 0.6rem;
}
.post-body hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 2.4rem auto;
  max-width: 60%;
}
.post-body pre, .post-body code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-2);
  border: 1px solid var(--rule);
}
.post-body code { padding: 0.1em 0.35em; }
.post-body pre { padding: 1rem; overflow-x: auto; margin-bottom: 1.4rem; }
.post-body pre code { background: none; border: none; padding: 0; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4rem;
  border: 1px solid var(--rule);
}
.post-body th, .post-body td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.post-body th { background: var(--bg-2); font-weight: 700; }
.post-body iframe {
  max-width: 100%;
  margin: 1.8rem auto;
  display: block;
}

/* ─── DROP CAP ─────────────────────────────────── */
.post-body .drop-cap {
  float: left;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 4.6rem;
  line-height: 0.85;
  margin: 0.32rem 0.55rem -0.2rem 0;
  color: var(--accent);
  /* subtle illumination behind the letter */
  background: linear-gradient(135deg, rgba(184,138,58,0.10) 0%, transparent 65%);
  padding: 0.05em 0.12em 0.06em 0.12em;
  border-radius: 4px;
}

/* ─── PULL QUOTE ────────────────────────────────── */
.post-body blockquote.pullquote {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.35;
  text-align: center;
  color: var(--accent);
  max-width: 32rem;
  margin: 2.6rem auto;
  padding: 1.6rem 1rem;
  border: 0;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  position: relative;
}
.post-body blockquote.pullquote p { margin: 0; }
.post-body blockquote.pullquote::before,
.post-body blockquote.pullquote::after {
  position: absolute;
  font-family: 'Lora', Georgia, serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--gold);
  font-style: normal;
  pointer-events: none;
}
.post-body blockquote.pullquote::before { content: 'C'; left: 0.4rem; top: 0.6rem; }
.post-body blockquote.pullquote::after  { content: 'D'; right: 0.4rem; bottom: 0.4rem; }

/* ─── CALLOUTS ──────────────────────────────────── */
.post-body .callout {
  margin: 2rem 0;
  padding: 1.1rem 1.4rem 1rem;
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
  background: rgba(184,138,58,0.06);
  position: relative;
}
.post-body .callout p { margin-bottom: 0; }
.post-body .callout .callout-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.post-body .callout .callout-emoji {
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0;
  /* nudge emoji vertically to align with caps text */
  transform: translateY(-1px);
}
.post-body .callout .callout-body {
  color: var(--txt);
  font-size: 1rem;
}

/* tip — gold (the default) */
.post-body .callout-tip {
  border-left-color: var(--gold);
  background: rgba(184,138,58,0.08);
}
.post-body .callout-tip .callout-label { color: #946a1f; }

/* warning — wine */
.post-body .callout-warning {
  border-left-color: var(--accent);
  background: rgba(122,46,46,0.06);
}
.post-body .callout-warning .callout-label { color: var(--accent); }

/* example — sage */
.post-body .callout-example {
  border-left-color: #5a7a6a;
  background: rgba(90,122,106,0.06);
}
.post-body .callout-example .callout-label { color: #4a6b5b; }

/* note — paper */
.post-body .callout-note {
  border-left-color: var(--txt-mid);
  background: rgba(74,61,51,0.05);
}
.post-body .callout-note .callout-label { color: var(--txt-mid); }

/* ─── SECTION HEADER EMOJI ──────────────────────── */
.post-body .section-emoji {
  display: inline-block;
  font-style: normal;
  margin-right: 0.4rem;
  /* keep emoji color/weight independent of heading style */
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-weight: 400;
  /* Slightly smaller than the heading text so it reads as a marker */
  font-size: 0.85em;
  vertical-align: 0.05em;
}

.post-footer { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.back-link a {
  font-family: var(--body); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
}
.back-link a:hover { color: var(--accent-dk); }

/* ─── POST NAV (prev/next) ────────────────────── */
.post-nav {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.post-nav .nav-prev, .post-nav .nav-next {
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 1.4rem 1.6rem;
  background: var(--bg-2);
  border: 1px solid var(--bg-3);
  text-decoration: none;
  color: var(--txt);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.post-nav .nav-prev:hover, .post-nav .nav-next:hover {
  border-color: var(--gold-lt);
  box-shadow: 0 6px 18px rgba(31,24,21,0.08);
  transform: translateY(-2px);
}
.post-nav .nav-next { text-align: right; }
.post-nav .nav-arrow {
  font-family: var(--body); font-size: 1rem; color: var(--accent);
}
.post-nav .nav-label {
  font-family: var(--body); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--txt-lt);
}
.post-nav .nav-title {
  font-family: var(--display); font-style: italic; font-weight: 700;
  font-size: 1.05rem; line-height: 1.3; color: var(--txt);
}

/* ─── FOOTER ─────────────────────────────────── */
footer {
  background:
    linear-gradient(to right,
      rgba(240,230,212,0)   0%, rgba(240,230,212,0.15) 8%, rgba(240,230,212,0.55) 16%,
      rgba(240,230,212,0.92) 24%, rgba(240,230,212,1)    32%, rgba(240,230,212,1)    68%,
      rgba(240,230,212,0.92) 76%, rgba(240,230,212,0.55) 84%, rgba(240,230,212,0.15) 92%,
      rgba(240,230,212,0) 100%) top / 100% 2px no-repeat,
    radial-gradient(ellipse at 50% 0%, rgba(232,93,44,0.10) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 60%, #2a1610 100%);
  padding: 3rem 3rem 2.2rem;
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 1.5rem;
}
.foot-left {
  font-family: var(--body); font-size: 0.85rem;
  color: var(--txt-lt); letter-spacing: 0.04em;
}
.foot-links {
  display: flex; gap: 1.6rem; list-style: none;
  justify-content: flex-end; flex-wrap: wrap;
}
.foot-links a {
  font-family: var(--body); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--txt-mid); text-decoration: none;
  transition: color 0.2s;
}
.foot-links a:hover { color: var(--accent); }

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 960px) {
  nav.masthead { padding: 1rem 1.2rem; grid-template-columns: 1fr auto; }
  nav.masthead::after { left: 1.2rem; right: 1.2rem; }
  .nav-cta { display: none; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 2px solid var(--txt);
    padding: 1.2rem 1.5rem 1.6rem; gap: 1.1rem;
    grid-column: 1 / -1; justify-content: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: flex; }
  .blog-hero { padding: 3.5rem 1.2rem 3rem; }
  .post { padding: 3rem 1.2rem 2rem; }
  .cat-grid { padding: 3.5rem 1.2rem 3rem; gap: 2rem; }
  .recent { padding: 3.5rem 1.2rem 4rem; }
  .post-nav { grid-template-columns: 1fr; padding: 0 1.2rem 4rem; }
  .post-nav .nav-next { text-align: left; }
  footer { grid-template-columns: 1fr; padding: 2.4rem 1.5rem; gap: 1.5rem; text-align: center; }
  .foot-links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brand-logo::before { animation: none; }
}
