/* Aspi synthwave: the blog (index + post layout).
   Builds on the shared kit in synth.css. Loaded from the blog templates'
   {% block head %}, after synth.css, so equal-specificity rules here win. */

:root{
  --sw-orange:#ff9f4a;
  --sw-blog-card:#120a30;
}

/* =====================================================================
   INDEX  /blog/  and  /blog/page-N/
   ===================================================================== */

/* ---------- Hero poster ---------- */
.sw-blog-hero{padding-bottom:max(clamp(200px,22vw,310px),17.4vw)}
.synth-page .sw-blog-eyebrow{margin-bottom:14px;font-size:clamp(9px,.9vw,12px);letter-spacing:.5em;padding-left:.5em;text-shadow:0 0 12px rgba(255,255,255,.5)}
.sw-blog-title{align-items:center}
.sw-blog-title .sw-neon{font-size:clamp(50px,6.6vw,100px);margin:0 0 -.26em -3.6em}
.sw-blog-title .sw-blog-chrome{display:flex;flex-wrap:wrap;justify-content:center;column-gap:.26em;font-size:clamp(50px,8.4vw,126px)}
.sw-blog-title .sw-chrome{font-size:1em}
.sw-blog-hero .sw-lede{margin-top:28px!important}
html.motion-enabled .sw-blog-hero .sw-neon{animation:swPowerOn 1.8s steps(1) .2s both}

/* ---------- Curated paths (page 1) ---------- */
.sw-blog-paths{padding:clamp(64px,7vw,104px) 0 clamp(80px,8vw,120px)}
.sw-blog-paths .sw-head{margin-bottom:48px}
.sw-path{display:flex;flex-direction:column;padding:34px 30px 26px;overflow:hidden}
.sw-path::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,var(--sw-magenta),var(--sw-violet) 45%,transparent 90%);box-shadow:0 0 14px var(--sw-magenta);opacity:.85}
.sw-path .sw-kicker{margin-bottom:14px;font-size:10px;letter-spacing:.26em}
.synth-page .sw-path h3{margin:0 0 12px;font-size:23px;line-height:1.15}
.sw-path>p{font-size:15.5px;line-height:1.65;color:var(--sw-muted)}
.sw-path-links{list-style:none;margin:auto 0 0;padding:24px 0 0}
.sw-path-links li{border-top:1px solid var(--sw-line)}
.sw-path-links a{display:block;padding:14px 0;text-wrap:pretty;font-size:15px;font-weight:600;line-height:1.45;color:#fff;transition:color .2s,text-shadow .2s,padding .2s}
.sw-path-links a:hover{color:var(--sw-cyan);text-shadow:0 0 12px rgba(45,226,255,.45);padding-left:6px}

/* ---------- Latest field notes ---------- */
.sw-latest-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px 40px;flex-wrap:wrap;margin-bottom:44px;padding-bottom:26px;border-bottom:1px solid var(--sw-line)}
.sw-blog-latest{padding-top:clamp(80px,8vw,120px)}
.synth-page .sw-latest-head .sw-script{margin-bottom:12px!important}
.sw-latest-head .sw-h2{margin:0}
.sw-latest-head .journey-link{flex-shrink:0}

.sw-post-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.sw-post-item{display:flex;min-width:0}
.sw-post-item.is-featured{grid-column:span 2;grid-row:span 2}

