/* ==========================================================================
   GITHUB-FEED.CSS — Live GitHub Activity widget in the Building section.
   Logic in js/github.js. Reuses the .panel/.bracket-frame language already
   used by build-card and terminal-shell, so it reads as part of the same
   HUD system rather than a bolted-on box.
   ========================================================================== */

.github-feed{
  margin-top:var(--sp-m); padding:18px 20px;
  display:flex; flex-direction:column; gap:12px;
}
.github-feed[hidden]{ display:none; }

.github-feed-head{ display:flex; align-items:center; gap:10px; }
.github-feed-dot{
  width:7px; height:7px; border-radius:50%; background:var(--emerald);
  box-shadow:0 0 8px rgba(var(--emerald-rgb),.85);
  animation:blip 2.4s ease-in-out infinite;
}
.github-feed-title{
  font-size:.78rem; letter-spacing:.08em; text-transform:uppercase; color:var(--text-mute);
  margin:0; flex:1;
}
.github-feed-link{
  font-size:.72rem; color:var(--text-mute); text-decoration:none; transition:color .2s ease;
}
.github-feed-link:hover{ color:var(--accent); }

.github-feed-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:9px; }
.github-feed-item{
  display:flex; flex-wrap:wrap; align-items:baseline; gap:6px;
  font-size:.84rem; color:var(--text-dim);
}
.github-feed-item.is-loading{ color:var(--text-mute); font-family:var(--font-mono); font-size:.78rem; }
.github-feed-verb{ color:var(--text-dim); }
.github-feed-repo{
  color:var(--accent); text-decoration:none; font-weight:600;
  transition:color .4s ease;
}
.github-feed-repo:hover{ text-decoration:underline; }
.github-feed-time{ margin-left:auto; font-size:.68rem; color:var(--text-mute); }

@media (prefers-reduced-motion: reduce){
  .github-feed-dot{ animation:none; }
}

/* ==========================================================================
   GITHUB.JS upgrades — skeleton loader, stat counters, contribution graph,
   language bar, pinned-style repo cards. Reuses the same panel/mono
   language as the rest of the HUD.
   ========================================================================== */

/* ---- skeleton loader ---- */
.gh-skeleton{ display:flex; flex-direction:column; gap:14px; }
.gh-skeleton[hidden]{ display:none; }
.gh-skel-row, .gh-skel-stats span, .gh-skel-grid span{
  background:linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%);
  background-size:200% 100%;
  animation:gh-shimmer 1.4s ease-in-out infinite;
  border-radius:var(--radius-s);
}
.gh-skel-row{ height:14px; width:70%; }
.gh-skel-stats{ display:flex; gap:12px; }
.gh-skel-stats span{ height:44px; flex:1; }
.gh-skel-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.gh-skel-grid span{ height:80px; }
@keyframes gh-shimmer{ 0%{ background-position:200% 0; } 100%{ background-position:-200% 0; } }

/* ---- stat counters ---- */
.gh-stats-row{ display:flex; gap:18px; margin-bottom:4px; flex-wrap:wrap; }
.gh-stat{ display:flex; flex-direction:column; gap:2px; }
.gh-stat-num{ font-size:var(--fs-md); font-weight:600; color:var(--accent); line-height:1; }
.gh-stat-label{ font-size:.7rem; color:var(--text-mute); text-transform:uppercase; letter-spacing:.05em; }

/* ---- contribution graph ---- */
.gh-contrib-graph{
  display:grid; grid-auto-flow:column; grid-template-rows:repeat(7,1fr);
  gap:3px; overflow-x:auto; padding:6px 2px 10px; -webkit-overflow-scrolling:touch;
}
.gh-contrib-graph[hidden]{ display:none; }
.gh-contrib-cell{
  width:9px; height:9px; border-radius:2px; background:var(--panel-2);
  border:1px solid var(--border-soft); flex-shrink:0;
}
.gh-contrib-cell[data-level="1"]{ background:rgba(var(--accent-rgb),.28); border-color:transparent; }
.gh-contrib-cell[data-level="2"]{ background:rgba(var(--accent-rgb),.5); border-color:transparent; }
.gh-contrib-cell[data-level="3"]{ background:rgba(var(--accent-rgb),.75); border-color:transparent; }
.gh-contrib-cell[data-level="4"]{ background:var(--accent); border-color:transparent; box-shadow:0 0 6px rgba(var(--accent-rgb),.6); }

/* ---- language bar ---- */
.gh-lang-block{ display:flex; flex-direction:column; gap:8px; }
.gh-lang-bar{
  display:flex; width:100%; height:8px; border-radius:var(--radius-full);
  overflow:hidden; background:var(--panel-2);
}
.gh-lang-bar span{ height:100%; transition:width .6s var(--ease); }
.gh-lang-legend{ display:flex; flex-wrap:wrap; gap:10px 16px; }
.gh-lang-chip{
  display:inline-flex; align-items:center; gap:6px;
  font-size:.74rem; color:var(--text-dim); font-family:var(--font-mono);
}
.gh-lang-chip i{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.gh-lang-chip b{ color:var(--text); font-weight:600; }

/* ---- pinned-style repo cards ---- */
.gh-repo-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(200px,1fr));
  gap:12px; margin-top:4px;
}
.gh-repo-card{
  display:flex; flex-direction:column; gap:8px; padding:14px 16px;
  background:var(--panel-2); border:1px solid var(--border-soft);
  border-radius:var(--radius-m); text-decoration:none; color:var(--text);
  transition:transform .25s var(--ease), border-color .25s ease, box-shadow .25s ease;
}
.gh-repo-card:hover, .gh-repo-card:focus-visible{
  transform:translateY(-3px); border-color:var(--accent);
  box-shadow:0 12px 26px -14px rgba(var(--accent-rgb),.5);
}
.gh-repo-card-head{ display:flex; align-items:center; gap:8px; }
.gh-repo-icon{ color:var(--accent); font-size:.9rem; }
.gh-repo-name{ font-weight:600; font-size:.92rem; }
.gh-repo-desc{
  font-size:.78rem; color:var(--text-dim); line-height:1.5;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.gh-repo-meta{ display:flex; gap:12px; font-size:.72rem; color:var(--text-mute); font-family:var(--font-mono); align-items:center; }
.gh-repo-lang{ display:inline-flex; align-items:center; gap:5px; }
.gh-repo-lang i{ width:7px; height:7px; border-radius:50%; display:inline-block; }

@media (prefers-reduced-motion: reduce){
  .gh-skel-row, .gh-skel-stats span, .gh-skel-grid span{ animation:none; }
}
