/* =====================================================
 *  components.css — per-card styling, modern edition
 * =================================================== */

.card { padding: clamp(22px, 2.6vw, 32px); }

.card .sp-title, .card .sp-artist, .card .sp-album,
.card .dc-name, .card .dc-custom,
.card .gh-name, .card .gh-bio,
.card .st-name, .card #st-state-text,
.card .ge-title, .card .ge-meta {
  transition: opacity .3s var(--ease), color .3s var(--ease);
}

#sp-art-img,
#dc-avatar,
#dc-act-img,
#st-avatar,
#st-ingame-img,
#gh-avatar {
  opacity: 0;
  transition: opacity .35s var(--ease);
}
#sp-art-img[src],
#dc-avatar[src],
#dc-act-img[src],
#st-avatar[src],
#st-ingame-img[src],
#gh-avatar[src] {
  opacity: 1;
}

/* ---------- Card head — JSX-style section labels ---------- */
.card-head {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;          /* clear the absolute card-tag (`// 0X — …`) at top-right */
  margin-bottom: 20px;
  position: relative;
}
.card-head h2 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1.2;
  position: relative;
  display: inline-flex;
  align-items: baseline;
}
.card-head h2::before { content: "<";  color: var(--text-faint); margin-right: 4px; transition: color var(--transition); }
.card-head h2::after  { content: " />"; color: var(--text-faint); transition: color var(--transition); }
.card:hover .card-head h2::before,
.card:hover .card-head h2::after { color: var(--accent); }

/* Animated underline that draws under the JSX header on card hover. */
.card-head h2 {
  background-image: linear-gradient(90deg, var(--accent), var(--accent-blue));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  padding-bottom: 4px;
  transition: background-size 0.4s var(--ease), color var(--transition);
}
.card:hover .card-head h2 { background-size: 100% 1.5px; }

/* =====================================================
 *  HERO
 * =================================================== */
.card--hero {
  padding: clamp(36px, 5vw, 72px);
  min-height: clamp(280px, 42vh, 460px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Subtle inner radial accent at top-left of the hero. */
.card--hero::after {
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(167, 139, 250, 0.10) 50%,
    transparent 62%
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  width: 100%;
}
.hero-text { min-width: 0; }

/* Hero name — huge, animated gradient. */
.hero-name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: var(--text);
  position: relative;
  display: flex;
  flex-wrap: wrap;
}

.hero-name .char {
  display: inline-block;
  white-space: pre;
  background-image: linear-gradient(
    120deg,
    #ffffff 0%,
    #c4b5fd 50%,
    #60a5fa 100%
  );
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: char-in 0.7s var(--ease) calc(0.4s + var(--i, 0) * 0.05s) both;
  text-shadow: 0 4px 24px rgba(167, 139, 250, 0.18);
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-name .char {
    background-image: none;
    -webkit-text-fill-color: currentColor;
  }
}

/* Glitch layers on hover, subtle. */
.hero-name::before,
.hero-name::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.hero-name:hover::before {
  opacity: 0.6;
  color: var(--accent-blue);
  clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
  animation: glitch-1 0.3s steps(2) forwards;
}
.hero-name:hover::after {
  opacity: 0.6;
  color: var(--accent);
  clip-path: polygon(0 55%, 100% 55%, 100% 75%, 0 75%);
  animation: glitch-2 0.3s steps(2) forwards;
}

.hero-tagline {
  margin-top: 26px;
  color: var(--text-muted);
  font-size: var(--text-lg);
  max-width: 52ch;
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.55;
}
.hero-tagline::before {
  content: '> ';
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
}

.hero-pills { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }

/* Hero avatar — bigger, glowing border, corner brackets. */
.hero-avatar {
  width: clamp(120px, 16vw, 220px);
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border-hover);
  box-shadow:
    inset 0 0 0 1px rgba(167, 139, 250, 0.30),
    0 16px 40px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(167, 139, 250, 0.20);
}
.hero-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  position: relative; z-index: 1;
}
.hero-avatar::before,
.hero-avatar::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid var(--accent);
  z-index: 2;
  pointer-events: none;
}
.hero-avatar::before { top: -1px;    left: -1px;  border-right: 0; border-bottom: 0; }
.hero-avatar::after  { bottom: -1px; right: -1px; border-left: 0;  border-top: 0;    }

@media (max-width: 640px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-avatar { justify-self: start; }
}

/* =====================================================
 *  SPOTIFY
 * =================================================== */
.card--spotify { position: relative; }
.sp-tint { display: none; opacity: 0.07; mix-blend-mode: color; }

.sp-live {
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 9px;
  background: rgba(167, 139, 250, 0.10);
  border-color: rgba(167, 139, 250, 0.30);
  color: var(--accent);
  opacity: 0;
  transition: opacity .3s;
}
.sp-live[data-playing="true"] { opacity: 1; }
.sp-live .dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: dot-pulse 1.4s ease-in-out infinite;
}

