/* Max-WoW Neon Portal — v2.4.1 clickable fix + visuals */
:root { --mw-neon: #2aa3ff; --mw-bg: #070b12; --mw-glow: rgba(42,163,255,.35); }

/* z-index to float above sticky headers that overflow */
.mw-updates-bleed{ position:relative; z-index: 50; }

/* Kill theme background/title when our section exists */
html:has(.mw-updates-bleed), body:has(.mw-updates-bleed){ background: var(--mw-bg) !important; }
body:has(.mw-updates-bleed) .site,
body:has(.mw-updates-bleed) #page,
body:has(.mw-updates-bleed) #content,
body:has(.mw-updates-bleed) .container,
body:has(.mw-updates-bleed) .site-content{ background: transparent !important; }
body:has(.mw-updates-bleed) .entry-title,
body:has(.mw-updates-bleed) h1.page-title,
body:has(.mw-updates-bleed) .page-title { display: none !important; }

.mw-updates-bleed{
  left:50%; right:50%; margin-left:-50vw; margin-right:-50vw; width:100vw;
  margin-top: 0;
  min-height: 100vh;
  color:#eaf2ff;
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(42,163,255,.12), transparent 60%),
    radial-gradient(1000px 700px at 90% 20%, rgba(42,163,255,.10), transparent 60%),
    radial-gradient(1200px 900px at 60% 100%, rgba(60,180,255,.14), transparent 55%),
    linear-gradient(180deg, #08101c 0%, #070b12 60%, #070b12 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -1px 0 rgba(0,0,0,.35);
  font-family: system-ui, Segoe UI, Roboto, Ubuntu, sans-serif;
}

.mw-updates-bleed::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(0deg, rgba(42,163,255,.14), transparent 40%),
             radial-gradient(60% 40% at 50% 0%, rgba(42,163,255,.08), transparent 70%);
}

.mw-updates-wrap{ max-width: 1280px; margin: 0 auto; padding: 22px 16px 64px; }
.mw-updates-title{ font-size:1.8rem; font-weight:900; margin:0 0 14px; text-shadow:0 0 12px rgba(42,163,255,.45); }

/* Grid */
.mw-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1200px){ .mw-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px){ .mw-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px){ .mw-grid{ grid-template-columns: 1fr; } }

/* Card base */
.mw-card{
  position:relative; overflow:hidden; border-radius:18px;
  background: rgba(10,17,28,.55);
  border:1px solid rgba(120,180,255,.20);
  min-height: 240px;
  transform: translateZ(0);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
  perspective: 1000px;
  isolation: isolate;
  cursor: pointer; /* whole card clickable */
}
.mw-card .mw-card-bg{
  position:absolute; inset:0; background-size:cover; background-position:center;
  filter: saturate(1.2) contrast(1.06) brightness(.92);
  transition: transform .25s ease, filter .25s ease;
  will-change: transform;
  z-index: 0;
}
.mw-card::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.62) 60%, rgba(0,0,0,.85));
  transition: opacity .25s ease;
  z-index: 1;
}

/* Neon corners (decorative, don't intercept clicks) */
.mw-corner{
  position:absolute; width:14px; height:14px; border:2px solid rgba(120,180,255,.45);
  filter: drop-shadow(0 0 6px var(--mw-glow));
  pointer-events: none; z-index: 2;
}
.mw-corner.tl{ top:10px; left:10px; border-right:none; border-bottom:none; border-radius:6px 0 0 0; }
.mw-corner.tr{ top:10px; right:10px; border-left:none; border-bottom:none; border-radius:0 6px 0 0; }
.mw-corner.bl{ bottom:10px; left:10px; border-right:none; border-top:none; border-radius:0 0 0 6px; }
.mw-corner.br{ bottom:10px; right:10px; border-left:none; border-top:none; border-radius:0 0 6px 0; }

/* Animated sweep line (decorative, no click block) */
.mw-sweep{
  position:absolute; inset:auto 0 0 0; height:2px;
  background: linear-gradient(90deg, transparent, rgba(42,163,255,.9), transparent);
  transform: translateX(-100%);
  animation: mwSweep 2.4s linear infinite;
  opacity:.6; pointer-events: none; z-index: 2;
}
@keyframes mwSweep { to { transform: translateX(100%);} }

/* Content */
.mw-card-inner{
  position:relative; z-index:3; display:flex; flex-direction:column; gap:.55rem;
  padding:16px;
}
.mw-card-title{ margin:0; font-size:1.08rem; font-weight:900; line-height:1.2; }
.mw-card-title a{ color:#eaf2ff; text-decoration:none; }
.mw-card-title a:hover{ text-decoration:underline; }

.mw-card-excerpt{ margin:0; color:#cfe0ff; font-size:.95rem; max-height:0; overflow:hidden; transition:max-height .25s ease; }
.mw-chip{
  align-self:flex-start; font-size:.75rem; font-weight:800; letter-spacing:.3px;
  padding:4px 10px; border-radius:999px; color:#cfe7ff;
  background: rgba(42,163,255,.12); border:1px solid rgba(120,180,255,.35);
  text-shadow: 0 0 8px rgba(42,163,255,.3);
}

.mw-empty{ color:#9fb6d8; padding: 8px 0 16px; }

/* Hover POP + glow */
.mw-card:hover{
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(120,180,255,.45);
  box-shadow: 0 10px 28px rgba(0,0,0,.55), 0 0 0 1px rgba(42,163,255,.18), 0 0 28px rgba(42,163,255,.18);
}
.mw-card:hover .mw-card-bg{ transform: scale(1.06); filter: saturate(1.25) contrast(1.08) brightness(.98); }
.mw-card:hover .mw-card-excerpt{ max-height: 200px; }

/* 3D tilt hint (JS updates CSS vars) */
.mw-card[data-tilt]{ transform-style: preserve-3d; }
.mw-card[data-tilt] .mw-card-inner,
.mw-card[data-tilt] .mw-card-bg{ transform: translateZ(0); }
.mw-card[data-tilt].is-tilting{
  transform: perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateZ(0);
}
.mw-card[data-tilt].is-tilting .mw-card-bg{ transform: translateZ(0) scale(1.08); }

/* Motion safety */
@media (prefers-reduced-motion: reduce){
  .mw-card, .mw-card *{ transition: none !important; animation: none !important; }
}

/* Fade up */
@keyframes mwFadeUp { from { opacity:0; transform: translateY(6px);} to { opacity:1; transform:none; } }
.mw-card { animation: mwFadeUp .35s ease both; }
