/* Shared shell for the hub and its error pages.
   Palette is lifted from /jnl so the site reads as one thing. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #111;
  --bg2: #1a1a1a;
  --bg3: #222;
  --border: #2a2a2a;
  --text: #e0e0e0;
  --muted: #666;
  --muted2: #8a8a8a;
  --accent: #c8903f;
  --radius: 8px;
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

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

/* ── Header ── */

header {
  padding: 72px 0 40px;
}

h1 {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 .dot { color: var(--accent); }

.tagline {
  color: var(--muted2);
  margin-top: 12px;
  max-width: 46ch;
}

/* ── Sections ── */

main { flex: 1; padding-bottom: 64px; }

section { margin-bottom: 48px; }

h2 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

/* ── Project rows ── */

.project {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 12px;
  margin: 0 -12px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.12s ease;
}

.project:hover,
.project:focus-visible {
  background: var(--bg2);
  outline: none;
}

.project:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); }

.project .name {
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 130px;
}

.project:hover .name { color: var(--accent); }

.project .blurb {
  color: var(--muted2);
  font-size: 14px;
  flex: 1;
}

.project .src {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.project:hover .src { opacity: 1; }

/* Touch devices have no hover, so never hide the source label there. */
@media (hover: none) {
  .project .src { opacity: 1; }
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  font-size: 13px;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

/* ── 404 ── */

.notfound { padding: 96px 0 48px; }
.notfound .code {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 8px;
}

@media (max-width: 620px) {
  header { padding: 48px 0 32px; }
  .project { flex-direction: column; gap: 4px; }
  .project .name { min-width: 0; }
  .project .src { opacity: 1; }
}
