/* ============================================================
   MaShowMagic Portfolio — Bento widget internals
   ============================================================ */

/* ---------------- Buttons ---------------- */
.btn {
  font-family: var(--font-sans); font-weight: 600; font-size: 13px;
  border: 0; cursor: pointer; border-radius: var(--radius-pill);
  padding: 9px 16px; display: inline-flex; align-items: center; gap: 7px;
  transition: background var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out), color var(--dur) var(--ease-out);
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn svg { width: 15px; height: 15px; }

/* ---------------- Now playing ---------------- */
.np-body { display: flex; gap: 14px; align-items: center; margin-top: 8px; text-decoration: none; }
a.np-body:hover .np-track b { text-decoration: underline; text-underline-offset: 2px; }

.card.np { isolation: isolate; }
.card.np > *:not(.np-bg) { position: relative; z-index: 2; }
.np-bg {
  position: absolute; inset: -20%; z-index: 0;
  background-size: cover; background-position: center; pointer-events: none;
}

/* LIVE (Discord-style): full-bleed blurred art + dark scrim + white text */
.card.np-live .np-bg { inset: -20px; filter: blur(30px) saturate(1.3) brightness(0.7); transform: scale(1.18); opacity: 1; }
.np-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(165deg, rgba(8,10,14,0.45), rgba(8,10,14,0.82)); pointer-events: none; }
.card.np-live .np-bg.drift { animation: npdrift 26s var(--ease-out) infinite alternate; }
@keyframes npdrift {
  from { transform: scale(1.18) translate(-2%, -1.5%); }
  to   { transform: scale(1.3) translate(2%, 2%); }
}
.motion-off .np-bg.drift { animation: none; }
@media (prefers-reduced-motion: reduce) { .np-bg.drift { animation: none; } }

