/* Noir Signal — live blog cards.
   Independent from the Card Lab demo; progressive enhancement only. */
.noir-blog-section {
  --noir-bg: #101b1c;
  --noir-bg-2: #142725;
  --noir-ink: #f3f7f1;
  --noir-green: #a9dfbb;
  --noir-green-bright: #c1f4c8;
  --noir-muted: #b2c6bf;
  --noir-line: #3a5650;
  --noir-teal: #80b89d;
  padding-top: clamp(115px, 14vw, 155px);
}

.noir-blog-intro { max-width: 760px; }
.noir-blog-intro h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: -.065em;
  margin: 0 0 .17em;
  line-height: 1.08;
}
.noir-blog-dot { color: #6da993; }
.noir-blog-intro .section-lead {
  max-width: 690px;
  font-size: clamp(.99rem, 1.6vw, 1.12rem);
  line-height: 1.8;
}

.blog-list.noir-blog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 23px;
  align-items: stretch;
  margin-top: clamp(30px, 4vw, 44px);
}
.blog-list .blog-card.noir-blog-card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 42%;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 475px;
  gap: 0;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid #38524c;
  border-radius: 20px;
  background: radial-gradient(ellipse at 60% 40%, var(--noir-bg-2) 0%, var(--noir-bg) 72%);
  color: var(--noir-ink);
  box-shadow: 0 16px 38px rgb(6 22 19 / 13%), inset 0 0 75px rgb(0 0 0 / 17%);
  overflow: hidden;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s ease, box-shadow .35s ease;
}
.blog-list .noir-blog-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(490px circle at var(--mx) var(--my), rgb(145 222 168 / 18%), transparent 57%);
  opacity: .35;
  transition: opacity .4s ease;
  pointer-events: none;
}
.blog-list .noir-blog-card::after {
  content: "";
  position: absolute;
  width: 56%;
  aspect-ratio: 1;
  right: -24%;
  top: 5%;
  z-index: -1;
  border: 1px solid rgb(151 204 178 / 10%);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgb(151 204 178 / 3%), 0 0 0 105px rgb(151 204 178 / 2%);
  pointer-events: none;
}
.blog-list .noir-blog-card:hover {
  border-color: #79c69d;
  box-shadow: 0 22px 48px rgb(6 22 19 / 23%), 0 0 0 1px rgb(138 222 164 / 14%);
}
.blog-list .noir-blog-card:hover::before { opacity: 1; }
.blog-list .noir-blog-card img.noir-card-cover {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  filter: grayscale(35%) blur(2px);
  opacity: .075;
  border: 0;
  border-radius: 0;
  pointer-events: none;
}
.noir-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: #b5d5c5;
}
.noir-card-transmission {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font: 700 clamp(.65rem, 1vw, .73rem)/1.5 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.noir-card-led {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b6e976;
  box-shadow: 0 0 0 4px rgb(158 218 115 / 10%), 0 0 16px rgb(166 242 126 / 42%);
  animation: noir-led-pulse 2.8s ease-in-out infinite;
}
.noir-card-broadcast { flex: none; width: 31px; height: 31px; color: #b8e7c0; }
.noir-card-broadcast svg { display: block; width: 100%; height: 100%; }
.noir-card-wave {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 1.1vw, 10px);
  height: 122px;
  min-height: 122px;
  padding: 10px 0 5px;
  transform: skewX(-14deg);
  pointer-events: none;
}
.noir-card-wave span {
  --bar: 38px;
  --lag: 0s;
  display: block;
  width: clamp(6px, .9vw, 9px);
  height: var(--bar);
  border-radius: 8px;
  background: linear-gradient(180deg, #c2ee9a, #68ae93);
  opacity: .79;
  box-shadow: 0 0 12px rgb(122 201 149 / 12%);
  transform-origin: 50% 50%;
  animation: noir-wave 2.35s ease-in-out infinite alternate;
  animation-delay: var(--lag);
}
.noir-card-wave span:nth-child(1) { --bar: 22px; --lag: -.8s; }
.noir-card-wave span:nth-child(2) { --bar: 42px; --lag: -.4s; }
.noir-card-wave span:nth-child(3) { --bar: 74px; --lag: -.9s; }
.noir-card-wave span:nth-child(4) { --bar: 51px; --lag: -1.4s; }
.noir-card-wave span:nth-child(5) { --bar: 90px; --lag: -.3s; }
.noir-card-wave span:nth-child(6) { --bar: 64px; --lag: -1.1s; }
.noir-card-wave span:nth-child(7) { --bar: 37px; --lag: -.5s; }
.noir-card-wave span:nth-child(8) { --bar: 75px; --lag: -1.6s; }
.noir-card-wave span:nth-child(9) { --bar: 54px; --lag: -.7s; }
.noir-card-wave span:nth-child(10) { --bar: 71px; --lag: -1.2s; }
.noir-card-wave span:nth-child(11) { --bar: 39px; --lag: -.2s; }
.noir-card-wave span:nth-child(12) { --bar: 24px; --lag: -1.8s; }

.noir-card-story { position: relative; z-index: 1; flex: 1; min-width: 0; }
.noir-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 1px 0 20px;
  font: 600 .72rem/1.6 var(--font-mono);
  color: #acd9bd;
  letter-spacing: .15em;
}
.noir-card-meta time { font-size: .7rem; letter-spacing: .02em; color: #a2c1b4; }
.section .noir-blog-card h2 {
  font: 750 clamp(1.62rem, 2.65vw, 2.16rem)/1.17 var(--font-body);
  letter-spacing: -.047em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  margin: 0 0 16px;
}
.noir-blog-card h2 a {
  color: var(--noir-ink);
  text-decoration: none;
  transition: color .2s ease;
}
.noir-blog-card h2 a:hover { color: var(--noir-green-bright); }
.noir-card-description {
  max-width: 53ch;
  color: var(--noir-muted);
  margin: 0 0 25px;
  font: 400 .92rem/1.75 var(--font-body);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.noir-card-bottom {
  z-index: 1;
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  min-height: 68px;
  border-top: 1px solid var(--noir-line);
  padding-top: 17px;
}
.noir-card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 200px;
  min-width: 0;
}
.noir-card-tags span {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #517066;
  border-radius: 6px;
  color: #d0e8db;
  font: 600 .66rem/1.3 var(--font-mono);
  overflow-wrap: anywhere;
}
.noir-card-readtime {
  flex: none;
  color: #acc3b8;
  font: 500 .69rem/1.5 var(--font-mono);
}
.noir-card-open {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #e4f6e9;
  color: #13251c;
  background: #f2f8f0;
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}
.noir-card-open svg { width: 24px; height: 24px; }
.noir-card-open:hover { background: #beefc7; border-color: #beefc7; transform: translateX(3px); }
.noir-card-discuss {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 38px;
  margin-top: 12px;
  color: #bce4cb;
  text-decoration: none;
  font: 700 .79rem/1.4 var(--font-body);
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.noir-card-discuss:hover { color: #fff; border-color: currentColor; }
.noir-blog-card :is(a,button):focus-visible { outline: 3px solid #b3e9ba; outline-offset: 4px; }
.noir-blog-list .noir-blog-card-featured {
  grid-column: 1 / -1;
  min-height: 490px;
  padding: clamp(25px, 4vw, 44px);
}
.noir-blog-list .noir-blog-card-featured .noir-card-wave {
  height: 136px;
  min-height: 136px;
}
.noir-blog-list .noir-blog-card-featured .noir-card-story {
  max-width: 790px;
}
.noir-blog-list .noir-blog-card-featured h2 {
  max-width: 24ch;
  font-size: clamp(2.1rem, 4.35vw, 3.8rem);
  line-height: 1.13;
}
.noir-blog-list .noir-blog-card-featured .noir-card-description { max-width: 72ch; }
/* Lights-out theme: keep chosen graphite + mint identity, soften glare. */
[data-theme="dark"] .noir-blog-section {
  --noir-bg: #0d1817;
  --noir-bg-2: #172923;
  --noir-line: #3b5b50;
  --noir-muted: #bbcdc3;
}
[data-theme="dark"] .noir-blog-dot { color: #67aa82; }
[data-theme="dark"] .blog-list .noir-blog-card { border-color: #426157; }
[data-theme="dark"] .blog-list .noir-blog-card:hover { border-color: #b0e8bf; }

@keyframes noir-wave {
  from { transform: scaleY(.53); opacity: .55; }
  to { transform: scaleY(1.07); opacity: .94; }
}
@keyframes noir-led-pulse {
  50% { opacity: .5; box-shadow: 0 0 0 3px rgb(158 218 115 / 7%); }
}
@keyframes noir-reveal {
  from { opacity: .65; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}
.noir-blog-card.noir-entered { animation: noir-reveal .55s cubic-bezier(.2,.8,.2,1) both; }

@media (max-width: 900px) {
  .blog-list.noir-blog-list { grid-template-columns: 1fr; gap: 19px; }
  .noir-blog-list .noir-blog-card-featured { grid-column: auto; }
  .noir-blog-list .noir-blog-card-featured h2 { max-width: none; font-size: clamp(1.65rem, 5vw, 2.3rem); }
  .blog-list .blog-card.noir-blog-card { min-height: 0; }
  .noir-card-wave, .noir-blog-list .noir-blog-card-featured .noir-card-wave { height: 108px; min-height: 108px; }
}
@media (max-width: 560px) {
  .noir-blog-section { padding-inline: 14px; padding-top: 115px; }
  .blog-list .blog-card.noir-blog-card,
  .noir-blog-list .noir-blog-card-featured {
    padding: 22px 20px 17px;
    border-radius: 17px;
  }
  .blog-list.noir-blog-list { gap: 19px; margin-top: 26px; }
  .noir-card-top { gap: 7px; }
  .noir-card-transmission { font-size: .64rem; letter-spacing: .11em; gap: 9px; }
  .noir-card-broadcast { width: 27px; height: 27px; }
  .noir-card-meta { margin-bottom: 15px; }
  .section .noir-blog-card h2,
  .noir-blog-list .noir-blog-card-featured h2 {
    font-size: clamp(1.72rem, 7.15vw, 2.1rem);
    letter-spacing: -.045em;
  }
  .noir-card-wave, .noir-blog-list .noir-blog-card-featured .noir-card-wave {
    height: 98px; min-height: 98px; gap: 6px;
  }
  .noir-card-wave span { width: 6px; }
  .noir-card-description { font-size: .87rem; margin-bottom: 24px; }
  .noir-card-tags { flex-basis: 170px; }
  .noir-card-readtime { margin-left: 0; }
  .noir-card-open { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .noir-blog-card, .noir-blog-card * { animation: none !important; transition: none !important; }
  .blog-list .blog-card.noir-blog-card { transform: none !important; }
  .noir-card-wave span { transform: none !important; opacity: .9; }
}
