/* oss.wesleymatos.dev — dark nebula theme, matched to wesleymatos.dev */

:root {
  --bg: #030209;
  --ink: rgb(178, 203, 246);
  --ink-dim: rgba(178, 203, 246, 0.66);
  --ink-faint: rgba(178, 203, 246, 0.42);
  --purple: rgb(130, 73, 169);
  --blue: rgb(100, 120, 255);
  --cyan: rgb(80, 200, 220);
  --gold: rgb(255, 224, 178);
  --card-bg: rgba(12, 9, 28, 0.62);
  --card-border: rgba(130, 73, 169, 0.35);
  --card-border-hover: rgba(100, 120, 255, 0.65);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* starfield canvas sits fixed behind everything */
canvas[data-starfield] { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.page {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

/* ---------- header ---------- */

.site-header { animation: arrive 0.9s ease-out both; }

.site-title {
  margin: 18px 0 6px;
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, #b4d2ff 0%, #8249a9 38%, #6478ff 68%, #50c8dc 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s linear infinite;
  text-shadow: none;
}

.site-subtitle {
  margin: 0 0 8px;
  max-width: 46ch;
  color: var(--ink-dim);
  font-size: 1.05rem;
}

.site-meta { color: var(--ink-faint); font-size: 0.85rem; }

/* ---------- controls ---------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 28px 0 8px;
}

#filter {
  flex: 1 1 240px;
  max-width: 420px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(12, 9, 28, 0.7);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#filter::placeholder { color: var(--ink-faint); }
#filter:focus {
  border-color: var(--card-border-hover);
  box-shadow: 0 0 14px rgba(100, 120, 255, 0.25);
}

#count { color: var(--ink-faint); font-size: 0.85rem; }

/* ---------- groups ---------- */

.group { margin-top: 44px; }

.group-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 4px;
  font-size: 1.3rem;
  font-weight: 650;
  text-shadow: 1px 1px 2px rgba(130, 73, 169, 0.55);
}

.group-count {
  color: var(--ink-faint);
  font-size: 0.8rem;
  font-weight: 400;
}

.group-blurb { margin: 0 0 16px; color: var(--ink-dim); font-size: 0.92rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* ---------- cards ---------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 16px 16px 13px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
  text-decoration: none;
  color: var(--ink);
  backdrop-filter: blur(3px);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--card-border-hover);
  box-shadow: 0 6px 24px rgba(100, 120, 255, 0.18), 0 0 0 1px rgba(100, 120, 255, 0.12);
}

.card.soon { border-style: dashed; }

.card-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  overflow-wrap: anywhere;
  text-shadow: 1px 1px 2px rgba(130, 73, 169, 0.55);
}

.card-desc {
  margin: 0;
  flex: 1;
  color: var(--ink-dim);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.card-desc:empty::before, .card-desc.null { content: "—"; color: var(--ink-faint); }

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(130, 73, 169, 0.45);
  background: rgba(130, 73, 169, 0.16);
  color: var(--ink-dim);
  white-space: nowrap;
}

.badge.soon {
  border-color: rgba(255, 224, 178, 0.4);
  background: rgba(255, 224, 178, 0.1);
  color: var(--gold);
}

.stars {
  font-size: 0.78rem;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 224, 178, 0.4);
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid rgba(130, 73, 169, 0.25);
  color: var(--ink-faint);
  font-size: 0.82rem;
}
.site-footer a { color: var(--ink-dim); }

/* ---------- animations ---------- */

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes arrive {
  0% { opacity: 0; transform: translateY(-14px); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .site-title { animation: none; }
  .site-header { animation: none; }
  .card { transition: none; }
}

/* ---------- narrow screens ---------- */

@media (max-width: 430px) {
  .page { padding: 28px 16px 56px; }
  .cards { grid-template-columns: 1fr; }
  .group { margin-top: 36px; }
}

/* ---------- full sections ---------- */

.sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.card-full { padding: 22px 22px 18px; border-radius: 16px; }
.card-full .card-name { font-size: 1.25rem; }

.card-purpose {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  max-width: 76ch;
}

.card-state {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.badge.state {
  border-color: rgba(100, 120, 255, 0.45);
  background: rgba(100, 120, 255, 0.12);
}

.state-note { color: var(--ink-faint); font-size: 0.8rem; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.star-btn, .site-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(100, 120, 255, 0.45);
  background: rgba(100, 120, 255, 0.1);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.star-btn:hover, .site-btn:hover {
  border-color: var(--card-border-hover);
  color: #ffb6e6;
  background: rgba(100, 120, 255, 0.16);
}

@media (max-width: 430px) {
  .card-actions { margin-left: 0; }
}
