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

:root{
  --bg:#F5F2EC;
  --surface:#F0EEEA;
  --surface2:#E8E5E0;
  --border:#D4CFC8;
  --border2:#C8C2BA;
  --text:#2D2A26;
  --text-dim:#57534E;
  --text-bright:#1A1816;
  --muted:#9A9490;
  --green:#2D7A50;
  --green-dim:#E8F5EE;
  --amber:#D97706;
  --amber-dim:#FEF3E2;
  --blue:#2563EB;
  --red:#EF6060;
  --cyan:#38BDF8;
  --serif:"Playfair Display",Georgia,serif;
  --body:"Source Serif 4",Georgia,serif;
  --mono:"IBM Plex Mono","Courier New",monospace;
}

html{scroll-behavior:smooth}
body{font-family:var(--body);background:var(--bg);color:var(--text);line-height:1.7;min-height:100vh;font-size:17px;-webkit-font-smoothing:antialiased}
a{color:var(--blue);text-decoration:none;transition:color .15s}
a:hover{color:var(--green)}
::selection{background:var(--green-dim);color:var(--text-bright)}

/* ─── Header ─── */
header.site-header{border-bottom:2px solid var(--text);background:var(--bg);padding:0;position:sticky;top:0;z-index:100}
.header-inner{max-width:780px;margin:0 auto;padding:1.1rem 2rem}
.header-top{display:flex;align-items:baseline;justify-content:space-between;gap:1rem}
.logo{font-family:var(--mono);font-size:1.25rem;font-weight:600;color:var(--text-bright)}
.logo a{color:var(--text-bright);text-decoration:none}
.logo .prompt{color:var(--green);font-weight:400}
.logo .cursor{display:inline-block;width:2px;height:.95em;background:var(--green);margin-left:2px;vertical-align:middle;animation:blink 1.1s step-end infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}
.header-meta{font-size:.62rem;color:var(--muted);font-family:var(--mono);letter-spacing:.05em}
.nav-bar{display:flex;gap:.85rem;margin-top:.65rem;flex-wrap:wrap;border-top:1px solid var(--border2);padding-top:.5rem}
.nav-bar a{font-size:.65rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-dim);padding:.15rem 0;border-bottom:2px solid transparent;font-family:var(--mono);transition:all .15s}
.nav-bar a:hover{color:var(--green);border-bottom-color:var(--green)}

/* ─── Content Area (Index) ─── */
.content-area{max-width:780px;margin:0 auto;padding:3rem 2rem 5rem}

