/* Pullshark — dark-first developer aesthetic. Light mode via prefers-color-scheme. */
@font-face {
  font-family: 'Chicago';
  src: url('fonts/ChicagoFLF.woff2') format('woff2');
  font-weight: normal; font-style: normal; font-display: swap;
}

:root {
  --bg: #0c0e12;
  --surface: #14171d;
  --surface-2: #181c23;
  --border: #232832;
  --border-strong: #303744;
  --text: #e7ebf0;
  --text-2: #aab2bf;
  --text-3: #6b7480;
  --accent: #f78166;        /* shark/coral accent */
  --accent-soft: #2a1a16;
  --up: #f78166;
  --star: #e3b341;
  --radius: 12px;
  --maxw: 760px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --border: #e6e8ec;
    --border-strong: #d4d8de;
    --text: #1a1e24;
    --text-2: #565d68;
    --text-3: #8a929c;
    --accent: #e0552f;
    --accent-soft: #fbece7;
    --up: #e0552f;
    --star: #b78400;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px 64px; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
  gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.brand-mark svg { width: 22px; height: 22px; display: block; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.1; }
.brand-tag { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.updated { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.updated .dot { width: 7px; height: 7px; border-radius: 50%; background: #3fb950; flex: none; }

/* Freshness banner */
.banner {
  display: none; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
.banner.show { display: flex; }

/* Tabs */
.tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  font-size: 13.5px; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  color: var(--text-2); background: transparent; border: 1px solid transparent;
  cursor: pointer; font-family: inherit;
}
.tab:hover { color: var(--text); background: var(--surface); }
.tab.active { color: var(--bg); background: var(--text); }
@media (prefers-color-scheme: light) { .tab.active { color: #fff; background: #1a1e24; } }
.tab-spacer { margin-left: auto; }

/* Category select */
.cat-select {
  font-family: inherit; font-size: 13px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 12px; cursor: pointer;
}

/* List */
.list { display: flex; flex-direction: column; gap: 10px; }
.card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 15px;
  transition: border-color .15s, transform .05s;
}
.card:hover { border-color: var(--border-strong); }
.rank { font-size: 15px; font-weight: 600; color: var(--text-3); width: 20px; text-align: center; flex: none; }
.thumb {
  width: 52px; height: 52px; border-radius: 10px; flex: none; object-fit: cover;
  background: var(--surface-2); border: 1px solid var(--border);
}
.body { flex: 1; min-width: 0; }
.title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.repo-name { font-size: 15.5px; font-weight: 600; letter-spacing: -0.2px; }
.repo-name:hover { color: var(--accent); }
.chip {
  font-size: 11px; font-weight: 500; padding: 2px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap;
}
.chip.new { background: #16341f; color: #4ac26b; }
@media (prefers-color-scheme: light) { .chip.new { background: #e6f5ec; color: #1a7f37; } }
.summary {
  font-size: 13.5px; color: var(--text-2); margin: 3px 0 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.meta { display: flex; align-items: center; gap: 15px; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.meta .lang { display: flex; align-items: center; gap: 6px; }
.lang-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--text-3); }
.meta .stars svg, .meta .topic svg { vertical-align: -2px; }
.meta .star-ico { color: var(--star); }

/* Upvote */
.upvote {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 60px; padding: 8px 0; border: 1px solid var(--border-strong);
  border-radius: 10px; background: var(--surface-2); color: var(--text);
  cursor: pointer; text-decoration: none; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.upvote:hover { border-color: var(--up); background: var(--accent-soft); }
.upvote svg { width: 18px; height: 18px; color: var(--up); }
.upvote .v { font-size: 15px; font-weight: 600; line-height: 1.2; }
.upvote .v.muted { color: var(--text-3); font-weight: 500; }
.upvote .label { font-size: 10px; color: var(--text-3); }

/* Empty / loading */
.note { text-align: center; color: var(--text-3); font-size: 14px; padding: 40px 0; }

/* Footer */
.site-footer {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--border);
  text-align: center; font-size: 12.5px; color: var(--text-3); line-height: 1.8;
}
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.chicago-font { font-family: 'Chicago', 'Geneva', sans-serif; letter-spacing: .5px; }
.credit a { color: inherit; text-decoration: none; transition: opacity .15s; opacity: .9; }
.credit a:hover { opacity: 1; }
