/* ============================================================
   Permanent Fixes — modernized presentation.
   REDESIGN A adopted site-wide (LOCKED user decision, 2026-09-30).
   Open page (NO floating cream panel/shadow/blue frame); his cream
   (#eeeecc) is the whole page below the menu; the menu sits in a
   full-width blue band directly under the photo; white search box,
   note box, and subject chips. Reading serif = TeX Gyre Pagella
   (Palatino-like, GUST Font License / LPPL — free) for titles,
   headings, and body; interface text = Inter (SIL OFL) — both stored
   locally in fonts/ (no outside font service). Interface text >= ~15px.
   Site colors (his own theme): slate blue #335676, cream #eeeecc,
   green #568767 (now a thin band atop the footer). His words, titles,
   labels, dates, and images are unchanged; only presentation is new.
   ============================================================ */

/* ---- local webfonts (in fonts/, relative to this stylesheet at the site root) ---- */
@font-face{font-family:'Pagella';src:url(fonts/pagella-400.woff2) format('woff2');font-weight:400;font-style:normal;font-display:swap;}
@font-face{font-family:'Pagella';src:url(fonts/pagella-700.woff2) format('woff2');font-weight:700;font-style:normal;font-display:swap;}
@font-face{font-family:'Pagella';src:url(fonts/pagella-400i.woff2) format('woff2');font-weight:400;font-style:italic;font-display:swap;}
@font-face{font-family:'Pagella';src:url(fonts/pagella-700i.woff2) format('woff2');font-weight:700;font-style:italic;font-display:swap;}
@font-face{font-family:'InterLoc';src:url(fonts/inter-400.woff2) format('woff2');font-weight:400;font-style:normal;font-display:swap;}
@font-face{font-family:'InterLoc';src:url(fonts/inter-600.woff2) format('woff2');font-weight:600;font-style:normal;font-display:swap;}

:root {
  --ink:        #211d18;   /* body text */
  --ink-soft:   #544c40;   /* meta / muted */
  --frame:      #335676;   /* HIS slate blue — menu band + footer band */
  --frame-dk:   #26425c;   /* darker slate for edges/hover */
  --card:       #eeeecc;   /* HIS cream */
  --page:       #eeeecc;   /* Design A: his cream is the whole page below the menu */
  --surface:    #ffffff;   /* white search box + note box + chips */
  --surface-in: #ffffff;   /* form inputs */
  --rule:       #d8d2b4;   /* thin warm hairlines on cream */
  --accent:     #335676;   /* links — HIS slate blue */
  --accent-dk:  #26425c;   /* link hover */
  --green:      #568767;   /* HIS muted green — thin band atop the footer */
  --measure:    38rem;     /* reading column ~65-70 chars in Pagella */

  --serif: 'Pagella', 'Palatino Linotype', 'Book Antiqua', Palatino,
           Georgia, 'Times New Roman', serif;
  --sans:  'InterLoc', system-ui, -apple-system, 'Segoe UI', Roboto,
           'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);        /* HIS cream is the open page */
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.04rem + 0.3vw, 1.2rem);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-dk); }

/* ---- shared layout wrapper ---- */
.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
.wrap--wide { max-width: 60rem; }
.wrap--read { max-width: var(--measure); }   /* single post + About */
.prose { max-width: none; }

/* ============================================================
   Site masthead — his clean text-free photograph (Alligator.jpg),
   cropped to a horizontal strip; his title + tagline as live text in
   the clear water at lower-left (kept OFF the alligator); his photo
   caption at lower-right. Legibility via an edge-only gradient. No
   white boxes. url() is relative to this stylesheet (site root), so
   the same rule resolves at any folder depth. (Unchanged in Redesign A
   except the title now renders in the Pagella serif.)
   ============================================================ */
