/*
Theme Name: Accubits Blog 2026
Theme URI: http://localhost/accubits-blog-2026
Author: Bud Studio
Author URI: https://bud.studio
Description: A clean, modern classic theme for the Accubits blog. Mobile-first, no jQuery, no build tooling. Recreates the original 2017 brand (Montserrat + red accent) in a lighter, faster shell.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: accubits-blog
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    --color-red: #ef0d33;
    --color-red-dark: #d60c2e;
    --color-ink: #1c1f24;
    --color-dark: #151719;
    --color-night: #0e1013;
    --color-dark-2: #2f3236;
    --color-body: #333;
    --color-muted: #767676;
    --color-line: #e6e6e6;
    --color-bg: #ffffff;
    --color-bg-alt: #f6f7f8;

    --font-base: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

    --wrap: 1200px;
    --gap: 1.75rem;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, .12);
    --header-h: 68px;
    --transition: .25s ease;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-body);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.site-main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-red-dark); }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; color: var(--color-ink); margin: 0 0 .6em; }

p { margin: 0 0 1.2em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-ink);
    color: #fff;
    padding: .75rem 1rem;
    z-index: 1000;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 2px solid var(--color-red); outline-offset: 2px; }

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    position: absolute !important;
    word-wrap: normal !important;
}

/* ==========================================================================
   Header
   ========================================================================== */
/* Transparent overlay header — the logo sits in a solid red box whose top
   edge is flush with the top of the screen. */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    pointer-events: none;
}
.site-header a,
.site-header .hdr-controls { pointer-events: auto; }

.site-header__inner {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    min-height: var(--header-h);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-red);
    padding: 10px 14px;
    flex-shrink: 0;
}
.site-brand:hover { opacity: .9; }
.site-brand img { height: 18px; width: auto; display: block; }

/* --- Header controls: search + menu pill --- */
.hdr-controls {
    position: absolute;
    top: 12px;
    right: clamp(1rem, 3vw, 2rem);
    display: flex;
    align-items: stretch;
    height: 34px;
    background: var(--color-red);
    border-radius: 0;
    overflow: hidden;
}

.hdr-search { display: flex; align-items: center; }
.hdr-search__field {
    width: 0;
    opacity: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: .88rem;
    transition: width var(--transition), opacity var(--transition), padding var(--transition);
}
.hdr-search__field::placeholder { color: rgba(255, 255, 255, .7); }
.hdr-search__field:focus { outline: none; }
/* expand on hover or when the field has keyboard focus */
.hdr-search:hover .hdr-search__field,
.hdr-search:focus-within .hdr-search__field {
    width: clamp(140px, 26vw, 220px);
    opacity: 1;
    padding: 0 .35rem 0 1.1rem;
}

.hdr-search__btn,
.hdr-menu {
    width: 48px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: background var(--transition);
}
.hdr-search__btn svg { width: 17px; height: 17px; }
.hdr-search__btn:hover,
.hdr-search:focus-within .hdr-search__btn,
.hdr-menu:hover { background: var(--color-red-dark); }

.hdr-menu { position: relative; border-left: 1px solid rgba(255, 255, 255, .28); }

/* hamburger → X */
.hdr-menu__bars { position: relative; width: 16px; height: 12px; }
.hdr-menu__bars i {
    position: absolute;
    left: 0;
    right: 0;
    height: 1.5px;
    border-radius: 2px;
    background: #fff;
    transition: transform var(--transition), opacity .18s ease, top var(--transition);
}
.hdr-menu__bars i:nth-child(1) { top: 0; }
.hdr-menu__bars i:nth-child(2) { top: 5px; }
.hdr-menu__bars i:nth-child(3) { top: 10px; }
.hdr-menu[aria-expanded="true"] .hdr-menu__bars i:nth-child(1) { top: 5px; transform: rotate(45deg); }
.hdr-menu[aria-expanded="true"] .hdr-menu__bars i:nth-child(2) { opacity: 0; }
.hdr-menu[aria-expanded="true"] .hdr-menu__bars i:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* when the drawer is open: hide search, keep menu above the drawer */
.drawer-open .hdr-search { display: none; }
.drawer-open .site-header { z-index: 300; }

/* --- Side drawer --- */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 9, 11, .55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 150;
}
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
body.drawer-open { overflow: hidden; }

.site-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 86vw);
    background: #fff;
    color: var(--color-ink);
    z-index: 200;
    padding: calc(var(--header-h) + 1.5rem) 1.75rem 2rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.drawer-open .site-drawer { transform: translateX(0); box-shadow: -20px 0 50px -30px rgba(0, 0, 0, .35); }