.sp-body { display: flex; gap: 16px; align-items: center; }
.sp-art {
  width: 84px; height: 84px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(167, 139, 250, 0.20);
}
.sp-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.sp-art img.on { opacity: 1; }
.sp-disc {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  animation: spin 4s linear infinite;
  animation-play-state: paused;
}

.sp-meta { min-width: 0; flex: 1; }
.sp-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-artist {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-album {
  color: var(--text-faint);
  font-size: 11px;
  margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* Progress bar with shimmer overlay. */
.sp-progress {
  margin-top: 18px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  position: relative;
  overflow: hidden;
}
.sp-progress > i {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent), var(--accent-cyan));
  border-radius: inherit;
  transition: width .3s linear;
  box-shadow: 0 0 8px var(--accent-glow);
}
.sp-times {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: 10.5px;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.card--spotify.idle .sp-progress > i {
  background: rgba(255, 255, 255, 0.08);
  animation: none;
  box-shadow: none;
}
.card--spotify.idle .sp-times { opacity: 0; }

.sp-waveform {
  display: none;
  gap: 3px; align-items: center; height: 24px;
  margin-top: 14px;
}
.card--spotify.idle .sp-waveform { display: flex; }
.sp-waveform i {
  width: 2.5px; height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  border-radius: 1px;
  transform-origin: center;
  animation: waveform 1.4s ease-in-out infinite;
  opacity: 0.7;
}
.sp-waveform i:nth-child(2) { animation-delay: .15s; }
.sp-waveform i:nth-child(3) { animation-delay: .30s; }
.sp-waveform i:nth-child(4) { animation-delay: .45s; }

/* =====================================================
 *  DISCORD
 * =================================================== */
.card--discord { display: flex; flex-direction: column; }
.card--discord .card-head { margin-bottom: 14px; }
.dc-body { display: flex; gap: 14px; align-items: center; }
.dc-avatar {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  position: relative;
  flex: 0 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: visible;
}
.dc-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.dc-statusdot {
  position: absolute; right: -3px; bottom: -3px;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--text-faint);
  color: transparent;
}
.dc-statusdot::after {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0;
  animation: status-ring 2.2s ease-out infinite;
}
.dc-statusdot.online  { background: #22c55e; color: #22c55e; box-shadow: 0 0 10px rgba(34, 197, 94, 0.6); }
.dc-statusdot.online::after  { opacity: 1; }
.dc-statusdot.idle    { background: #f59e0b; color: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
.dc-statusdot.idle::after    { opacity: 1; }
.dc-statusdot.dnd     { background: #ef4444; color: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }
.dc-statusdot.dnd::after     { opacity: 1; }
.dc-statusdot.offline { background: var(--text-faint); color: transparent; box-shadow: none; }

.dc-info { min-width: 0; flex: 1; }
.dc-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dc-custom {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dc-custom img { width: 14px; height: 14px; flex: 0 0 auto; }

.dc-activity {
  margin-top: 18px;
  margin-bottom: 14px;
  display: flex; gap: 12px; align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(21, 21, 46, 0.6);
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.dc-activity:hover {
  background: var(--surface-3);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.dc-activity .ai {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  flex: 0 0 auto;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}
.dc-activity .ai img { width: 100%; height: 100%; object-fit: cover; }
.dc-activity .ai.no-img {
  display: grid; place-items: center;
  background: var(--surface);
}
.dc-activity .ai.no-img::after {
  content: attr(data-letter);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-hover);
}
.dc-activity .at { min-width: 0; flex: 1; }
.dc-activity .an {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dc-activity .ad {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 3px;
  font-family: var(--font-display);
}

.dc-live {
  margin-top: auto;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 9px;
  opacity: 0.55;
  transition: opacity var(--transition), background var(--transition), border-color var(--transition);
}
.dc-live[data-connected="true"] {
  opacity: 1;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.40);
  color: var(--accent);
}
.dc-live .dot { background: var(--text-faint); box-shadow: none; }
.dc-live[data-connected="true"] .dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: dot-pulse 1.4s ease-in-out infinite;
}

/* =====================================================
 *  STEAM
 * =================================================== */
.card--steam { position: relative; }
.st-tint { display: none; }

.st-live {
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 9px;
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.40);
  color: var(--accent);
  font-family: var(--font-display);
}
.st-live .dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: dot-pulse 1.4s ease-in-out infinite;
}

.st-top {
  display: grid;
  grid-template-columns: auto 1fr minmax(0, 2fr);
  gap: 24px;
  align-items: center;
}
.st-recent { grid-column: 3; margin-top: 0; }
@media (max-width: 900px) {
  .st-top { grid-template-columns: auto 1fr; }
  .st-recent { grid-column: 1 / -1; margin-top: 14px; }
}
@media (max-width: 640px) { .st-top { grid-template-columns: 1fr; } }

.st-avatar {
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.st-avatar img { width: 100%; height: 100%; object-fit: cover; }
.st-info { min-width: 0; }
.st-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}
.st-state {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: 4px;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
}
.st-state .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: 0 0 6px currentColor;
}
.st-state.online  .dot { background: #22c55e; color: #22c55e; }
.st-state.in-game .dot { background: var(--accent); color: var(--accent); animation: dot-pulse 1.6s ease-in-out infinite; }

.st-recent {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
@media (max-width: 460px) { .st-recent { grid-template-columns: 1fr; } }

.st-recent .g {
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
  min-width: 0;
}
.st-recent .g:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: var(--surface-3);
}
.st-recent .g .cover {
  aspect-ratio: 460 / 215;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  position: relative;
}
.st-recent .g .cover.img-missing { background: var(--surface); }
.st-recent .g .cover.img-missing img { display: none; }
.st-recent .g .cover img { width: 100%; height: 100%; object-fit: cover; }
.st-recent .g .gn {
  font-size: 11.5px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-recent .g .gh {
  font-size: 10px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}

.st-ingame {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(220px, 1fr);
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-hover);
  background: var(--surface-2);
  box-shadow: 0 0 40px rgba(167, 139, 250, 0.10);
}
.st-ingame .ig-art { position: relative; overflow: hidden; }
.st-ingame .ig-art img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; display: block; background: var(--surface); }
.st-ingame.img-missing .ig-art img { display: none; }
.st-ingame.img-missing .ig-art {
  min-height: 200px;
  background: var(--surface);
}

.st-ingame .ig-info {
  padding: 18px 22px;
  display: flex; flex-direction: column;
  gap: 10px;
  border-left: 1px solid var(--border);
  min-width: 0;
}
.st-ingame .ig-info .st-badge {
  align-self: flex-start;
  font-size: 9px;
  letter-spacing: 0.18em;
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.40);
  color: var(--accent);
}
.st-ingame .ig-info .st-badge .dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: dot-pulse 1.4s ease-in-out infinite;
}
.st-ingame .ig-name {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.7vw, 24px);
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.st-ingame .ig-stats {
  margin-top: 4px;
  display: flex; flex-direction: column;
}
.st-ingame .ig-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.st-ingame .ig-row:last-child { border-bottom: 0; }
.st-ingame .ig-label {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-family: var(--font-display);
}
.st-ingame .ig-val {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-ingame .ig-cta {
  align-self: flex-start;
  margin-top: 4px;
  color: var(--accent);
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.40);
}
.st-ingame .ig-cta:hover {
  background: rgba(167, 139, 250, 0.20);
  border-color: var(--accent);
  color: var(--accent-hover);
}