/* ─── Post Cards (Index) ─── */
.post-card{padding:2.5rem 0;border-bottom:1px solid var(--border)}
.post-card:first-child{padding-top:.5rem}
.post-card:last-child{border-bottom:none}
.post-card-tags{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:.75rem}
.post-card-tag{font-size:.55rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.15rem .55rem;border-radius:2px;font-family:var(--mono);background:var(--green-dim);border:1px solid #A8D5BC;color:var(--green)}
.post-card-title{font-family:var(--serif);font-size:1.8rem;font-weight:900;color:var(--text-bright);line-height:1.2;letter-spacing:-.02em;margin-bottom:.6rem}
.post-card-title a{color:var(--text-bright);text-decoration:none}
.post-card-title a:hover{color:var(--green)}
.post-card-excerpt{font-family:var(--body);font-size:1.05rem;color:var(--text-dim);line-height:1.7;margin-bottom:.75rem}
.post-card-meta{font-size:.65rem;color:var(--muted);display:flex;gap:.85rem;flex-wrap:wrap;font-family:var(--mono)}
.post-card-meta .sep{color:var(--border2)}

/* ─── Article Layout ─── */
.article-wrap{max-width:780px;margin:0 auto;padding:3rem 2rem 5rem}

/* ─── Article Header ─── */
.article-header{margin-bottom:2.5rem;padding-bottom:1.5rem;border-bottom:1px solid var(--border2)}
.article-tags{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem}
.tag{font-size:.55rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.15rem .55rem;border-radius:2px;font-family:var(--mono);background:var(--green-dim);border:1px solid #A8D5BC;color:var(--green)}
.article-title{font-family:var(--serif);font-size:2.6rem;font-weight:900;color:var(--text-bright);line-height:1.15;letter-spacing:-.025em;margin-bottom:1rem}
.article-deck{font-family:var(--body);font-size:1.15rem;color:var(--text-dim);line-height:1.7;font-style:italic;margin-bottom:1rem}
.article-meta{font-size:.65rem;color:var(--muted);display:flex;gap:.85rem;flex-wrap:wrap;font-family:var(--mono)}
.article-meta .author{color:var(--text);font-weight:600}
.article-meta .sep{color:var(--border2)}

/* ─── Article Body ─── */
.gh-content{font-family:var(--body);font-size:1.1rem;line-height:1.85;color:var(--text)}
.gh-content p{margin-bottom:1.5rem}
.gh-content strong{color:var(--text-bright);font-weight:700}
.gh-content em{font-style:italic;color:var(--text-dim)}
.gh-content h2{font-family:var(--serif);font-size:1.6rem;font-weight:900;color:var(--text-bright);margin:3rem 0 1.25rem;line-height:1.2;letter-spacing:-.015em}
.gh-content h3{font-family:var(--serif);font-size:1.25rem;font-weight:700;color:var(--text-bright);margin:2.5rem 0 1rem}
.gh-content h4{font-family:var(--mono);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:2rem 0 1rem}
.gh-content ul,.gh-content ol{margin:0 0 1.5rem 1.5rem}
.gh-content li{margin-bottom:.5rem}
.gh-content a{color:var(--green);border-bottom:1px solid transparent;transition:border-color .15s}
.gh-content a:hover{border-bottom-color:var(--green)}

/* ─── Blockquote / Pull Quote ─── */
.gh-content blockquote{border-left:3px solid var(--green);padding:1rem 1.5rem;margin:2rem 0;background:var(--surface);border-radius:0 4px 4px 0}
.gh-content blockquote p{font-family:var(--serif);font-size:1.2rem;font-style:italic;color:var(--text-bright);line-height:1.55;margin:0;font-weight:700}

/* ─── Code ─── */
.gh-content pre{background:#1F1C18;color:#E8E4DD;border-radius:4px;padding:1.25rem 1.5rem;margin:2rem 0;font-family:var(--mono);font-size:.8rem;line-height:1.8;overflow-x:auto}
.gh-content code{font-family:var(--mono);font-size:.85em;background:var(--surface2);padding:.15rem .4rem;border-radius:3px;color:var(--green)}
.gh-content pre code{background:none;padding:0;font-size:inherit;color:inherit}

/* ─── Data Box (custom HTML card styling) ─── */
.gh-content .data-box{background:var(--surface);border:1px solid var(--border2);border-radius:4px;padding:1.25rem 1.5rem;margin:2rem 0;font-family:var(--mono);font-size:.75rem;line-height:2.2}
.gh-content .data-box .box-title{font-size:.6rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:.6rem;padding-bottom:.4rem;border-bottom:1px solid var(--border)}
.gh-content .data-box .k{color:var(--text-dim);display:inline-block;min-width:180px}
.gh-content .data-box .v{color:var(--green);font-weight:500}
.gh-content .data-box .v-amber{color:var(--amber);font-weight:500}
.gh-content .data-box .v-red{color:var(--red);font-weight:500}
.gh-content .data-box .v-blue{color:var(--blue);font-weight:500}

/* ─── Section Marker ─── */
.gh-content .post-disclaimer{font-family:var(--mono);font-size:.78rem;color:var(--muted);background:var(--surface2);border-left:3px solid var(--green);padding:.6rem 1rem;border-radius:0 4px 4px 0;margin:0 0 2rem;display:block}
.gh-content .section-marker{font-family:var(--mono);font-size:.62rem;color:var(--muted);margin:2.5rem 0 1.5rem;display:flex;align-items:center;gap:.75rem;letter-spacing:.05em}
.gh-content .section-marker::after{content:"";flex:1;height:1px;background:var(--border2)}

/* ─── Images ─── */
.gh-content img{max-width:100%;height:auto;border-radius:4px;margin:2rem 0}
.gh-content figure{margin:2rem 0}
.gh-content figcaption{font-family:var(--mono);font-size:.7rem;color:var(--muted);text-align:center;margin-top:.75rem}

/* ─── HR ─── */
.gh-content hr{border:none;height:1px;background:var(--border2);margin:3rem 0}

/* ─── Ghost Cards ─── */
.gh-content .kg-card{margin:2rem 0}
.gh-content .kg-image-card img{width:100%}
.gh-content .kg-width-wide{margin-left:-80px;margin-right:-80px;max-width:calc(100% + 160px)}
.gh-content .kg-width-full{margin-left:calc(-50vw + 50%);margin-right:calc(-50vw + 50%);max-width:100vw;width:100vw}
.gh-content .kg-bookmark-card{border:1px solid var(--border2);border-radius:4px;overflow:hidden}
.gh-content .kg-bookmark-container{display:flex;text-decoration:none;color:var(--text)}
.gh-content .kg-bookmark-content{padding:1.25rem;flex:1}
.gh-content .kg-bookmark-title{font-family:var(--serif);font-weight:700;font-size:1rem;color:var(--text-bright)}
.gh-content .kg-bookmark-description{font-size:.85rem;color:var(--text-dim);margin-top:.35rem;line-height:1.5}
.gh-content .kg-bookmark-metadata{font-family:var(--mono);font-size:.65rem;color:var(--muted);margin-top:.75rem;display:flex;align-items:center;gap:.5rem}
.gh-content .kg-bookmark-thumbnail{width:200px;min-height:160px}
.gh-content .kg-bookmark-thumbnail img{width:100%;height:100%;object-fit:cover}

/* ─── Pagination ─── */
.pagination{display:flex;justify-content:center;gap:2rem;padding:2.5rem 0;font-family:var(--mono);font-size:.75rem}
.pagination a{color:var(--green);font-weight:600;letter-spacing:.03em}
.pagination a:hover{color:var(--text)}

/* ─── Footer ─── */
footer.site-footer{border-top:2px solid var(--text);background:var(--bg);padding:1.75rem 2rem}
.footer-inner{max-width:780px;margin:0 auto;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem}
.footer-logo{font-size:.85rem;font-weight:600;color:var(--text-dim);font-family:var(--mono)}
.footer-logo .p{color:var(--green)}
.footer-links{display:flex;gap:1.5rem;font-size:.7rem;color:var(--text-dim);font-family:var(--mono)}
.footer-links a{color:var(--text-dim);transition:color .15s}
.footer-links a:hover{color:var(--green)}
.footer-copy{width:100%;font-size:.6rem;color:var(--muted);margin-top:.5rem;text-align:center;font-family:var(--mono);letter-spacing:.03em}

/* ─── Responsive ─── */
@media(max-width:740px){
  .header-inner,.article-wrap,.content-area{padding-left:1.25rem;padding-right:1.25rem}
  .article-title{font-size:1.9rem}
  .post-card-title{font-size:1.4rem}
  .gh-content{font-size:1rem}
  .gh-content .kg-width-wide{margin-left:0;margin-right:0;max-width:100%}
  header.site-header{position:relative}
}

/* ─── Featured / Latest Post ─── */
.featured-post{border-bottom:2px solid var(--text);padding:3rem 0 2.5rem;margin-bottom:2.5rem;position:relative}
.featured-badge{font-family:var(--mono);font-size:.6rem;font-weight:600;letter-spacing:.12em;color:var(--green);border:1px solid var(--green);display:inline-block;padding:.15rem .6rem;margin-bottom:1.25rem}
.featured-title{font-family:var(--display);font-size:2.8rem;line-height:1.08;color:var(--text);margin:0 0 1rem;font-weight:900}
.featured-title a{color:inherit;text-decoration:none}
.featured-title a:hover{color:var(--green)}
.featured-excerpt{font-family:var(--serif);font-size:1.15rem;line-height:1.65;color:var(--text-dim);margin:0 0 1.25rem;max-width:640px}

/* ─── Post Cards (listing) ─── */
.post-card{border-bottom:1px solid var(--border2);padding:1.75rem 0}
.post-card:last-of-type{border-bottom:2px solid var(--text)}
.post-card-tags{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:.5rem}
.post-card-tag{font-family:var(--mono);font-size:.6rem;font-weight:500;color:var(--muted);letter-spacing:.06em;text-transform:uppercase}
.post-card-title{font-family:var(--display);font-size:1.65rem;line-height:1.15;color:var(--text);margin:0 0 .6rem;font-weight:700}
.post-card-title a{color:inherit;text-decoration:none}
.post-card-title a:hover{color:var(--green)}
.post-card-excerpt{font-family:var(--serif);font-size:.95rem;line-height:1.6;color:var(--text-dim);margin:0 0 .75rem;max-width:600px}
.post-card-meta{font-family:var(--mono);font-size:.65rem;color:var(--muted);display:flex;gap:.4rem;align-items:center;letter-spacing:.02em}
.post-card-meta .sep{color:var(--border2)}

/* ─── Projects Promo Grid ─── */
.promo-section{padding:3rem 0 2rem}
.promo-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1.25rem;margin-top:1.5rem}
.promo-card{display:flex;flex-direction:column;padding:1.5rem;border:1px solid var(--border2);border-radius:4px;text-decoration:none;color:var(--text);transition:all .2s ease;background:var(--bg)}
.promo-card:hover{border-color:var(--text);transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.06)}
.promo-icon{font-size:1.5rem;margin-bottom:.75rem;line-height:1}
.promo-name{font-family:var(--mono);font-size:.85rem;font-weight:600;color:var(--text);letter-spacing:.02em;margin-bottom:.35rem}
.promo-desc{font-family:var(--serif);font-size:.8rem;line-height:1.55;color:var(--text-dim);flex:1}
.promo-link{font-family:var(--mono);font-size:.65rem;color:var(--green);font-weight:500;margin-top:.75rem;letter-spacing:.03em}
.promo-card:hover .promo-link{text-decoration:underline}
.promo-peercortex:hover{border-color:#2563eb}.promo-peercortex .promo-icon{color:#2563eb}
.promo-github:hover{border-color:#333}.promo-github .promo-icon{color:#333}
.promo-rf:hover{border-color:var(--green)}.promo-rf .promo-icon{color:var(--green)}
.promo-nognet:hover{border-color:#e67e22}.promo-nognet .promo-icon{color:#e67e22}

/* ─── Author Section ─── */
.author-section{padding:2rem 0 3rem}
.author-card{display:flex;align-items:flex-start;gap:1.5rem;padding:1.5rem;border:1px solid var(--border2);border-radius:4px;margin-top:1.5rem}
.author-info{flex:1}
.author-name{font-family:var(--display);font-size:1.25rem;font-weight:700;color:var(--text);margin-bottom:.15rem}
.author-role{font-family:var(--mono);font-size:.7rem;color:var(--green);font-weight:500;letter-spacing:.04em;margin-bottom:.75rem}
.author-bio{font-family:var(--serif);font-size:.85rem;line-height:1.6;color:var(--text-dim);margin-bottom:.75rem}
.author-links{display:flex;gap:1rem}
.author-links a{font-family:var(--mono);font-size:.7rem;color:var(--green);font-weight:500;letter-spacing:.02em}
.author-links a:hover{color:var(--text);text-decoration:underline}

/* ─── Responsive: Homepage ─── */
@media(max-width:740px){
  .featured-title{font-size:2rem}
  .promo-grid{grid-template-columns:1fr}
  .author-card{flex-direction:column}
}

/* ─── PDF Preview Card ─── */
.pdf-preview-card{display:block;margin:2rem 0;border-radius:6px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,0.12);text-decoration:none;position:relative;}
.pdf-preview-card img{width:100%;display:block;height:auto;}
.pdf-preview-card .pdf-overlay{position:absolute;inset:0;background:rgba(15,52,96,0);display:flex;align-items:center;justify-content:center;transition:background 0.2s;}
.pdf-preview-card:hover .pdf-overlay{background:rgba(15,52,96,0.6);}
.pdf-overlay-label{color:#fff;font-weight:700;font-size:1rem;opacity:0;transition:opacity 0.2s;display:flex;align-items:center;gap:8px;}
.pdf-preview-card:hover .pdf-overlay-label{opacity:1;}
.pdf-preview-caption{text-align:center;font-size:0.75rem;color:var(--text-dim);margin-top:0.5rem;font-family:var(--mono);}
.pdf-preview-caption a{color:var(--green);}

/* ─── Post Footer (after article) ─── */
.post-footer{margin-top:3rem;padding-top:2rem;border-top:2px solid var(--text)}

/* ─── Share Buttons ─── */
.share-section{padding-bottom:2rem}
.share-buttons{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:1.25rem}
.share-btn{display:inline-flex;align-items:center;gap:.5rem;padding:.55rem 1.1rem;border:1px solid var(--border2);border-radius:3px;font-family:var(--mono);font-size:.7rem;font-weight:600;letter-spacing:.04em;color:var(--text-dim);background:var(--bg);cursor:pointer;transition:all .15s;text-decoration:none}
.share-btn:hover{border-color:var(--text);color:var(--text-bright);transform:translateY(-1px)}
.share-linkedin:hover{border-color:#0A66C2;color:#0A66C2}
.share-x:hover{border-color:var(--text-bright);color:var(--text-bright)}
.share-copy:hover{border-color:var(--green);color:var(--green)}

/* ─── Post Navigation (prev/next) ─── */
.post-nav{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem;padding:2rem 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.post-nav-item{display:flex;flex-direction:column;gap:.35rem;padding:1rem;border:1px solid var(--border2);border-radius:4px;text-decoration:none;color:var(--text);transition:all .15s}
.post-nav-item:hover{border-color:var(--green);transform:translateY(-1px)}
.post-nav-next{text-align:right;grid-column:2}
.post-nav-label{font-family:var(--mono);font-size:.6rem;color:var(--muted);letter-spacing:.06em;text-transform:uppercase}
.post-nav-title{font-family:var(--serif);font-size:.9rem;font-weight:700;color:var(--text-bright);line-height:1.3}


/* ─── Buy Me a Coffee ─── */
.bmac-section{padding:2rem 0}
.bmac-card{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;padding:1.5rem;border:1px solid var(--border2);border-radius:4px;margin-top:1.25rem;background:var(--surface);flex-wrap:wrap}
.bmac-text{flex:1;min-width:200px}
.bmac-title{font-family:var(--mono);font-size:.8rem;font-weight:600;color:var(--text-bright);margin-bottom:.35rem;letter-spacing:.02em}
.bmac-desc{font-family:var(--body);font-size:.85rem;color:var(--text-dim);line-height:1.6}
.bmac-btn{display:inline-flex;align-items:center;gap:.5rem;padding:.6rem 1.25rem;border:2px solid #FFDD00;border-radius:4px;font-family:var(--mono);font-size:.75rem;font-weight:600;letter-spacing:.04em;color:var(--text-bright);background:#FFDD00;text-decoration:none;transition:all .15s;white-space:nowrap}
.bmac-btn:hover{background:#FFE94D;border-color:#FFE94D;transform:translateY(-1px);box-shadow:0 3px 8px rgba(0,0,0,.08)}
.bmac-btn svg{width:20px;height:20px}
/* ─── Section Markers (reused in post footer) ─── */
.post-footer .section-marker,.promo-section .section-marker,.author-section .section-marker{font-family:var(--mono);font-size:.62rem;color:var(--muted);display:flex;align-items:center;gap:.75rem;letter-spacing:.05em}
.post-footer .section-marker::after,.promo-section .section-marker::after,.author-section .section-marker::after{content:"";flex:1;height:1px;background:var(--border2)}

/* ─── Responsive: Post Footer ─── */
@media(max-width:740px){
  .post-nav{grid-template-columns:1fr}
  .post-nav-next{text-align:left;grid-column:1}
  .share-buttons{gap:.5rem}
  .share-btn{padding:.45rem .85rem;font-size:.65rem}
}

/* Feature Images */
.featured-img{width:100%;max-height:420px;object-fit:cover;border-radius:4px;margin-bottom:1.25rem}
.post-card-img{width:100%;max-height:240px;object-fit:cover;border-radius:4px;margin-bottom:.75rem}
.article-feature-img{width:100%;max-height:480px;object-fit:cover;border-radius:4px;margin-bottom:1.5rem}