.site-drawer__title {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 0 0 1.25rem;
}
.site-drawer__list { list-style: none; margin: 0; padding: 0; }
.site-drawer__list li { border-bottom: 1px solid var(--color-line); }
.site-drawer__list a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 0;
    color: var(--color-ink);
    font-size: 1rem;
    font-weight: 500;
    transition: color var(--transition), padding-left var(--transition);
}
.site-drawer__list a:hover { color: var(--color-red); padding-left: .4rem; }
.site-drawer__list em {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: .72rem;
    color: var(--color-muted);
}

/* ==========================================================================
   Page header (archive / search titles)
   ========================================================================== */
.page-hero {
    background: var(--color-dark);
    color: #fff;
    padding: calc(var(--header-h) + 1.75rem) 0 3rem;
    text-align: center;
}
.page-hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .72rem;
    color: var(--color-red);
    margin: 0 0 .6rem;
    font-weight: 600;
}
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.page-hero p { color: rgba(255, 255, 255, .7); margin: .8rem 0 0; }

/* ==========================================================================
   Listing grid
   ========================================================================== */
.section-listing { padding: 3rem 0 4rem; background: var(--color-bg-alt); }

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

.post-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.post-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-bg-alt);
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__media--placeholder {
    background: linear-gradient(135deg, #2f3236, #151719);
}

.post-card__body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }

.post-card__cat {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .68rem;
    font-weight: 600;
    color: var(--color-red);
    margin-bottom: .6rem;
}

.post-card__title { font-size: 1.18rem; line-height: 1.35; margin: 0 0 .6rem; }
.post-card__title a { color: var(--color-ink); }
.post-card__title a:hover { color: var(--color-red); }

.post-card__excerpt { color: var(--color-muted); font-size: .9rem; margin: 0 0 1.1rem; flex: 1; }
/* Hide the excerpt on archive listings (category, author, tag, date). */
.archive .post-card__excerpt { display: none; }

.post-card__meta {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .78rem;
    color: var(--color-muted);
    margin-top: auto;
}
.post-card__meta img { width: 26px; height: 26px; border-radius: 50%; }
.post-card__meta .author { color: var(--color-ink); font-weight: 600; }

/* Open link — chevron inside a circle */
.card-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--color-line);
    color: var(--color-red);
    margin-top: 1.1rem;
    align-self: flex-start;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.card-open svg { width: 16px; height: 16px; }
.card-open:hover {
    background: var(--color-red);
    border-color: var(--color-red);
    color: #fff;
    transform: translateX(2px);
}

/* ==========================================================================
   Pagination (the_posts_pagination)
   ========================================================================== */
.pagination { margin-top: 3rem; }
.pagination .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .6rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--color-line);
    color: var(--color-ink);
    font-size: .85rem;
    font-weight: 500;
}
.pagination .page-numbers:hover { border-color: var(--color-red); color: var(--color-red); }
.pagination .page-numbers.current {
    background: var(--color-red);
    border-color: var(--color-red);
    color: #fff;
}
.pagination .page-numbers.dots { border-color: transparent; background: transparent; }

/* ==========================================================================
   Single post — dark banner + overlapping image, Medium-style serif body
   ========================================================================== */
.single-entry { padding-bottom: 4rem; }

.single-hero {
    position: relative;
    background-color: var(--color-dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: calc(var(--header-h) + 3rem) 0 3.25rem;
    isolation: isolate;
}
/* dark overlay so the title/meta stay legible over the image */
.single-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .68), rgba(0, 0, 0, .85));
    z-index: -1;
}
.single-hero__cat {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
    font-weight: 600;
    color: var(--color-red);
    margin-bottom: 1rem;
}
.single-hero__cat a { color: var(--color-red); }
.single-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 60rem; }