.np-brand { font-family: var(--font-sans); font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; gap: 7px; color: var(--fg-muted); }
.np-brand svg { color: var(--spotify); }
.np-brand.on { color: rgba(255,255,255,0.92); }
.np-brand.on svg { color: #1ed760; }

/* live horizontal layout: art left, info+progress right */
.np-live-grid { display: flex; gap: 16px; align-items: center; height: 100%; }
.card.np-live .np-art {
  width: clamp(84px, 13vw, 112px); aspect-ratio: 1; height: auto; flex: none; align-self: center;
  border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,0.5); background-color: rgba(255,255,255,0.06);
}
.np-art-link { display: block; }
.np-live-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.np-live-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.np-live-meta { text-decoration: none; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
a.np-live-meta:hover b { text-decoration: underline; text-underline-offset: 2px; }
.np-live-bottom { margin-top: 2px; }

.np-art {
  width: 80px; height: 80px; border-radius: 14px; flex: none; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #5865f2, #1db954);
}
.np-track { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card.np-live .np-live-meta b { color: #fff; }
.card.np-live .np-artist { color: rgba(255,255,255,0.85); }
.card.np-live .np-album { color: rgba(255,255,255,0.55); }
.np-track b, .np-live-meta b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 12.5px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-album { font-size: 11px; color: var(--fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.np-bar { height: 5px; border-radius: 4px; background: rgba(255,255,255,0.18); overflow: hidden; }
.card.np:not(.np-live) .np-bar { background: var(--surface-3); margin-top: 16px; }
.np-bar i { display: block; height: 100%; background: #1ed760; border-radius: 4px; transition: width 0.5s linear; }
.np-time { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; margin-top: 6px; color: rgba(255,255,255,0.72); font-variant-numeric: tabular-nums; }
.card.np:not(.np-live) .np-time { color: var(--fg-muted); }

/* IDLE / not listening */
.np-idle-body { display: flex; gap: 14px; align-items: center; margin-top: auto; }
.np-art-idle { display: grid; place-items: center; background: var(--surface-2); color: var(--fg-subtle); }
.np-idle .np-track b { font-size: 15px; font-weight: 700; }
.np-dot-off { width: 8px; height: 8px; border-radius: 999px; background: var(--fg-subtle); flex: none; }

.eq { display: flex; align-items: flex-end; gap: 2.5px; height: 15px; }
.eq i { width: 3px; background: #1ed760; border-radius: 2px; height: 4px; }
.eq.on i { animation: bounce 0.9s var(--ease-out) infinite; }
.eq i:nth-child(2){animation-delay:.2s}.eq i:nth-child(3){animation-delay:.45s}.eq i:nth-child(4){animation-delay:.1s}.eq i:nth-child(5){animation-delay:.3s}
@keyframes bounce { 0%,100%{height:4px} 50%{height:15px} }
.motion-off .eq.on i { animation: none; height: 9px; }
.np-play {
  width: 36px; height: 36px; border-radius: 999px; border: 0; cursor: pointer; flex: none;
  background: var(--spotify); color: #fff; display: grid; place-items: center;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.np-play:hover { transform: scale(1.1); }
.np-play:active { transform: scale(0.92); }
.np-play svg { width: 15px; height: 15px; }

/* ---------------- Weather ---------------- */
.wx-temp { font-family: var(--font-display); font-weight: 800; font-size: 40px; letter-spacing: -0.04em; color: var(--fg); margin-top: auto; line-height: 1; }
.wx-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--fg-muted); font-size: 12.5px; }
.wx-row svg { width: 14px; height: 14px; }
.wx-time { font-family: var(--font-mono); font-size: 11px; color: var(--fg-subtle); margin-top: 3px; letter-spacing: .04em; }
.wx-sun {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 999px;
  background: radial-gradient(circle, #ffd97a, #f0b232);
  box-shadow: 0 0 0 0 rgba(240,178,50,.5); animation: sunpulse 3.4s var(--ease-out) infinite;
}
@keyframes sunpulse { 0%,100%{box-shadow:0 0 22px 2px rgba(240,178,50,.35)} 50%{box-shadow:0 0 30px 8px rgba(240,178,50,.5)} }

/* ---------------- Discord widget ---------------- */
.card.dc { isolation: isolate; justify-content: space-between; overflow: hidden; }
.dc-banner {
  position: absolute; inset: -20px; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(34px) saturate(1.35) brightness(0.92);
  transform: scale(1.25); opacity: 0.5;
}
[data-theme="dark"] .dc-banner { opacity: 0.38; }
.dc-banner.drift { animation: npdrift 30s var(--ease-out) infinite alternate; }
.motion-off .dc-banner.drift { animation: none; }
@media (prefers-reduced-motion: reduce) { .dc-banner.drift { animation: none; } }
.dc-scrim {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(155deg, color-mix(in srgb, var(--blurple-500) 15%, var(--surface)) 0%, color-mix(in srgb, var(--surface) 88%, transparent) 72%);
}
.card.dc > *:not(.dc-banner):not(.dc-scrim) { position: relative; z-index: 1; }

.dc-top { display: flex; align-items: center; gap: 16px; }
.dc-ico-wrap { position: relative; flex: none; }
.dc-ico {
  width: 72px; height: 72px; border-radius: 22px; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--blurple-400), var(--blurple-600));
  box-shadow: 0 10px 26px rgba(88,101,242,0.42), 0 0 0 4px var(--surface);
}
.dc-ico-img { width: 100%; height: 100%; object-fit: cover; }
.dc-ico-ring {
  position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 999px;
  background: var(--status-online); border: 4px solid var(--surface); box-shadow: 0 0 0 0 rgba(35,165,90,.5);
  animation: pulse 2.4s var(--ease-out) infinite;
}
.motion-off .dc-ico-ring { animation: none; }

.dc-id { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.dc-server { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.03em; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-handle { font-family: var(--font-mono); font-size: 11px; color: var(--blurple-500); letter-spacing: .01em; }
[data-theme="dark"] .dc-handle { color: var(--blurple-400); }
.dc-stats { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 12.5px; color: var(--fg-muted); }
.dc-stats b { font-weight: 700; color: var(--fg); }
.dc-on { display: inline-flex; align-items: center; gap: 6px; }
.dc-sep { color: var(--fg-subtle); }
.dc-mem { white-space: nowrap; }

.dc-join {
  margin-left: auto; align-self: flex-start; flex: none; text-decoration: none;
  font-family: var(--font-sans); font-weight: 700; font-size: 14px; color: #fff;
  background: var(--blurple-500); border-radius: var(--radius-pill);
  padding: 11px 22px;
  box-shadow: 0 6px 16px rgba(88,101,242,0.4);
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.dc-join:hover { background: var(--blurple-600); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(88,101,242,0.5); }
.dc-join:active { transform: scale(0.95); }

.dc-foot { display: flex; align-items: center; gap: 14px; }
.dc-avis { display: flex; }
.dc-avis .av {
  width: 36px; height: 36px; border-radius: 999px; margin-left: -11px;
  border: 3px solid var(--surface); background-size: cover; background-position: center;
  background-color: var(--surface-3); box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: transform var(--dur) var(--ease-spring), margin var(--dur) var(--ease-out);
}
.card.dc:hover .dc-avis .av { margin-left: -5px; }
.dc-avis .av:first-child { margin-left: 0; }
.dc-more {
  width: 36px; height: 36px; border-radius: 999px; margin-left: -11px;
  border: 3px solid var(--surface); background: var(--surface-3);
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: var(--fg-muted);
}
.dc-foot-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-subtle); }

/* ---------------- Building / project ---------------- */
.proj h3 { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.025em; margin: 10px 0 0; color: var(--fg); }
.proj p { margin: 8px 0 0; font-size: 13px; color: var(--fg-muted); line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px; }
.tag.hot { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------------- Currently building (clickable project card) ---------------- */
.proj-card { text-decoration: none; color: inherit; }
.proj-card .proj-go { width: 16px; height: 16px; color: var(--fg-subtle); transition: transform var(--dur) var(--ease-spring), color var(--dur) var(--ease-out); }
.proj-card:hover .proj-go { transform: translate(2px, -2px); color: var(--accent); }
.proj-card .tags { margin-top: 14px; padding-top: 0; }
.proj-link {
  margin-top: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em;
  color: var(--accent); display: inline-flex; align-items: center; gap: 5px; width: fit-content;
}
.proj-link::before { content: "↗"; font-size: 12px; }
.proj-card:hover .proj-link { text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- GitHub profile card ---------------- */
/* GitHub card: let the graph fill remaining height (cancel head's auto-margin) */
.gh-card .card-head { margin-bottom: 12px; }
.gh-head-r { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }
.gh-head-r .flame { color: var(--kofi); width: 14px; height: 14px; }
.gh-user { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.gh-user b { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--fg); }
.gh-user span { font-family: var(--font-mono); font-size: 11px; color: var(--fg-subtle); }
.gh-stats { display: flex; gap: 22px; margin-top: 12px; }
.gh-stats .n { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--fg); letter-spacing: -0.02em; }
.gh-stats .l { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-subtle); margin-top: 1px; }
/* contribution graph — square cells (real GitHub look), fills card width */
.gh-graph {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 5px;
  margin-top: 18px;
  align-content: center;
  flex: 1; min-height: 0; overflow: hidden;
}
.gh-cell { aspect-ratio: 1; border-radius: 3px; background: var(--surface-3); }
.gh-cell.l1 { background: color-mix(in srgb, var(--spotify) 30%, var(--surface-3)); }
.gh-cell.l2 { background: color-mix(in srgb, var(--spotify) 55%, var(--surface-3)); }
.gh-cell.l3 { background: color-mix(in srgb, var(--spotify) 78%, var(--surface-3)); }
.gh-cell.l4 { background: var(--spotify); }
.motion-on .gh-cell { animation: ghpop 0.5s var(--ease-out) backwards; }
@keyframes ghpop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }

/* ---------------- Socials grid (fallback / unused in sidebar layout) ---------------- */
.soc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 10px; flex: 1; }
.soc {
  display: flex; flex-direction: column; gap: 8px; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-inner); padding: 12px;
  text-decoration: none; color: var(--fg);
  transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.soc:hover { background: var(--surface-3); transform: translateY(-2px); }
.soc img { width: 20px; height: 20px; }
.soc b { font-size: 12px; font-weight: 600; }
.soc span { font-family: var(--font-mono); font-size: 9px; color: var(--fg-subtle); }

/* ---------------- Photos ---------------- */
.photo { padding: 0; }
.photo .slot { flex: 1; display: grid; }
.ph-cap {
  position: absolute; left: 14px; bottom: 14px; z-index: 3;
  font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em;
  color: #fff; background: rgba(0,0,0,.42); backdrop-filter: blur(6px);
  padding: 5px 10px; border-radius: 999px; pointer-events: none;
}
/* posted photo (pulled from Photos page) */
.photo.posted { padding: 0; text-decoration: none; display: block; position: relative; }
.photo.posted .ph-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-slow) var(--ease-out); }
.photo.posted:hover .ph-img { transform: scale(1.05); }
.photo.posted .ph-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; flex-direction: column; gap: 2px;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.62), transparent);
  pointer-events: none;
}
.photo.posted .ph-title { color: #fff; font-weight: 600; font-size: 13px; letter-spacing: -0.01em; }
.photo.posted .ph-loc { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.8); }