.sw-post-card{
  --cat:var(--sw-orange);
  display:flex;flex-direction:column;width:100%;min-width:0;overflow:hidden;color:var(--sw-text);
  transition:border-color .3s,box-shadow .3s,transform .3s;
}
.sw-post-card::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;z-index:2;background:linear-gradient(90deg,var(--cat),transparent 85%);box-shadow:0 0 14px var(--cat);opacity:.85}
.sw-post-card.is-ai-operators{--cat:var(--sw-pink)}
.sw-post-card.is-ai-news{--cat:var(--sw-cyan)}
.sw-post-card.is-craft{--cat:var(--sw-gold)}
.sw-post-card.is-agentic-workflows{--cat:var(--sw-violet)}
.sw-post-card:hover{color:var(--sw-text);transform:translateY(-3px)}
.sw-post-card-body{display:flex;flex-direction:column;flex:1;padding:28px 28px 26px}
.sw-post-card-meta{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 14px;margin-bottom:20px}
.sw-post-card-cat{display:inline-block;padding:7px 11px;border:1px solid color-mix(in srgb,var(--cat) 55%,transparent);border-radius:999px;background:color-mix(in srgb,var(--cat) 8%,transparent);font:600 9.5px/1 var(--font-tech);letter-spacing:.16em;text-transform:uppercase;color:var(--cat)}
.sw-post-card-meta time{font:500 10px/1.4 var(--font-tech);letter-spacing:.14em;text-transform:uppercase;color:var(--sw-dim)}
.synth-page .sw-post-card-title{margin:0 0 12px;font:800 italic 21px/1.24 var(--font-chrome);text-transform:none;color:#fff;text-wrap:pretty;transition:color .25s}
.sw-post-card:hover .sw-post-card-title{color:#ffd9f4}
.synth-page .sw-post-card-desc{font-size:15px;line-height:1.65;color:var(--sw-muted)}
.sw-post-card-more{display:inline-flex;align-items:center;gap:10px;margin-top:auto;padding-top:22px;font:600 10.5px/1.5 var(--font-tech);letter-spacing:.18em;text-transform:uppercase;color:var(--sw-cyan);text-shadow:0 0 12px rgba(45,226,255,.4)}
.sw-post-card-more span{transition:transform .25s}
.sw-post-card:hover .sw-post-card-more{color:#fff}
.sw-post-card:hover .sw-post-card-more span{transform:translateX(4px)}

/* Featured (newest) card: a small sunset beside the copy. */
.sw-post-card.is-featured{border-color:rgba(255,46,166,.45);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 0 44px rgba(255,46,166,.16),0 22px 50px rgba(0,0,0,.35)}
.sw-post-card-art{--floor:30%;position:relative;flex:1 1 auto;min-height:250px;overflow:hidden;background:linear-gradient(180deg,#07031a 0%,#1d0b4d 38%,#5a1680 60%,#ff3ea5 80%,#ff86d6 86%)}
.sw-post-card-art::before{content:'';position:absolute;inset:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='14' cy='22' r='.8' opacity='.8'/%3E%3Ccircle cx='96' cy='12' r='.6' opacity='.6'/%3E%3Ccircle cx='140' cy='60' r='.9' opacity='.7'/%3E%3Ccircle cx='52' cy='70' r='.6' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:linear-gradient(#000 20%,transparent 60%);mask:linear-gradient(#000 20%,transparent 60%)}
.sw-post-card-sun{position:absolute;left:50%;bottom:var(--floor);width:clamp(190px,21vw,300px);aspect-ratio:1;transform:translate(-50%,42%);transition:transform .6s cubic-bezier(.2,.7,.2,1)}
.sw-post-card:hover .sw-post-card-sun{transform:translate(-50%,34%)}
.sw-post-card-art .sw-post-card-mountains{bottom:var(--floor);height:34%;z-index:1}
.sw-post-card-art .sw-grid{border-top-width:1px}
.sw-post-card-art .sw-grid i{background-size:48px 48px}
html.motion-enabled .sw-post-card-art .sw-grid i{animation-name:swBlogGrid}
@keyframes swBlogGrid{to{background-position:50% 48px}}
.sw-post-card.is-featured .sw-post-card-body{flex:0 0 auto;padding:32px 40px 32px}
.synth-page .sw-post-card.is-featured .sw-post-card-title{font-size:clamp(24px,2.2vw,31px);line-height:1.16;margin-bottom:14px}
.synth-page .sw-post-card.is-featured .sw-post-card-desc{font-size:16px;max-width:640px}
.sw-post-card.is-featured .sw-post-card-more{padding-top:18px}

/* ---------- Pager ---------- */
.sw-pager{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:16px 28px;margin-top:64px}
.site-journey .sw-pager-link{min-width:150px}
.site-journey .sw-pager .is-disabled{opacity:.35;box-shadow:none;cursor:default;border-color:rgba(185,103,255,.35);color:var(--sw-dim);background:none}
.sw-pager-status{font:500 10.5px/1.6 var(--font-tech);letter-spacing:.3em;text-transform:uppercase;color:var(--sw-muted)}

/* =====================================================================
   POST  /blog/<slug>/
   ===================================================================== */

/* ---------- Header: a shorter poster so reading starts above the fold ---------- */
.sw-post-hero{text-align:center;padding-top:calc(var(--header-height) + clamp(40px,5vw,76px));padding-bottom:max(clamp(130px,13vw,200px),15vw)}
.sw-post-hero .sw-mountains{bottom:-1px;height:clamp(90px,10.5vw,170px)}
.sw-post-hero::after{content:'';position:absolute;z-index:3;left:8%;right:8%;bottom:0;height:1px;background:linear-gradient(90deg,transparent,rgba(255,46,166,.55),rgba(45,226,255,.45),transparent)}
.sw-post-hero .sw-horizon-glow{bottom:clamp(30px,5vw,90px);height:clamp(150px,15vw,230px)}
.sw-post-head{max-width:1040px}
.sw-post-hero .sw-crumb{margin-bottom:22px}
.sw-post-hero .sw-kicker{margin-bottom:14px}
.synth-page .sw-post-title{margin:0 auto;max-width:980px;font:900 italic clamp(32px,4.3vw,60px)/1.08 var(--font-chrome);text-transform:none;color:#fff;text-wrap:balance;text-shadow:0 0 2px rgba(255,255,255,.35),0 0 30px rgba(255,46,166,.4)}
.sw-byline{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:28px}
.sw-byline-face{flex-shrink:0;width:50px;height:50px;border-radius:50%}
.sw-byline-face img{object-position:50% 22%}
.synth-page .sw-byline-text{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left}
.sw-byline-author{font:600 11.5px/1.5 var(--font-tech);letter-spacing:.16em;text-transform:uppercase;color:#fff}
.sw-byline-facts{display:flex;flex-wrap:wrap;align-items:center;gap:0 10px;font-size:14px;line-height:1.5;color:#e2d6ff}
.sw-byline-sep{color:var(--sw-pink);text-shadow:0 0 8px var(--sw-magenta)}

.sw-post-feature{max-width:980px;margin-top:clamp(40px,5vw,64px)}
.sw-post-feature img{width:100%;height:auto;border-radius:14px;border:1px solid rgba(185,103,255,.4);box-shadow:0 0 44px rgba(123,44,255,.25),0 30px 70px rgba(0,0,0,.45)}

/* ---------- The reading column ---------- */
.sw-post-wrap{padding:clamp(52px,6vw,84px) 0 clamp(56px,6vw,88px)}
/* End mark: a short neon horizon under the last paragraph. */
.sw-post-body::after{content:'';display:block;width:min(320px,70%);height:1px;margin:clamp(44px,5vw,64px) auto 0;background:linear-gradient(90deg,transparent,var(--sw-magenta),var(--sw-violet),var(--sw-cyan),transparent);box-shadow:0 0 12px rgba(255,46,166,.6)}
.sw-post-body{margin-inline:auto;color:#e2d9fb;overflow-wrap:break-word}
.sw-post-body :is(p,li,td){color:inherit;line-height:inherit}
.sw-post-body td{line-height:1.55}
.synth-page .sw-post-body>p:first-child{font-size:1.14em;line-height:1.72;color:#fff}
.synth-page .sw-post-body>:first-child{margin-top:0}
.synth-page .sw-post-body :is(h2,h3){text-wrap:balance}
.synth-page .sw-post-body h2+:is(h3,h4){margin-top:.4em}
.sw-post-body a{overflow-wrap:anywhere}
.sw-post-body :not(pre)>code{overflow-wrap:anywhere}
.sw-post-body li>p{margin-bottom:.5em!important}
.sw-post-body li>:is(ul,ol){margin:.55em 0 .2em}
.sw-post-body ol{padding-left:1.6em}
.sw-post-body blockquote strong{color:var(--sw-pink)}
.sw-post-body blockquote :is(ul,ol):last-child{margin-bottom:0}

/* Code: a dark terminal pane with a neon top edge. Scrolls inside itself. */
.sw-post-body pre{
  max-width:100%;padding:22px 22px 20px;
  background:linear-gradient(90deg,var(--sw-magenta),var(--sw-violet) 50%,var(--sw-cyan)) top/100% 2px no-repeat,#09051c;
  scrollbar-color:rgba(185,103,255,.5) transparent;scrollbar-width:thin;
}
.sw-post-body pre code{display:block;width:max-content;min-width:100%;font-size:14px;white-space:pre;tab-size:2}

/* Tables: wrapped by the layout in .sw-table-scroll so wide ones scroll in their own box. */
.sw-table-scroll{
  margin:1.9em 0;max-width:100%;overflow-x:auto;border-radius:12px;border:1px solid rgba(185,103,255,.32);
  background:
    linear-gradient(90deg,var(--sw-blog-card) 30%,rgba(18,10,48,0)) left/40px 100% no-repeat local,
    linear-gradient(270deg,var(--sw-blog-card) 30%,rgba(18,10,48,0)) right/40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%,rgba(255,46,166,.5),transparent) left/14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%,rgba(255,46,166,.5),transparent) right/14px 100% no-repeat scroll,
    var(--sw-blog-card);
  box-shadow:0 0 30px rgba(123,44,255,.14);
  scrollbar-color:rgba(185,103,255,.5) transparent;scrollbar-width:thin;
}
.sw-post-body .sw-table-scroll>table{display:table;width:100%;margin:0;overflow:visible;font-size:15px}
.sw-post-body .sw-table-scroll :is(th,td){min-width:5.5em;padding:13px 16px}
.sw-post-body .sw-table-scroll th{background:rgba(255,46,166,.07);white-space:nowrap}
.sw-post-body .sw-table-scroll tbody tr:last-child td{border-bottom:0}
.sw-post-body .sw-table-scroll tbody tr:nth-child(even){background:rgba(255,255,255,.025)}
.sw-post-body .sw-table-scroll td:first-child{min-width:8.5em;color:#fff;font-weight:600}
.sw-post-body .sw-table-scroll td code{white-space:nowrap}

/* ---------- Mid-article CTA (injected after the 3rd paragraph) ---------- */
.sw-post-body .sw-mid-cta{
  position:relative;isolation:isolate;overflow:hidden;margin:2.4em 0;padding:28px 170px 20px 32px;border-radius:14px;
  background:linear-gradient(160deg,rgba(44,20,96,.72),rgba(16,8,42,.9));
  border:1px solid rgba(255,46,166,.45);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 0 38px rgba(255,46,166,.16),0 22px 50px rgba(0,0,0,.3);
}
.sw-mid-cta::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--sw-sunset);box-shadow:0 0 14px var(--sw-magenta)}
.sw-mid-cta::after{
  content:'';position:absolute;z-index:-1;right:22px;bottom:-30px;width:130px;aspect-ratio:1;border-radius:50%;opacity:.5;
  box-shadow:0 0 40px rgba(255,62,165,.5);
  background:var(--sw-sunset);
  -webkit-mask:linear-gradient(#000 0 54%,transparent 54% 57%,#000 57% 64%,transparent 64% 68%,#000 68% 74%,transparent 74% 79%,#000 79% 84%,transparent 84% 90%,#000 90%);
  mask:linear-gradient(#000 0 54%,transparent 54% 57%,#000 57% 64%,transparent 64% 68%,#000 68% 74%,transparent 74% 79%,#000 79% 84%,transparent 84% 90%,#000 90%);
}
.synth-page .sw-post-body .sw-mid-cta .sw-kicker{margin:0 0 10px;font-size:10px;letter-spacing:.28em;color:var(--sw-pink)}
.synth-page .sw-post-body .sw-mid-cta-text{margin:0 0 8px;max-width:540px;font-size:17px;line-height:1.65;color:#fff}
.sw-mid-cta-actions{display:flex;flex-wrap:wrap;align-items:center;gap:0 28px}
.site-journey .sw-mid-cta .journey-link{overflow-wrap:normal}

/* ---------- Previous / next ---------- */
.sw-post-nav{max-width:980px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;padding-bottom:clamp(36px,4vw,56px)}
.sw-post-nav-link{display:flex;flex-direction:column;gap:12px;padding:26px 28px;color:#fff;transition:border-color .3s,box-shadow .3s,transform .3s}
.sw-post-nav-link:hover{color:#fff;transform:translateY(-3px)}
.sw-post-nav-next{grid-column:2;align-items:flex-end;text-align:right}
.sw-post-nav-label{font:600 10px/1.5 var(--font-tech);letter-spacing:.28em;text-transform:uppercase;color:var(--sw-cyan);text-shadow:0 0 12px rgba(45,226,255,.45)}
.sw-post-nav-title{font:800 italic 19px/1.3 var(--font-chrome);color:#fff;text-wrap:pretty}
.sw-post-nav-link:hover .sw-post-nav-title{color:#ffd9f4}

/* ---------- Closing: sunset CTA ---------- */
.sw-post-finale{padding-top:clamp(100px,10vw,140px)}
.sw-post-finale .sw-neon{font-size:clamp(46px,6vw,90px)}
.sw-post-finale-title .sw-chrome{font-size:clamp(50px,8.6vw,128px)}
.sw-post-finale .sw-actions{margin-top:34px}
.sw-post-finale .sw-meta a{color:#fff;text-decoration:underline;text-decoration-color:rgba(255,255,255,.5);text-underline-offset:5px;text-shadow:0 0 12px rgba(45,226,255,.5)}
.sw-post-finale .sw-meta a:hover{text-decoration-color:#fff}

/* ---------- Responsive ---------- */
@media(max-width:1100px){
  .sw-post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sw-post-item.is-featured{grid-column:auto;grid-row:auto}
  .sw-post-card-art{flex:0 0 auto;height:150px;min-height:0}
  .sw-post-card.is-featured .sw-post-card-body{flex:1 1 auto;padding:28px 28px 26px}
  .synth-page .sw-post-card.is-featured .sw-post-card-title{font-size:23px}
}
@media(max-width:900px){
  .sw-path-grid{gap:18px}
  .sw-post-nav{grid-template-columns:1fr;gap:16px}
  .sw-post-nav-next{grid-column:auto}
}
@media(max-width:700px){
  .sw-blog-hero{padding-bottom:clamp(170px,48vw,220px)}
  .sw-blog-title .sw-neon{font-size:clamp(42px,13vw,58px);margin:0 0 -.12em -1.6em}
  .sw-blog-title .sw-blog-chrome{flex-direction:column;align-items:center;font-size:clamp(46px,16vw,70px);line-height:1}
  .sw-blog-hero .sw-lede{font-size:16px}
  .sw-blog-paths .sw-head{margin-bottom:34px}
  .sw-blog-paths{padding-top:56px}
  .sw-path{padding:28px 22px 20px}
  .sw-latest-head{margin-bottom:30px}
  .sw-post-grid{grid-template-columns:1fr;gap:16px}
  .sw-post-card-body{padding:24px 22px 22px}
  .synth-page .sw-post-card-title{font-size:20px}
  .sw-post-card-art{height:160px}
  .sw-post-card-sun{width:170px}
  .sw-post-card.is-featured .sw-post-card-body{padding:24px 22px 22px}
  .synth-page .sw-post-card.is-featured .sw-post-card-title{font-size:21px}
  .sw-pager{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:44px}
  .sw-pager-status{grid-column:1/-1;grid-row:1;text-align:center}
  .site-journey .sw-pager-link{min-width:0;padding-inline:12px}

  .sw-post-hero{padding-bottom:clamp(104px,30vw,130px)}
  .sw-post-hero .sw-mountains{height:clamp(72px,20vw,100px)}
  .sw-post-hero .sw-horizon-glow{bottom:20px;height:150px}
  .sw-post-hero .sw-crumb{margin-bottom:16px}
  .synth-page .sw-post-title{font-size:clamp(28px,8.4vw,36px);line-height:1.1}
  .sw-byline{margin-top:22px}
  .sw-byline-face{width:44px;height:44px}
  .sw-byline-facts{font-size:13px}
  .sw-post-wrap{padding-top:44px}
  .synth-page .sw-post-body>p:first-child{font-size:1.08em}
  .sw-post-body pre{margin-inline:-6px;padding:18px 16px;border-radius:10px}
  .sw-post-body pre code{font-size:13px}
  .sw-post-body .sw-table-scroll>table{font-size:14px}
  .sw-post-body .sw-table-scroll :is(th,td){padding:11px 12px}
  .sw-post-body .sw-mid-cta{padding:24px 20px 16px 24px}
  .sw-post-body blockquote{padding:16px 18px;font-size:1em}
  .sw-mid-cta::after{width:110px;right:-24px;bottom:-40px;opacity:.28}
  .synth-page .sw-post-body .sw-mid-cta-text{font-size:16px}
  .sw-mid-cta-actions{flex-direction:column;align-items:flex-start}
  .sw-post-nav-link{padding:22px 20px}
  .sw-post-nav-title{font-size:17px}
  .sw-post-finale .sw-neon{font-size:clamp(40px,12vw,56px)}
  .sw-post-finale-title .sw-chrome{font-size:clamp(40px,13.5vw,64px)}
  .sw-post-finale .sw-btn-ghost{width:100%}
}
@media(max-width:480px){.sw-mid-cta::after{display:none}}
@media(prefers-reduced-motion:reduce){
  .sw-post-card,.sw-post-nav-link,.sw-post-card-sun,.sw-path-links a{transition:none}
  .sw-post-card:hover,.sw-post-nav-link:hover{transform:none}
}
/* Wide tables step out of the reading column on large screens. */
@media(min-width:1101px){
  .sw-post-body .sw-table-scroll{width:max-content;min-width:100%;max-width:min(1040px,calc(100vw - var(--sw-gutter)*2 - 24px));margin-left:50%;transform:translateX(-50%)}
}