.post-meta {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: 1.5rem;
    font-size: .88rem;
    color: rgba(255, 255, 255, .75);
}
.post-meta img { width: 40px; height: 40px; border-radius: 50%; }
.post-meta .author { color: #fff; font-weight: 600; }
.post-meta .sep { opacity: .4; }

.article__inner {
    max-width: 860px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}
.single-entry .article__content { margin-top: 2.5rem; }

/* Body — serif, large, generous spacing */
.article__content {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.75;
    color: #242424;
    letter-spacing: -.003em;
}
.article__content p { margin: 0 0 1.7rem; }
.article__content h2,
.article__content h3 {
    font-family: var(--font-base);
    color: #242424;
    letter-spacing: -.015em;
}
.article__content h2 { font-size: 1.75rem; font-weight: 700; margin: 2.6rem 0 1rem; }
.article__content h3 { font-size: 1.35rem; font-weight: 600; margin: 2rem 0 .8rem; }
.article__content a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.article__content a:hover { color: var(--color-red); }
.article__content img { border-radius: 4px; margin: 2rem auto; display: block; }
.article__content figure { margin: 2rem 0; }
.article__content figcaption { font-family: var(--font-base); font-size: .82rem; color: var(--color-muted); text-align: center; margin-top: .6rem; }
.article__content blockquote {
    margin: 2rem 0;
    padding-left: 1.5rem;
    border-left: 3px solid #242424;
    font-style: italic;
    color: #515151;
    font-size: 1.32rem;
    line-height: 1.6;
}
.article__content ul,
.article__content ol { padding-left: 1.5rem; margin: 0 0 1.7rem; }
.article__content li { margin-bottom: .5rem; }
.article__content pre {
    font-family: var(--font-mono);
    background: var(--color-night);
    color: #f4f4f4;
    padding: 1.2rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: .92rem;
    line-height: 1.6;
    margin: 0 0 1.7rem;
}
.article__content code { font-family: var(--font-mono); background: var(--color-bg-alt); padding: .15em .4em; border-radius: 4px; font-size: .88em; }
.article__content pre code { background: transparent; padding: 0; }

/* Tags */
.entry-tags { margin-top: 2.5rem; }
.entry-tags a {
    display: inline-block;
    background: var(--color-bg-alt);
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: .74rem;
    padding: .4rem .85rem;
    border-radius: 999px;
    margin: 0 .4rem .5rem 0;
}
.entry-tags a:hover { background: var(--color-red); color: #fff; }

/* About the author */
.author-box {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-line);
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}
.author-box img { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; }
.author-box__label {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .7rem;
    color: var(--color-muted);
    margin: 0 0 .35rem;
}
.author-box__name { font-size: 1.3rem; margin: 0 0 .5rem; color: var(--color-ink); }
.author-box__bio { color: var(--color-body); font-size: .98rem; line-height: 1.7; margin: 0 0 .7rem; }
.author-box__more {
    font-family: var(--font-mono);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
}

/* Related articles — card grid */
.related {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--color-line);
}
.related__inner {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 1.25rem;
}
.related__title { font-size: 1.4rem; margin: 0 0 1.5rem; color: var(--color-ink); }
.related .post-card__cat { display: none; }

/* ==========================================================================
   Search form (page) + 404
   ========================================================================== */
.status-block { text-align: center; padding: calc(var(--header-h) + 3rem) 1.25rem 5rem; max-width: 640px; margin-inline: auto; }
.status-block__code { word-break: break-word; }
.search-form { width: 100%; }
.status-block__code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 700; color: var(--color-red); line-height: 1; }
.status-block h1 { margin-top: .5rem; }
.status-block p { color: var(--color-muted); }

.search-form {
    display: flex;
    max-width: 480px;
    margin: 1.8rem auto 0;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    overflow: hidden;
}
.search-form input[type="search"] {
    flex: 1;
    border: 0;
    padding: .85rem 1.2rem;
    font: inherit;
    font-size: .95rem;
}
.search-form input[type="search"]:focus { outline: none; }
.search-form button {
    border: 0;
    background: var(--color-red);
    color: #fff;
    font: inherit;
    font-weight: 600;
    padding: 0 1.5rem;
    cursor: pointer;
    transition: background var(--transition);
}
.search-form button:hover { background: var(--color-red-dark); }

.no-results { text-align: center; padding: 3rem 0; color: var(--color-muted); }

.btn {
    display: inline-block;
    background: var(--color-red);
    color: #fff;
    padding: .8rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-top: 1.5rem;
    transition: background var(--transition);
}
.btn:hover { background: var(--color-red-dark); color: #fff; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--color-dark); color: #cfcfcf; }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.8rem 0;
    font-size: .82rem;
}
.footer-logo img { height: 22px; opacity: .85; transition: opacity var(--transition); }
.footer-logo:hover img { opacity: 1; }

.footer-copy { color: #8a8d92; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .post-nav { grid-template-columns: 1fr; }
    .post-nav__link.is-next { text-align: left; }

    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
    .post-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
    .post-card:hover { transform: none; }
}

/* ==========================================================================
   HOME PAGE — editorial tech-journal treatment
   ========================================================================== */

