/* ============================================================
   Bush Coding — blog styles (listing + articles)
   Loaded after css/style.css on blog pages only.
   ============================================================ */

/* ------------------------------------------------------------
   Blog listing
   ------------------------------------------------------------ */

.blog-listing {
   padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 5rem));
}

.blog-listing h1 {
   font-size: clamp(2.3rem, 4.6vw, 3.2rem);
   font-weight: 800;
   letter-spacing: -0.02em;
   line-height: 1.08;
   margin-bottom: 1rem;
}

.blog-listing .section-intro {
   max-width: 62ch;
}

.blog-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
   gap: 1.5rem;
}

.post-card {
   display: flex;
   flex-direction: column;
   gap: 0.6rem;
   padding: 1.5rem;
   background: var(--paper);
   border: 1px solid var(--line);
   border-radius: var(--radius);
   text-decoration: none;
   color: inherit;
   transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover,
.post-card:focus-visible {
   transform: translateY(-4px);
   box-shadow: 0 12px 24px rgba(14, 36, 26, 0.12);
   border-color: var(--leaf);
}

.post-card-date {
   font-family: var(--font-mono);
   font-size: 0.78rem;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   color: var(--leaf-deep);
}

.post-card h2 {
   margin: 0;
   font-size: 1.25rem;
   line-height: 1.3;
   color: var(--ink);
}

.post-card p {
   margin: 0;
   font-size: 0.95rem;
   line-height: 1.6;
   color: var(--ink-muted);
   flex-grow: 1;
}

.post-card-more {
   margin-top: 0.5rem;
   font-size: 0.9rem;
   font-weight: 600;
   color: var(--leaf-deep);
}

/* ------------------------------------------------------------
   Article
   ------------------------------------------------------------ */

.post-header {
   padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 5rem));
   padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.post-kicker {
   font-family: var(--font-mono);
   font-size: 0.78rem;
   letter-spacing: 0.08em;
   text-transform: uppercase;
   color: var(--leaf-deep);
}

.post-header h1 {
   margin-top: 0.75rem;
   font-size: clamp(1.9rem, 4.5vw, 2.6rem);
   line-height: 1.15;
   max-width: 22ch;
}

.post-meta {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   margin-top: 1rem;
   font-family: var(--font-mono);
   font-size: 0.85rem;
   color: var(--ink-muted);
}

.post-body {
   max-width: 72ch;
   padding-bottom: clamp(4rem, 9vw, 6.5rem);
   font-size: 1.02rem;
   line-height: 1.75;
}

.post-body p {
   margin-block: 1.1em;
   color: var(--ink);
}

.post-body h2 {
   margin-top: 2.2em;
   font-size: 1.5rem;
   line-height: 1.3;
}

.post-body h3 {
   margin-top: 1.8em;
   font-size: 1.15rem;
}

.post-body ul,
.post-body ol {
   margin-block: 1.1em;
   padding-left: 1.35rem;
}

/* style.css resets all ul to list-style: none; restore bullets in posts */
.post-body ul {
   list-style: disc;
}

.post-body li {
   margin-block: 0.45em;
}

.post-body li::marker {
   color: var(--leaf-deep);
}

.post-body a {
   color: var(--leaf-deep);
   font-weight: 600;
   text-decoration: underline;
   text-decoration-thickness: 1px;
   text-underline-offset: 3px;
}

/* The CTA button is a link too; without this, .post-body a paints its
   text leaf-deep on the leaf-deep .btn-solid background (invisible) */
.post-body .btn {
   text-decoration: none;
}

.post-body .btn-solid {
   color: #fff;
}

.post-body blockquote {
   margin-block: 1.4em;
   padding: 1rem 1.25rem;
   background: var(--mist);
   border-left: 3px solid var(--leaf);
   border-radius: 0 var(--radius) var(--radius) 0;
}

.post-body blockquote p {
   margin: 0;
}

.post-body code {
   font-family: var(--font-mono);
   font-size: 0.9em;
   background: var(--mist);
   border: 1px solid var(--line);
   border-radius: 5px;
   padding: 0.12em 0.4em;
}

.post-body .code-block {
   margin-block: 1.4em;
   padding: 1.1rem 1.25rem;
   background: var(--forest-deep);
   border-radius: var(--radius);
   overflow-x: auto;
   white-space: pre;
}

.post-body .code-block code {
   font-size: 0.88rem;
   background: none;
   border: none;
   padding: 0;
   color: var(--leaf-light);
}

.post-body hr {
   margin-block: 2em;
   border: none;
   border-top: 1px solid var(--line);
}

.post-body table {
   width: 100%;
   border-collapse: collapse;
   margin-block: 1.6em;
   font-size: 0.95rem;
}

/* Ad unit inside the article: keep it aligned with the text column,
   not the site-wide .ad-slot layout used on the home page */
.post-body .ad-slot {
   max-width: none;
   padding-inline: 0;
   margin-block: 2.4em;
}

.post-body th,
.post-body td {
   padding: 0.6rem 0.8rem;
   border: 1px solid var(--line);
   text-align: left;
   vertical-align: top;
}

.post-body th {
   background: var(--mist);
   font-weight: 600;
}

/* Call to action after each article */

.post-cta {
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   gap: 1rem;
   margin-top: 2.5rem;
   padding: 1.5rem 1.75rem;
   background: var(--mist);
   border: 1px solid var(--line);
   border-left: 4px solid var(--leaf);
   border-radius: var(--radius);
}

.post-cta-title {
   margin: 0;
   font-size: 1.05rem;
   font-weight: 600;
   color: var(--ink);
}
