:root{
  --bg: #07060b;
  --fg: #eae7ff;
  --muted: rgba(234,231,255,.75);
  --line: rgba(234,231,255,.18);
  --card: rgba(255,255,255,.06);
  --accent: #a78bfa;  /* violet */
  --accent2:#22d3ee;  /* cyan */
  --warn: #fbbf24;    /* amber */
  --ok:   #34d399;    /* green */
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*{ box-sizing:border-box; }

/* ✅ Background never gets cut */
html{
  min-height: 100%;
  background:
    radial-gradient(900px 600px at 18% 10%, rgba(167,139,250,.22), transparent 60%),
    radial-gradient(800px 500px at 82% 30%, rgba(34,211,238,.12), transparent 60%),
    var(--bg);
  background-color: var(--bg);
}

body{
  margin:0;
  min-height: 100vh;
  font-family: var(--mono);
  color: var(--fg);
  background: transparent;
  letter-spacing:.2px;
}

/* Anti-overflow safety */
body, p, li, a, code, small, span, div, h1, h2, h3, h4{
  overflow-wrap: anywhere;
  word-break: break-word;
}

a{ color: var(--accent2); text-decoration:none; }
a:hover{ text-decoration:underline; }
code{ font-family: var(--mono); color: rgba(234,231,255,.9); }

/* Topbar */
.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(7,6,11,.78);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
}
.topbar > *{ min-width: 0; }

.brand{
  display:flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1 1 280px;
}
.brand .sig{
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display:block;
}
.brand small{
  color: var(--muted);
  font-size: 12px;
  max-width: 100%;
}

.nav{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
}
.nav a{
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  white-space: nowrap;
}
.nav a:hover{
  border-color: var(--line);
  background: rgba(255,255,255,.04);
}
.nav a.active{
  border-color: rgba(167,139,250,.45);
  background: rgba(167,139,250,.08);
  color: rgba(234,231,255,.95);
}

@media (max-width: 560px){
  .brand small{ display:none; }
  .nav{ justify-content: flex-start; width: 100%; }
}

/* Layout */
.wrap{
  max-width: 1060px;
  margin: 20px auto;
  padding: 0 14px 50px;
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 14px;
  max-width: 100%;
}
@media (max-width: 920px){
  .wrap{ grid-template-columns: minmax(0,1fr); }
}

.card{
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  min-width: 0;
  max-width: 100%;
}
.card h2{
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing:.5px;
}
.hint{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* Sidebar bits */
.badgeRow{ display:flex; gap:8px; flex-wrap: wrap; margin-top: 10px; }
.badge{
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-size: 12px;
}
.status{
  margin-top: 12px;
  border-top: 1px dashed rgba(234,231,255,.22);
  padding-top: 12px;
  display:grid;
  gap: 8px;
  font-size: 13px;
}
.kv{ display:flex; justify-content: space-between; gap: 10px; }
.kv span:first-child{ color: var(--muted); }
.kv span:last-child{ color: rgba(234,231,255,.9); }

.btn{
  width:100%;
  font: inherit;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  max-width: 100%;
}
.btn:hover{ background: rgba(255,255,255,.08); }
.btn strong{ color: rgba(234,231,255,.95); }
.btn small{ color: var(--muted); display:block; margin-top: 2px; }

.terminal{
  margin-top: 12px;
  border: 1px solid rgba(34,211,238,.25);
  border-radius: 14px;
  background: rgba(34,211,238,.06);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(234,231,255,.85);
  min-width: 0;
  max-width: 100%;
}
.terminal b{ color: rgba(234,231,255,.95); }
.terminal .prompt{ color: var(--accent2); }

/* Hero + marquee */
.hero h1{
  margin: 6px 0 8px;
  font-size: 22px;
  letter-spacing: .8px;
}
.subtitle{
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.marquee{
  overflow:hidden;
  border: 1px solid rgba(167,139,250,.35);
  border-radius: 14px;
  background: rgba(167,139,250,.08);
  margin-bottom: 12px;
  max-width: 100%;
  contain: paint;
  position: relative;
}
.marquee__track{
  display:flex;
  width: max-content;
  gap: 22px;
  padding: 8px 12px;
  white-space: nowrap;
  animation: slide 16s linear infinite;
  will-change: transform;
}
@keyframes slide{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}
.marquee__track span{ white-space: nowrap; }

.grid2{
  display:grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 720px){
  .grid2{ grid-template-columns: minmax(0,1fr); }
}
.panel{
  border: 1px dashed rgba(234,231,255,.25);
  border-radius: 14px;
  padding: 14px;
  background: rgba(0,0,0,.15);
  min-width: 0;
  max-width: 100%;
}
.panel h3{
  margin: 0 0 8px;
  font-size: 14px;
  color: rgba(234,231,255,.92);
}

/* Posts */
.log{ display:grid; gap: 10px; margin-top: 10px; }
.post{
  border: 1px solid rgba(234,231,255,.18);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,.18);
}
.meta{
  font-size: 12px;
  color: var(--muted);
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.post h4{ margin: 0 0 6px; font-size: 14px; }
.post p{ margin: 0; color: rgba(234,231,255,.86); line-height: 1.55; }

/* Footer */
footer{
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
}

/* CRT noise overlay */
.noise{
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.03) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: overlay;
  transition: opacity .2s ease;
  z-index: 999;
}
.noise.on{ opacity: .25; }
