:root{
  --bg: #0b0d12;
  --panel: #101524;
  --text: #e8ecf3;
  --muted: #a7b0c2;
  --border: rgba(255,255,255,.10);
  --shadow: 0 16px 60px rgba(0,0,0,.45);
  --accent: #8bf2c8;
  --accent2: #8ab7ff;
  --max: 1120px;
  --radius: 16px;
}

@media (prefers-color-scheme: light){
  :root{
    --bg:#f7f8fb;
    --panel:#ffffff;
    --text:#0f172a;
    --muted:#475569;
    --border: rgba(15,23,42,.12);
    --shadow: 0 18px 70px rgba(2,6,23,.10);
    --accent:#0ea5e9;
    --accent2:#10b981;
  }
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(900px 600px at 12% 10%, rgba(138,183,255,.22), transparent 60%),
    radial-gradient(900px 600px at 75% 25%, rgba(139,242,200,.18), transparent 55%),
    var(--bg);
  color:var(--text);
  line-height:1.55;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.wrap{ max-width: var(--max); margin: 0 auto; padding: 28px 18px 70px; }

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  position:sticky;
  top:0;
  padding:16px 18px;
  margin:-28px -18px 18px;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(11,13,18,.86), rgba(11,13,18,.60));
  border-bottom:1px solid var(--border);
  z-index:20;
}
@media (prefers-color-scheme: light){
  .topbar{
    background: linear-gradient(to bottom, rgba(247,248,251,.92), rgba(247,248,251,.60));
  }
}

.brand{
  display:flex;
  align-items:baseline;
  gap:10px;
  font-weight:700;
  letter-spacing:-.02em;
}
.brand small{
  font-weight:600;
  color:var(--muted);
  letter-spacing:0;
}

.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background: rgba(255,255,255,.03);
}
@media (prefers-color-scheme: light){
  .pill{ background: rgba(15,23,42,.03); }
}
.pill.active{
  border-color: rgba(139,242,200,.55);
  box-shadow: 0 0 0 4px rgba(139,242,200,.10);
}
.dot{
  width:8px;height:8px;border-radius:99px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.hero{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
}
@media (prefers-color-scheme: light){
  .hero{ background: linear-gradient(180deg, rgba(15,23,42,.03), rgba(15,23,42,.01)); }
}
.hero h1{
  margin:0;
  font-size: 34px;
  letter-spacing: -0.03em;
}
.hero p{ margin:10px 0 0; color:var(--muted); max-width: 74ch; }
.hero .meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
  align-items:center;
}

.grid{
  display:grid;
  grid-template-columns: 1.4fr .6fr;
  gap:18px;
  margin-top:18px;
}
@media (max-width: 940px){
  .grid{ grid-template-columns: 1fr; }
}

.panel{
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius);
  padding: 16px;
}
@media (prefers-color-scheme: light){
  .panel{ background: rgba(15,23,42,.02); }
}

.panel h2{
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cats{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.cat{
  flex: 1 1 160px;
  min-width: 160px;
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
}
.cat b{ display:block; font-size: 14px; }
.cat span{ display:block; margin-top:6px; color:var(--muted); font-size: 13px; }

.searchRow{
  display:flex;
  gap:10px;
  align-items:center;
  margin: 10px 0 0;
}
input[type="search"]{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
}
@media (prefers-color-scheme: light){
  input[type="search"]{ background: rgba(255,255,255,.85); }
}
input[type="search"]:focus{
  box-shadow: 0 0 0 4px rgba(138,183,255,.14);
  border-color: rgba(138,183,255,.55);
}

.list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.card{
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px;
  background: rgba(0,0,0,.14);
}
@media (prefers-color-scheme: light){
  .card{ background: rgba(255,255,255,.70); }
}
.card h3{
  margin:0;
  font-size: 16px;
  letter-spacing:-.01em;
}
.card .sub{
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  color: var(--muted);
  font-size: 13px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.02);
}

.post{
  max-width: 820px;
  margin: 22px auto 0;
}
.postHeader{
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}
.postHeader h1{ margin:0; font-size: 28px; letter-spacing:-.02em; }
.postHeader .sub{ margin-top:10px; color:var(--muted); display:flex; flex-wrap:wrap; gap:10px; }
.postBody{
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0,0,0,.12);
}
@media (prefers-color-scheme: light){
  .postHeader{ background: rgba(15,23,42,.02); }
  .postBody{ background: rgba(255,255,255,.75); }
}
.postBody p{ margin: 0 0 12px; }
.postBody p:last-child{ margin-bottom:0; }

.footer{
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.footer a{ color: var(--text); }