.site-masthead {
  position: relative;
  min-height: clamp(11rem, 27vw, 20rem);
  background-image: url(images/Alligator.jpg);
  background-size: 158%;
  background-position: 47% 52%;
  background-repeat: no-repeat;
  overflow: hidden;
}
.site-masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(102deg, rgba(10,16,22,0.72) 0%, rgba(10,16,22,0.40) 24%, rgba(10,16,22,0) 52%),
    radial-gradient(74% 135% at 100% 100%, rgba(9,14,20,0.66) 0%, rgba(9,14,20,0.24) 34%, rgba(9,14,20,0) 60%),
    linear-gradient(to top, rgba(10,16,22,0.52) 0%, rgba(10,16,22,0) 28%);
}
.site-masthead__inner {
  position: absolute;
  left: clamp(1.1rem, 3.8vw, 3.25rem);
  bottom: clamp(1rem, 3vw, 2.3rem);
  z-index: 1;
  max-width: min(28rem, 50%);
  text-align: left;
}
.site-masthead__caption {
  position: absolute;
  right: clamp(1.2rem, 3.2vw, 3.5rem);
  bottom: clamp(0.7rem, 1.8vw, 1.35rem);
  z-index: 1;
  margin: 0;
  max-width: min(24rem, 46%);
  text-align: right;
  font-family: var(--sans);
  font-style: italic;
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: 0.01em;
  color: rgba(250,247,241,0.96);
  font-size: clamp(0.82rem, 1.05vw, 0.95rem);
  text-shadow: 0 1px 2px rgba(0,0,0,0.92), 0 1px 10px rgba(0,0,0,0.72);
}
.site-masthead__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1.03;
  color: #fbf9f4;
  font-size: clamp(1.9rem, 5.4vw, 3.9rem);
  text-shadow: 0 2px 14px rgba(0,0,0,0.62), 0 1px 3px rgba(0,0,0,0.6);
}
.site-masthead__title a { color: inherit; text-decoration: none; }
.site-masthead__title a:hover { color: #ffffff; }
.site-masthead__tagline {
  margin: 0.7rem 0 0;
  max-width: 32rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(251,249,244,0.5);
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.4;
  color: #f1ece2;
  font-size: clamp(0.9rem, 1.55vw, 1.12rem);
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}
@media (max-width: 34rem) {
  .site-masthead {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: 175%;
    background-position: 50% 38%;
    min-height: clamp(12.5rem, 54vw, 17rem);
    padding: 0 0 0.9rem;
  }
  .site-masthead::before {
    background: linear-gradient(to top, rgba(8,13,18,0.80) 0%, rgba(8,13,18,0.42) 38%, rgba(8,13,18,0) 66%);
  }
  .site-masthead__inner {
    position: static;
    left: auto; right: auto; bottom: auto;
    max-width: none;
    padding: 0 1rem;
  }
  .site-masthead__caption {
    position: static;
    right: auto; bottom: auto;
    max-width: none;
    text-align: left;
    padding: 0.45rem 1rem 0;
    font-size: 0.85rem;
  }
}

/* ---- primary nav — full-width blue band directly under the photo ---- */
.site-nav {
  background: var(--frame);
  border-top: 1px solid var(--frame-dk);
  border-bottom: 1px solid var(--frame-dk);
}
.site-nav ul {
  list-style: none;
  margin: 0 auto;
  max-width: 60rem;
  padding: 0.4rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  font-family: var(--sans);
  font-size: 1rem;
}
.site-nav a {
  display: inline-block;
  padding: 0.65rem 0;
  color: #dbe4ee;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #ffffff;
  border-bottom-color: var(--card);   /* cream underline on slate */
}

/* ============================================================
   Main — open page (no floating panel/shadow/frame). Content sits
   directly on the cream page.
   ============================================================ */
main { padding: 2.6rem 0 3.4rem; }
main > .wrap { background: none; border-radius: 0; box-shadow: none; padding: 0 1.25rem; }

.page-heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: 0.005em;
  margin: 0 0 1.1rem;
}
.lede {
  color: var(--ink-soft);
  font-size: 1rem;
  font-family: var(--sans);
  margin: 0 0 2rem;
}

/* ============================================================
   Post listing (curated topic pages use .post-card)
   ============================================================ */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-card { padding: 1.9rem 0; border-top: 1px solid var(--rule); }