/* ---------------- Blog ---------------- */
.blog-list { display: flex; flex-direction: column; margin-top: 8px; flex: 1; min-height: 0; justify-content: flex-start; overflow-y: auto; }
.blog-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: padding-left var(--dur) var(--ease-out);
}
.blog-item:last-child { border-bottom: 0; }
.blog-item:hover { padding-left: 8px; }
.blog-item:hover .blog-arrow { opacity: 1; color: var(--accent); transform: none; }
.blog-item b { font-size: 14.5px; font-weight: 600; color: var(--fg); letter-spacing: -0.01em; }
.blog-item .d { font-family: var(--font-mono); font-size: 10px; color: var(--fg-subtle); margin-top: 3px; }
.blog-arrow { opacity: .35; transition: opacity var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.blog-arrow svg { width: 16px; height: 16px; }

/* ---------------- Ko-fi support ---------------- */
.kofi-body { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.kofi-big { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--fg); }
.kofi-sub { font-size: 12.5px; color: var(--fg-muted); margin-top: 4px; }
.kofi-heart { display: inline-block; animation: beat 1.8s var(--ease-out) infinite; }
@keyframes beat { 0%,100%{transform:scale(1)} 18%{transform:scale(1.18)} 36%{transform:scale(1)} }

/* generic status big (shared) */
.status-big { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--fg); margin-top: auto; }
.status-sub { font-size: 12.5px; color: var(--fg-muted); margin-top: 4px; }

