/* =========================================================================
   blog-style.css — Editorial blog styling for home.php & single.php
   Scoped to .ed-* classes so it won't fight your existing theme.
   ========================================================================= */

   @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,800&family=Spline+Sans:wght@400;500;600&family=Spline+Sans+Mono:wght@500&display=swap');

   :root {
       --ed-paper:      #f4efe6;
       --ed-card:       #fffdf8;
       --ed-ink:        #1c1814;
       --ed-ink-soft:   #6d6358;
       --ed-accent:     #b4451f;
       --ed-accent-ink: #8a3416;
       --ed-line:       rgba(28, 24, 20, 0.12);
       --ed-line-soft:  rgba(28, 24, 20, 0.07);
       --ed-shadow:     0 1px 2px rgba(28,24,20,.05), 0 18px 40px -22px rgba(28,24,20,.45);
   
       --ed-display: 'Fraunces', Georgia, 'Times New Roman', serif;
       --ed-sans:    'Spline Sans', -apple-system, BlinkMacSystemFont, sans-serif;
       --ed-mono:    'Spline Sans Mono', ui-monospace, monospace;
   
       --ed-wrap: 1180px;
       --ed-read: 42rem;
   }
   
   /* ---- Base canvas ------------------------------------------------------- */
   .ed-main,
   .ed-post,
   .ed-postnav,
   .ed-comments {
       font-family: var(--ed-sans);
       color: var(--ed-ink);
       -webkit-font-smoothing: antialiased;
   }
   
   body:has(.ed-main),
   body:has(.ed-post) {
       background-color: var(--ed-paper);
       background-image:
           radial-gradient(circle at 1px 1px, var(--ed-line-soft) 1px, transparent 0);
       background-size: 26px 26px;
   }
   
   .ed-main {
       max-width: var(--ed-wrap);
       margin: 0 auto;
       padding: clamp(2rem, 6vw, 5rem) clamp(1.1rem, 4vw, 2.5rem) 5rem;
   }
   
   /* ---- Masthead ---------------------------------------------------------- */
   .ed-masthead {
       border-bottom: 1px solid var(--ed-line);
       padding-bottom: clamp(1.5rem, 4vw, 2.75rem);
       margin-bottom: clamp(2rem, 5vw, 3.5rem);
       animation: ed-rise .7s cubic-bezier(.2,.7,.3,1) both;
   }
   
   .ed-masthead__kicker {
       font-family: var(--ed-mono);
       text-transform: uppercase;
       letter-spacing: .22em;
       font-size: .72rem;
       color: var(--ed-accent);
       margin: 0 0 .9rem;
   }
   
   .ed-masthead__title {
       font-family: var(--ed-display);
       font-optical-sizing: auto;
       font-weight: 600;
       font-size: clamp(2.6rem, 8vw, 5.2rem);
       line-height: .96;
       letter-spacing: -.02em;
       margin: 0;
   }
   
   .ed-masthead__title-accent {
       font-style: italic;
       font-weight: 400;
       color: var(--ed-accent);
   }
   
   .ed-masthead__nav {
       margin-top: 1.6rem;
       display: flex;
       flex-wrap: wrap;
       gap: .4rem 1.4rem;
   }
   
   .ed-masthead__nav ul {
       list-style: none;
       margin: 0;
       padding: 0;
       display: flex;
       flex-wrap: wrap;
       gap: .4rem 1.4rem;
   }
   
   .ed-masthead__nav a {
       font-size: .9rem;
       font-weight: 500;
       color: var(--ed-ink-soft);
       text-decoration: none;
       padding-bottom: 2px;
       background-image: linear-gradient(var(--ed-accent), var(--ed-accent));
       background-size: 0% 1.5px;
       background-position: 0 100%;
       background-repeat: no-repeat;
       transition: color .25s, background-size .3s;
   }
   
   .ed-masthead__nav a:hover {
       color: var(--ed-accent);
       background-size: 100% 1.5px;
   }
   
   /* ---- Feed grid --------------------------------------------------------- */
   .ed-feed {
       display: grid;
       grid-template-columns: repeat(2, 1fr);
       gap: clamp(1.4rem, 3vw, 2.4rem);
   }
   
   /* ---- Cards ------------------------------------------------------------- */
   .ed-card {
       background: var(--ed-card);
       border: 1px solid var(--ed-line);
       border-radius: 14px;
       overflow: hidden;
       transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s, border-color .35s;
       animation: ed-rise .7s cubic-bezier(.2,.7,.3,1) both;
   }
   .ed-card:nth-child(2) { animation-delay: .06s; }
   .ed-card:nth-child(3) { animation-delay: .12s; }
   .ed-card:nth-child(4) { animation-delay: .18s; }
   .ed-card:nth-child(5) { animation-delay: .24s; }
   .ed-card:nth-child(6) { animation-delay: .30s; }
   
   .ed-card:hover {
       transform: translateY(-5px);
       box-shadow: var(--ed-shadow);
       border-color: transparent;
   }
   
   .ed-card__link {
       display: flex;
       flex-direction: column;
       height: 100%;
       text-decoration: none;
       color: inherit;
   }
   
   .ed-card__media {
       overflow: hidden;
       aspect-ratio: 16 / 10;
       background: var(--ed-paper);
   }
   
   .ed-card__img {
       width: 100%;
       height: 100%;
       object-fit: cover;
       display: block;
       transition: transform .6s cubic-bezier(.2,.7,.3,1);
   }
   
   .ed-card:hover .ed-card__img { transform: scale(1.05); }
   
   .ed-card__body {
       padding: clamp(1.1rem, 2.2vw, 1.7rem);
       display: flex;
       flex-direction: column;
       flex: 1;
   }
   
   .ed-card__meta {
       display: flex;
       align-items: center;
       gap: .8rem;
       font-family: var(--ed-mono);
       font-size: .68rem;
       text-transform: uppercase;
       letter-spacing: .12em;
       color: var(--ed-ink-soft);
       margin-bottom: .85rem;
   }
   
   .ed-card__cat {
       color: var(--ed-accent);
       position: relative;
       padding-right: .8rem;
   }
   .ed-card__cat::after {
       content: '';
       position: absolute;
       right: 0; top: 50%;
       width: 3px; height: 3px;
       border-radius: 50%;
       background: var(--ed-ink-soft);
       transform: translateY(-50%);
   }
   
   .ed-card__title {
       font-family: var(--ed-display);
       font-weight: 600;
       font-size: clamp(1.25rem, 2.4vw, 1.6rem);
       line-height: 1.14;
       letter-spacing: -.01em;
       margin: 0 0 .6rem;
       transition: color .25s;
   }
   .ed-card:hover .ed-card__title { color: var(--ed-accent-ink); }
   
   .ed-card__excerpt {
       font-size: .96rem;
       line-height: 1.6;
       color: var(--ed-ink-soft);
       margin: 0 0 1.2rem;
   }
   
   .ed-card__more {
       margin-top: auto;
       display: inline-flex;
       align-items: center;
       gap: .5rem;
       font-size: .82rem;
       font-weight: 600;
       letter-spacing: .02em;
       color: var(--ed-ink);
   }
   .ed-card__arrow { transition: transform .3s; }
   .ed-card:hover .ed-card__arrow { transform: translateX(5px); }
   
   /* ---- Lead (featured) card --------------------------------------------- */
   .ed-card--lead { grid-column: 1 / -1; }
   
   @media (min-width: 720px) {
       .ed-card--lead .ed-card__link { flex-direction: row; }
       .ed-card--lead .ed-card__media {
           flex: 1 1 56%;
           aspect-ratio: auto;
           min-height: 340px;
       }
       .ed-card--lead .ed-card__body {
           flex: 1 1 44%;
           justify-content: center;
           padding: clamp(1.8rem, 4vw, 3rem);
       }
       .ed-card--lead .ed-card__title { font-size: clamp(1.9rem, 3.2vw, 2.75rem); }
       .ed-card--lead .ed-card__excerpt { font-size: 1.05rem; }
   }
   
   /* ---- Pagination -------------------------------------------------------- */
   .ed-pagination { margin-top: clamp(2.5rem, 5vw, 4rem); }
   .ed-pagination .nav-links {
       display: flex;
       flex-wrap: wrap;
       justify-content: center;
       gap: .4rem;
   }
   .ed-pagination .page-numbers {
       font-family: var(--ed-mono);
       font-size: .85rem;
       min-width: 2.6rem;
       padding: .55rem .7rem;
       text-align: center;
       text-decoration: none;
       color: var(--ed-ink);
       border: 1px solid var(--ed-line);
       border-radius: 9px;
       background: var(--ed-card);
       transition: background .25s, color .25s, border-color .25s;
   }
   .ed-pagination .page-numbers:hover { border-color: var(--ed-accent); color: var(--ed-accent); }
   .ed-pagination .page-numbers.current {
       background: var(--ed-ink);
       color: var(--ed-paper);
       border-color: var(--ed-ink);
   }
   .ed-pagination .page-numbers.dots { border: 0; background: transparent; }
   
   /* ---- Empty state ------------------------------------------------------- */
   .ed-empty { text-align: center; padding: 5rem 1rem; }
   .ed-empty__title { font-family: var(--ed-display); font-size: 2rem; margin: 0 0 .5rem; }
   .ed-empty__text { color: var(--ed-ink-soft); }
   
   /* =========================================================================
      SINGLE POST
      ========================================================================= */
   .ed-post {
       max-width: var(--ed-wrap);
       margin: 0 auto;
       padding: clamp(2rem, 6vw, 4.5rem) clamp(1.1rem, 4vw, 2.5rem) 0;
   }
   
   .ed-post__header {
       max-width: var(--ed-read);
       margin: 0 auto;
       text-align: center;
       animation: ed-rise .7s cubic-bezier(.2,.7,.3,1) both;
   }
   
   .ed-post__meta {
       display: flex;
       justify-content: center;
       flex-wrap: wrap;
       align-items: center;
       gap: .55rem 1rem;
       font-family: var(--ed-mono);
       font-size: .72rem;
       text-transform: uppercase;
       letter-spacing: .14em;
       color: var(--ed-ink-soft);
       margin-bottom: 1.4rem;
   }
   .ed-post__cat {
       color: var(--ed-accent);
       text-decoration: none;
       border: 1px solid currentColor;
       padding: .28rem .65rem;
       border-radius: 999px;
   }
   .ed-post__cat:hover { background: var(--ed-accent); color: #fff; }
   
   .ed-post__title {
       font-family: var(--ed-display);
       font-optical-sizing: auto;
       font-weight: 600;
       font-size: clamp(2.1rem, 5.5vw, 3.9rem);
       line-height: 1.04;
       letter-spacing: -.02em;
       margin: 0 0 1.1rem;
   }
   
   .ed-post__standfirst {
       font-family: var(--ed-display);
       font-style: italic;
       font-weight: 400;
       font-size: clamp(1.1rem, 2.4vw, 1.4rem);
       line-height: 1.5;
       color: var(--ed-ink-soft);
       margin: 0 0 2rem;
   }
   
   .ed-post__byline {
       display: inline-flex;
       align-items: center;
       gap: .8rem;
       text-align: left;
   }
   .ed-post__avatar { border-radius: 50%; width: 44px; height: 44px; }
   .ed-post__byline-text { display: flex; flex-direction: column; }
   .ed-post__author { font-weight: 600; font-size: .95rem; }
   .ed-post__byline-sub {
       font-family: var(--ed-mono);
       font-size: .68rem;
       text-transform: uppercase;
       letter-spacing: .12em;
       color: var(--ed-ink-soft);
   }
   
   /* ---- Hero image -------------------------------------------------------- */
   .ed-post__hero {
       margin: clamp(2.2rem, 5vw, 3.5rem) 0;
   }
   .ed-post__hero-img {
       width: 100%;
       height: auto;
       display: block;
       border-radius: 16px;
       box-shadow: var(--ed-shadow);
   }
   .ed-post__hero-caption {
       font-family: var(--ed-mono);
       font-size: .72rem;
       color: var(--ed-ink-soft);
       text-align: center;
       margin-top: .8rem;
   }
   
   /* ---- Article body ------------------------------------------------------ */
   .ed-post__content {
       max-width: var(--ed-read);
       margin: 0 auto;
       font-size: 1.16rem;
       line-height: 1.75;
       color: #2a241e;
   }
   .ed-post__content > p { margin: 0 0 1.5rem; }
   
   .ed-post__content > p:first-of-type::first-letter {
       float: left;
       font-family: var(--ed-display);
       font-weight: 800;
       font-size: 3.9em;
       line-height: .72;
       padding: .08em .12em 0 0;
       color: var(--ed-accent);
   }
   
   .ed-post__content h2,
   .ed-post__content h3 {
       font-family: var(--ed-display);
       font-weight: 600;
       letter-spacing: -.01em;
       line-height: 1.2;
       margin: 2.4rem 0 1rem;
   }
   .ed-post__content h2 { font-size: 1.7rem; }
   .ed-post__content h3 { font-size: 1.35rem; }
   
   .ed-post__content a {
       color: var(--ed-accent-ink);
       text-decoration: underline;
       text-decoration-thickness: 1px;
       text-underline-offset: 3px;
   }
   .ed-post__content a:hover { color: var(--ed-accent); }
   
   .ed-post__content blockquote {
       margin: 2rem 0;
       padding: .4rem 0 .4rem 1.6rem;
       border-left: 3px solid var(--ed-accent);
       font-family: var(--ed-display);
       font-style: italic;
       font-size: 1.3rem;
       line-height: 1.5;
       color: var(--ed-ink);
   }
   
   .ed-post__content img { max-width: 100%; height: auto; border-radius: 12px; }
   .ed-post__content figcaption { font-family: var(--ed-mono); font-size: .72rem; color: var(--ed-ink-soft); text-align: center; margin-top: .5rem; }
   .ed-post__content ul,
   .ed-post__content ol { margin: 0 0 1.5rem; padding-left: 1.4rem; }
   .ed-post__content li { margin-bottom: .5rem; }
   .ed-post__content pre {
       background: var(--ed-ink);
       color: #f4efe6;
       padding: 1.2rem;
       border-radius: 12px;
       overflow-x: auto;
       font-size: .9rem;
   }
   .ed-post__content code { font-family: var(--ed-mono); font-size: .9em; }
   
   .ed-post__pagelinks {
       font-family: var(--ed-mono);
       font-size: .85rem;
       margin-top: 2rem;
   }
   
   /* ---- Footer: tags + bio ----------------------------------------------- */
   .ed-post__footer {
       max-width: var(--ed-read);
       margin: 3rem auto 0;
   }
   .ed-post__tags {
       display: flex;
       flex-wrap: wrap;
       gap: .5rem;
       padding-bottom: 2.5rem;
       border-bottom: 1px solid var(--ed-line);
   }
   .ed-post__tags a {
       font-family: var(--ed-mono);
       font-size: .8rem;
       color: var(--ed-ink-soft);
       text-decoration: none;
       padding: .35rem .7rem;
       border: 1px solid var(--ed-line);
       border-radius: 999px;
       transition: border-color .25s, color .25s;
   }
   .ed-post__tags a:hover { color: var(--ed-accent); border-color: var(--ed-accent); }
   
   .ed-post__bio {
       display: flex;
       gap: 1.2rem;
       margin-top: 2.5rem;
       padding: 1.8rem;
       background: var(--ed-card);
       border: 1px solid var(--ed-line);
       border-radius: 16px;
   }
   .ed-post__bio-avatar { border-radius: 50%; width: 64px; height: 64px; flex-shrink: 0; }
   .ed-post__bio-label {
       font-family: var(--ed-mono);
       font-size: .68rem;
       text-transform: uppercase;
       letter-spacing: .12em;
       color: var(--ed-accent);
   }
   .ed-post__bio-name { font-family: var(--ed-display); font-size: 1.3rem; margin: .2rem 0 .5rem; }
   .ed-post__bio-text { font-size: .95rem; line-height: 1.6; color: var(--ed-ink-soft); margin: 0; }
   
   /* ---- Prev / next ------------------------------------------------------- */
   .ed-postnav {
       max-width: var(--ed-wrap);
       margin: clamp(3rem, 6vw, 4.5rem) auto 0;
       padding: 0 clamp(1.1rem, 4vw, 2.5rem);
       display: grid;
       grid-template-columns: 1fr 1fr;
       gap: 1.2rem;
   }
   .ed-postnav__item {
       display: flex;
       flex-direction: column;
       gap: .5rem;
       padding: 1.4rem 1.6rem;
       border: 1px solid var(--ed-line);
       border-radius: 14px;
       background: var(--ed-card);
       text-decoration: none;
       color: inherit;
       transition: transform .3s, box-shadow .3s, border-color .3s;
   }
   .ed-postnav__item:hover { transform: translateY(-3px); box-shadow: var(--ed-shadow); border-color: transparent; }
   .ed-postnav__item--next { text-align: right; align-items: flex-end; }
   .ed-postnav__dir {
       font-family: var(--ed-mono);
       font-size: .7rem;
       text-transform: uppercase;
       letter-spacing: .12em;
       color: var(--ed-accent);
   }
   .ed-postnav__title { font-family: var(--ed-display); font-weight: 500; font-size: 1.05rem; line-height: 1.25; }
   
   /* ---- Comments wrapper -------------------------------------------------- */
   .ed-comments {
       max-width: var(--ed-read);
       margin: clamp(3rem, 6vw, 4.5rem) auto 4rem;
       padding: 0 clamp(1.1rem, 4vw, 2.5rem);
   }
   
   /* ---- Motion ------------------------------------------------------------ */
   @keyframes ed-rise {
       from { opacity: 0; transform: translateY(18px); }
       to   { opacity: 1; transform: translateY(0); }
   }
   @media (prefers-reduced-motion: reduce) {
       * { animation: none !important; transition: none !important; }
   }
   
   /* ---- Responsive -------------------------------------------------------- */
   @media (max-width: 620px) {
       .ed-feed { grid-template-columns: 1fr; }
       .ed-postnav { grid-template-columns: 1fr; }
       .ed-postnav__item--next { text-align: left; align-items: flex-start; }
       .ed-post__bio { flex-direction: column; }
       .ed-post__content > p:first-of-type::first-letter { font-size: 3.2em; }
   }