.post-card:first-child { border-top: 0; padding-top: 0.4rem; }
.post-card__date {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.4rem;
}
.post-card__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.7rem);
  line-height: 1.22;
  margin: 0 0 0.55rem;
}
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a:hover { color: var(--accent); }
.post-card__excerpt { margin: 0.55rem 0 0.9rem; font-size: 1.08rem; line-height: 1.7; }
.readmore {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.readmore::after { content: " \2192"; }

/* ============================================================
   All Posts archive (home) + subject filter
   ============================================================ */
.year-group { margin: 0 0 2.6rem; }
.year-heading {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0 0 0.4rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-item { padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.archive-item:first-child { border-top: 0; }
.archive-item__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.25;
  text-decoration: none;
  color: var(--ink);
}
.archive-item__title:hover { color: var(--accent); }
.archive-item__meta {
  display: block;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 0.45rem;
}
.archive-item__origin {
  display: block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}
.archive-item__excerpt {
  margin: 0.55rem 0 0;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink);
  max-width: var(--measure);
}
/* His category labels as quiet inline filter links in the meta line; Uncategorized is plain text. */
.cat-link { color: inherit; text-decoration: none; }
.cat-link:hover, .cat-link:focus-visible { text-decoration: underline; text-underline-offset: 0.15em; color: var(--accent); }
/* subject-filter line ("Showing N posts on <Label> · Show all posts") */
.pf-subject { font-family: var(--sans); font-size: 0.98rem; color: var(--ink-soft); margin: 0.2rem 0 1rem; }
.pf-subject a { color: var(--accent); }

/* ============================================================
   Search + sort controls (light, flat; injected by JS)
   ============================================================ */
.pf-search {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-end;
  margin: 0 0 1rem;
  padding: 1.2rem 1.25rem;
  background: var(--surface);        /* white box on the cream page */
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.pf-field { display: flex; flex-direction: column; gap: 0.4rem; }
.pf-field:first-child { flex: 1 1 18rem; }
.pf-search label {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
}
.pf-search input[type="search"],
.pf-search select {
  font-family: var(--sans);
  font-size: 1.02rem;
  color: var(--ink);
  background: var(--surface-in);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
  width: 100%;
}
.pf-search input[type="search"]:focus,
.pf-search select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.pf-count { font-family: var(--sans); font-size: 0.98rem; color: var(--ink-soft); margin: 0 0 1.8rem; }

/* ============================================================
   Category chips (his labels — clickable subject filters; white)
   ============================================================ */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; align-items: center; }
.tags li { margin: 0; }
.tags-label {
  font-family: var(--sans);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-right: 0.25rem;
}
.tags .tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);          /* white chip */
  color: var(--accent);
  text-decoration: none;
}
span.tag { cursor: default; color: var(--ink-soft); }   /* the Uncategorized chip is plain text */
a.tag:hover, a.tag:focus-visible { border-color: var(--accent); color: var(--accent-dk); }
a.tag:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ============================================================
   Browse by Subject grid
   ============================================================ */
.topic-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}
.topic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);          /* white card */
}
.topic a { text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.topic a:hover { color: var(--accent); }
.topic:hover { border-color: var(--accent); }
.topic__count {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: var(--page);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
}

/* ============================================================
   Curator / grandkids note box (light, flat) + About curator note
   ============================================================ */
.curator-note {
  margin: 0 0 2.2rem;
  padding: 1.2rem 1.4rem;
  background: var(--surface);          /* white box */
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
}
.curator-note p { margin: 0; }
.curator-note cite {
  display: block;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}
.curator-rule {
  clear: both;
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.8rem 0 1.7rem;
}
.curator-note__heading {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.curator-note--about p { margin: 0 0 0.9rem; }
.curator-note--about p:last-child { margin-bottom: 0; }

/* A quoted message inside a Curator's Note (e.g. Home Works' memorial message on Buckets and Trash Cans).
   Quiet italic quote with a thin green accent rule; small upright attribution. */
.curator-note .curator-quote {
  margin: 0.9rem 0 0;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 3px solid var(--green);
}
.curator-note .curator-quote p { margin: 0 0 0.7rem; font-style: italic; }
.curator-note .curator-quote p:last-child { margin-bottom: 0; }
.curator-note .curator-quote__attrib { font-style: normal; font-size: 0.95rem; color: var(--ink-soft); }

/* Home Works photo on "Buckets and Trash Cans" — floated right beside his paragraph; his text wraps at
   its left. On phones it becomes a full-width block. Never upscaled past the photo's native 846px. */
.prose figure.post-photo { float: right; width: min(20rem, 46%); margin: 0.3rem 0 1rem 1.6rem; text-align: center; }
.prose figure.post-photo img { width: 100%; height: auto; max-width: 846px; }
@media (max-width: 34rem) { .prose figure.post-photo { float: none; width: 100%; margin: 1.4rem auto; } }

/* ============================================================
   Single post (article)
   ============================================================ */
.post-full__header { margin-bottom: 2.1rem; }
.post-full__date {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}
.post-full__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 1.6rem + 1.7vw, 2.8rem);
  line-height: 1.16;
  letter-spacing: 0.003em;
  margin: 0 0 0.9rem;
}
.post-full__byline { font-family: var(--sans); font-size: 0.98rem; color: var(--ink-soft); margin: 0 0 1.2rem; }
.post-full__byline .handle { color: var(--ink-soft); }
.post-full__byline .handle::before { content: "\2014\00a0"; }   /* em dash + nbsp */
.post-full__origin {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0.1rem 0 1rem;
}