/* ---------------- Live Discord activity card ---------------- */
.act-card { position: relative; overflow: hidden; color: #fff; }
.act-bg {
  position: absolute; inset: -20px; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(26px) saturate(1.25) brightness(0.62);
  transform: scale(1.15);
}
.act-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(160deg, rgba(10,10,15,0.32), rgba(10,10,15,0.72)); }
.act-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.act-verb {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,0.82); display: inline-flex; align-items: center; gap: 6px;
}
.act-head .dot { box-shadow: 0 0 0 3px rgba(0,0,0,0.25); }
.act-body { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; margin-top: auto; }
.act-thumb { position: relative; width: 72px; height: 72px; flex: none; }
.act-thumb > img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45); background: rgba(255,255,255,0.08);
}
.act-thumb-fallback {
  width: 100%; height: 100%; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255,255,255,0.12); color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,0.45);
}
.act-thumb-fallback svg { width: 30px; height: 30px; }
.act-thumb-sm {
  position: absolute; right: -7px; bottom: -7px; width: 30px; height: 30px;
  border-radius: 999px; object-fit: cover; border: 3px solid rgba(20,20,28,0.95);
  background: #222;
}
.act-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.act-name { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-line { font-size: 12px; color: rgba(255,255,255,0.86); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-line.dim { color: rgba(255,255,255,0.6); }
.act-time {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 5px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .03em;
  color: rgba(255,255,255,0.9); font-variant-numeric: tabular-nums;
}
.act-time svg { width: 12px; height: 12px; }
.t-title { font-family: var(--font-sans); font-size: var(--fs-title); font-weight: 600; letter-spacing: -0.02em; color: var(--fg); }
