:root {
  --bg: #000000;
  --ink: #e9ecf3;
  --muted: #767f92;
  --line: rgba(233, 236, 243, 0.14);
  --surface: rgba(233, 236, 243, 0.035);
  --accent: #a9c7ff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  padding: 0 clamp(20px, 6vw, 80px) 80px;
  overflow-x: hidden;
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
}

/* ---------- custom cross cursor ---------- */

@media (hover: hover) and (pointer: fine) {
  body, a, button { cursor: none; }

  #cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity .2s ease, transform .12s ease;
  }
  #cursor.is-live { opacity: 1; }
  #cursor.is-hot { transform: rotate(45deg) scale(1.35); }
  #cursor.is-hot .cursor-bar { background: var(--accent); }

  .cursor-bar {
    position: absolute;
    background: var(--ink);
    top: 50%;
    left: 50%;
  }
  .cursor-bar--h { width: 100%; height: 1.5px; transform: translate(-50%, -50%); }
  .cursor-bar--v { height: 100%; width: 1.5px; transform: translate(-50%, -50%); }
}

@media not all and (hover: hover) {
  #cursor { display: none; }
}

/* ---------- masthead ---------- */

.masthead {
  padding: clamp(70px, 14vh, 150px) 0 0;
  max-width: 62ch;
}

.wordmark {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(56px, 13vw, 132px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin: 0;
}

.blurb {
  color: var(--muted);
  margin: 20px 0 0;
  max-width: 44ch;
}

/* ---------- tabs ---------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: clamp(40px, 7vh, 72px) 0 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.tab {
  font: inherit;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 2px;
  padding: 7px 13px;
  transition: color .18s ease, background .18s ease;
}

.tab:hover { color: var(--ink); background: var(--surface); }
.tab[aria-selected="true"] { color: var(--bg); background: var(--ink); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- grid ---------- */

.count {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 22px;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--bg);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
  transition: background .18s ease;
}

.card:hover { background: var(--surface); }

.card h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { color: var(--accent); }
.card h2 a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  flex: 1;
}

.meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.meta .kind { color: var(--accent); }

.empty {
  color: var(--muted);
  padding: 50px 0;
}

.empty code {
  color: var(--ink);
  font-size: 13px;
}

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

.foot {
  display: flex;
  justify-content: space-between;
  margin-top: 70px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