@media (max-width: 900px) {
  .st-ingame { grid-template-columns: 1fr; }
  .st-ingame .ig-info { border-left: 0; border-top: 1px solid var(--border); }
}

.skel-card { opacity: .55; }

/* =====================================================
 *  GITHUB
 * =================================================== */
.gh-top {
  display: flex; gap: 14px; align-items: center;
  margin-bottom: 16px;
}
.gh-avatar {
  width: 60px; height: 60px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  flex: 0 0 auto;
  border: 1px solid var(--border);
}
.gh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gh-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.gh-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}
.gh-bio {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 48ch;
  line-height: 1.45;
}
.gh-loc { align-self: flex-start; font-size: 9.5px; }

.gh-pills { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.gh-repos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  flex: 1;                    /* fill remaining card height when paired */
  align-content: start;
}
.gh-repo {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(21, 21, 46, 0.55);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  min-height: 100px;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.gh-repo::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-blue));
  opacity: 0;
  border-radius: 0 2px 2px 0;
  transition: opacity var(--transition);
}
.gh-repo:hover {
  background: var(--surface-3);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.gh-repo:hover::before { opacity: 1; }

.gh-repo .rn {
  color: var(--accent-hover);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-display);
}
.gh-repo .rd {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gh-repo .rf {
  margin-top: auto;
  display: flex; align-items: center; gap: 14px;
  font-size: 10.5px;
  color: var(--text-faint);
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}
.gh-repo .lang { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); }
.gh-repo .lang i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lang, var(--accent-blue));
  box-shadow: 0 0 6px currentColor;
  color: var(--lang, var(--accent-blue));
}

