/* BLOG ARCHIVE — featured post block, filter bar, recent posts grid, browse by category */

/* =========================================
   FEATURED / LATEST POST
   ========================================= */
.blog-featured {
    padding: clamp(24px, 3vw, 48px) 0 clamp(72px, 9vw, 120px);
    background: var(--clr-white);
}
/* When .blog-featured sits as the first section of <main> (e.g. on the
   single-post template, with no .page-hero above it), it needs top padding
   to clear the position:absolute site-header. */
main > .blog-featured:first-child {
    padding-top: clamp(150px, 13vw, 200px);
}

.blog-featured-card {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 80px;
    align-items: stretch;
}

.blog-featured-photo {
    background: #d9c5b3;       /* peach/tan panel behind the photo */
    border-radius: 18px;
    aspect-ratio: 1 / 1.18;     /* slightly taller portrait crop, matches mockup */
    overflow: hidden;
    position: relative;
    display: block;
}
.blog-featured-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 18%;
}

.blog-featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}
.blog-featured-eyebrow {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--clr-navy);
    margin: 0;
}
.blog-featured-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.25rem, 2.05vw, 1.7rem);
    line-height: 1.3;
    letter-spacing: -0.005em;
    color: var(--clr-navy);
    margin: 0 0 6px;
}
.blog-featured-body p {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--clr-navy);
    margin: 0 0 12px;
    letter-spacing: 0;
}
.blog-featured-readme {
    align-self: flex-end;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clr-navy);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.blog-featured-readme::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--clr-navy);
}
.blog-featured-readme:hover { color: var(--clr-red); }
.blog-featured-readme:hover::before { background: var(--clr-red); }

@media (max-width: 1024px) {
    .blog-featured-card {
        grid-template-columns: 1fr;
        gap: 28px;
        max-width: 540px;
    }
    .blog-featured-photo { aspect-ratio: 1 / 1; max-width: 380px; margin: 0 auto; }
}

/* =========================================
   FILTER + SEARCH BAR
   ========================================= */
.blog-filter {
    background: rgba(128, 144, 255, 0.18); /* soft lavender */
    padding: 36px 0;
}
.blog-filter-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.blog-filter-cats {
    display: flex;
    align-items: center;
    gap: 28px;          /* generous spacing between category items */
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clr-navy);
}
.blog-filter-cats > .label { margin-right: 8px; }
.blog-filter-cats a {
    color: var(--clr-navy);
    text-decoration: none;
    transition: color 0.18s ease;
}
.blog-filter-cats a:hover { color: var(--clr-red); }
/* Forward-slash separator instead of a vertical bar */
.blog-filter-cats .sep {
    color: var(--clr-navy);
    opacity: 0.55;
    user-select: none;
}
.blog-filter-cats .sep::before { content: "/"; }

.blog-filter-search {
    position: relative;
    width: 280px;
    max-width: 100%;
}
.blog-filter-search input {
    width: 100%;
    padding: 10px 42px 10px 18px;
    border: 1px solid var(--clr-navy);
    border-radius: 18px;
    background: transparent;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clr-navy);
    outline: none;
    transition: box-shadow 0.18s ease;
}
.blog-filter-search input::placeholder { color: var(--clr-navy); opacity: 0.85; }
.blog-filter-search input:focus { box-shadow: 0 0 0 2px #8090ff; }
.blog-filter-search button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    background: transparent;
    border: 0;
    color: var(--clr-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.blog-filter-search button .icon { width: 18px; height: 18px; }

@media (max-width: 768px) {
    .blog-filter-inner { padding: 0 20px; gap: 14px; flex-direction: column; align-items: stretch; }
    .blog-filter-cats { justify-content: center; gap: 10px; font-size: 0.68rem; }
    .blog-filter-cats .sep { display: none; }
    .blog-filter-search { width: 100%; }
}

/* =========================================
   RECENT POSTS
   ========================================= */
.recent-posts {
    background: var(--clr-white);
    padding: clamp(48px, 7vw, 96px) 0 0;
}
.recent-posts-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}
.recent-posts-heading {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: -0.005em;
    text-transform: uppercase;
    color: var(--clr-navy);
    margin: 0 0 36px;
    line-height: 1;
}
/* Tan band that bleeds edge-to-edge while the grid stays centered + capped.
   #f9f7f2 = rgba(241, 236, 225, 0.44) resolved over white — used as a SOLID
   color so cells and band match (rgba would compound when cells stack on band). */
.recent-posts-band {
    background: #f9f7f2;
    padding: 0 32px;
    border-top: 1px solid #d9d4c5;
    border-bottom: 1px solid #d9d4c5;
}
.recent-posts-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Hairline separators between cells via the gap technique.
       Top + bottom of the band carry the matching navy-greige hairline so
       the grid reads as a single connected table. */
    gap: 1px;
    background: #d9d4c5;
}
.recent-posts-grid > * { background: #f9f7f2; }

@media (max-width: 1024px) {
    .recent-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .recent-posts-grid { grid-template-columns: 1fr; }
    .recent-posts-container { padding: 0 20px; }
}

/* =========================================
   BROWSE BY CATEGORY
   ========================================= */
.browse-cat {
    background: var(--clr-white);
    padding: clamp(56px, 8vw, 96px) 0;
}
.browse-cat-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}
.browse-cat-heading {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: -0.005em;
    text-transform: uppercase;
    color: var(--clr-navy);
    margin: 0 0 40px;
    line-height: 1;
}
.browse-cat-group { margin-bottom: clamp(32px, 4vw, 56px); }
.browse-cat-group:last-child { margin-bottom: 0; }

.browse-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 18px;
}
@media (max-width: 1024px) {
    .browse-cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .browse-cat-grid { grid-template-columns: 1fr; }
    .browse-cat-container { padding: 0 20px; }
}

