/* ═══════════════════════════════════════════════════════════════════
   THE LUPID BRIEF — index, light "pixel-grid" theme
   Matches /index.html and /contact/: #EDEEF5 canvas, acid-green accent,
   Space Grotesk, dot-grid. Shares the homepage nav + footer + page-fade
   so navigation stays seamless. (Article pages still use blog.css.)
   ═══════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk-VariableFont_wght.woff2') format('woff2'),
       url('../fonts/SpaceGrotesk-VariableFont_wght.ttf') format('truetype');
  font-weight: 300 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #EDEEF5; --ink: #1a1a1a; --ink-2: rgba(26,26,26,0.62); --ink-3: rgba(26,26,26,0.45);
  --dim: #8e8e8e; --green: #9fff00; --green-text: #5f7d00;
  --line: rgba(26,26,26,0.10); --line-2: rgba(26,26,26,0.18); --surface: #ffffff;
  --ease: cubic-bezier(0.22,0.61,0.36,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--green); color: #000; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

/* seamless page transitions (identical to homepage/contact) */
@media (prefers-reduced-motion: no-preference) {
  main { animation: pageFade 0.42s var(--ease) both; }
  @keyframes pageFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  html.is-leaving main { opacity: 0; transform: translateY(-6px); transition: opacity 0.2s ease, transform 0.2s ease; animation: none; }
}

body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(26,26,31,0.05) 1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 95% 55% at 50% 0%, #000 28%, transparent 82%);
          mask-image: radial-gradient(ellipse 95% 55% at 50% 0%, #000 28%, transparent 82%);
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }
section { position: relative; z-index: 2; }

/* reveal-on-scroll */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].in { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 70ms; }
[data-reveal-delay="2"] { transition-delay: 140ms; }
[data-reveal-delay="3"] { transition-delay: 210ms; }
[data-reveal-delay="4"] { transition-delay: 280ms; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1 !important; transform: none !important; } }

/* ─── shared brand mark / nav (identical metrics to homepage) ─── */
.container { max-width: 80rem; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 40px; } }
.brand-mark { fill: var(--ink); width: 28px; height: 28px; flex-shrink: 0; display: block; }
@media (min-width: 768px) { .brand-mark { width: 32px; height: 32px; } }
.brand-name { font-size: 22px; letter-spacing: -0.025em; color: var(--ink); text-transform: lowercase; line-height: 1; }
@media (min-width: 768px) { .brand-name { font-size: 24px; } }