/* GitHub activity feed */
.gh-activity { margin-top: 18px; }
.gh-col-title {
  font-size: 9.5px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 12px 2px;
  font-family: var(--font-display);
}
.gh-events { display: flex; flex-direction: column; gap: 1px; }
.gh-event {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
  position: relative;
  min-width: 0;
}
.gh-event:hover { background: var(--surface-2); transform: translateX(3px); }
.gh-event .ge-icon {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent);
  border: 1px solid rgba(167, 139, 250, 0.30);
  margin-top: 1px;
}
.gh-event .ge-icon svg { width: 12px; height: 12px; }
.gh-event .ge-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.gh-event .ge-title {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.gh-event .ge-meta {
  font-size: 10.5px;
  color: var(--text-faint);
  display: inline-flex; gap: 6px;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}
.gh-event .ge-repo { color: var(--text-muted); }
.gh-event .ge-sep  { opacity: .5; }

/* =====================================================
 *  STATS.FM
 * =================================================== */
.sfm-cta {
  margin-left: auto;
  color: var(--accent);
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.40);
}
.sfm-cta:hover {
  background: rgba(167, 139, 250, 0.22);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.sfm-hero {
  padding: 26px 20px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(167, 139, 250, 0.12), transparent 70%),
    var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.sfm-hero::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  width: 80px; height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-blue), transparent);
}
.sfm-hero .n {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 76px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, #ffffff 0%, #c4b5fd 50%, #60a5fa 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 4px 16px rgba(167, 139, 250, 0.20);
}
.sfm-hero .l {
  margin-top: 10px;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-weight: 700;
}
.sfm-sub {
  margin-top: 12px;
  display: inline-flex; gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}
.sfm-sub b { color: var(--text); font-weight: 700; }

.card--statsfm { container-type: inline-size; }
.sfm-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@container (max-width: 540px) { .sfm-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px)     { .sfm-grid { grid-template-columns: 1fr; } }
.sfm-col-title {
  font-size: 9.5px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px 8px;
  font-family: var(--font-display);
  font-weight: 700;
}
.sfm-list .item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  min-width: 0;
}
.sfm-list .item:hover { background: var(--surface-2); }
.sfm-list .rank {
  width: 18px; text-align: center;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 700;
}
.sfm-list .cover {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
}
.sfm-list .cover.round { border-radius: 50%; }
.sfm-list .cover img { width: 100%; height: 100%; object-fit: cover; }
.sfm-list .txt { min-width: 0; flex: 1; }
.sfm-list .t {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sfm-list .s {
  color: var(--text-faint);
  font-size: 10.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-display);
}
.sfm-list .plays { margin-left: auto; font-size: 9.5px; flex: 0 0 auto; }

.sfm-fallback { margin-top: 14px; display: flex; justify-content: center; }

/* =====================================================
 *  TERMINAL
 * =================================================== */
.card--terminal .tr-hint {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-faint);
  font-family: var(--font-display);
}
.card--terminal .tr-hint code {
  font-family: var(--font-display);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent);
  margin: 0 2px;
  border: 1px solid rgba(167, 139, 250, 0.20);
}

.tr-window {
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #050510 0%, #08081a 100%);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tr-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}
.tr-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.tr-dot--red    { background: #ff5f57; box-shadow: 0 0 6px rgba(255, 95, 87, 0.4); }
.tr-dot--yellow { background: #febc2e; box-shadow: 0 0 6px rgba(254, 188, 46, 0.4); }
.tr-dot--green  { background: #28c840; box-shadow: 0 0 6px rgba(40, 200, 64, 0.4); }
.tr-title {
  margin-left: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.tr-body {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.6;
  color: #d8d4f0;
  padding: 16px 18px;
  height: clamp(280px, 38vh, 440px);
  overflow-y: auto;
  overflow-x: hidden;
  cursor: text;
  display: flex;
  flex-direction: column;
}
.tr-body::-webkit-scrollbar       { width: 6px; }
.tr-body::-webkit-scrollbar-thumb { background: rgba(167, 139, 250, 0.25); border-radius: 3px; }

.tr-output { white-space: pre-wrap; word-break: break-word; }
.tr-output .tr-line { display: block; margin: 0; }
.tr-output .tr-accent      { color: var(--accent); }
.tr-output .tr-soft        { color: var(--accent-hover); }
.tr-output .tr-muted       { color: rgba(216, 212, 240, 0.55); }
.tr-output .tr-error       { color: #fca5a5; }
.tr-output .tr-warn        { color: #fde68a; }
.tr-output .tr-prompt-echo { color: var(--accent); }

.tr-input-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.tr-prompt {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
  text-shadow: 0 0 8px var(--accent-glow);
}
.tr-prompt .tr-path { color: var(--accent-blue); font-weight: 400; }
.tr-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #f0ecff;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  caret-color: var(--accent);
}
.tr-caret { display: none; }

@media (max-width: 560px) {
  .tr-body { font-size: 12px; padding: 14px; }
  .card--terminal .tr-hint { display: none; }
}
