/* Editorial overrides for /blog, layered on top of modern-home.css.
   The blog page reuses index.html's nav/footer classes, so modern-home.css
   already supplies the palette, type, nav and footer. Only the blog-specific
   hero, search and card grid are restated here. */

.blog-hero {
    /* body is a flex column: an auto cross-axis margin suppresses stretch, so
       the width has to be stated for the hero to line up with .blog-content. */
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: calc(76px + clamp(4rem, 9vw, 7rem)) 2rem clamp(2.5rem, 5vw, 4rem);
    text-align: left;
}

.blog-hero::before {
    content: "01 / Field notes";
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    font: 400 .62rem/1 "DM Mono", monospace;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.blog-hero h1 {
    max-width: 900px;
    margin-bottom: 1.4rem;
    font-size: clamp(2.8rem, 5.2vw, 5.1rem);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.06em;
}

.blog-hero p {
    max-width: 62ch;
    margin: 0;
    color: var(--text-2);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* ── Search ── */
.blog-search {
    max-width: 420px;
    margin: 2.5rem 0 0;
}

.blog-search input {
    padding: .85rem 1rem .85rem 2.6rem;
    border: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font: 400 .72rem/1 "DM Mono", monospace;
    letter-spacing: .06em;
    transition: border-color .2s;
}

.blog-search input::placeholder {
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .12em;
}

.blog-search input:focus {
    border-color: var(--accent);
    box-shadow: none;
}

.blog-search-icon {
    left: .9rem;
    display: flex;
    color: var(--text-3);
}

.blog-search-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
}

/* ── Grid ── */
.blog-content {
    max-width: 1240px;
    padding: 0 2rem clamp(5rem, 9vw, 8rem);
}

.blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.blog-card {
    border: 0;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    transition: background .25s;
}

.blog-card:hover {
    transform: none;
    border-color: var(--border);
    background: rgba(147, 119, 255, .05);
}

.blog-card img {
    aspect-ratio: 16/10;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    filter: saturate(.85) contrast(1.05);
}

.blog-card:hover img {
    filter: none;
}

.blog-card-body {
    gap: 0;
    padding: 1.4rem;
}

.blog-card-date {
    margin-bottom: .9rem;
    color: var(--text-3);
    font: 400 .56rem/1 "DM Mono", monospace;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.blog-card-tags {
    gap: .35rem;
    margin-bottom: 1rem;
}

.blog-tag {
    padding: .22rem .5rem;
    border: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    color: var(--text-3);
    font: 400 .55rem/1.2 "DM Mono", monospace;
    font-weight: 400;
    letter-spacing: .12em;
}

.blog-card:hover .blog-tag {
    color: var(--accent-light);
    border-color: var(--border-hover);
}

.blog-card-title {
    margin-bottom: .7rem;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -.02em;
}

.blog-card-excerpt {
    margin-bottom: 1.4rem;
    color: var(--text-2);
    font-size: .84rem;
    line-height: 1.6;
}

.blog-card-link {
    color: var(--accent);
    font: 400 .56rem/1 "DM Mono", monospace;
    font-weight: 400;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.blog-empty {
    padding: 5rem 2rem;
    color: var(--text-3);
    font: 400 .7rem/1.5 "DM Mono", monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
}

@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
    .blog-hero { padding-inline: 1.5rem; }
    .blog-content { padding-inline: 1.5rem; }
}

@media (max-width: 640px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-hero h1 { font-size: 2.7rem; }
    .blog-search { max-width: none; }
}

/* Honour the OS setting: stop transitions and any transform-based motion
   for readers who ask for reduced motion. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
