/* spacebunny dashboard
   Shares the game's palette and monospace voice: cyan on near-black, amber for
   emphasis, the same --mono stack. The game page keeps its own stylesheet. */

:root {
  --cyan: #7fe3ff;
  --cyan-dim: rgba(127, 227, 255, 0.55);
  --amber: #ffc46b;
  --ink: #e9f4fb;
  --muted: #8fa3b8;
  --bg: #04070c;
  --bg-raise: #070d16;
  --panel-bg: rgba(6, 12, 20, 0.5);
  --panel-edge: rgba(127, 227, 255, 0.16);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;

  /* A faint starfield so the page feels like the same place as the game. */
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, 0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 8%, rgba(255, 255, 255, 0.38) 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 62%, rgba(255, 255, 255, 0.32) 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 78%, rgba(255, 255, 255, 0.28) 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 41%, rgba(255, 255, 255, 0.22) 50%, transparent 51%),
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(127, 227, 255, 0.09), transparent 70%);
  background-repeat: no-repeat;
}

a { color: var(--cyan); }

/* ─────────────────────────  masthead  ───────────────────────── */

.masthead {
  border-bottom: 1px solid var(--panel-edge);
  padding: clamp(3.5rem, 9vw, 6.5rem) 1.5rem clamp(2.5rem, 6vw, 4rem);
}

.masthead-inner { max-width: var(--maxw); margin: 0 auto; }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--cyan-dim);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.masthead h1 {
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.masthead h1 span {
  color: var(--cyan);
  text-shadow: 0 0 28px rgba(127, 227, 255, 0.35);
}

.tagline {
  margin: 1.25rem 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.02rem;
}

/* ─────────────────────────  bands  ───────────────────────── */

.band {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem 0;
}

.band-head { margin-bottom: 2rem; }

.band-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.band-head h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  margin-top: 0.7rem;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.band-sub {
  margin: 1.1rem 0 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ─────────────────────────  cards  ───────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  background: var(--panel-bg);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* A class selector outranks the UA's [hidden] { display: none }, so filtering
   by setting card.hidden left every card on screen -- the hash updated, the
   counts looked right, and nothing was actually filtered. Restore the
   attribute's effect explicitly. */
.card[hidden] { display: none; }

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(127, 227, 255, 0.5);
  box-shadow: 0 14px 40px -18px rgba(127, 227, 255, 0.5);
  outline: none;
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #02050a;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover .card-thumb img { transform: scale(1.035); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.1rem 1.2rem 1.25rem;
  flex: 1;
}

.card-kicker {
  margin: 0;
  color: var(--amber);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  flex: 1;
}

.card-foot {
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.chip {
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(127, 227, 255, 0.2);
  border-radius: 999px;
  background: rgba(127, 227, 255, 0.07);
  color: var(--cyan-dim);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.card-metrics {
  color: rgba(143, 163, 184, 0.75);
  font-size: 0.7rem;
  white-space: nowrap;
}

/* featured card spans the full width and sits on its side */

.card-feature {
  flex-direction: row;
  align-items: stretch;
}

.card-feature .card-thumb {
  flex: 1 1 54%;
  aspect-ratio: auto;
}

.card-feature .card-body {
  flex: 1 1 46%;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 2.6rem);
  gap: 0.7rem;
}

.card-feature .card-title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.card-feature .card-desc { font-size: 0.95rem; max-width: 46ch; }

.card-meta {
  margin: 0.4rem 0 0;
  color: var(--cyan);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

@media (max-width: 720px) {
  .card-feature { flex-direction: column; }
  .card-feature .card-thumb { aspect-ratio: 16 / 10; }
}

/* ─────────────────────────  notes  ───────────────────────── */

.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.note {
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  background: var(--panel-bg);
}

.note h4 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

code {
  padding: 0.08em 0.36em;
  border-radius: 4px;
  background: rgba(127, 227, 255, 0.1);
  color: var(--cyan);
  font-size: 0.86em;
}

/* ─────────────────────────  footer  ───────────────────────── */

.foot {
  max-width: var(--maxw);
  margin: clamp(3.5rem, 8vw, 6rem) auto 0;
  padding: 2rem 1.5rem 3.5rem;
  border-top: 1px solid var(--panel-edge);
  color: rgba(143, 163, 184, 0.7);
  font-size: 0.84rem;
}

.foot p { margin: 0; }

/* ─────────────────────  project filters  ───────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.7rem;
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.filter:hover {
  color: var(--ink);
  border-color: rgba(127, 227, 255, 0.4);
}

.filter:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.filter.is-active {
  color: #04121a;
  border-color: var(--cyan);
  background: var(--cyan);
}

.filter-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  opacity: 0.65;
}

.filter.is-active .filter-count { opacity: 0.8; }

.empty-note {
  margin: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Fifty cards at the demo grid's width would run very long, so the projects
   grid is denser: a tighter column and a clamped description. */
.grid-projects {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.grid-projects .card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grid-projects .card-title { font-size: 0.98rem; }