/* --- Banner (dark, centered "BLOG") --- */
.home-lead {
    position: relative;
    background: var(--color-night);
    color: #fff;
    overflow: hidden;
    padding: calc(var(--header-h) + clamp(1.5rem, 4vw, 2.5rem)) 0 clamp(1.75rem, 4vw, 3rem);
    isolation: isolate;
}
/* fine engineered dot-grid, fading downward */
.home-lead::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 90%);
    mask-image: linear-gradient(to bottom, #000 35%, transparent 90%);
    z-index: -2;
}
/* animated connecting lines, layered just above the dots */
.home-grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 92%);
    mask-image: linear-gradient(to bottom, #000 30%, transparent 92%);
}
.home-banner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
}
.home-banner__title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1;
    color: #fff;
    margin: 0;
}
.home-banner__rule {
    width: 48px;
    height: 3px;
    background: var(--color-red);
    border-radius: 2px;
}
.home-banner__tagline {
    font-family: var(--font-mono);
    font-size: clamp(.78rem, 2vw, .92rem);
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .68);
    margin: 0;
    max-width: 38ch;
}

/* --- Feed (light listing) --- */
.feed {
    position: relative;
    background: var(--color-bg-alt);
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3.5rem, 7vw, 5.5rem);
}
/* On paginated pages the feed is the first section, beneath the floating logo. */
.paged .feed { padding-top: calc(var(--header-h) + 1.5rem); }

.feed__head {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}
.feed__label {
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--color-ink);
    white-space: nowrap;
}
.feed__label b { color: var(--color-red); font-weight: 600; }
.feed__rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--color-line), transparent);
}
.feed__count { font-family: var(--font-mono); font-size: .74rem; color: var(--color-muted); white-space: nowrap; }

.feed__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

.ed-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 18, 20, .05), 0 18px 30px -22px rgba(16, 18, 20, .5);
    transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
}
/* red reveal bar on top edge */
.ed-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--color-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s cubic-bezier(.2, .7, .2, 1);
    z-index: 3;
}
.ed-card:hover { transform: translateY(-6px); box-shadow: 0 1px 2px rgba(16, 18, 20, .06), 0 28px 44px -26px rgba(16, 18, 20, .6); }
.ed-card:hover::before { transform: scaleX(1); }

.ed-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-bg-alt);
}
.ed-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.ed-card:hover .ed-card__media img { transform: scale(1.06); }
.ed-card__media--placeholder,
.ed-card__media.is-broken,
.post-card__media.is-broken { background: linear-gradient(135deg, var(--color-dark-2), var(--color-night)); }
.ed-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16, 18, 20, .55), transparent 45%);
    opacity: .9;
}

.ed-card__tag {
    position: absolute;
    left: .85rem;
    bottom: .85rem;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: .64rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(14, 16, 19, .55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .18);
    padding: .32rem .7rem;
    border-radius: 999px;
}
.ed-card__tag:hover { color: #fff; background: var(--color-red); border-color: var(--color-red); }

.ed-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.3rem 1.35rem 1.45rem; }
.ed-card__title { font-size: 1.13rem; line-height: 1.34; font-weight: 600; letter-spacing: -.01em; margin: 0 0 1.1rem; }
.ed-card__title a { color: var(--color-ink); }
.ed-card__title a:hover { color: var(--color-red); }
.ed-card__meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--color-muted);
}
.ed-card__meta img { width: 24px; height: 24px; border-radius: 50%; }
.ed-card__meta .author { color: var(--color-ink); }
.ed-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--color-red); }

/* --- Page-load reveal (one orchestrated stagger) --- */
@keyframes ed-rise {
    to { opacity: 1; transform: none; }
}
.home-lead .reveal,
.feed__grid .ed-card {
    opacity: 0;
    transform: translateY(18px);
    animation: ed-rise .7s cubic-bezier(.2, .7, .2, 1) forwards;
}
.home-banner__title.reveal { animation-delay: .04s; }
.home-banner__rule.reveal { animation-delay: .12s; }
.home-banner__tagline.reveal { animation-delay: .18s; }
.feed__grid .ed-card:nth-child(1) { animation-delay: .02s; }
.feed__grid .ed-card:nth-child(2) { animation-delay: .08s; }
.feed__grid .ed-card:nth-child(3) { animation-delay: .14s; }
.feed__grid .ed-card:nth-child(4) { animation-delay: .2s; }
.feed__grid .ed-card:nth-child(5) { animation-delay: .26s; }
.feed__grid .ed-card:nth-child(6) { animation-delay: .32s; }
.feed__grid .ed-card:nth-child(n+7) { animation-delay: .38s; }

/* --- Home responsive --- */
@media (max-width: 980px) {
    .feed__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .feed__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .home-lead .reveal,
    .feed__grid .ed-card { opacity: 1; transform: none; animation: none; }
    .ed-card:hover { transform: none; }
    .ed-card:hover .ed-card__media img { transform: none; }
}