/* the article body — his words, verbatim */
.prose > p { margin: 0 0 1.5rem; }
.prose > p:first-of-type { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { font-family: var(--serif); font-weight: 700; line-height: 1.25; margin: 2.2rem 0 0.8rem; }
.prose h2 { font-size: 1.6rem; } .prose h3 { font-size: 1.35rem; } .prose h4 { font-size: 1.15rem; }
.prose a { color: var(--accent); }
.prose blockquote {
  margin: 1.9rem 0;
  padding: 0.4rem 0 0.4rem 1.4rem;
  border-left: 3px solid var(--green);
  color: var(--ink-soft);
  font-style: italic;
}
.prose blockquote p { margin: 0 0 1rem; }
.prose blockquote p:last-child { margin-bottom: 0; }

/* Images are his content — reproduced as-is, shown responsively and centered as blocks. */
.prose img { height: auto; max-width: 100%; border: 1px solid var(--rule); border-radius: 3px; background: #fff; box-shadow: 0 6px 20px rgba(33,29,24,0.10); }
.prose p > img, .prose figure { display: block; margin: 2rem auto; }
.prose figure { max-width: 100%; text-align: center; }
.prose figcaption { font-family: var(--sans); font-size: 0.95rem; color: var(--ink-soft); margin-top: 0.6rem; }

.post-full__footer { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.post-nav { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-top: 1rem; font-family: var(--sans); }
.post-nav a { text-decoration: none; display: block; font-size: 1.05rem; }
.post-nav .label {
  display: block;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 0.25rem;
}
.post-nav .next { text-align: right; }
@media (max-width: 34rem) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { text-align: left; } }

/* ============================================================
   About page — portrait floated beside his opening paragraph;
   Flannery O'Connor quotation; surfaced original dates
   ============================================================ */
.prose img.about-portrait {
  float: right;
  width: 14rem;
  max-width: 40%;
  height: auto;
  margin: 0.4rem 0 0.9rem 1.5rem;
}
/* Flannery O'Connor quotation (reuses .prose blockquote; only the attribution differs) */
.prose blockquote.about-quote .quote-attrib {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}

/* surfaced original-publication date (a date he himself recorded) */
.post-card__origin,
.post-full__origin { font-style: italic; }
.post-card__origin {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0.1rem 0 0.55rem;
}

/* ============================================================
   Footer — his blue band with white text + a thin green top band
   ============================================================ */
.site-footer {
  margin-top: 0;
  background: var(--frame);            /* HIS slate blue */
  border-top: 6px solid var(--green);  /* HIS green — a thin band along the full top edge */
  color: #e7eef7;
  font-family: var(--sans);
  font-size: 0.98rem;
}
.site-footer .wrap { padding-top: 2.2rem; padding-bottom: 2.6rem; }
.site-footer p { margin: 0 0 0.6rem; line-height: 1.6; }
.site-footer a { color: #ffffff; text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-bottom: 1rem; }
