/* TheFourth — shared styles */
:root {
  --bg: #09090b;
  --bg-soft: #101013;
  --card: #141417;
  --card-hover: #1a1a1f;
  --line: #27272d;
  --line-soft: #1e1e23;
  --fg: #fafafa;
  --fg-dim: #a1a1aa;
  --fg-faint: #6b6b76;
  --accent: #d4ff4f;
  --accent-dim: #96b82f;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand .mark {
  font-family: var(--mono);
  color: var(--bg);
  background: var(--accent);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 13px;
  font-weight: 700;
  position: relative;
  top: -1px;
}
.topbar nav { display: flex; gap: 20px; font-size: 14px; color: var(--fg-dim); }
.topbar nav a { text-decoration: none; }
.topbar nav a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 44px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.lede {
  margin: 0;
  max-width: 54ch;
  color: var(--fg-dim);
  font-size: clamp(16px, 2.2vw, 19px);
}

/* ---------- catalog ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 48px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.section-head .count { font-family: var(--mono); font-size: 13px; color: var(--fg-faint); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.card:hover {
  background: var(--card-hover);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-2px);
}
.card .icon { font-size: 22px; line-height: 1; }
.card h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 14px; color: var(--fg-dim); line-height: 1.5; }
.card .slug {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: -0.01em;
}
.card:hover .slug { color: var(--accent-dim); }
.card.is-soon { opacity: .45; cursor: default; }
.card.is-soon:hover {
  transform: none;
  background: var(--card);
  border-color: var(--line);
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}

.hint { font-size: 14px; color: var(--fg-faint); }

/* ---------- footer ---------- */
footer {
  margin-top: 80px;
  border-top: 1px solid var(--line-soft);
  padding: 28px 0 48px;
  color: var(--fg-faint);
  font-size: 13px;
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: var(--fg-dim); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ---------- contributor ---------- */
.bio .lede strong { color: var(--fg); font-weight: 600; }
.bio .links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 20px 0 0;
  font-family: var(--mono);
  font-size: 13px;
}
.bio .links a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.bio .links a:hover { border-bottom-color: var(--accent); }