.nav { position: fixed; top: 0; left: 0; width: 100%; z-index: 50; transition: all 0.3s var(--ease);
  padding-top: 24px; padding-bottom: 24px;
  background: linear-gradient(to bottom, rgba(241,241,241,0.7), transparent);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@media (min-width: 768px) { .nav { padding-top: 32px; padding-bottom: 32px; } }
.nav--scrolled { padding-top: 14px; padding-bottom: 14px; background: rgba(237,238,245,0.8);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border-bottom: 1px solid rgba(26,26,26,0.06); }
.nav--open { background: #EDEEF5; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border-bottom: 1px solid rgba(26,26,26,0.08); }
.nav__inner { display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; column-gap: 16px; }
.nav__brand { grid-column: span 6; display: flex; align-items: center; gap: 10px; }
@media (min-width: 768px) { .nav__brand { grid-column: span 3; } }
.nav__links { display: none; }
@media (min-width: 768px) { .nav__links { display: flex; grid-column: span 6; justify-content: center; align-items: center; gap: 28px; } }
.nav__actions { grid-column: span 6; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
@media (min-width: 768px) { .nav__actions { grid-column: span 3; gap: 16px; } }
.nav-link { position: relative; font-size: 13px; text-transform: lowercase; color: rgba(26,26,26,0.65); transition: color 0.2s; }
.nav-link:hover { color: var(--ink); }
.nav-link::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0; background: var(--ink); transition: width 0.3s; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--ink); }
.nav-link.active::after { width: 100%; background: var(--green); height: 2px; bottom: -7px; }

.btn-dark { background-color: #1a1a1a; color: #ffffff; }
.btn-dark:hover { background-color: #000000; }
.star-btn { display: inline-flex; flex-shrink: 0; white-space: nowrap; align-items: center; gap: 8px; font-size: 13px; text-transform: lowercase; padding: 10px 16px; border-radius: 9999px; box-shadow: 0 8px 24px -14px rgba(0,0,0,0.6); transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), background-color 0.2s ease; }
.star-btn__inner { display: flex; align-items: center; gap: 8px; transition: transform 0.15s; }
.star-btn:active .star-btn__inner { transform: scale(0.94); }
.star-btn svg { width: 16px; height: 16px; fill: currentColor; }
.star-btn--nav { display: none; }
@media (min-width: 640px) { .star-btn--nav { display: inline-flex; } }

.hamburger { display: flex; position: relative; width: 36px; height: 36px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 0; }
@media (min-width: 768px) { .hamburger { display: none; } }
.hamburger span { display: block; height: 2px; width: 20px; background: var(--ink); transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.drawer { display: block; overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.45s var(--ease), opacity 0.3s ease; }
@media (min-width: 768px) { .drawer { display: none; } }
.drawer.open { max-height: 32rem; opacity: 1; }
.drawer__inner { max-width: 80rem; margin: 0 auto; padding: 12px 24px 28px; display: flex; flex-direction: column; gap: 4px; }
.drawer__inner a:not(.star-btn) { display: flex; align-items: center; justify-content: space-between; font-size: 16px; text-transform: lowercase; color: rgba(26,26,26,0.8); padding: 12px 0; border-bottom: 1px solid rgba(26,26,26,0.06); opacity: 0; transform: translateY(10px); transition: color 0.2s ease, opacity 0.42s var(--ease), transform 0.42s var(--ease); }
.drawer__inner a:not(.star-btn).active { color: var(--ink); }
.drawer__inner a:not(.star-btn)::after { content: "→"; color: rgba(26,26,26,0.25); font-size: 15px; transition: transform 0.25s var(--ease), color 0.25s ease; }
.drawer__inner a:not(.star-btn):hover::after { color: #9fc100; transform: translateX(4px); }
.drawer.open .drawer__inner a:not(.star-btn) { opacity: 1; transform: translateY(0); }
.drawer .star-btn { margin-top: 16px; width: -moz-fit-content; width: fit-content; opacity: 0; transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), background-color 0.2s ease, opacity 0.42s var(--ease); }
.drawer.open .star-btn { opacity: 1; }
.drawer.open .drawer__inner > *:nth-child(1) { transition-delay: 0.05s; }
.drawer.open .drawer__inner > *:nth-child(2) { transition-delay: 0.10s; }
.drawer.open .drawer__inner > *:nth-child(3) { transition-delay: 0.15s; }
.drawer.open .drawer__inner > *:nth-child(4) { transition-delay: 0.20s; }
.drawer.open .drawer__inner > *:nth-child(5) { transition-delay: 0.25s; }
.drawer.open .drawer__inner > *:nth-child(6) { transition-delay: 0.30s; }
@media (prefers-reduced-motion: reduce) { .drawer__inner a:not(.star-btn) { transform: none; transition-property: color, opacity; } .drawer.open .drawer__inner > * { transition-delay: 0s !important; } }

/* ─── kicker ─── */
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.04em; text-transform: lowercase; color: var(--ink-2); margin-bottom: 24px; }
.kicker .sq { width: 7px; height: 7px; border-radius: 2px; background: var(--green); box-shadow: 0 0 0 1px rgba(26,26,26,0.1); flex-shrink: 0; }
.dim { color: var(--dim); }

/* ═══════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════ */
.blog-hero { padding: 150px 0 32px; }
@media (min-width: 768px) { .blog-hero { padding: 184px 0 40px; } }
.blog-hero h1 { font-weight: 500; font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; letter-spacing: -0.022em; }
.blog-hero .lede { margin-top: 24px; max-width: 620px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: var(--ink-2); }

/* search + rss toolbar */
.search-row { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.search-shell { display: inline-flex; align-items: center; gap: 10px; flex: 1; min-width: 240px; max-width: 460px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 9999px; background: rgba(255,255,255,0.6); transition: border-color 0.2s, background 0.2s; cursor: text; }
.search-shell:focus-within { border-color: var(--green-text); background: #fff; }
.search-svg { color: var(--ink-3); flex-shrink: 0; }
.search-input { flex: 1; border: 0; background: none; outline: none; font: inherit; font-size: 14px; color: var(--ink); }
.search-input::placeholder { color: var(--ink-3); }
.search-kbd { font-size: 12px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; background: rgba(255,255,255,0.7); }
.rss-button { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; text-transform: lowercase; color: var(--ink); padding: 11px 16px; border: 1px solid var(--line-2); border-radius: 9999px; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.rss-button svg { width: 14px; height: 14px; fill: currentColor; color: var(--green-text); }
.rss-button:hover { border-color: var(--green-text); background: rgba(159,255,0,0.06); }

/* category filter chips */
.filters { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font-size: 12.5px; text-transform: lowercase; color: var(--ink-2); padding: 7px 14px; border: 1px solid var(--line); border-radius: 9999px; background: transparent; cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s; font-family: inherit; }
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.active { border-color: rgba(110,143,0,0.4); background: rgba(159,255,0,0.10); color: var(--green-text); }

/* ledger bar */
.ledger-bar { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.ledger-bar b { color: var(--green-text); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   FEATURED + LEDGER LIST
   ═══════════════════════════════════════════════════════════════════ */
.blog-grid { padding: 8px 0 64px; }

.featured-post { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; padding: 36px 8px 40px; border-top: 1px solid var(--line-2); align-items: start; }
@media (max-width: 820px) { .featured-post { grid-template-columns: 1fr; gap: 20px; } }
.featured-post::before { content: ''; position: absolute; left: 0; top: -1px; width: 0; height: 2px; background: var(--green); transition: width 0.4s var(--ease); }
.featured-post:hover::before { width: 64px; }
.featured-post .meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
.featured-post .meta-row .em { color: var(--green-text); font-weight: 600; }
.featured-post h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; color: var(--ink); }
.featured-post h2 em { font-style: normal; color: var(--dim); }
.featured-post .left-col .excerpt { margin-top: 16px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.featured-post .right-col { display: flex; flex-direction: column; gap: 18px; }
.featured-post .right-col .excerpt { font-size: 15px; line-height: 1.62; color: var(--ink-2); }
.read-on { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; text-transform: lowercase; color: var(--ink); }
.read-on .arr { transition: transform 0.22s var(--ease), color 0.22s; }
.featured-post:hover .read-on .arr { transform: translateX(5px); color: var(--green-text); }

.posts-list { margin-top: 4px; }
.ledger-head { display: grid; grid-template-columns: 130px minmax(0,1fr) 110px; gap: 24px; padding: 22px 8px 14px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 640px) { .ledger-head { display: none; } }

.post-card { position: relative; display: grid; grid-template-columns: 130px minmax(0,1fr) 110px; gap: 24px; align-items: baseline; padding: 26px 8px; border-top: 1px solid var(--line); transition: background 0.22s ease; }
.post-card:last-of-type { border-bottom: 1px solid var(--line); }
.post-card::before { content: ''; position: absolute; left: 0; top: -1px; bottom: 0; width: 0; background: var(--green); transition: width 0.25s var(--ease); }
.post-card:hover { background: rgba(159,255,0,0.05); }
.post-card:hover::before { width: 3px; }
.post-card .date { font-size: 13px; letter-spacing: 0.04em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.post-card .body { min-width: 0; }
.post-card h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); line-height: 1.25; }
.post-card h3 em { font-style: normal; color: var(--dim); }
.post-card .excerpt { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.post-card .topic-tag { display: inline-block; margin-top: 14px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-text); }
.post-card .right-meta { text-align: right; display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 8px; }
.post-card .read-time { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.post-card .right-meta::after { content: "→"; color: var(--ink-3); opacity: 0; transition: opacity 0.2s, transform 0.22s var(--ease); transform: translateX(-4px); }
.post-card:hover .right-meta::after { opacity: 1; transform: translateX(0); color: var(--green-text); }
@media (max-width: 640px) {
  .post-card { grid-template-columns: 1fr; gap: 6px; padding: 24px 0; }
  .post-card .date { order: -1; }
  .post-card .right-meta { justify-content: flex-start; margin-top: 12px; }
  .post-card .right-meta::after { display: none; }
}

/* load more */
.load-more-row { margin-top: 36px; display: flex; justify-content: center; }
.load-more { display: inline-flex; align-items: center; gap: 12px; font-family: inherit; font-size: 13px; text-transform: lowercase; color: var(--ink); background: transparent; border: 1px solid var(--line-2); border-radius: 9999px; padding: 12px 22px; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.load-more:hover { border-color: var(--green-text); background: rgba(159,255,0,0.06); }
.load-more .lm-count { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }

/* no results */
.search-no-results { padding: 56px 8px; text-align: center; }
.search-no-results .empty-mark { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.search-no-results p { font-size: 15px; color: var(--ink-2); }
.empty-query { color: var(--ink); }
.link-clear { font: inherit; font-size: 15px; color: var(--green-text); background: none; border: 0; border-bottom: 1px solid var(--green); cursor: pointer; padding: 0; }

/* ═══════════════════════════════════════════════════════════════════
   FOOTER (mirrors homepage)
   ═══════════════════════════════════════════════════════════════════ */
.footer { position: relative; z-index: 2; width: 100%; background: var(--bg); padding: 80px 24px 32px; overflow: hidden; }
@media (min-width: 768px) { .footer { padding-left: 40px; padding-right: 40px; } }
.footer__top { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 40px; border-top: 1px solid rgba(26,26,26,0.1); padding-top: 48px; }
@media (min-width: 768px) { .footer__top { grid-template-columns: repeat(12, 1fr); gap: 32px; } }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
@media (min-width: 768px) { .footer__brand { grid-column: span 4; } }
.footer__brand .star-btn { align-self: flex-start; }
.footer__brand-row { display: flex; align-items: center; gap: 10px; }
.footer__desc { font-size: 14px; line-height: 1.625; color: rgba(26,26,26,0.55); max-width: 300px; }
.footer__colwrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
@media (min-width: 640px) { .footer__colwrap { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .footer__colwrap { grid-column: span 8; } }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col__title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(26,26,26,0.4); }
.footer-col a { font-size: 14px; color: rgba(26,26,26,0.7); transition: color 0.2s; width: -moz-fit-content; width: fit-content; text-transform: capitalize; }
.footer-col a:hover { color: var(--ink); }
.footer__meta { max-width: 1200px; margin: 56px auto 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; font-size: 12px; color: rgba(26,26,26,0.45); }
@media (min-width: 640px) { .footer__meta { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer__social { display: flex; align-items: center; gap: 20px; text-transform: lowercase; }
.footer__social a { display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s; }
.footer__social a:hover { color: var(--ink); }
.footer__social svg { width: 15px; height: 15px; fill: currentColor; }
.footer__mark-wrap { position: relative; max-width: 1700px; margin: 56px auto 0; -webkit-user-select: none; user-select: none; }
@media (min-width: 768px) { .footer__mark-wrap { margin-top: 48px; } }
.footer__rule { display: flex; align-items: center; gap: 16px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.22em; color: rgba(26,26,26,0.35); margin-bottom: 20px; }
@media (min-width: 768px) { .footer__rule { font-size: 11px; margin-bottom: 28px; } }
.footer__rule .line { height: 1px; flex: 1; background: rgba(26,26,26,0.12); }
.footer__rule .nowrap { white-space: nowrap; }
.footer-mark { font-weight: 600; letter-spacing: -0.035em; line-height: 1; color: var(--ink); font-size: clamp(78px, 19vw, 300px); padding-bottom: 0.06em; display: flex; align-items: flex-end; justify-content: center; }
.footer-mark span { display: inline-flex; align-items: flex-end; transition: transform 0.5s cubic-bezier(0.22,1,0.36,1); will-change: transform; }
.footer-mark:hover span { transform: translateY(-0.06em); }
.footer-cursor { display: inline-block; width: 0.12em; height: 0.12em; background: var(--green); margin-left: 0.08em; margin-bottom: 0.14em; border-radius: 2px; align-self: flex-end; animation: pixelBlink 1.4s steps(1) infinite; }
@keyframes pixelBlink { 0%,55% { opacity: 1; } 56%,100% { opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) { .footer-cursor { animation: none; } }

/* footer wordmark: a thin green rule wipes in beneath "lupid" on hover —
   echoes the brand's green progress bar and the framing rule above it */
.fm-sweep {
  height: 3px; width: 100%; margin-top: 0.06em;
  background: #9fff00; border-radius: 2px;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.22,0.61,0.36,1);
}
.footer-mark:hover ~ .fm-sweep { transform: scaleX(1); transform-origin: left center; }
@media (prefers-reduced-motion: reduce) { .fm-sweep { transition: none; } }
