/* ── Writing page ──────────────────────────────────────────────
   A curated "Featured" grid (best per Ahrefs, with covers), then
   the rest of the archive as compact rows. Elfsight = coral,
   Beamtrace = purple→magenta. Same warm cream frame as the site. */
.wr {
    --wr-el: #F93262; --wr-el-soft: rgba(249,50,98,0.06);
    --wr-bt: #6720FF; --wr-bt2: #FF1B9F; --wr-bt-soft: rgba(103,32,255,0.05);
    max-width: 1040px; width: 100%; margin: 0 auto;
    padding: var(--space-lg) var(--space-md) var(--space-md); flex: 1;
}

.wr-hero { margin-bottom: var(--space-lg); max-width: 680px; }
.wr-hero h1 { font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 1rem; }
.wr-sub { font-size: 1.1rem; line-height: 1.7; color: var(--color-text-secondary); }

.wr-sec-h { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.7rem); font-weight: 400; letter-spacing: -0.01em; }

/* Shared publisher pill */
.wr-pub { font-family: var(--font-body); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.wr-elfsight .wr-pub { color: var(--wr-el); background: rgba(249,50,98,0.10); }
.wr-beamtrace .wr-pub { color: var(--wr-bt); background: rgba(103,32,255,0.10); }
.wr-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wr-card-meta time { font-size: 0.76rem; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }

/* Featured grid */
.wr-featured-sec { margin-bottom: var(--space-lg); }
.wr-featured-sec .wr-sec-h { margin-bottom: 1.2rem; }
.wr-featured { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 278px), 1fr)); gap: 18px; }
.wr-feat { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.wr-feat:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -26px rgba(20,10,30,0.42); }
.wr-elfsight.wr-feat:hover { border-color: rgba(249,50,98,0.4); }
.wr-beamtrace.wr-feat:hover { border-color: rgba(103,32,255,0.36); }
.wr-feat-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-surface); }
.wr-feat-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.wr-feat:hover .wr-feat-media img { transform: scale(1.035); }
.wr-feat-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.wr-feat-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; line-height: 1.28; margin: 0.55rem 0 0.5rem; }
.wr-feat-title a { color: var(--color-text); text-decoration: none; }
.wr-feat-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.wr-elfsight.wr-feat:hover .wr-feat-title a { color: var(--wr-el); }
.wr-beamtrace.wr-feat:hover .wr-feat-title a { color: var(--wr-bt); }
.wr-feat-desc { font-size: 0.86rem; line-height: 1.55; color: var(--color-text-secondary); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* All / rest */
.wr-all-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.8rem 1.2rem; margin-bottom: 1.2rem; }
.wr-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.wr-filter { font-family: var(--font-body); font-size: 0.82rem; font-weight: 500; color: var(--color-text-secondary); background: transparent; border: 1px solid var(--color-border); border-radius: 999px; padding: 0.42rem 0.9rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: border-color .18s, color .18s, background .18s; }
.wr-filter span { font-size: 0.72rem; opacity: 0.7; font-variant-numeric: tabular-nums; }
.wr-filter:hover { border-color: var(--color-text-secondary); color: var(--color-text); }
.wr-filter.is-active { color: #fff; border-color: transparent; }
.wr-filter.is-active span { color: #fff; opacity: 0.75; }
.wr-filter[data-filter="all"].is-active { background: var(--color-text); }
.wr-filter[data-filter="elfsight"].is-active { background: var(--wr-el); }
.wr-filter[data-filter="beamtrace"].is-active { background: linear-gradient(120deg, var(--wr-bt2), var(--wr-bt)); }

.wr-rows { display: flex; flex-direction: column; gap: 8px; }
.wr-row { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 22px; align-items: center; padding: 1.05rem 1.6rem 1.05rem 1.5rem; background: #fff; border: 1px solid var(--color-border); border-radius: 12px; text-decoration: none; color: var(--color-text); overflow: hidden; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease; }
.wr-row[hidden] { display: none; }
.wr-row:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -20px rgba(20,10,30,0.4); }
.wr-elfsight.wr-row:hover { border-color: rgba(249,50,98,0.32); background: var(--wr-el-soft); }
.wr-beamtrace.wr-row:hover { border-color: rgba(103,32,255,0.3); background: var(--wr-bt-soft); }
.wr-row-strip { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.wr-elfsight .wr-row-strip { background: var(--wr-el); }
.wr-beamtrace .wr-row-strip { background: linear-gradient(180deg, var(--wr-bt2), var(--wr-bt)); }
.wr-row-date { font-family: var(--font-body); font-size: 0.8rem; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.wr-row-main { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.wr-row-title { font-family: var(--font-display); font-size: 1.24rem; font-weight: 400; line-height: 1.3; color: var(--color-text); transition: color .18s ease; }
.wr-elfsight.wr-row:hover .wr-row-title { color: var(--wr-el); }
.wr-beamtrace.wr-row:hover .wr-row-title { color: var(--wr-bt); }
@media (max-width: 560px) {
    .wr-row { grid-template-columns: 82px 1fr; gap: 14px; padding: 0.95rem 1.2rem 0.95rem 1.15rem; }
    .wr-row-title { font-size: 1.1rem; }
}
@media (max-width: 360px) {
    .wr-row { grid-template-columns: 1fr; gap: 0.5rem; }
    .wr-row-main { gap: 0.45rem; }
}

.wr-see-all { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.3rem; }
.wr-see-all a { font-size: 0.9rem; color: var(--color-text-secondary); text-decoration: none; transition: color .2s; }
.wr-see-all a:hover { color: var(--color-text); }
.wr-show-more { display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 1.3rem auto 0; padding: 0.55rem 1.2rem; font: 500 0.88rem var(--font-body); color: var(--color-text); background: #fff; border: 1px solid var(--color-border); border-radius: 999px; cursor: pointer; }
.wr-show-more:hover { border-color: var(--color-text-secondary); background: var(--color-surface); }
.wr-show-more[hidden] { display: none; }

.wr-linkedin { margin: var(--space-lg) 0; }
.wr-linkedin h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; color: var(--color-text-secondary); margin-bottom: var(--space-md); }

@media (max-width: 600px) {
    .wr { padding-left: var(--space-sm); padding-right: var(--space-sm); }
    .wr-featured { gap: 14px; }
}
