/* ============================================================
   YATIN SHARMA — PORTFOLIO
   Dark glassmorphism · gradient orbs · grid bg · vanilla CSS
   ============================================================ */

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

/* UI chrome that shouldn't be selectable */
nav, .topbar-pill, .topbar-nav-icons, .tb-icon-btn, .topbar-divider,
.topbar-music-widget, .intro-overlay, .cmd-palette-overlay, .cmd-palette,
.hero-gradient-orb, .grid-bg, .click-splash, .click-splash-inner,
button, .btn-primary, .btn-ghost, .copy-btn, .quote-swap,
.skill-tab, .al-tab, .ama-sort-btn, .ama-vote-btn, .ama-react-btn, .ama-send,
.footer-bar, .footer-link, .footer-logo,
.presence-link, .presence-icon,
.orbit-item, .orbit-container,
.slide-player-panel, .sp-vinyl, .sp-controls, .sp-progress-bar,
.shortcut-overlay, .shortcut-card,
.achievement-toast, .cursor-glow, .scroll-progress-bar,
.back-to-top, .back-to-top-btn,
.project-dl-btn, .project-live-btn,
.pg-overlay, .pg-close {
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}

:root {
  --bg: #000000;
  --surface: #0c0c0c;
  --surface2: #141414;
  --white: #ffffff;
  --gray: #a1a1aa;
  --gray-dim: #52525b;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --glow: rgba(255,255,255,0.05);
  --grid: rgba(255,255,255,0.028);
  --accent: rgba(0,200,255,0.6);
  --accent2: rgba(120,90,255,0.5);
  --accent-solid: #00c8ff;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', system-ui, sans-serif;
  --radius-card: 28px;
  --radius-btn: 999px;
  --theme-transition: 0.35s;
  --maxw: 1080px;
}

/* ── LIGHT THEME ── */
html.light {
  --bg: #f0f0f8;
  --surface: #e8e8f2;
  --surface2: #dddde8;
  --white: #1a1a2e;
  --gray: #4a4a6a;
  --gray-dim: #8888aa;
  --border: rgba(80,80,140,0.14);
  --border-hover: rgba(80,80,140,0.32);
  --glow: rgba(100,80,220,0.06);
  --grid: rgba(100,80,200,0.08);
}

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

::selection { background: color-mix(in srgb, var(--accent-solid) 20%, transparent); }
/* F. Styled Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent), var(--accent2)); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
html { scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg); }

a { color: inherit; text-decoration: none; }

/* ============ MINI MUSIC PLAYER (Synthwave glass dock — theme-aware) ============ */
.mini-player {
  position: fixed; right: 16px; bottom: 16px; z-index: 900;
  width: 340px; max-width: calc(100vw - 32px);
  --mp-glass: rgba(12,12,12,0.45);
  --mp-fill: rgba(18,18,18,0.75);
  --mp-fill-h: rgba(18,18,18,0.85);
  --mp-line: rgba(255,255,255,0.08);
  border-radius: 20px; border: 1px solid rgba(255,255,255,0.08);
  background: var(--mp-glass);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  opacity: 0; transform: translateY(20px) scale(0.97); pointer-events: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.22,1,.36,1), box-shadow .5s ease;
}
.mini-player.open { opacity: 1; transform: none; pointer-events: auto; }
.mini-player.playing { box-shadow: 0 20px 60px rgba(0,0,0,0.5); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); }
.mini-player .mp-glass { position: relative; border-radius: 19px; overflow: hidden; padding: 14px 15px 16px; }
.mini-player .mp-glass::before { content: ""; position: absolute; inset: -40px; pointer-events: none; opacity: 0; background: radial-gradient(60% 60% at 22% 26%, color-mix(in srgb, var(--accent2) 45%, transparent), transparent 70%); filter: blur(26px); z-index: 0; }
.mini-player .mp-glass::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: repeating-linear-gradient(180deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 3px); z-index: 1; }
.mini-player .mp-backdrop { position: absolute; inset: -24px; background-size: cover; background-position: center; opacity: 0; filter: blur(30px) saturate(1.5); transition: opacity .4s ease; z-index: 0; }
.mini-player.expanded .mp-backdrop { opacity: .5; }
.mini-player .mp-head, .mini-player .mp-expand-panel, .mini-player .mp-track, .mini-player .mp-seek-row, .mini-player .mp-controls, .mini-player .mp-bottom { position: relative; z-index: 2; }

/* header: equalizer (hero) + now-playing label + expand/close */
.mini-player .mp-head { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.mini-player .mp-eq { display: flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.mini-player .mp-eq i { width: 3px; height: 4px; border-radius: 2px; background: linear-gradient(var(--accent-solid), var(--accent2)); opacity: .85; }
.mini-player.playing .mp-eq i { animation: mpEq .9s ease-in-out infinite; }
.mini-player .mp-eq i:nth-child(2){animation-delay:.12s}.mini-player .mp-eq i:nth-child(3){animation-delay:.28s}.mini-player .mp-eq i:nth-child(4){animation-delay:.42s}.mini-player .mp-eq i:nth-child(5){animation-delay:.2s}
@keyframes mpEq { 0%,100%{height:4px} 50%{height:16px} }
.mini-player .mp-now-label { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: var(--accent-solid); }
.mini-player .mp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-dim); transition: .3s; }
.mini-player.playing .mp-dot { background: var(--accent-solid); box-shadow: none; }
@keyframes mpPulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.mini-player .mp-head-sp { flex: 1; }
.mini-player .mp-mini-btn { width: 30px; height: 30px; border-radius: 9px; background: var(--mp-fill); color: var(--gray); }
.mini-player .mp-mini-btn:hover { color: var(--white); background: var(--mp-fill-h); }
.mini-player .mp-mini-btn svg { width: 15px; height: 15px; }
.mini-player .mp-close { font-size: 13px; }

/* expanded hero */
.mini-player .mp-expand-panel { text-align: center; padding: 2px 0 12px; display: none; }
.mini-player.expanded .mp-expand-panel { display: block; }
.mini-player.expanded .mp-track { display: none; }
.mini-player .mp-big-art { width: 148px; height: 148px; margin: 0 auto 12px; border-radius: 14px; background-size: cover; background-position: center; background-color: color-mix(in srgb, var(--accent-solid) 8%, #0b0b16); box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px var(--mp-line) inset; }
.mini-player .mp-big-title { font-size: 16px; font-weight: 700; color: var(--white); }
.mini-player .mp-big-artist { font-size: 12.5px; color: var(--gray); margin-top: 2px; }

/* compact track row */
.mini-player .mp-track { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.mini-player .mp-thumb { width: 54px; height: 54px; border-radius: 12px; flex-shrink: 0; background-size: cover; background-position: center; background-color: color-mix(in srgb, var(--accent-solid) 8%, #0b0b16); box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 0 0 1px var(--mp-line) inset; }
.mini-player .mp-bar-main { flex: 1; min-width: 0; }
.mini-player .mp-title { font-size: 14.5px; font-weight: 700; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player .mp-artist { font-size: 12.5px; color: var(--gray); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* seek */
.mini-player .mp-seek-row { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.mini-player .mp-time { font-family: var(--mono); font-size: 10px; color: var(--gray); flex-shrink: 0; font-variant-numeric: tabular-nums; min-width: 30px; }
.mini-player .mp-time-r { text-align: right; }
.mini-player .mp-seek-bar { position: relative; flex: 1; height: 9px; border-radius: 999px; background: var(--mp-fill-h); cursor: pointer; touch-action: none; }
/* Invisible extended hit area so the bar is easy to grab (esp. on touch). */
.mini-player .mp-seek-bar::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; bottom: -9px; }
.mini-player .mp-seek-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 999px; background: var(--accent-solid); box-shadow: none; }
/* Grab handle at the playhead. */
.mini-player .mp-seek-fill::after { content: ""; position: absolute; right: -7px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.35); transition: transform .15s ease; }
.mini-player .mp-seek-bar:hover .mp-seek-fill::after { transform: translateY(-50%) scale(1.2); }

/* controls */
.mini-player .mp-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 14px; }
.mini-player .mp-btn { border: none; background: transparent; flex-shrink: 0; display: grid; place-items: center; cursor: pointer; transition: transform .15s ease, color .2s ease, background .2s ease; }
.mini-player .mp-controls .mp-btn { width: 40px; height: 40px; border-radius: 50%; color: var(--white); }
.mini-player .mp-controls .mp-btn:hover { background: var(--mp-fill-h); transform: scale(1.07); }
.mini-player .mp-btn svg { width: 18px; height: 18px; fill: currentColor; }
.mini-player .mp-btn .material-symbols-outlined { font-size: 18px; }
.mini-player .mp-play { width: 54px; height: 54px; color: var(--white); background: rgba(255,255,255,0.06); border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.mini-player .mp-play:hover { color: var(--white); transform: scale(1.06); background: rgba(255,255,255,0.1); }
.mini-player .mp-play svg { width: 22px; height: 22px; }
.mini-player .mp-play .mp-icon-pause { display: none; }
.mini-player .mp-play.playing .mp-icon-play { display: none; }
.mini-player .mp-play.playing .mp-icon-pause { display: block; }
/* secondary controls (shuffle / repeat) */
.mini-player .mp-controls .mp-sec { width: 34px; height: 34px; color: var(--gray); }
.mini-player .mp-controls .mp-sec:hover { color: var(--white); background: var(--mp-fill-h); }
.mini-player .mp-controls .mp-sec.active { color: var(--accent-solid); }
.mini-player .mp-controls .mp-sec.active::after { content: ""; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--accent-solid); box-shadow: none; }
.mini-player .mp-sec { position: relative; }
.mini-player .mp-sec .material-symbols-outlined { font-size: 19px; }

/* volume + youtube */
.mini-player .mp-bottom { display: flex; align-items: center; gap: 11px; }
.mini-player .mp-vol-ic { font-size: 17px; color: var(--gray); flex-shrink: 0; display: grid; place-items: center; }
/* Native slider tinted with accent-color: the browser renders the filled
   track + thumb on the compositor, so dragging stays smooth (no per-input
   JS repaint of a gradient fill inside the blurred glass card). */
.mini-player .mp-vol-range { flex: 1; height: 6px; cursor: pointer; outline: none; accent-color: var(--accent-solid); }
.mini-player .mp-yt { width: 32px; height: 32px; border-radius: 9px; color: var(--gray); background: var(--mp-fill); text-decoration: none; }
.mini-player .mp-yt:hover { color: var(--white); background: var(--mp-fill-h); }
.mini-player .mp-yt .material-symbols-outlined { font-size: 16px; }
.mini-player .mp-expand svg { transition: transform .3s ease; }
.mini-player.expanded .mp-expand svg { transform: rotate(180deg); }

@media (max-width: 480px) { .mini-player { width: calc(100vw - 24px); right: 12px; bottom: 12px; } }

/* ---- light theme: frosted glass, softened neon ---- */
html.light .mini-player {
  --mp-glass: rgba(255,255,255,0.35);
  --mp-fill: rgba(70,70,120,0.06);
  --mp-fill-h: rgba(70,70,120,0.10);
  --mp-line: rgba(70,70,120,0.10);
  box-shadow: 0 20px 60px rgba(80,80,140,0.15);
}
html.light .mini-player.playing { box-shadow: 0 20px 60px rgba(80,80,140,0.15); border-color: color-mix(in srgb, var(--accent-solid) 22%, transparent); }
html.light .mini-player .mp-glass::before { opacity: 0; }
html.light .mini-player .mp-glass::after { display: none; }
html.light .mini-player .mp-play { color: var(--gray); }
html.light .mini-player .mp-big-art, html.light .mini-player .mp-thumb { background-color: color-mix(in srgb, var(--accent-solid) 10%, #e6e6f0); }
html.light .mini-player.expanded .mp-backdrop { opacity: .2; }

/* mini-player drag affordance + matching topbar widget */
.mini-player .mp-thumb, .mini-player .mp-title, .mini-player .mp-expand-panel, .mini-player .mp-big-art { cursor: grab; touch-action: none; }
.mini-player.dragging { user-select: none; -webkit-user-select: none; }
.mini-player.dragging .mp-thumb, .mini-player.dragging .mp-title, .mini-player.dragging .mp-expand-panel, .mini-player.dragging .mp-big-art { cursor: grabbing; }
/* Animated equalizer icon in the topbar music button (accent-aware).
   Five bars, each with its own multi-peak, irregular keyframe so the icon
   reacts like a real spectrum analyzer rather than a synced wave. Uses
   scaleY off a shared baseline (GPU-composited, so it stays smooth). */
.topbar-music-widget .tb-eq-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); height: 18px; display: flex; align-items: flex-end; gap: 2px; }
.topbar-music-widget .tb-eq-icon i { width: 3px; height: 18px; border-radius: 2px; background: linear-gradient(to top, var(--accent2), var(--accent-solid)); transform-origin: center bottom; transform: scaleY(.32); will-change: transform; }
/* Idle: calm, slow, low-amplitude shimmer with varied resting levels. */
.topbar-music-widget .tb-eq-icon i:nth-child(1) { animation: tbIdle1 2.3s ease-in-out infinite; }
.topbar-music-widget .tb-eq-icon i:nth-child(2) { animation: tbIdle2 2.8s ease-in-out infinite; }
.topbar-music-widget .tb-eq-icon i:nth-child(3) { animation: tbIdle3 1.9s ease-in-out infinite; }
.topbar-music-widget .tb-eq-icon i:nth-child(4) { animation: tbIdle4 2.5s ease-in-out infinite; }
.topbar-music-widget .tb-eq-icon i:nth-child(5) { animation: tbIdle5 2.15s ease-in-out infinite; }
@keyframes tbIdle1 { 0%,100% { transform: scaleY(.28); } 50% { transform: scaleY(.46); } }
@keyframes tbIdle2 { 0%,100% { transform: scaleY(.40); } 50% { transform: scaleY(.60); } }
@keyframes tbIdle3 { 0%,100% { transform: scaleY(.24); } 50% { transform: scaleY(.42); } }
@keyframes tbIdle4 { 0%,100% { transform: scaleY(.44); } 50% { transform: scaleY(.62); } }
@keyframes tbIdle5 { 0%,100% { transform: scaleY(.30); } 50% { transform: scaleY(.5); } }
/* Playing: taller, faster, irregular multi-peak motion per bar. */
.topbar-music-widget .tb-eq-icon.playing i { animation-timing-function: cubic-bezier(.4,0,.5,1); }
.topbar-music-widget .tb-eq-icon.playing i:nth-child(1) { animation: tbPlay1 .95s infinite; }
.topbar-music-widget .tb-eq-icon.playing i:nth-child(2) { animation: tbPlay2 .72s infinite; }
.topbar-music-widget .tb-eq-icon.playing i:nth-child(3) { animation: tbPlay3 1.08s infinite; }
.topbar-music-widget .tb-eq-icon.playing i:nth-child(4) { animation: tbPlay4 .82s infinite; }
.topbar-music-widget .tb-eq-icon.playing i:nth-child(5) { animation: tbPlay5 .64s infinite; }
@keyframes tbPlay1 { 0%,100% { transform: scaleY(.30); } 18% { transform: scaleY(.92); } 40% { transform: scaleY(.42); } 62% { transform: scaleY(1); } 82% { transform: scaleY(.5); } }
@keyframes tbPlay2 { 0%,100% { transform: scaleY(.5); } 22% { transform: scaleY(1); } 46% { transform: scaleY(.3); } 68% { transform: scaleY(.82); } 88% { transform: scaleY(.4); } }
@keyframes tbPlay3 { 0%,100% { transform: scaleY(.24); } 16% { transform: scaleY(.6); } 38% { transform: scaleY(.98); } 58% { transform: scaleY(.36); } 80% { transform: scaleY(.88); } }
@keyframes tbPlay4 { 0%,100% { transform: scaleY(.44); } 20% { transform: scaleY(.2); } 44% { transform: scaleY(.9); } 66% { transform: scaleY(.5); } 86% { transform: scaleY(.95); } }
@keyframes tbPlay5 { 0%,100% { transform: scaleY(.55); } 24% { transform: scaleY(1); } 50% { transform: scaleY(.34); } 74% { transform: scaleY(.9); } }
@media (prefers-reduced-motion: reduce) {
  .topbar-music-widget .tb-eq-icon i { animation: none !important; }
  .topbar-music-widget .tb-eq-icon i:nth-child(1) { transform: scaleY(.4); }
  .topbar-music-widget .tb-eq-icon i:nth-child(2) { transform: scaleY(.7); }
  .topbar-music-widget .tb-eq-icon i:nth-child(3) { transform: scaleY(1); }
  .topbar-music-widget .tb-eq-icon i:nth-child(4) { transform: scaleY(.62); }
  .topbar-music-widget .tb-eq-icon i:nth-child(5) { transform: scaleY(.44); }
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ── THEME TRANSITIONS ── */
body, .topbar-pill, .slide-player-panel, .glass-card, .interest-card,
.stat-card, .section-label, .gh-card, .skill-tab, .al-tab, .tag,
.tb-icon-btn, .topbar-divider, .topbar-music-widget, .intro-overlay {
  transition: background-color var(--theme-transition) ease,
              border-color var(--theme-transition) ease,
              color var(--theme-transition) ease,
              box-shadow var(--theme-transition) ease;
}

/* ============ BACKGROUND ============ */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, color-mix(in srgb, var(--accent-solid) 5%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(120,90,255,0.04) 0%, transparent 60%);
}
.hero-gradient-orb {
  position: fixed; inset: -50%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 20% 30%, rgba(0,220,200,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(120,80,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 45% 50% at 50% 80%, rgba(0,180,255,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 70% 60%, rgba(0,240,180,0.04) 0%, transparent 55%);
  filter: blur(80px);
  animation: helloGradient 16s ease-in-out infinite alternate;
}
@keyframes helloGradient {
  0%   { transform: translate(0%,0%) rotate(0deg) scale(1); }
  25%  { transform: translate(3%,-4%) rotate(15deg) scale(1.08); }
  50%  { transform: translate(-5%,3%) rotate(-10deg) scale(1.04); }
  75%  { transform: translate(4%,5%) rotate(20deg) scale(1.1); }
  100% { transform: translate(-3%,-3%) rotate(-5deg) scale(1.02); }
}

/* ============ CLICK SPLASH ============ */
.click-splash, .click-splash-inner {
  position: fixed; top: 0; left: 0; width: 8px; height: 8px;
  border-radius: 50%; pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%); opacity: 0;
}
/* Accent-synced ring */
.click-splash { border: 2px solid color-mix(in srgb, var(--accent-solid) 60%, transparent); }
.click-splash.animating { animation: splashRing 0.6s ease-out forwards; }
@keyframes splashRing {
  0% { width: 8px; height: 8px; opacity: 0.85; }
  100% { width: 80px; height: 80px; opacity: 0; }
}
/* Soft accent glow burst — the palette-synced tap/click glow (also fires on mobile taps) */
.click-splash-inner {
  width: 130px; height: 130px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-solid) 34%, transparent), transparent 62%);
}
.click-splash-inner.animating { animation: splashGlow 0.55s ease-out forwards; }
@keyframes splashGlow {
  0% { opacity: 0.7; transform: translate(-50%,-50%) scale(0.35); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.1); }
}

/* ============ INTRO OVERLAY ============ */
.intro-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 28px 32px 40px;
  transition: transform 0.55s cubic-bezier(0.32,0,0.67,0), opacity 0.4s ease;
  overflow: hidden;
}
/* Pointer-events kept active during dismiss animation — prevents click leak-through */
.intro-overlay.hidden { transform: translate3d(0,-110vh,0); opacity: 0; }

.intro-topbar {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 12px; color: var(--gray); letter-spacing: 0.05em;
}
.intro-status { display: flex; align-items: center; gap: 8px; }
.intro-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.intro-tag { color: var(--gray-dim); }

/* ── Glitch Name ── */
.intro-center { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.intro-name {
  display: flex; gap: 12px;
  font-family: var(--mono); font-size: clamp(48px, 10vw, 80px); font-weight: 700;
  letter-spacing: 0.12em; line-height: 1;
}
.intro-char {
  display: inline-block;
  color: var(--white);
  transition: transform 0.15s ease, color 0.1s ease;
  position: relative;
}
.intro-char.scrambling {
  color: var(--accent);
  text-shadow: 0 0 20px color-mix(in srgb, var(--accent-solid) 30%, transparent);
}
.intro-char.locked {
  color: var(--white);
  text-shadow: none;
  animation: charLock 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes charLock {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); color: #fff; text-shadow: 0 0 30px rgba(255,255,255,0.6); }
  100% { transform: scale(1); text-shadow: none; }
}
.intro-char.shattered {
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.55, 0, 1, 0.45), opacity 0.35s ease;
}

/* ── Progress Bar ── */
.intro-progress-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(320px, 60vw);
}
.intro-progress-bar {
  width: 100%; height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 1px; overflow: hidden;
}
.intro-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 1px;
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent-solid) 30%, transparent);
  transition: width 0.15s ease;
}
.intro-percent {
  font-family: var(--mono); font-size: 13px; color: var(--gray-dim);
  letter-spacing: 0.1em;
}

/* ── Designed By ── */
.intro-designed {
  font-family: var(--mono); font-size: 13px; color: var(--gray-dim);
  letter-spacing: 0.08em; opacity: 0;
  transition: opacity 0.6s ease;
}
.intro-designed.visible { opacity: 1; }
.intro-designed b { color: var(--white); }

/* ── Swipe Hint ── */
.intro-swipe-hint {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--gray); font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  opacity: 0; transition: opacity 0.5s ease;
}
.intro-overlay.hint-ready .intro-swipe-hint { opacity: 0.9; }
.swipe-icon { font-size: 22px; animation: swipeUp 1.8s ease-in-out infinite; }
@keyframes swipeUp { 0%,100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-8px); opacity: 1; } }

/* ============ TOPBAR PILL ============ */
.topbar-container {
  position: fixed; top: 16px; left: 0; right: 0;
  display: flex; justify-content: center; z-index: 1000; padding: 0 16px; pointer-events: none;
}
.topbar-pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: 4px;
  background: rgba(18,18,24,0.5);
  backdrop-filter: blur(56px) saturate(220%);
  -webkit-backdrop-filter: blur(56px) saturate(220%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-btn);
  padding: 5px 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
  max-width: 100%;
  overflow: visible;
}
html.light .topbar-pill {
  background: rgba(255,255,255,0.55);
  border-color: rgba(80,80,140,0.18);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
}
html.light .topbar-music-widget:hover { background: rgba(0,0,0,0.04); }
html.light .topbar-divider { background: rgba(80,80,140,0.15); }
html.light .tb-icon-btn:hover { background: rgba(0,0,0,0.06); color: var(--white); }
html.light .tb-icon-btn.active svg { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent-solid) 50%, transparent)); }

/* ── Topbar Mini CD Sleeve ── */
.tb-cd-sleeve {
  position: relative; width: 26px; height: 26px; flex-shrink: 0;
  overflow: visible;
  /* Extra right margin so disc doesn't overlap EQ bars */
  margin-right: 4px;
}
.tb-cd-cover {
  position: absolute; inset: 0; border-radius: 5px;
  background: url('assets/cover.jpg') center/cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  z-index: 2;
}
/* Cover slit on left edge */
.tb-cd-cover::after {
  content: ''; position: absolute;
  left: 0; top: 20%; bottom: 20%; width: 2px;
  background: rgba(0,0,0,0.3); border-radius: 1px;
}
.tb-cd-disc {
  position: absolute;
  top: 50%;
  width: 22px; height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--accent) 0 22%, transparent 22%),
    radial-gradient(circle at 50% 50%, #111 0 8%, transparent 8%),
    repeating-radial-gradient(circle at 50% 50%, #333 0 1px, #1a1a1a 1px 2px);
  border: 1px solid rgba(0,0,0,0.6);
  z-index: 1;
  /* PAUSED: fully inside sleeve — centered on cover */
  left: 50%;
  margin-left: -11px;
  transition: left 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              margin-left 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease;
  box-shadow: none;
}
/* Rainbow streak so spin is visible */
.tb-cd-disc::before {
  content: ''; position: absolute; inset: 2px; border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    color-mix(in srgb, var(--accent-solid) 18%, transparent) 30deg,
    rgba(120,80,255,0.15) 60deg,
    rgba(255,100,200,0.12) 90deg,
    transparent 120deg,
    transparent 360deg
  );
}
.tb-cd-disc::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 4px; height: 4px; margin: -2px 0 0 -2px;
  border-radius: 50%; background: #0a0a0e;
}
/* PLAYING: disc slides LEFT — peeks out from sleeve's left edge, spins */
#tb-music-disc.playing .tb-cd-disc {
  left: 0;
  margin-left: -8px;
  animation: miniSpin 3s linear infinite;
  box-shadow: -2px 0 8px color-mix(in srgb, var(--accent-solid) 30%, transparent);
}
@keyframes miniSpin { to { transform: rotate(360deg); } }
@keyframes refreshSpin { to { transform: rotate(180deg); } }

.topbar-music-widget {
  position: relative; width: 38px; height: 38px; border-radius: 11px;
  padding: 0; display: grid; place-items: center; overflow: hidden;
}
.topbar-music-widget:hover { background: rgba(255,255,255,0.06); }

.tb-eq-bars { display: none; gap: 2px; align-items: flex-end; height: 14px; }
.tb-eq-bars.playing { display: flex; }
.tb-eq-bars i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq 0.8s ease-in-out infinite; }
.tb-eq-bars i:nth-child(1) { height: 60%; animation-delay: 0s; }
.tb-eq-bars i:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.tb-eq-bars i:nth-child(3) { height: 40%; animation-delay: 0.3s; }
@keyframes eq { 0%,100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

.tb-track-meta { display: flex; flex-direction: column; line-height: 1.1; }
.tb-track-title { font-size: 12px; font-weight: 600; }
.tb-track-artist { font-size: 10px; color: var(--gray-dim); font-family: var(--mono); }

.topbar-divider { width: 1px; height: 22px; background: var(--border); }
.topbar-nav-icons { display: flex; align-items: center; gap: 2px; }
.tb-icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray); transition: all 0.2s ease;
}
.tb-icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--white); transform: translateY(-1px); }
.tb-icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.theme-toggle .icon-auto, .theme-toggle .icon-sun, .theme-toggle .icon-moon { display: none; }
.theme-toggle.mode-auto .icon-auto,
.theme-toggle.mode-light .icon-sun,
.theme-toggle.mode-dark .icon-moon { display: block; }

/* ============ SLIDE MUSIC PLAYER (Cyberpunk Glass) ============ */
.slide-player-panel {
  position: fixed; top: 0; right: 0; height: 100vh; width: 380px; max-width: 90vw;
  z-index: 900; overflow: hidden;
  padding: 70px 26px 30px;
  display: flex; flex-direction: column; gap: 24px;
  transform: translateX(100%); transition: transform 0.45s cubic-bezier(0.22,1,0.36,1);
  background: rgba(5, 5, 12, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-left: 1px solid color-mix(in srgb, var(--accent-solid) 10%, transparent);
}
.slide-player-panel.open { transform: translateX(0); }

.sp-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.6);
  font-size: 14px; backdrop-filter: blur(10px); transition: all 0.18s ease;
}
.sp-close:hover { background: color-mix(in srgb, var(--accent-solid) 10%, transparent); border-color: var(--accent); color: #fff; transform: rotate(90deg); }

/* ── Full Player: CD Sleeve Stage ── */
.sp-art-stage { display: flex; justify-content: center; align-items: center; padding: 20px 0 10px; position: relative; overflow: visible; }
.sp-vinyl-glow {
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-solid) 8%, transparent), transparent 65%);
  opacity: 0; transition: opacity 0.6s ease; filter: blur(30px); z-index: 0;
  left: 10px; top: 10px;
}
.slide-player-panel.playing .sp-vinyl-glow { opacity: 1; }

.sp-cd-sleeve {
  position: relative; width: 200px; height: 200px; z-index: 1;
}
.sp-cd-cover {
  position: absolute; inset: 0; border-radius: 16px;
  background: url('assets/cover.jpg') center/cover;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(255,255,255,0.08);
  z-index: 2;
  /* Subtle 3D depth on the cover */
  border: 1px solid rgba(255,255,255,0.05);
}
/* Cover slit — a thin dark line on the left edge to look like the opening */
.sp-cd-cover::after {
  content: ''; position: absolute;
  left: 0; top: 15%; bottom: 15%; width: 3px;
  background: rgba(0,0,0,0.4);
  border-radius: 2px 0 0 2px;
}

.sp-cd-disc {
  position: absolute; top: 50%;
  width: 180px; height: 180px; margin-top: -90px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--accent) 0 12%, color-mix(in srgb, var(--accent-solid) 30%, transparent) 13%, transparent 14%),
    radial-gradient(circle at 50% 50%, #05050a 0 3.5%, transparent 4%),
    repeating-radial-gradient(circle at 50% 50%, #1e1e1e 0 1px, #0d0d0d 1px 2.5px);
  border: 2px solid rgba(0,0,0,0.7);
  box-shadow:
    inset 0 0 25px rgba(0,0,0,0.8);
  z-index: 1;
  /* PAUSED: fully inside sleeve — centered on cover */
  left: 50%;
  margin-left: -90px;
  transition: left 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              margin-left 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease;
}
/* Iridescent rainbow reflection — like light hitting a real spinning CD */
.sp-cd-disc::before {
  content: ''; position: absolute; inset: 4px; border-radius: 50%; z-index: 3;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    color-mix(in srgb, var(--accent-solid) 12%, transparent) 20deg,
    rgba(80,160,255,0.15) 50deg,
    rgba(120,80,255,0.12) 80deg,
    rgba(200,60,255,0.10) 110deg,
    rgba(255,80,180,0.08) 140deg,
    transparent 170deg,
    transparent 240deg,
    color-mix(in srgb, var(--accent-solid) 6%, transparent) 280deg,
    rgba(120,80,255,0.05) 320deg,
    transparent 360deg
  );
  mix-blend-mode: screen;
}
.sp-cd-label {
  position: absolute; inset: 26%; border-radius: 50%; z-index: 4;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-solid) 30%, transparent), rgba(120,80,255,0.25));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-solid) 18%, transparent), inset 0 0 10px rgba(0,0,0,0.25);
}
.sp-cd-label::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: #05050a;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent-solid) 40%, transparent), 0 0 6px rgba(0,0,0,0.6);
}

/* PLAYING: CD slides LEFT — peeks out from cover's left edge, spins */
.sp-cd-disc.playing {
  left: 0;
  margin-left: -50px;
  animation: cdSpin 4s linear infinite;
  box-shadow:
    -2px 0 10px rgba(0,0,0,0.3),
    inset 0 0 25px rgba(0,0,0,0.8);
}
@keyframes cdSpin { to { transform: rotate(360deg); } }

/* Shadow on cover where the CD emerges */
.sp-cd-cover::before {
  content: ''; position: absolute;
  left: -6px; top: 12%; bottom: 12%; width: 12px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.15));
  border-radius: 4px 0 0 4px;
  opacity: 0; transition: opacity 0.4s ease 0.15s;
}
.slide-player-panel.playing .sp-cd-cover::before { opacity: 1; }

/* Track Info */
.sp-track-info { text-align: center; margin-top: 10px; }
.sp-now-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.3em; color: var(--accent); margin-bottom: 8px; text-transform: uppercase; }
.sp-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: #fff; }
.sp-artist { font-size: 12px; color: rgba(255,255,255,0.5); font-family: var(--mono); margin-top: 4px; }

/* Minimalist Neon Progress */
.sp-progress { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.sp-progress-bar { height: 2px; background: rgba(255,255,255,0.1); border-radius: 2px; cursor: pointer; position: relative; }
.sp-progress-fill { height: 100%; width: 0%; background: var(--accent-solid); border-radius: 2px; position: relative; transition: width 0.15s linear; box-shadow: none; }
.sp-progress-fill::after {
  content: ''; position: absolute; right: 0; top: 50%; transform: translate(50%, -50%);
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.sp-times { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.05em; }

/* Massive Play Button */
.sp-controls { display: flex; align-items: center; justify-content: center; margin-top: 10px; }
.sp-play-btn {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.sp-play-btn:hover { 
  transform: scale(1.05); 
  background: color-mix(in srgb, var(--accent-solid) 8%, transparent); 
  border-color: var(--accent); 
}
.sp-play-btn svg { width: 28px; height: 28px; fill: currentColor; filter: none; }
.sp-icon-pause { display: none; }
.slide-player-panel.playing .sp-icon-play { display: none; }
.slide-player-panel.playing .sp-icon-pause { display: block; }

/* Minimal Footer (Volume + YT) */
/* Volume + YT link (above play button) */
.sp-toolbar { display: flex; align-items: center; gap: 15px; padding-top: 4px; }
.sp-vol-slider { flex: 1; -webkit-appearance: none; appearance: none; height: 2px; border-radius: 2px; background: rgba(255,255,255,0.15); outline: none; }
.sp-vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.sp-vol-slider::-moz-range-thumb { width: 12px; height: 12px; border: none; border-radius: 50%; background: #fff; cursor: pointer; }
.sp-yt-link { display: flex; align-items: center; color: rgba(255,255,255,0.4); transition: color 0.2s ease; }
.sp-yt-link:hover { color: #ff6b6b; }
.sp-yt-link svg { width: 20px; height: 20px; fill: currentColor; }

.yt-host {
  position: fixed; left: -9999px; top: 0;
  width: 320px; height: 180px; opacity: 0; pointer-events: none;
}

/* ============ SITE-WIDE PARTICLES ============ */
.site-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.4; }
html.light .site-particles { opacity: 0.8; }
.hero-inner { position: relative; z-index: 2; }
/* ============ HERO TERMINAL ============ */
.hero-terminal { max-width: 480px; margin: 0 auto 28px; text-align: left; background: rgba(8,8,12,0.7); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; overflow: hidden; backdrop-filter: blur(8px); }
.term-dots { display: flex; gap: 6px; padding: 10px 14px; background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.06); }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; }
.term-dots i:nth-child(1) { background: #ff5f57; }
.term-dots i:nth-child(2) { background: #febc2e; }
.term-dots i:nth-child(3) { background: #28c840; }
.term-body { padding: 14px 16px; font-family: var(--mono); font-size: 13px; min-height: 48px; }
.term-line { color: #34d399; }
.term-line .term-cmd { color: var(--accent); }
.term-caret { color: var(--accent); animation: caretBlink 1s step-end infinite; }
/* ============ TECH ORBIT ============ */
.orbit-section { display: flex; justify-content: center; margin-top: 48px; padding: 20px 0; }
.orbit-wrap { position: relative; width: 260px; height: 260px; }
.orbit-core { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: flex; align-items: center; justify-content: center; font-size: 30px; color: #000; z-index: 2; box-shadow: 0 0 30px color-mix(in srgb, var(--accent-solid) 40%, transparent); }
.orbit-ring { position: absolute; inset: 0; animation: orbitSpin 30s linear infinite; }
@keyframes orbitSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes orbitCounterSpin { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
.orbit-item {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px;
  background: rgba(18,18,24,0.8); border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  backdrop-filter: blur(8px); box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  /* Counter-rotate so the text stays upright while revolving */
  animation: orbitCounterSpin 30s linear infinite;
}
/* ============ ANIME BANNER ============ */
.al-banner { display: flex; gap: 16px; align-items: center; padding: 14px; margin-bottom: 18px; border-radius: 16px; border: 1px solid var(--border); background: linear-gradient(135deg, color-mix(in srgb, var(--accent-solid) 6%, transparent), rgba(120,80,255,0.04)); }
.al-banner-img { width: 60px; height: 84px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.al-banner-info { flex: 1; min-width: 0; }
.al-banner-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; color: #34d399; margin-bottom: 4px; }
.al-banner-label[data-status="current"] { color: #3b82f6; }
.al-banner-label[data-status="watching"] { color: #3b82f6; }
.al-banner-label[data-status="completed"] { color: #34d399; }
.al-banner-label[data-status="rewatching"] { color: #a78bfa; }
.al-banner-label[data-status="repeating"] { color: #a78bfa; }
.al-banner-label[data-status="planning"] { color: #f59e0b; }
.al-banner-label[data-status="paused"] { color: #fb923c; }
.al-banner-label[data-status="dropped"] { color: #f87171; }
.al-banner-title { font-size: 16px; font-weight: 700; }
.al-banner-progress { font-family: var(--mono); font-size: 11px; color: var(--gray); margin-top: 4px; }
/* 39. Banner rotation fade + position dots */
.al-banner { position: relative; transition: opacity 0.2s ease; }
.al-banner.al-banner-fading { opacity: 0; }
.al-banner-dots { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 5px; }
.al-banner-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.25); transition: background 0.2s ease, transform 0.2s ease; }
.al-banner-dots span.on { background: var(--accent, #00c8ff); transform: scale(1.25); }
/* 33. Shareable AMA answer cards */
.ama-share-btn { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--gray); cursor: pointer; transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease; }
.ama-share-btn:hover { color: var(--white); border-color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 8%, transparent); }
.ama-share-btn .material-symbols-outlined { font-size: 18px; }
.ama-share-modal { position: fixed; inset: 0; z-index: 2400; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ama-share-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.ama-share-dialog { position: relative; z-index: 1; width: min(680px, 100%); max-height: 92vh; overflow-y: auto; padding: 20px; border-radius: 18px; border: 1px solid var(--border); background: var(--card, rgba(16,16,22,0.98)); box-shadow: 0 24px 70px rgba(0,0,0,0.55); }
.ama-share-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--white); cursor: pointer; font-size: 14px; }
.ama-share-x:hover { background: rgba(255,255,255,0.1); }
.ama-share-canvas { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); }
.ama-share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ama-share-action { display: inline-flex; align-items: center; gap: 7px; padding: 11px 18px; border-radius: 11px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--white); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color 0.16s ease, background 0.16s ease; }
.ama-share-action:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 8%, transparent); }
.ama-share-action .material-symbols-outlined { font-size: 18px; }
.ama-share-action.copied { border-color: #34d399; color: #34d399; }
/* 57. Ask-my-portfolio AI chatbot */
/* A class-level `display` overrides the [hidden] attribute, which would leave
   these overlays invisibly capturing pointer events. Force hidden = gone. */
.pchat-panel[hidden], .accent-popover[hidden], .ama-share-modal[hidden], .ama-send-spinner[hidden],
.pchat-fab-badge[hidden], .pchat-scroll-btn[hidden] { display: none !important; }
.pchat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 1500; width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center; color: #000; background: linear-gradient(135deg, var(--accent-solid), var(--accent2)); box-shadow: 0 8px 26px color-mix(in srgb, var(--accent-solid) 30%, rgba(0,0,0,0.4)); transition: transform 0.18s ease, opacity 0.18s ease; }
.pchat-fab:hover { transform: translateY(-2px) scale(1.05); }
.pchat-fab.hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }
.pchat-fab .material-symbols-outlined { font-size: 26px; font-variation-settings: 'FILL' 1, 'wght' 400, 'opsz' 24; }

/* FAB unread badge */
.pchat-fab-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 10px; background: #ef4444; color: #fff;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(239,68,68,0.5);
  animation: pchatBadgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pchatBadgePop { from { transform: scale(0); } to { transform: scale(1); } }

/* Panel with gradient border glow */
.pchat-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 1501;
  width: min(400px, calc(100vw - 32px)); height: min(580px, calc(100vh - 40px));
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: rgba(12,12,12,0.45); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  opacity: 0; transform: translateY(16px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px color-mix(in srgb, var(--accent-solid) 8%, transparent);
}
.pchat-panel.open {
  opacity: 1; transform: translateY(0) scale(1);
  box-shadow: 0 24px 70px rgba(0,0,0,0.6), 0 0 40px color-mix(in srgb, var(--accent-solid) 6%, transparent), 0 0 0 1px color-mix(in srgb, var(--accent-solid) 15%, transparent);
}

/* Header */
.pchat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.pchat-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pchat-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; flex-shrink: 0; }
.pchat-status {
  font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--gray-dim);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 8px; margin-left: 4px;
}
.pchat-head-actions { display: flex; gap: 6px; align-items: center; }
.pchat-clear {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04);
  color: var(--white); cursor: pointer; font-size: 11px; font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.pchat-clear .material-symbols-outlined { font-size: 15px; }
.pchat-clear:hover { background: rgba(255,255,255,0.1); border-color: var(--border-hover); }
.pchat-close {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.04); color: var(--white); cursor: pointer;
  display: grid; place-items: center; transition: background 0.15s ease, border-color 0.15s ease;
}
.pchat-close:hover { background: rgba(255,255,255,0.1); border-color: var(--border-hover); }
.pchat-close { font-size: 16px; }

/* Chat log */
.pchat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.pchat-log::-webkit-scrollbar { width: 4px; }
.pchat-log::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Message entrance animation */
@keyframes pchatMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Messages */
.pchat-msg {
  max-width: 85%; padding: 10px 14px; border-radius: 16px;
  font-size: 13.5px; line-height: 1.55;
  white-space: pre-wrap; word-wrap: break-word;
  animation: pchatMsgIn 0.25s ease both;
}
.pchat-msg a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.pchat-msg strong, .pchat-msg b { font-weight: 700; }
.pchat-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent, #00c8ff), var(--accent2, #7a5aff));
  color: #fff; border-bottom-right-radius: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.pchat-user a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255,255,255,0.7);
  font-weight: 600;
}
.pchat-user a:hover {
  text-decoration-color: #fff;
}
.pchat-user .pchat-msg-meta {
  color: rgba(255,255,255,0.7);
}
.pchat-bot-wrap {
  display: flex; gap: 8px; align-items: flex-start;
  max-width: 85%; animation: pchatMsgIn 0.25s ease both;
}
.pchat-bot-avatar {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: color-mix(in srgb, var(--accent-solid) 15%, transparent);
  display: grid; place-items: center;
}
.pchat-bot-avatar .material-symbols-outlined {
  font-size: 16px; color: var(--accent); font-variation-settings: 'FILL' 1, 'wght' 500, 'opsz' 20;
}
.pchat-bot-bubble {
  flex: 1; min-width: 0;
  background: rgba(18,18,18,0.75); border: 1px solid rgba(255,255,255,0.06);
  padding: 10px 14px; border-radius: 16px; border-bottom-left-radius: 4px;
  font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word;
}
.pchat-bot-bubble a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Message meta (timestamp + copy) */
.pchat-msg-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px; opacity: 0.5; font-family: var(--mono); font-size: 10px; color: var(--gray-dim);
}
.pchat-msg-time { flex: 1; }
.pchat-copy-btn {
  background: none; border: none; color: var(--gray-dim); cursor: pointer;
  padding: 2px; border-radius: 4px; display: grid; place-items: center;
  transition: color 0.15s ease, background 0.15s ease; opacity: 0;
}
.pchat-bot-wrap:hover .pchat-copy-btn { opacity: 1; }
.pchat-copy-btn:hover { color: var(--accent); background: rgba(255,255,255,0.06); }
.pchat-copy-btn .material-symbols-outlined { font-size: 14px; }

/* Typing indicator */
.pchat-typing-wrap { display: flex; gap: 8px; align-items: flex-start; max-width: 85%; animation: pchatMsgIn 0.25s ease both; }
.pchat-typing-bubble {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  padding: 10px 14px; border-radius: 16px; border-bottom-left-radius: 4px;
  flex: 1;
}
.pchat-typing-text { font-size: 13px; color: var(--gray); }
.pchat-typing-dots { display: flex; gap: 3px; }
.pchat-typing-dots span {
  width: 5px; height: 5px; border-radius: 50%; background: var(--gray);
  animation: pchatBlink 1.2s infinite ease-in-out;
}
.pchat-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.pchat-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pchatBlink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* Error + retry */
.pchat-msg-error { color: #ff6b6b; }
.pchat-msg-error .pchat-bot-bubble { border-color: rgba(255,107,107,0.3) !important; }
.pchat-retry-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px; padding: 4px 10px; border-radius: 8px;
  border: 1px solid rgba(255,107,107,0.3); background: rgba(255,107,107,0.06);
  color: #ff6b6b; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease;
}
.pchat-retry-btn:hover { background: rgba(255,107,107,0.12); }
.pchat-retry-btn .material-symbols-outlined { font-size: 14px; }

/* Suggestion chips */
.pchat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 8px; }
.pchat-suggest-chip {
  padding: 8px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--white); font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all 0.15s ease;
  animation: pchatMsgIn 0.3s ease both;
}
.pchat-suggest-chip:nth-child(2) { animation-delay: 0.05s; }
.pchat-suggest-chip:nth-child(3) { animation-delay: 0.1s; }
.pchat-suggest-chip:nth-child(4) { animation-delay: 0.15s; }
.pchat-suggest-chip:hover {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 8%, transparent);
  transform: translateY(-1px);
}

/* Scroll-to-bottom button */
.pchat-scroll-btn {
  position: absolute; bottom: 70px; right: 24px; z-index: 1502;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card, rgba(14,14,20,0.95));
  color: var(--white); cursor: pointer; display: grid; place-items: center;
  backdrop-filter: blur(8px); box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.pchat-scroll-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.pchat-scroll-btn .material-symbols-outlined { font-size: 20px; }

/* Input form */
.pchat-form {
  display: flex; gap: 8px; padding: 12px 12px 18px 12px;
  border-top: 1px solid var(--border); align-items: center; position: relative;
  flex-wrap: wrap;
}
.pchat-input {
  flex: 1; padding: 11px 14px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(18,18,18,0.75);
  color: var(--white); font-size: 13.5px; outline: none;
}
.pchat-input:focus { border-color: var(--accent); }
.pchat-input::placeholder { color: var(--gray-dim); }
.pchat-char-count {
  width: 100%; text-align: right;
  font-family: var(--mono); font-size: 10px; color: var(--gray-dim);
  pointer-events: none; opacity: 0;
  transition: opacity 0.15s ease;
  margin-top: 2px;
  order: 10;
}
.pchat-char-count.visible { opacity: 0.6; }
.pchat-char-count.warn { color: #f59e0b; opacity: 1 !important; }
.pchat-char-count.limit { color: #ef4444; opacity: 1 !important; font-weight: 700; }
.pchat-send {
  width: 42px; height: 42px; border-radius: 12px; border: none; cursor: pointer;
  color: #000; background: linear-gradient(135deg, var(--accent, #00c8ff), var(--accent2, #7a5aff));
  display: grid; place-items: center; flex-shrink: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.pchat-send:hover { transform: scale(1.05); }
.pchat-send:disabled { opacity: 0.5; cursor: default; transform: none; }
.pchat-send .material-symbols-outlined { font-size: 20px; }
.pchat-foot { padding: 0 14px 12px; font-size: 10.5px; color: var(--gray); }
.pchat-foot a { color: var(--accent); }

/* Light-mode overrides */
html.light .pchat-panel { background: rgba(255,255,255,0.35); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 20px 60px rgba(80,80,140,0.22), 0 0 0 1px color-mix(in srgb, var(--accent-solid) 8%, transparent); }
html.light .pchat-panel.open { box-shadow: 0 24px 70px rgba(80,80,140,0.28), 0 0 40px color-mix(in srgb, var(--accent-solid) 6%, transparent), 0 0 0 1px color-mix(in srgb, var(--accent-solid) 15%, transparent); }
html.light .pchat-bot-bubble { background: rgba(60,60,110,0.06); }
html.light .pchat-input { background: rgba(60,60,110,0.05); }
html.light .pchat-close, html.light .pchat-clear { background: rgba(60,60,110,0.06); }
html.light .pchat-close:hover, html.light .pchat-clear:hover { background: rgba(60,60,110,0.12); }
html.light .pchat-suggest-chip { background: rgba(60,60,110,0.04); }
html.light .pchat-status { background: rgba(60,60,110,0.06); }
html.light .pchat-fab { color: #fff; }
html.light .pchat-fab:hover { transform: translateY(-2px) scale(1.05); }
html.light .pchat-head { border-bottom-color: rgba(80,80,140,0.12); }
html.light .pchat-title { color: var(--gray); }
html.light .pchat-clear { color: var(--gray-dim); }
html.light .pchat-close { color: var(--gray-dim); }
html.light .pchat-bot-bubble { color: var(--gray); }
html.light .pchat-msg { color: var(--gray); }
html.light .pchat-bot-avatar { background: color-mix(in srgb, var(--accent-solid) 10%, transparent); }
html.light .pchat-typing-bubble { background: rgba(60,60,110,0.05); border-color: rgba(80,80,140,0.1); }
html.light .pchat-scroll-btn { background: rgba(248,248,253,0.95); border-color: rgba(80,80,140,0.15); color: var(--gray-dim); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
html.light .pchat-form { border-top-color: rgba(80,80,140,0.12); }
html.light .pchat-suggest-chip { color: var(--gray); }
html.light .pchat-suggest-chip:hover { border-color: var(--accent); }
html.light .pchat-foot { color: var(--gray-dim); }
html.light .pchat-send { color: #fff; }

/* Mobile — tall panel, NOT forced fullscreen. User can close via ✕ */
@media (max-width: 440px) {
  .pchat-panel { right: 0; bottom: 0; width: 100vw; height: 85vh; max-height: 85vh; border-radius: 16px 16px 0 0; }
  .pchat-fab { right: 14px; bottom: 14px; }
  .pchat-scroll-btn { right: 16px; bottom: 64px; }
  .pchat-suggest-chip { font-size: 12px; padding: 7px 12px; }
}
@media (max-width: 380px) {
  .pchat-msg, .pchat-bot-wrap, .pchat-typing-wrap { max-width: 90%; font-size: 13px; }
  .pchat-status { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pchat-typing-dots span { animation: none; }
  .pchat-panel, .pchat-fab, .pchat-fab-badge, .pchat-msg, .pchat-bot-wrap,
  .pchat-typing-wrap, .pchat-suggest-chip { animation: none; transition: none; }
}
/* 61. Konami code easter egg */
.konami-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 3000; overflow: hidden; }
.konami-confetti i { position: absolute; top: -20px; width: 10px; height: 14px; opacity: 0.95; animation: konamiFall linear forwards; }
@keyframes konamiFall { to { transform: translate(var(--drift), 105vh) rotate(var(--rot)); opacity: 0.9; } }
.konami-party { animation: konamiHue 1.2s linear infinite; }
@keyframes konamiHue { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .konami-party { animation: none; } }
/* 60. Accent color picker */
.accent-popover { position: fixed; z-index: 1200; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--card, rgba(20,20,28,0.96)); backdrop-filter: blur(14px); box-shadow: 0 12px 40px rgba(0,0,0,0.45); opacity: 0; transform: translateY(-6px) scale(0.97); transition: opacity 0.16s ease, transform 0.16s ease; }
.accent-popover.open { opacity: 1; transform: translateY(0) scale(1); }
.accent-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; display: grid; place-items: center; background: transparent; transition: transform 0.15s ease, border-color 0.15s ease; }
.accent-swatch span { width: 22px; height: 22px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 10px var(--sw); }
.accent-swatch:hover { transform: scale(1.12); }
.accent-swatch.active { border-color: var(--sw); }
/* 36. Anime / Manga media switcher */
.al-media { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); }
.al-media-btn { padding: 7px 18px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--gray); background: transparent; border: none; cursor: pointer; transition: color 0.18s ease, background 0.18s ease; }
.al-media-btn:hover { color: var(--white); }
.al-media-btn.active { color: var(--bg); background: var(--white); }
/* ============ 3D CARD TILT ============ */
.project-card, .interest-card { transform-style: preserve-3d; transition: transform 0.15s ease; }
.project-card .project-body, .interest-card h3, .interest-card p, .interest-card .interest-icon { transform: translateZ(30px); }
/* ============ HERO STAGGERED ENTRANCE ============ */
.hero-reveal { opacity: 0; transform: translateY(28px); }
.hero.revealed .hero-reveal {
  animation: heroReveal 0.8s cubic-bezier(0.22,1,0.36,1) forwards;
  animation-delay: calc(var(--d, 0) * 0.1s);
}
@keyframes heroReveal { to { opacity: 1; transform: translateY(0); } }

/* ============ HERO STATUS BADGE ============ */
.hero-status-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--gray);
  padding: 7px 14px; border-radius: var(--radius-btn);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  margin-bottom: 22px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; animation: pulse 2s ease-in-out infinite; }

/* ============ MAGNETIC BUTTONS ============ */
.magnetic { transition: transform 0.2s cubic-bezier(0.22,1,0.36,1); will-change: transform; }

/* ============ KEYBOARD FOCUS RINGS ============ */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}

/* ============ IMAGE BLUR-UP ============ */
.blur-up { filter: blur(12px); transition: filter 0.5s ease; }
.blur-up.loaded { filter: blur(0); }

/* ============ HERO ============ */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 24px 60px; text-align: center;
}
.hero-inner { max-width: var(--maxw); }
.hero-label { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); letter-spacing: 0.12em; margin-bottom: 18px; text-transform: uppercase; }
.hero-label-hash { color: var(--accent); margin-right: 4px; }
.hero-label-sep { color: var(--border-hover); margin: 0 6px; }
.hero-eyebrow { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 16px; }
.hero-h1 {
  font-size: clamp(38px, 8vw, 84px); font-weight: 800; line-height: 1.02;
  letter-spacing: -0.04em; margin-bottom: 22px;
}
.hero-h1-grad {
  background: linear-gradient(120deg,
    var(--accent-solid) 0%,
    color-mix(in hsl, var(--accent-solid) 40%, hsl(340, 85%, 62%)) 20%,
    color-mix(in hsl, var(--accent-solid) 35%, var(--accent2)) 40%,
    color-mix(in hsl, var(--accent-solid) 30%, hsl(175, 100%, 45%)) 60%,
    color-mix(in hsl, var(--accent-solid) 38%, hsl(90, 80%, 55%)) 80%,
    var(--accent-solid) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradShift 6s linear infinite;
  display: inline-block;
}
@keyframes gradShift { to { background-position: 200% center; } }
.hero-sub { font-size: clamp(15px, 2.4vw, 19px); color: var(--gray); max-width: 560px; margin: 0 auto 28px; }
.hero-tags { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  padding: 7px 16px; border-radius: var(--radius-btn);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--gray);
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-btn);
  font-size: 14px; font-weight: 700; letter-spacing: 0.02em;
  background: var(--white); color: #000; border: 1.5px solid var(--white);
  transition: all 0.22s cubic-bezier(0.22,1,0.36,1);
}
.btn-primary:hover { box-shadow: 0 0 28px rgba(255,255,255,0.2); transform: translateY(-2px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 26px; border-radius: var(--radius-btn);
  font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--border-hover); color: var(--white);
  transition: all 0.22s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--white); transform: translateY(-2px); }
.btn-ghost.sm { padding: 9px 18px; font-size: 12px; }
.hero-scroll-hint { margin-top: 48px; font-size: 28px; color: var(--gray-dim); animation: bounce 2s ease-in-out infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ============ SECTIONS ============ */
.section {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: 100px 24px;
  /* Skip rendering off-screen sections entirely — biggest scroll perf win.
     The browser skips layout/paint for hidden sections, reducing jank
     through heavy sections like AniList. */
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}
.section + .section { padding-top: 60px; }
.section-head { margin-bottom: 40px; }
.section-label { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.12em; }
.section-title {
  font-size: clamp(28px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; margin-top: 10px; line-height: 1.1;
}
.section-title em { font-style: normal; color: var(--gray); }
.section-desc { color: var(--gray); margin-top: 14px; max-width: 520px; line-height: 1.7; }

.glass-card {
  background: rgba(12,12,12,0.15);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-card);
  padding: 28px;
}
html.light .glass-card { background: rgba(255,255,255,0.35); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); }

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
.about-text p { color: var(--gray); margin-bottom: 18px; font-size: 16px; line-height: 1.75; }
.about-text strong { color: var(--white); font-weight: 600; }
.about-side { display: flex; flex-direction: column; gap: 16px; }

.quote-card { padding: 22px; }
.quote-label { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.quote-swap { background: none; border: none; color: var(--gray-dim); cursor: pointer; padding: 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease; }
.quote-swap:hover { color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 10%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-solid) 20%, transparent); }
.quote-swap:active { transform: scale(0.92); }
.quote-swap .material-symbols-outlined { font-size: 18px; transition: transform 0.25s ease; will-change: transform; }
.quote-swap.qs-spin .material-symbols-outlined { animation: qsRotate 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes qsRotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.quote-body { position: relative; }
#quote-text { font-size: 18px; font-weight: 600; line-height: 1.4; font-style: italic; transition: opacity 0.2s ease, transform 0.2s ease; }
#quote-author { display: block; margin-top: 10px; font-size: 13px; color: var(--gray-dim); font-family: var(--mono); transition: opacity 0.2s ease, transform 0.2s ease; }
.quote-body.qs-out #quote-text,
.quote-body.qs-out #quote-author { opacity: 0; transform: translateY(-8px); }
.quote-body.qs-in #quote-text,
.quote-body.qs-in #quote-author { animation: qsSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes qsSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.bio-card { padding: 20px; }
.bio-grid { display: flex; flex-direction: column; gap: 2px; }
.bio-item { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 10px; transition: background 0.2s ease; }
.bio-item:hover { background: color-mix(in srgb, var(--accent-solid) 5%, transparent); }
.bio-icon { font-size: 18px !important; color: var(--gray-dim); width: 20px; text-align: center; flex-shrink: 0; transition: color 0.2s ease; }
.bio-item:hover .bio-icon { color: var(--accent); }
.bio-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bio-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-dim); }
.bio-value { font-size: 14px; font-weight: 500; color: var(--gray); }
.bio-chips { display: inline-flex; align-items: center; gap: 5px; }
.bio-chips .chip { font-family: var(--mono); font-size: 11px; font-style: normal; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border); font-weight: 500; }
.bio-chips .chip-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); background: color-mix(in srgb, var(--accent-solid) 6%, transparent); }
.bio-chips .chip-muted { color: var(--gray-dim); border-color: transparent; background: none; font-style: normal; }
.bio-email { font-family: var(--mono); font-size: 12px !important; word-break: break-all; }
.bio-status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px !important; color: #34d399 !important; font-weight: 500 !important; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px color-mix(in srgb, #34d399 50%, transparent); animation: pulse 2s ease-in-out infinite; flex-shrink: 0; }
.bio-status-dot { position: relative; }
.bio-status-dot::before { content: ''; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, #34d399 12%, transparent); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: pulse 2s ease-in-out infinite; }

/* ── Time Card ── */
.time-card { padding: 20px; }
.time-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.time-icon { font-size: 14px !important; color: var(--accent); }
.time-label { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); letter-spacing: 0.05em; }
.time-grid { display: flex; align-items: center; gap: 0; border-radius: 12px; background: color-mix(in srgb, var(--accent-solid) 3%, transparent); border: 1px solid var(--border); overflow: hidden; }
.time-col { flex: 1; text-align: center; padding: 14px 16px 12px; }
.time-zone { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-dim); margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.tz-icon { font-size: 12px !important; color: var(--gray-dim); }
.time-value { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--gray); }
.time-sub { font-family: var(--mono); font-size: 10px; color: var(--gray-dim); margin-top: 4px; }
.time-divider { width: 40px; min-width: 40px; display: flex; align-items: center; justify-content: center; background: var(--border); height: 100%; padding: 8px 0; }
.time-divider .material-symbols-outlined { font-size: 14px !important; color: var(--gray-dim); opacity: 0.6; }

/* ── Stack Card ── */
.stack-card { padding: 20px; }
.stack-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.stack-icon { font-size: 14px !important; color: var(--accent); }
.stack-label { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); }
.stack-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-pill { font-family: var(--mono); font-size: 11px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--gray); display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s ease; background: transparent; cursor: default; }
.stack-pill:hover { border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); background: color-mix(in srgb, var(--accent-solid) 5%, transparent); color: var(--accent); }
.stack-pill .material-symbols-outlined { font-size: 14px !important; opacity: 0.6; transition: opacity 0.2s ease; }
.stack-pill:hover .material-symbols-outlined { opacity: 1; color: var(--accent); }

.gh-card {
  display: flex; flex-direction: column; gap: 20px; margin-top: 36px; padding: 28px;
  background: rgba(12,12,12,0.15); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-card);
  width: 100%;
}
.gh-top-row { display: flex; align-items: center; gap: 16px; text-align: left; }
.gh-avatar-wrap { position: relative; flex-shrink: 0; }
.gh-avatar { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--border-hover); display: block; }
.gh-avatar-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent-solid) 30%, transparent); animation: pulse 3s ease-in-out infinite; pointer-events: none; }
.gh-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gh-name { font-size: 22px; font-weight: 800; line-height: 1.2; }
.gh-handle { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.gh-loc { font-size: 12px; color: var(--gray-dim); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.gh-loc-icon { font-size: 14px !important; }

/* Stats row */
.gh-stats-row { display: flex; align-items: center; justify-content: center; gap: 0; padding: 16px; border-radius: 12px; background: color-mix(in srgb, var(--accent-solid) 3%, transparent); border: 1px solid var(--border); }
.gh-stat-item { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; }
.gh-stat-icon { font-size: 18px !important; color: var(--gray-dim); }
.gh-stat-body { display: flex; flex-direction: column; }
.gh-stat-val { font-size: 20px; font-weight: 800; line-height: 1.2; }
.gh-stat-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--gray-dim); }
.gh-stat-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }

/* CTA button */
.gh-cta { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--mono); font-size: 12px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); color: var(--gray); text-decoration: none; transition: all 0.2s ease; width: 100%; }
.gh-cta:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 5%, transparent); }
.gh-cta .material-symbols-outlined { font-size: 16px !important; transition: transform 0.2s ease; }
.gh-cta:hover .material-symbols-outlined { transform: translateX(3px); }

/* ============ SKILLS ============ */
.skill-panel { padding: 28px; }
.skill-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.build-icon { font-family: 'Material Symbols Outlined', var(--mono); font-size: 22px; color: var(--accent); }
.skill-panel-title { font-weight: 700; font-size: 16px; }
.skill-panel-tags { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.skill-role-pill {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  padding: 2px 9px; border-radius: 999px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 25%, transparent);
  background: color-mix(in srgb, var(--accent-solid) 8%, transparent);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.skill-role-pill:hover {
  background: color-mix(in srgb, var(--accent-solid) 18%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent-solid) 20%, transparent);
}
.skill-sep { color: var(--gray-dim); font-size: 11px; }
.skill-count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--accent); padding: 3px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent-solid) 25%, transparent); background: color-mix(in srgb, var(--accent-solid) 6%, transparent); }

.skill-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.skill-tab {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--gray-dim);
}
.skill-tab.active { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 700; }

/* Skill toggle — collapse/expand the list */
.skill-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 10px 16px; margin-top: 4px;
  border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.03); color: var(--white);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.skill-toggle:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-solid) 8%, transparent);
}
.skill-toggle-arrow {
  font-size: 18px; transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.skill-toggle.open .skill-toggle-arrow { transform: rotate(180deg); }

/* Skill list — collapsible */
.skill-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, margin-top 0.35s ease;
  margin-top: 0;
}
.skill-list.open {
  max-height: 3000px; opacity: 1; margin-top: 16px;
}
.skill-item {
  padding: 14px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.02); transition: all 0.22s ease;
}
.skill-item:hover { border-color: color-mix(in srgb, var(--accent-solid) 25%, transparent); transform: translateY(-2px); background: color-mix(in srgb, var(--accent-solid) 4%, transparent); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.skill-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.skill-item-icon { font-family: 'Material Symbols Outlined', var(--mono); font-size: 20px; color: var(--accent); }
.skill-item-name { font-weight: 700; font-size: 15px; }
.skill-item-cat { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--gray-dim); letter-spacing: 0.05em; }
.skill-item-desc { font-size: 12px; color: var(--gray); line-height: 1.5; }

/* ============ PROJECTS ============ */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.project-card {
  border-radius: var(--radius-card); overflow: hidden;
  background: rgba(12,12,12,0.15); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s cubic-bezier(0.22,1,0.36,1); display: flex; flex-direction: column;
  position: relative;
}
.project-card:hover { border-color: color-mix(in srgb, var(--accent-solid) 40%, transparent); transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px color-mix(in srgb, var(--accent-solid) 12%, transparent); }
/* Hover preview popup */
.project-card .project-preview {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
  width: 280px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-hover); box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none; z-index: 100;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.project-card .project-preview img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.project-card:hover .project-preview { opacity: 1; transform: translateX(-50%) translateY(-8px); pointer-events: auto; }
.project-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border-bottom: 1px solid var(--border); }
.project-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.project-cat {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
  padding: 4px 11px; border-radius: 999px; width: fit-content;
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  color: var(--gray);
}
.project-cat .material-symbols-outlined { font-size: 13px; color: var(--accent); }
.project-name { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.project-desc { font-size: 13px; color: var(--gray); line-height: 1.65; flex: 1; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.project-tags span {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--gray-dim); transition: all 0.15s ease;
}
.project-tags span:hover { border-color: color-mix(in srgb, var(--accent-solid) 25%, transparent); color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 5%, transparent); }
.project-link { font-size: 13px; font-weight: 600; color: var(--accent); }
.project-link:hover { text-decoration: underline; }

.gh-live { margin-top: 44px; }
.gh-live-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  padding: 4px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  color: var(--gray); margin-bottom: 16px;
}
.gh-live-label .material-symbols-outlined { font-size: 14px; color: var(--accent); }
.gh-live-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.gh-repo {
  padding: 16px; border-radius: 16px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.02); transition: all 0.2s ease;
}
.gh-repo:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.05); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.3), 0 0 20px color-mix(in srgb, var(--accent-solid) 6%, transparent); }
.gh-repo-name { font-weight: 700; font-size: 14px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-repo-desc { font-size: 12px; color: var(--gray); line-height: 1.5; margin-bottom: 8px; min-height: 32px; }
.gh-repo-meta { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 11px; color: var(--gray-dim); }
.gh-repo-lang { display: flex; align-items: center; gap: 5px; }
.gh-repo-lang::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--lang-color, var(--accent)); }

/* ============ LAST.FM ============ */
.lastfm-card { padding: 32px; }
.lfm-recent-wrap { margin-top: 22px; }
.lfm-recent-wrap .lfm-col-title { margin-bottom: 12px; }
.lfm-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.lfm-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--border); object-fit: cover; }
.lfm-head-text { flex: 1; min-width: 0; }
.lfm-title { font-weight: 800; font-size: 18px; }
.lfm-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lfm-stat-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em;
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  color: var(--gray);
  isolation: isolate;
}
.lfm-stat-pill .material-symbols-outlined { font-size: 13px; color: var(--accent); }
.lfm-stat-pill b { color: var(--white); font-weight: 700; }

.lfm-nowplaying { display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: 18px; border: 1px solid var(--border); background: rgba(12,12,16,0.98); margin-bottom: 22px; transition: border-color 0.4s ease, box-shadow 0.4s ease; }
.lfm-nowplaying.live { border-color: color-mix(in srgb, var(--accent-solid) 35%, transparent); box-shadow: 0 0 20px color-mix(in srgb, var(--accent-solid) 10%, transparent), inset 0 0 30px color-mix(in srgb, var(--accent-solid) 4%, transparent); }
.lfm-nowplaying.live::before { content: ''; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none; z-index: 0; box-shadow: 0 0 30px color-mix(in srgb, var(--accent-solid) 16%, transparent), inset 0 0 40px color-mix(in srgb, var(--accent-solid) 7%, transparent); animation: npGlow 3s ease-in-out infinite; }
.lfm-np-art-wrap { position: relative; flex-shrink: 0; }
.lfm-np-art { width: 96px; height: 96px; border-radius: 14px; background-size: cover; background-position: center; background-color: #141414; box-shadow: 0 6px 20px rgba(0,0,0,0.3); flex-shrink: 0; transition: transform 0.3s ease; }
.lfm-nowplaying.live .lfm-np-art { transform: scale(1); }
.lfm-nowplaying.live:hover .lfm-np-art { transform: scale(1.03); }
.lfm-np-art.lfm-noart { display: flex; align-items: center; justify-content: center; color: #52525b; font-size: 32px; }
.lfm-np-progress { position: absolute; bottom: 6px; left: 8px; right: 8px; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; z-index: 2; opacity: 0; transition: opacity 0.4s ease; }
.lfm-nowplaying.live .lfm-np-progress { opacity: 1; }
.lfm-np-progress-bar { height: 100%; width: 0%; border-radius: 3px; background: var(--accent); transition: width 1.8s linear; box-shadow: 0 0 8px color-mix(in srgb, var(--accent-solid) 50%, transparent); position: relative; }
.lfm-np-progress-bar::after { content: ''; position: absolute; right: -2px; top: 50%; transform: translateY(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent-solid), 0 0 12px color-mix(in srgb, var(--accent-solid) 40%, transparent); }
.lfm-np-info { flex: 1; min-width: 0; }
.lfm-np-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 3px; background: rgba(255,255,255,0.06); padding: 1px 7px; border-radius: 5px; width: fit-content; border: 1px solid rgba(255,255,255,0.06); }
.lfm-nowplaying.live .lfm-np-label { color: var(--accent-solid); background: rgba(6,8,14,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-color: rgba(255,255,255,0.1); }
.lfm-np-track { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; background: rgba(255,255,255,0.06); padding: 1px 7px; border-radius: 6px; width: fit-content; border: 1px solid rgba(255,255,255,0.06); }
.lfm-nowplaying.live .lfm-np-track { background: rgba(6,8,14,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-color: rgba(255,255,255,0.1); }
.lfm-np-artist { font-size: 12px; color: var(--gray); font-family: var(--mono); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; background: rgba(255,255,255,0.06); padding: 1px 7px; border-radius: 6px; width: fit-content; border: 1px solid rgba(255,255,255,0.06); }
.lfm-nowplaying.live .lfm-np-artist { background: rgba(6,8,14,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-color: rgba(255,255,255,0.1); }
.lfm-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }
.lfm-col { min-width: 0; overflow: hidden; }
.lfm-col-title {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  padding: 4px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  color: var(--gray); margin-bottom: 12px;
  isolation: isolate;
}
.lfm-col-title .material-symbols-outlined { font-size: 13px; color: var(--accent); }
.lfm-tracks { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lfm-track { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; transition: background 0.15s ease, transform 0.2s ease, border-color 0.2s ease; min-width: 0; overflow: hidden; border-left: 2px solid transparent; }
.lfm-track:hover { background: rgba(255,255,255,0.04); transform: translateX(3px); border-left-color: var(--accent); }
.lfm-track-rank { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--gray-dim); width: 18px; height: 18px; text-align: center; line-height: 18px; border-radius: 6px; flex-shrink: 0; }
.lfm-track:nth-child(1) .lfm-track-rank,
.lfm-track:nth-child(2) .lfm-track-rank,
.lfm-track:nth-child(3) .lfm-track-rank { background: color-mix(in srgb, var(--accent-solid) 12%, transparent); color: var(--accent); }
.lfm-track-img { width: 40px; height: 40px; border-radius: 8px; background-size: cover; background-position: center; background-color: #141414; flex-shrink: 0; }
.lfm-track-img.lfm-noart { display: flex; align-items: center; justify-content: center; color: #52525b; font-size: 16px; }
.lfm-track-info { flex: 1; min-width: 0; }
.lfm-track-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lfm-track-artist { font-size: 10px; color: var(--gray-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lfm-track-plays { font-family: var(--mono); font-size: 10px; color: var(--accent); flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }

/* -- Play count bar -- */
.lfm-track-plays-bar { width: 40px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.06); overflow: hidden; }
.lfm-track-plays-bar-fill { height: 100%; border-radius: 2px; background: color-mix(in srgb, var(--accent-solid) 60%, transparent); transition: width 0.4s ease; }

/* -- Track tooltip -- */
.lfm-track { position: relative; }
.lfm-track-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) scale(0.95); background: rgba(20,20,28,0.95); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-family: var(--mono); font-size: 10px; color: var(--gray); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s, transform 0.15s; z-index: 10; }
.lfm-track:hover .lfm-track-tip { opacity: 1; transform: translateX(-50%) scale(1); }
.lfm-track-tip-loved { color: #ef4444; }

.lfm-artists { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lfm-artist { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; transition: background 0.15s ease, transform 0.2s ease, border-color 0.2s ease; min-width: 0; overflow: hidden; border-left: 2px solid transparent; }
.lfm-artist:hover { background: rgba(255,255,255,0.04); transform: translateX(3px); border-left-color: var(--accent); }
.lfm-artist-img { width: 40px; height: 40px; border-radius: 50%; background-size: cover; background-position: center; background-color: #141414; flex-shrink: 0; }
.lfm-artist-img.lfm-noart { display: flex; align-items: center; justify-content: center; color: #71717a; font-size: 16px; font-weight: 700; text-transform: uppercase; }
.lfm-artist-name { font-size: 12px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lfm-artist-plays { font-family: var(--mono); font-size: 10px; color: var(--accent); flex-shrink: 0; }
.lfm-recent { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; padding-left: 4px; padding-right: 4px; -webkit-mask-image: linear-gradient(to right, transparent, black 10px, black calc(100% - 10px), transparent); mask-image: linear-gradient(to right, transparent, black 10px, black calc(100% - 10px), transparent); }
.lfm-recent::-webkit-scrollbar { height: 4px; }
.lfm-recent::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; }
.lfm-recent-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; transition: all 0.15s ease; }
.lfm-recent-item:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.03); }
.lfm-recent-img { width: 32px; height: 32px; border-radius: 6px; background-size: cover; background-position: center; background-color: #141414; flex-shrink: 0; }
.lfm-recent-img.lfm-noart { display: flex; align-items: center; justify-content: center; color: #52525b; font-size: 14px; }

.lfm-recent-info { min-width: 0; }
.lfm-recent-name { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; max-width: 150px; }
.lfm-recent-name-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lfm-playcount-badge { flex-shrink: 0; }
.lfm-recent-artist { font-size: 9px; color: var(--gray-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.lfm-recent-time { font-size: 8px; color: var(--accent); font-family: var(--mono); opacity: 0.7; white-space: nowrap; }
/* -- Genre tags on tracks -- */
.lfm-track-tags { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.lfm-track-tag { font-family: var(--mono); font-size: 8px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--gray-dim); white-space: nowrap; }

/* -- Period selector tabs -- */
.lfm-period-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.lfm-period-tab {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  color: var(--gray); cursor: pointer; transition: all 0.2s ease;
  isolation: isolate;
}
.lfm-period-tab:hover { background: color-mix(in srgb, var(--accent-solid) 12%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 20%, transparent); color: var(--white); }
.lfm-period-tab.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }

/* -- Your Vibe genre pills -- */
.lfm-vibe { margin-bottom: 18px; }
.lfm-vibe-label { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; padding: 4px 11px; border-radius: 999px; background: color-mix(in srgb, var(--accent-solid) 6%, transparent); border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent); color: var(--gray); margin-bottom: 10px; isolation: isolate; }
.lfm-vibe-label .material-symbols-outlined { font-size: 13px; color: var(--accent); }
.lfm-vibe-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lfm-vibe-pill { font-family: var(--mono); font-size: 9px; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent-solid) 6%, transparent); border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent); color: var(--gray); font-weight: 500; transition: all 0.15s ease; cursor: default; isolation: isolate; }
.lfm-vibe-pill:hover { background: color-mix(in srgb, var(--accent-solid) 12%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 20%, transparent); color: var(--white); transform: scale(1.04); }

/* -- Top Genres pie chart -- */
.lfm-genre-chart { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); }
.lfm-genre-pie-wrap { position: relative; width: 130px; height: 130px; flex-shrink: 0; }
@keyframes pieFloat { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-4px); } }
.lfm-genre-pie { width: 100%; height: 100%; border-radius: 50%; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease, filter 0.5s ease; animation: pieFloat 4s ease-in-out infinite; box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 2px 0 0 rgba(255,255,255,0.04), inset 0 2px 0 rgba(255,255,255,0.08), inset 0 -2px 0 rgba(0,0,0,0.3); position: relative; overflow: hidden; }
.lfm-genre-pie::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: conic-gradient(from 0deg, transparent 0%, rgba(255,255,255,0.13) 10%, transparent 20%, transparent 50%, rgba(255,255,255,0.06) 60%, transparent 70%); pointer-events: none; }
.lfm-genre-pie::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(ellipse at 35% 25%, rgba(255,255,255,0.15) 0%, transparent 50%); pointer-events: none; }
.lfm-genre-pie-wrap:hover .lfm-genre-pie { transform: scale(1.08); box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 40px color-mix(in srgb, var(--accent-solid) 18%, transparent), 0 2px 0 0 rgba(255,255,255,0.06), inset 0 2px 0 rgba(255,255,255,0.12), inset 0 -2px 0 rgba(0,0,0,0.3); filter: brightness(1.06) saturate(1.1); }
.lfm-genre-pie-center { position: absolute; inset: 28px; border-radius: 50%; background: var(--card-bg, #0a0a14); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06); }
.lfm-genre-pie-wrap:hover .lfm-genre-pie-center { transform: scale(1.06); box-shadow: 0 4px 16px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1); }
.lfm-genre-pie-icon { font-size: 16px; color: var(--accent); opacity: 0.7; line-height: 1; }
.lfm-genre-pie-count { font-family: var(--mono); font-size: 20px; font-weight: 800; color: var(--white); line-height: 1.2; }
.lfm-genre-pie-label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); }
.lfm-genre-legend { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.lfm-genre-legend-item { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.lfm-genre-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lfm-genre-legend-name { font-family: var(--mono); font-size: 11px; color: var(--white); flex: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.lfm-genre-legend-pct { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--accent); min-width: 32px; text-align: right; }

/* -- Loved tracks heart -- */
.lfm-loved { color: #ef4444; font-size: 10px; margin-left: 4px; font-style: normal; }
.lfm-playcount-badge { display: inline-flex; align-items: center; margin-left: 5px; padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.02em; color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent-solid) 20%, transparent); vertical-align: middle; line-height: 1.4; flex-shrink: 0; }

/* -- Now Playing background blur -- */
.lfm-nowplaying { position: relative; overflow: hidden; }
.lfm-np-bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(50px) saturate(1.6) brightness(0.9); opacity: 0; transition: opacity 0.8s ease; border-radius: inherit; z-index: 0; pointer-events: none; }
.lfm-nowplaying.live .lfm-np-bg { opacity: 0.4; }
.lfm-np-bg-ghost { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(4px) saturate(0.7) brightness(0.55); opacity: 0; transition: opacity 0.8s ease 0.15s; border-radius: inherit; z-index: 0; pointer-events: none; }
.lfm-nowplaying.live .lfm-np-bg-ghost { opacity: 0.8; }
.lfm-np-art-wrap, .lfm-np-info { position: relative; z-index: 1; }
@keyframes npGlow { 0%, 100% { box-shadow: 0 0 30px color-mix(in srgb, var(--accent-solid) 16%, transparent), inset 0 0 40px color-mix(in srgb, var(--accent-solid) 7%, transparent); } 50% { box-shadow: 0 0 45px color-mix(in srgb, var(--accent-solid) 22%, transparent), inset 0 0 50px color-mix(in srgb, var(--accent-solid) 10%, transparent); } }

/* -- 7-day activity chart -- */
.lfm-activity { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; padding: 0; }
.lfm-activity-label {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em;
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  color: var(--gray); margin-bottom: 8px;
  isolation: isolate;
  min-width: 110px; justify-content: center;
  transition: opacity 0.3s ease;
}
.lfm-activity-label b { color: var(--white); font-weight: 700; }
.lfm-streak { display: inline-flex; align-items: center; gap: 6px; margin-top: 0; font-family: var(--mono); font-size: 10px; color: var(--gray-dim); padding: 3px 10px; border-radius: 6px; border: 1px solid var(--border); background: color-mix(in srgb, var(--accent-solid) 4%, transparent); isolation: isolate; }
.lfm-streak-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-solid); box-shadow: 0 0 6px var(--accent-solid); animation: npPulse 2s ease-in-out infinite; }
.lfm-streak-dot.idle { background: var(--gray-dim); box-shadow: none; animation: none; }
@keyframes npPulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.lfm-activity-bars { display: flex; align-items: flex-end; gap: 6px; flex: 1; }
.lfm-activity-day { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.lfm-activity-bar { width: 100%; min-height: 3px; border-radius: 5px; background: color-mix(in srgb, var(--accent-solid) 60%, transparent); transition: height 0.6s ease, opacity 0.6s ease; }
.lfm-activity-day-label { font-family: var(--mono); font-size: 8px; color: var(--gray-dim); opacity: 0.6; }

/* -- Day-of-week listening heatmap -- */
.lfm-heatmap { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); }
.lfm-heatmap-head { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; min-width: 80px; }
.lfm-heatmap-icon { font-size: 16px; color: var(--accent); opacity: 0.7; }
.lfm-heatmap-title { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--white); text-transform: uppercase; }
.lfm-heatmap-sub { font-family: var(--mono); font-size: 8px; color: var(--gray-dim); letter-spacing: 0.02em; }
.lfm-heatmap-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; flex: 1; }
.lfm-heatmap-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 4px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.04); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; cursor: default; }
.lfm-heatmap-cell:hover { transform: scale(1.06); border-color: rgba(255,255,255,0.1); }
.lfm-heatmap-cell-peak { border-color: color-mix(in srgb, var(--accent-solid) 35%, transparent); box-shadow: 0 0 12px color-mix(in srgb, var(--accent-solid) 15%, transparent); }
.lfm-heatmap-cell-peak:hover { box-shadow: 0 0 18px color-mix(in srgb, var(--accent-solid) 25%, transparent); }
.lfm-heatmap-day { font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: 0.04em; color: var(--gray); }
.lfm-heatmap-cell-peak .lfm-heatmap-day { color: var(--accent); }
.lfm-heatmap-count { font-family: var(--mono); font-size: 14px; font-weight: 800; color: var(--white); line-height: 1; }
.lfm-heatmap-cell .lfm-heatmap-count[data-count="0"] { color: var(--gray-dim); }

/* -- Album name in now playing -- */
.lfm-np-album { font-size: 10px; color: rgba(255,255,255,0.75); font-family: var(--mono); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; background: rgba(255,255,255,0.06); padding: 1px 7px; border-radius: 6px; width: fit-content; border: 1px solid rgba(255,255,255,0.06); }
.lfm-nowplaying.live .lfm-np-album { background: rgba(6,8,14,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-color: rgba(255,255,255,0.1); }

/* -- Artist rank numbers -- */
.lfm-artist-rank { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--gray-dim); width: 18px; height: 18px; text-align: center; line-height: 18px; border-radius: 6px; flex-shrink: 0; }
.lfm-artist:nth-child(1) .lfm-artist-rank,
.lfm-artist:nth-child(2) .lfm-artist-rank,
.lfm-artist:nth-child(3) .lfm-artist-rank { background: color-mix(in srgb, var(--accent-solid) 12%, transparent); color: var(--accent); }

/* -- Clickable track/artist links -- */
.lfm-track-name a, .lfm-artist-name a { color: inherit; text-decoration: none; }
.lfm-track-name a:hover, .lfm-artist-name a:hover { color: var(--accent); text-decoration: underline; }
.lfm-recent-name a { color: inherit; text-decoration: none; }
.lfm-recent-name a:hover { color: var(--accent); text-decoration: underline; }

/* -- Shimmer skeleton -- */
.lastfm-card .skeleton { background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.06) 50%, var(--border) 75%) !important; background-size: 200px 100% !important; animation: lfmShimmer 1.5s ease-in-out infinite !important; }
@keyframes lfmShimmer { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } }
html.light .lastfm-card .skeleton { background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.02) 50%, rgba(0,0,0,0.06) 75%) !important; background-size: 200px 100% !important; animation: lfmShimmer 1.5s ease-in-out infinite !important; }

@media (max-width: 820px) { .lfm-columns { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .lfm-heatmap { flex-direction: column; align-items: stretch; gap: 10px; } .lfm-heatmap-head { flex-direction: row; align-items: center; gap: 8px; min-width: 0; } }

/* ============ ANILIST ============ */
.anilist-card { padding: 32px; }
.al-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.al-avatar { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--border); }
.al-head-text { flex: 1; min-width: 0; }
.al-title { font-weight: 800; font-size: 18px; }
.al-sub {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em;
  padding: 3px 10px; border-radius: 999px; margin-top: 6px;
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  color: var(--gray);
}
.al-sub .material-symbols-outlined { font-size: 13px; color: var(--accent); }

.al-refresh-btn { margin-left: 8px; }
.al-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.al-tab {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  color: var(--gray); cursor: pointer; transition: all 0.2s ease;
}
.al-tab.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
.al-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.al-item { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease; }
.al-item:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px color-mix(in srgb, var(--accent-solid) 12%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); }
.al-item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.al-item-cover { position: relative; overflow: hidden; }
.al-fav { position: absolute; top: 6px; right: 6px; z-index: 2; color: #ff5c8a; font-size: 13px; background: rgba(0,0,0,0.55); width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.al-item-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,8,14,0.97) 28%, rgba(6,8,14,0.55)); opacity: 0; transition: opacity 0.2s ease; padding: 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.al-item:hover .al-item-overlay, .al-item:focus-within .al-item-overlay { opacity: 1; }
.al-item:hover .al-cover-fmt, .al-item:focus-within .al-cover-fmt { opacity: 0; }
.al-cover-fmt { transition: opacity 0.2s ease; }
.al-ov-fmt { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--accent); }
.al-ov-genres { display: flex; flex-wrap: wrap; gap: 4px; }
.al-ov-genres span { font-family: var(--mono); font-size: 9px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,0.14); color: #fff; }
.al-ov-desc { font-size: 10px; line-height: 1.4; color: rgba(255,255,255,0.85); }
.al-item-info { padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.al-item-name { font-size: 12px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.al-item-score {
  display: inline-flex; align-items: center; gap: 2px;
  font-family: var(--sans); font-size: 9px; letter-spacing: 0.02em;
  padding: 2px 7px; border-radius: 999px; width: fit-content;
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  color: var(--gray); font-weight: 500;
}
.al-item-score b { color: var(--white); font-weight: 700; }
.al-item-score.al-score-high { color: #34d399; background: color-mix(in srgb, #34d399 8%, transparent); border-color: color-mix(in srgb, #34d399 16%, transparent); }
.al-item-score.al-score-high b { color: #34d399; }
.al-item-score.al-score-mid { color: #f59e0b; background: color-mix(in srgb, #f59e0b 8%, transparent); border-color: color-mix(in srgb, #f59e0b 16%, transparent); }
.al-item-score.al-score-mid b { color: #f59e0b; }
.al-item-score.al-score-low { color: #f87171; background: color-mix(in srgb, #f87171 8%, transparent); border-color: color-mix(in srgb, #f87171 16%, transparent); }
.al-item-score.al-score-low b { color: #f87171; }
.al-item-bar { position: relative; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04); }
.al-item-bar i { position: relative; display: block; height: 100%; min-width: 5px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent2)); box-shadow: 0 0 8px color-mix(in srgb, var(--accent-solid) 45%, transparent); transition: width 0.5s cubic-bezier(.22,1,.36,1); }
.al-item-bar i::after { content: ''; position: absolute; right: 0; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 7px var(--accent-solid), 0 0 2px #fff; transform: translate(50%, -50%); animation: al-dot-pulse 1.8s ease-in-out infinite; will-change: transform; }
@keyframes al-dot-pulse { 0%, 100% { transform: translate(50%, -50%) scale(1); } 50% { transform: translate(50%, -50%) scale(1.32); } }
.al-tab-count { margin-left: 6px; opacity: 0.6; font-size: 10px; }
.al-tab.active .al-tab-count { opacity: 0.85; }
.al-empty { grid-column: 1/-1; text-align: center; color: var(--gray-dim); font-family: var(--mono); font-size: 13px; padding: 20px; }

/* ====== AniList Improvements ====== */

/* #1 Card hover glow */
.al-item { transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease; }
.al-item:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px color-mix(in srgb, var(--accent-solid) 12%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); }

/* #2 Score badge on cover */
.al-cover-score {
  position: absolute; top: 6px; left: 6px; z-index: 3;
  padding: 2px 7px; border-radius: 6px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
}
.al-cover-score.high { color: #34d399; }
.al-cover-score.mid { color: #f59e0b; }
.al-cover-score.low { color: #f87171; }

/* #3 Format chip on cover */
.al-cover-fmt {
  position: absolute; bottom: 6px; right: 6px; z-index: 3;
  padding: 2px 7px; border-radius: 5px;
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 0.04em;
}

/* Anime/manga date row in info area */
.al-item-date {
  display: flex; align-items: center; gap: 3px;
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  color: var(--accent); letter-spacing: 0.02em;
  opacity: 0.7;
}
.al-item-date .material-symbols-outlined { font-size: 10px; }

/* #4 Status badge on cover — dark base + colored accent for universal visibility */
.al-cover-status {
  position: absolute; bottom: 6px; left: 6px; z-index: 3;
  padding: 2px 7px; border-radius: 6px;
  font-family: var(--mono); font-size: 8px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(6,8,14,0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-left: 2px solid var(--status-color, #fff);
  color: var(--status-color, #fff);
  text-shadow: 0 0 6px var(--status-color, transparent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: opacity 0.2s ease;
}
.al-item:hover .al-cover-status { opacity: 0; }
.al-item[data-status="CURRENT"] .al-cover-status { --status-color: #34d399; }
.al-item[data-status="REPEATING"] .al-cover-status { --status-color: #a78bfa; }
.al-item[data-status="COMPLETED"] .al-cover-status { --status-color: #3b82f6; }
.al-item[data-status="PLANNING"] .al-cover-status { --status-color: #f59e0b; }
.al-item[data-status="PAUSED"] .al-cover-status { --status-color: #fb923c; }
.al-item[data-status="DROPPED"] .al-cover-status { --status-color: #f87171; }

/* #5 Skeleton shimmer (reuse Last.fm pattern) */
.anilist-card .skeleton { background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.06) 50%, var(--border) 75%) !important; background-size: 200px 100% !important; animation: lfmShimmer 1.5s ease-in-out infinite !important; }
html.light .anilist-card .skeleton { background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.02) 50%, rgba(0,0,0,0.06) 75%) !important; background-size: 200px 100% !important; animation: lfmShimmer 1.5s ease-in-out infinite !important; }

/* #15 Card entrance stagger animation */
@keyframes alCardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.al-item { animation: alCardIn 0.35s ease both; }

/* #16 Banner progress bar */
.al-banner-progress-bar {
  height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px;
  margin-top: 6px; overflow: hidden;
}
.al-banner-progress-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* #17 Empty state with icon */
.al-empty-icon { font-size: 32px; margin-bottom: 8px; opacity: 0.4; display: block; }
.al-empty-text { color: var(--gray-dim); font-family: var(--mono); font-size: 13px; }

/* #19 Refresh spinner (reuses ama-refresh-spin already in handler) */



/* #12 Score toggle button */
.al-score-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: var(--radius-btn);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--gray-dim); font-family: var(--mono); font-size: 10px;
  cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease;
}
.al-score-toggle:hover { border-color: var(--accent); color: var(--white); }
.al-score-toggle .material-symbols-outlined { font-size: 14px; }

/* #13 View mode toggle */
.al-view-toggle {
  display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
}
.al-view-btn {
  width: 28px; height: 28px; border-radius: 6px; border: none;
  background: transparent; color: var(--gray-dim); cursor: pointer;
  display: grid; place-items: center; transition: all 0.15s ease;
}
.al-view-btn .material-symbols-outlined { font-size: 16px; }
.al-view-btn:hover { color: var(--white); }
.al-view-btn.active { background: var(--white); color: #000; }

/* #13 Compact list view */
.al-list.list-view { grid-template-columns: 1fr; gap: 6px; }
.al-list.list-view .al-item {
  display: flex; gap: 12px; padding: 8px 12px; border-radius: 12px;
  border-left: 3px solid transparent;
}
.al-list.list-view .al-item[data-status="CURRENT"] { border-left-color: #34d399; }
.al-list.list-view .al-item[data-status="REPEATING"] { border-left-color: #a78bfa; }
.al-list.list-view .al-item[data-status="COMPLETED"] { border-left-color: #3b82f6; }
.al-list.list-view .al-item[data-status="PLANNING"] { border-left-color: #f59e0b; }
.al-list.list-view .al-item[data-status="PAUSED"] { border-left-color: #fb923c; }
.al-list.list-view .al-item[data-status="DROPPED"] { border-left-color: #f87171; }
.al-list.list-view .al-item-cover { width: 40px; height: 54px; border-radius: 6px; flex-shrink: 0; }
.al-list.list-view .al-item-cover img { aspect-ratio: auto; height: 100%; width: 100%; object-fit: cover; }
.al-list.list-view .al-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.al-list.list-view .al-item-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-list.list-view .al-item-overlay,
.al-list.list-view .al-fav,
.al-list.list-view .al-cover-score,
.al-list.list-view .al-cover-fmt,
.al-list.list-view .al-cover-status { display: none !important; }

/* #14 Per-page control */
.al-perpage {
  display: flex; align-items: center; gap: 4px;
}
.al-perpage-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
   padding: 4px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  color: var(--gray);
}
.al-perpage-btn {
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent;
  color: var(--gray-dim); font-family: var(--mono); font-size: 10px;
  cursor: pointer; transition: all 0.15s ease;
}
.al-perpage-btn:hover { border-color: var(--border-hover); }
.al-perpage-btn.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }

/* #18 Search highlight */
mark.al-hl { background: color-mix(in srgb, var(--accent-solid) 25%, transparent); color: var(--white); border-radius: 2px; padding: 0 1px; }

/* Light-mode additions for new elements */
html.light .al-cover-score, html.light .al-cover-fmt { background: rgba(255,255,255,0.85); color: var(--gray); border-color: rgba(0,0,0,0.1); }
html.light .al-item-date { color: #0e7490; }
html.light .al-cover-score.high { color: #059669; }
html.light .al-cover-score.mid { color: #d97706; }
html.light .al-cover-score.low { color: #dc2626; }
html.light .al-perpage-label { background: color-mix(in srgb, var(--accent-solid) 8%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); }
html.light .al-score-toggle { border-color: var(--border); color: var(--gray-dim); }
html.light .al-score-toggle:hover { border-color: var(--accent); }
html.light .al-view-btn.active { background: var(--white); color: #fff; }
html.light .al-perpage-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }
mark.al-hl { background: rgba(0,120,255,0.2); }

/* ============ INTERESTS ============ */
.interests-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.interest-card {
  padding: 24px; border-radius: 16px;
  background: rgba(12,12,12,0.15); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.25s ease;
}
.interest-card:hover { border-color: color-mix(in srgb, var(--accent-solid) 25%, transparent); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
html.light .interest-card { background: rgba(255,255,255,0.5); }
html.light .interest-icon { background: color-mix(in srgb, var(--accent-solid) 8%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 15%, transparent); }
.interest-icon {
  font-family: 'Material Symbols Outlined'; font-size: 24px; color: var(--accent); font-variation-settings: 'FILL' 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent-solid) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent-solid) 20%, transparent);
  margin-bottom: 14px; transition: all 0.25s ease;
}
.interest-card:hover .interest-icon { background: color-mix(in srgb, var(--accent-solid) 15%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 35%, transparent); transform: scale(1.05); }
.interest-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.interest-card p { font-size: 13px; color: var(--gray); line-height: 1.6; }

/* ============ AMA ============ */
.ama-card { padding: 32px; max-width: 680px; }

/* Inline decorative icon inside section title */
.ama-deco-icon {
  font-size: 28px; color: var(--accent); font-variation-settings: 'FILL' 1, 'wght' 300, 'opsz' 24;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent-solid) 35%, transparent));
  vertical-align: middle;
  margin-left: 6px;
  display: inline-block;
}

/* Counter — pill badge with progress bar */
.ama-counter {
  font-family: var(--mono); font-size: 12px; color: var(--gray-dim);
  margin-bottom: 6px; display: inline-flex; align-items: center;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 20px;
}
.ama-counter #ama-count { color: var(--white); font-weight: 700; }
.ama-counter-bar {
  width: 100%; max-width: 160px; height: 3px;
  background: rgba(255,255,255,0.06); border-radius: 4px;
  margin-bottom: 16px; overflow: hidden;
}
.ama-counter-fill {
  height: 100%; width: 0%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.4s cubic-bezier(0.22,1,0.36,1);
}
.ama-counter-fill.warn { background: linear-gradient(90deg, #f59e0b, #ef4444); }

/* Input wrappers with icon prefix */
.ama-input-wrap {
  position: relative; margin-bottom: 12px;
}
.ama-textarea-wrap {
  position: relative; margin-bottom: 14px;
}
.ama-input-icon {
  position: absolute; top: 50%; left: 14px; transform: translateY(-50%);
  font-size: 18px; color: var(--gray-dim); pointer-events: none;
  transition: color 0.2s ease; z-index: 1;
}
.ama-textarea-wrap .ama-input-icon {
  top: 18px; transform: none;
}
.ama-input-wrap:focus-within .ama-input-icon,
.ama-textarea-wrap:focus-within .ama-input-icon {
  color: var(--accent);
}
.ama-name-input {
  width: 100%;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px 12px 44px; color: var(--white); font-family: inherit; font-size: 14px;
  outline: none;
}
.ama-name-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-solid) 10%, transparent), 0 0 16px color-mix(in srgb, var(--accent-solid) 8%, transparent); }
.ama-input {
  width: 100%; min-height: 90px; resize: vertical;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 50px 32px 44px; color: var(--white); font-family: inherit; font-size: 15px; line-height: 1.5;
  outline: none;
}
.ama-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-solid) 10%, transparent), 0 0 16px color-mix(in srgb, var(--accent-solid) 8%, transparent); }

/* Character counter */
.ama-char-count {
  position: absolute; bottom: 10px; right: 14px;
  font-family: var(--mono); font-size: 11px; color: var(--gray-dim);
  pointer-events: none; transition: color 0.2s ease;
}
.ama-char-count.warn { color: #f59e0b; }
.ama-char-count.limit { color: #ef4444; font-weight: 700; }

/* Send button — icon + spinner + disabled */
.ama-send {
  margin-bottom: 8px; position: relative; min-width: 100px; justify-content: center;
  transition: all 0.22s cubic-bezier(0.22,1,0.36,1);
}
.ama-send:disabled {
  opacity: 0.4; cursor: not-allowed; transform: none !important;
  box-shadow: none !important;
}
.ama-send:not(:disabled):hover {
  box-shadow: 0 0 28px rgba(255,255,255,0.2); transform: translateY(-2px);
}
.ama-send-icon {
  font-size: 16px; transition: transform 0.2s ease;
}
.ama-send:not(:disabled):hover .ama-send-icon { transform: translateX(2px) translateY(-1px); }
.ama-send-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.2); border-top-color: #000;
  border-radius: 50%; animation: amaSpin 0.6s linear infinite;
}
@keyframes amaSpin { to { transform: rotate(360deg); } }

/* Status with icon */
.ama-status {
  font-size: 13px; min-height: 20px; display: flex; align-items: center; gap: 6px;
}
.ama-status.ok { color: #34d399; }
.ama-status.err { color: #ff6b6b; }

/* Divider between form and list */
.ama-divider {
  height: 1px; margin: 24px 0 0;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
}

/* Question cards — hover lift + glow */
.ama-list { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.ama-q {
  padding: 16px; border-radius: 14px; border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: amaFadeIn 0.4s ease both;
}
.ama-q:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-solid) 30%, var(--border));
  box-shadow: 0 4px 20px rgba(0,0,0,0.2), 0 0 0 1px color-mix(in srgb, var(--accent-solid) 10%, transparent);
}
@keyframes amaFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ama-q-text { font-size: 14px; margin-bottom: 8px; }
.ama-q-ans { font-size: 13px; color: var(--gray); padding-left: 12px; border-left: 2px solid var(--accent); }
.ama-q-meta { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.ama-q-meta-name { color: var(--white); font-weight: 600; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.ama-q-meta-time { opacity: 0.7; display: flex; align-items: center; gap: 6px; }
.ama-q-meta-answered { color: #34d399; opacity: 1; }
.ama-q-meta-icon { font-size: 15px !important; font-variation-settings: 'FILL' 1, 'wght' 500, 'opsz' 20; flex-shrink: 0; }
.ama-q-meta-answered .ama-q-meta-icon { color: #34d399; }
.ama-q-meta-edited { color: #fbbf24; opacity: 0.9; }
.ama-q-meta-edited .ama-q-meta-icon { color: #fbbf24; }
.ama-q-meta-time:not(.ama-q-meta-answered):not(.ama-q-meta-edited) { color: var(--accent); opacity: 0.85; }
.ama-q-meta-time:not(.ama-q-meta-answered):not(.ama-q-meta-edited) .ama-q-meta-icon { color: var(--accent); }

/* ============ PRESENCE ============ */
.presence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.presence-link {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px;
  border-radius: 14px; border: 1px solid var(--border); transition: all 0.25s ease;
  background: rgba(12,12,12,0.12);
}
.presence-link:hover { border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); transform: translateY(-4px); background: color-mix(in srgb, var(--accent-solid) 5%, transparent); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.presence-icon { font-family: 'Material Symbols Outlined'; font-size: 28px; color: var(--accent); font-variation-settings: 'FILL' 1; transition: all 0.25s ease; }
.presence-link:hover .presence-icon { color: var(--white); transform: scale(1.12); }
.presence-name { font-size: 11px; font-weight: 600; color: var(--gray-dim); font-family: var(--mono); letter-spacing: 0.03em; transition: color 0.25s ease; }
.presence-link:hover .presence-name { color: var(--gray); }
/* ============ FOOTER BAR ============ */
.footer-bar {
  margin-top: 48px;
  padding: 0 24px;
}
.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
  margin-bottom: 24px;
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 8px 16px;
  flex-wrap: wrap;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-solid), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  color: #000; flex-shrink: 0;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent-solid) 25%, transparent);
}
.footer-logo svg { display: block; }
.footer-brand {
  font-weight: 700; font-size: 14px; color: var(--white);
  letter-spacing: -0.01em;
}
.footer-center {
  flex: 1; text-align: center;
  min-width: 0;
}
.footer-copy {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray-dim); letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.footer-nav {
  display: flex; gap: 4px; justify-content: center; flex-wrap: wrap;
}
.footer-nav a {
  font-family: var(--mono); font-size: 11px; color: var(--gray-dim);
  letter-spacing: 0.05em; padding: 4px 10px; border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}
.footer-nav a:hover {
  color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
}
.footer-right {
  display: flex; align-items: center; gap: 8px;
}
.footer-link {
  width: 36px; height: 36px;
  border-radius: 10px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-dim);
  transition: all 0.22s ease;
}
.footer-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent-solid) 12%, transparent);
}
.footer-link svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.footer-link[href*="github"] svg { fill: currentColor; stroke: none; }
/* Envelope icon: body filled, flap stroked */
.footer-mailto .envelope-body { fill: none; stroke: currentColor; }
.footer-mailto .envelope-flap { fill: none; stroke: currentColor; }

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-left { justify-content: center; }
  .footer-right { justify-content: center; }
}

/* ============ ANIMATIONS ============ */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Staggered card entrance — children slide up one by one */
.stagger-children.visible > * {
  animation: staggerUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stagger-children.visible > *:nth-child(1) { animation-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { animation-delay: 0.06s; }
.stagger-children.visible > *:nth-child(3) { animation-delay: 0.12s; }
.stagger-children.visible > *:nth-child(4) { animation-delay: 0.18s; }
.stagger-children.visible > *:nth-child(5) { animation-delay: 0.24s; }
.stagger-children.visible > *:nth-child(6) { animation-delay: 0.30s; }
@keyframes staggerUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ SCROLL PROGRESS BAR ============ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%; z-index: 5000;
  background: linear-gradient(90deg, #00c8ff, #7850ff, #00f0b4);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent-solid) 50%, transparent); transition: width 0.08s linear;
}



/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed; bottom: 20px; left: 20px; z-index: 800;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(18,18,24,0.55); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border); color: var(--gray);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
}
html.light .back-to-top { background: rgba(255,255,255,0.6); }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { color: var(--white); border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); transform: translateY(-2px); box-shadow: 0 0 20px color-mix(in srgb, var(--accent-solid) 12%, transparent), 0 6px 20px rgba(0,0,0,0.3); }
html.light .back-to-top:hover { border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); box-shadow: 0 0 20px color-mix(in srgb, var(--accent-solid) 8%, transparent), 0 6px 20px rgba(0,0,0,0.06); }
.back-to-top svg { width: 20px; height: 20px; fill: currentColor; }

/* ============ ACTIVE NAV HIGHLIGHT ============ */
.tb-icon-btn.active { color: var(--accent); }
.tb-icon-btn.active svg { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent-solid) 60%, transparent)); }

/* ============ SECTION SCROLL OFFSET ============ */
.section, .hero { scroll-margin-top: 90px; }

/* ============ MUSIC TOOLTIP ============ */
.tb-music-tooltip {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: rgba(12,12,16,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 14px; font-family: var(--mono); font-size: 11px; color: var(--gray); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: all 0.2s ease; z-index: 1100;
}
.tb-music-tooltip::before {
  content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px; background: rgba(12,12,16,0.95);
  border-left: 1px solid var(--border); border-top: 1px solid var(--border);
}
.topbar-music-widget:hover .tb-music-tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ COPY EMAIL BUTTON ============ */
.email-wrap { display: flex; align-items: center; gap: 6px; }
.copy-btn { font-size: 14px; color: var(--gray-dim); padding: 2px; border-radius: 6px; transition: all 0.15s ease; font-family: 'Material Symbols Outlined'; }
.copy-btn:hover { color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 10%, transparent); }
.copy-btn.copied { color: #34d399; }

/* ============ HERO TYPEWRITER ============ */
.hero-caret { color: var(--accent); animation: caretBlink 1s step-end infinite; font-weight: 300; }
@keyframes caretBlink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

/* ============ PROJECT THUMBNAIL IMAGE ============ */
.project-thumb-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border-bottom: 1px solid var(--border); }

/* ============ CHANGELOGS PILL + MODAL ============ */
.changelog-pill {
  position: fixed; bottom: 20px; right: 20px; z-index: 800;
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: var(--gray);
  padding: 9px 16px; border-radius: var(--radius-btn);
  background: rgba(18,18,24,0.55); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border); transition: all 0.22s ease;
}
html.light .changelog-pill { background: rgba(255,255,255,0.6); }
.changelog-pill:hover { color: var(--white); border-color: var(--border-hover); transform: translateY(-2px); }
.changelog-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; animation: pulse 1.8s ease-in-out infinite; }
.changelog-modal {
  position: fixed; bottom: 64px; right: 20px; z-index: 801; width: 340px; max-width: 90vw; max-height: 60vh;
  background: rgba(12,12,16,0.92); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(10px) scale(0.97); pointer-events: none; transition: all 0.25s cubic-bezier(0.22,1,0.36,1);
}
html.light .changelog-modal { background: rgba(245,245,250,0.95); }
.changelog-modal.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.changelog-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 12px; color: var(--gray-dim); }
.changelog-close { font-size: 14px; color: var(--gray); }
.changelog-close:hover { color: var(--white); }
.changelog-body { padding: 14px 18px; overflow-y: auto; }
.changelog-entry { padding: 12px 0; border-bottom: 1px solid var(--border); }
.changelog-entry:last-child { border-bottom: none; }
.changelog-date { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-bottom: 6px; }
.changelog-entry ul { list-style: none; padding: 0; }
.changelog-entry li { font-size: 12px; color: var(--gray); line-height: 1.6; padding-left: 12px; position: relative; }
.changelog-entry li::before { content: '›'; position: absolute; left: 0; color: var(--gray-dim); }

/* ============ AMA SORT + PAGINATION + VOTING ============ */
.ama-list-wrap { margin-top: 28px; }
.ama-sort-label { font-family: var(--mono); font-size: 12px; color: var(--gray-dim); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.ama-refresh-btn { background: none; border: none; color: var(--gray-dim); cursor: pointer; padding: 2px; display: inline-flex; align-items: center; border-radius: 6px; transition: color 0.2s, background 0.2s; }
.ama-refresh-btn:hover { color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 8%, transparent); }
.ama-refresh-btn .material-symbols-outlined { font-size: 16px; }
.ama-refresh-spin .material-symbols-outlined { animation: ama-refresh-rotate 0.6s ease; }
@keyframes ama-refresh-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.ama-sort { display: flex; gap: 8px; margin-bottom: 18px; }
.ama-sort-btn { font-family: var(--mono); font-size: 11px; padding: 6px 14px; border-radius: var(--radius-btn); border: 1px solid var(--border); color: var(--gray-dim); }
.ama-sort-btn.active { background: var(--white); color: #000; border-color: var(--white); }
.ama-search-wrap { position: relative; display: flex; align-items: center; margin-bottom: 18px; }
.ama-search-icon { position: absolute; left: 12px; font-size: 18px; color: var(--gray-dim); pointer-events: none; }
.ama-search-input {
  width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 38px 10px 40px; color: var(--white); font-family: inherit; font-size: 14px;
}
.ama-search-input::placeholder { color: var(--gray-dim); }
.ama-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-solid) 10%, transparent), 0 0 16px color-mix(in srgb, var(--accent-solid) 8%, transparent); }
.ama-search-clear { position: absolute; right: 8px; background: none; border: none; color: var(--gray-dim); cursor: pointer; padding: 4px; display: inline-flex; align-items: center; border-radius: 8px; transition: color 0.2s, background 0.2s; }
.ama-search-clear:hover { color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 8%, transparent); }
.ama-search-clear .material-symbols-outlined { font-size: 16px; }
.ama-q-vote { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.ama-vote-btn { font-size: 14px; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); color: var(--gray); display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; }
.ama-vote-btn:hover { border-color: var(--border-hover); color: var(--white); }
.ama-vote-btn.voted { background: var(--accent); color: #000; border-color: var(--accent); }
.ama-vote-count { font-family: var(--mono); font-size: 13px; font-weight: 700; min-width: 24px; text-align: center; }
.ama-pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.ama-page { font-family: var(--mono); font-size: 11px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); color: var(--gray-dim); display: flex; align-items: center; justify-content: center; }
.ama-page.active { background: var(--white); color: #000; border-color: var(--white); }
.ama-page:hover:not(.active) { border-color: var(--border-hover); }

/* ============ PLAYGROUND CARDS ============ */
.pg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pg-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  padding: 22px; border-radius: 20px;
  background: rgba(12,12,12,0.15); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.25s cubic-bezier(0.22,1,0.36,1); color: inherit;
}
html.light .pg-card { background: rgba(255,255,255,0.5); }
.pg-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,0.4); }
.pg-card-icon { font-size: 30px; margin-bottom: 4px; }
.pg-card-name { font-size: 16px; font-weight: 700; }
.pg-card-desc { font-size: 12px; color: var(--gray); line-height: 1.5; flex: 1; }
.pg-card-play { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-top: 8px; }

/* ============ PLAYGROUND OVERLAY ============ */
.pg-overlay {
  position: fixed; inset: 0; z-index: 6000;
  background: rgba(5,5,9,0.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.pg-overlay.open { opacity: 1; pointer-events: auto; }
.pg-topbar { display: flex; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.pg-close { font-size: 20px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); color: var(--gray); }
.pg-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
.pg-title { font-weight: 700; font-size: 18px; }
.pg-score { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--accent); margin-right: 12px; }
.pg-host { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 30px; overflow: auto; }
.pg-canvas { background: #0a0a0e; border: 1px solid var(--border); border-radius: 16px; max-width: 100%; height: auto; touch-action: none; }
.pg-btn { padding: 11px 24px; border-radius: var(--radius-btn); font-size: 13px; font-weight: 700; background: var(--white); color: #000; border: none; }
.pg-btn:hover { transform: translateY(-1px); box-shadow: 0 0 20px rgba(255,255,255,0.2); }
.pg-mines { display: grid; gap: 3px; padding: 10px; background: rgba(255,255,255,0.04); border-radius: 12px; border: 1px solid var(--border); }
.pg-cell { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; border-radius: 6px; background: rgba(255,255,255,0.08); border: 1px solid transparent; cursor: pointer; }
.pg-cell.rev { background: transparent; }
.pg-cell.mine { background: rgba(255,80,80,0.25); }
.pg-react { width: 320px; max-width: 90vw; height: 240px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; cursor: pointer; transition: background 0.1s ease; border: 1px solid var(--border); position: relative; }
.pg-react.idle { background: rgba(255,255,255,0.05); }
.pg-react.red { background: #dc2626; color: #fff; }
.pg-react.green { background: #16a34a; color: #fff; }
.pg-react.done { background: rgba(52,211,153,0.2); color: #34d399; border-color: #34d399; }
.pg-react-best { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--gray-dim); margin-top: 10px; }

/* ============ SNAKE D-PAD ============ */
.pg-dpad {
  display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 52px);
  gap: 6px; justify-content: center; margin-top: 6px;
}
.pg-dpad-btn {
  border-radius: 12px; border: 1px solid var(--border); color: var(--white);
  font-size: 20px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); transition: all 0.12s ease; user-select: none;
}
.pg-dpad-btn:active { background: var(--accent); color: #000; transform: scale(0.94); }
.pg-dpad-btn.up { grid-column: 2; grid-row: 1; }
.pg-dpad-btn.left { grid-column: 1; grid-row: 2; }
.pg-dpad-btn.right { grid-column: 3; grid-row: 2; }
.pg-dpad-btn.down { grid-column: 2; grid-row: 3; }

/* ============ PROJECT BUTTONS ============ */
.project-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.project-dl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px;
  font-size: 12px; font-weight: 600; font-family: var(--mono); text-decoration: none;
  background: var(--white); color: #000; border: 1px solid var(--white);
  transition: all 0.22s cubic-bezier(0.22,1,0.36,1);
}
.project-dl-btn .material-symbols-outlined { font-size: 15px; }
.project-dl-btn:hover { box-shadow: 0 0 24px rgba(255,255,255,0.15); transform: translateY(-1px); }
.project-live-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px;
  font-size: 12px; font-weight: 600; font-family: var(--mono); text-decoration: none;
  background: color-mix(in srgb, var(--accent-solid) 8%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent-solid) 20%, transparent);
  transition: all 0.22s ease;
}
.project-live-btn .material-symbols-outlined { font-size: 15px; }
.project-live-btn:hover { background: color-mix(in srgb, var(--accent-solid) 18%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 45%, transparent); transform: translateY(-1px); }

/* ============ ANILIST SUMMARY ============ */
.al-summary { font-family: var(--mono); font-size: 12px; color: var(--gray-dim); margin-bottom: 16px; }
/* AniList — stats panel */
.al-stats { margin-bottom: 18px; }
.al-stat-cards { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.al-stat-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  min-width: 80px; flex: 1; max-width: 140px;
}
.al-sc-val { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--white); line-height: 1; }
.al-sc-label { font-family: var(--mono); font-size: 10px; color: var(--gray-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.al-sc-accent { border-color: color-mix(in srgb, var(--accent-solid) 25%, transparent); background: color-mix(in srgb, var(--accent-solid) 6%, transparent); }
.al-sc-accent .al-sc-val { color: #34d399; }
.al-genre-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.al-genre-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  font-family: var(--mono); font-size: 11px; color: var(--gray-dim);
  position: relative; overflow: hidden;
}
.al-genre-tag::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--fill, 0%); border-radius: 8px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.al-gt-name { position: relative; z-index: 1; color: var(--white); font-weight: 500; }
.al-gt-count { position: relative; z-index: 1; font-size: 11px; font-weight: 600; color: var(--accent); }
/* AniList — controls (search + sort) */
.al-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.al-search-wrap { position: relative; display: flex; align-items: center; flex: 1; min-width: 180px; }
.al-search-icon { position: absolute; left: 12px; font-size: 18px; color: var(--gray-dim); pointer-events: none; }
.al-search-input { width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 9px 36px 9px 38px; color: var(--white); font-family: inherit; font-size: 13px; }
.al-search-input::placeholder { color: var(--gray-dim); }
.al-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-solid) 10%, transparent); }
.al-search-clear { position: absolute; right: 8px; background: none; border: none; color: var(--gray-dim); cursor: pointer; padding: 4px; display: inline-flex; border-radius: 8px; transition: color 0.2s, background 0.2s; }
.al-search-clear:hover { color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 8%, transparent); }
.al-search-clear .material-symbols-outlined { font-size: 16px; }
.al-sort { display: flex; gap: 6px; flex-wrap: wrap; }
.al-sort-btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  color: var(--gray); cursor: pointer; transition: all 0.2s ease;
}
.al-sort-btn.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
/* AniList — genre filter */
.al-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.al-genre-pill {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-solid) 12%, transparent);
  background: color-mix(in srgb, var(--accent-solid) 6%, transparent);
  color: var(--gray); cursor: pointer; transition: all 0.2s ease;
}
.al-genre-pill.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
.al-pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 20px; }
.al-page-btn { font-family: var(--mono); font-size: 13px; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--gray); display: flex; align-items: center; justify-content: center; }
.al-page-btn.active { background: var(--white); color: #000; border-color: var(--white); }
.al-page-btn:hover:not(.active):not(:disabled) { border-color: var(--border-hover); }
.al-page-btn:disabled { opacity: 0.3; cursor: default; }
.al-page-dots { font-family: var(--mono); color: var(--gray-dim); }

/* ============ RESPONSIVE ============ */
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .gh-card { padding: 22px; }
  .gh-stats-row { padding: 12px; }
  .gh-stat-item { flex-direction: column; gap: 4px; }
  .gh-stat-icon { display: none; }
  .gh-langs-wrap { flex-direction: column; align-items: center; }
  .projects-grid { grid-template-columns: 1fr; }
  .gh-live-list { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .pg-cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .al-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .presence-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .contrib-total { font-size: 24px; }
  .contrib-summary { gap: 12px; }
  .contrib-stat-value { font-size: 16px; }
}
@media (max-width: 600px) {
  .section { padding: 50px 16px; }
  .section + .section { padding-top: 30px; }
  .section-head { margin-bottom: 28px; }
  .section-title { font-size: clamp(24px, 7vw, 36px); }
  .topbar-pill { gap: 0; }
  .tb-track-meta { display: none; }
  .topbar-nav-icons { gap: 0; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-ghost { width: 100%; max-width: 280px; justify-content: center; }

  /* Cards — consistent mobile padding */
  .glass-card { padding: 20px; border-radius: 22px; }
  .gh-card { padding: 24px; }
  .gh-top-row { flex-direction: column; text-align: center; }
  .gh-info { align-items: center; }
  .gh-loc { justify-content: center; }
  .skill-panel { padding: 20px; }
  .contrib-card { padding: 20px; }
  .wakatime-card { padding: 20px; }
  .ama-card { padding: 20px; }
  .anilist-card { padding: 20px; }
  .interest-card { padding: 22px; }
  .quote-card, .bio-card, .stack-card, .time-card { padding: 16px; }

  /* Contribution heatmap — mobile scrollable */
  .contrib-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
    margin: 0 -4px;
    padding: 0 4px 10px;
  }
  .contrib-scroll::-webkit-scrollbar { height: 5px; }
  .contrib-scroll::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
  .contrib-day { width: 10px; height: 10px; }
  .contrib-week { gap: 2px; }
  .contrib-grid { gap: 2px; }
  .contrib-legend { margin-top: 8px; }
  .contrib-header { gap: 8px; margin-bottom: 12px; }

  /* Skills grid */
  .skill-list { grid-template-columns: 1fr; gap: 10px; }
  .skill-tabs { gap: 6px; }
  .skill-tab { padding: 6px 12px; font-size: 10px; }

  /* Projects */
  .projects-grid { gap: 16px; }
  .project-body { padding: 16px 18px 18px; }
  .project-name { font-size: 17px; }

  /* GitHub repos */
  .gh-live { margin-top: 30px; }
  .gh-repo { padding: 14px; }

  /* GitHub card avatar */
  .gh-avatar { width: 60px; height: 60px; }
  .gh-name { font-size: 20px; }
  .gh-stat-val { font-size: 18px; }

  /* Last.fm */
  .lfm-head { gap: 10px; margin-bottom: 16px; }
  .lfm-avatar { width: 40px; height: 40px; }
  .lfm-title { font-size: 16px; }
  .lfm-nowplaying { padding: 14px; gap: 14px; flex-wrap: wrap; }
  .lfm-np-art { width: 72px; height: 72px; }
  .lfm-np-track { font-size: 13px; }
  .lfm-columns { gap: 16px; }
  .lfm-col-title { font-size: 9px; }
  .lfm-recent-item { padding: 5px 10px 5px 5px; }
  .lfm-recent-name { max-width: 120px; }
  .lfm-recent-artist { max-width: 90px; }
  .lfm-period-tabs { gap: 4px; margin-bottom: 14px; }
  .lfm-period-tab { padding: 4px 10px; font-size: 9px; }
  .lfm-activity { margin-bottom: 16px; }
  .lfm-activity-bar { max-width: 28px; }

  /* AniList */
  .al-head { gap: 10px; margin-bottom: 18px; }
  .al-avatar { width: 44px; height: 44px; }
  .al-title { font-size: 16px; }
  .al-tabs { gap: 6px; }
  .al-tab { padding: 6px 11px; font-size: 10px; }
  .al-media { margin-bottom: 14px; }
  .al-media-btn { padding: 6px 14px; font-size: 12px; }
  .al-list { gap: 12px; }
  .al-controls { gap: 8px; }
  .al-search-wrap { min-width: 140px; }
  .al-sort { gap: 4px; }
  .al-sort-btn { padding: 5px 10px; font-size: 10px; }
  .al-genres { gap: 4px; }
  .al-genre-pill { padding: 4px 9px; font-size: 9px; }

  /* WakaTime */
  .wt-head { gap: 10px; margin-bottom: 14px; }
  .wt-total { font-size: 20px; }
  .wt-range-selector { gap: 4px; margin-bottom: 12px; }
  .wt-range-btn { padding: 5px 12px; font-size: 10px; }
  .wt-heatmap { height: 64px; gap: 6px; }
  .wt-heatmap-days { gap: 6px; }
  .wt-heatmap-days span { font-size: 8px; }
  .wt-lang-name { min-width: 72px; font-size: 12px; }
  .wt-editor-name { min-width: 64px; }
  .wt-project-name { min-width: 80px; max-width: 120px; font-size: 11px; }

  /* Interests */
  .interests-grid { grid-template-columns: 1fr; gap: 16px; }
  .interest-icon { width: 52px; height: 52px; font-size: 30px; border-radius: 14px; }

  /* AMA */
  .ama-deco-icon { font-size: 22px; }
  .ama-counter { font-size: 11px; padding: 5px 12px; }
  .ama-input { min-height: 72px; padding: 14px 44px 28px 40px; font-size: 14px; }
  .ama-name-input { padding: 10px 14px 10px 40px; font-size: 13px; }
  .ama-input-icon { font-size: 16px; left: 12px; }
  .ama-textarea-wrap .ama-input-icon { top: 14px; }
  .ama-char-count { font-size: 10px; bottom: 8px; right: 10px; }
  .ama-q { padding: 14px; border-radius: 12px; }
  .ama-q-text { font-size: 13px; }
  .ama-q-ans { font-size: 12px; padding-left: 10px; }
  .ama-sort { gap: 6px; flex-wrap: wrap; }
  .ama-sort-btn { padding: 5px 12px; font-size: 10px; }

  /* Presence grid */
  .presence-grid { gap: 10px; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .presence-link { padding: 18px 8px; border-radius: 14px; }
  .presence-icon { font-size: 26px; }
  .presence-name { font-size: 11px; }

  /* Playground cards */
  .pg-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pg-card { padding: 18px; }

  /* Testimonials */
  .testimonials-grid { gap: 14px; }
  .testimonial-card { padding: 20px; }

  /* Bio/time cards */


  .time-grid { gap: 0; }
  .time-col { padding: 10px 10px 8px; }
  .time-value { font-size: 22px; }
  .time-divider { width: 32px; min-width: 32px; }

  /* Footer */
  .footer-bar { margin-top: 36px; }
  .footer-content { gap: 10px; }
  .footer-brand { font-size: 13px; }
}

/* ============ CURSOR GLOW + TRAIL ============ */
.cursor-glow {
  position: fixed; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-solid) 8%, transparent), transparent 60%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-solid) 12%, transparent), transparent 60%);
  pointer-events: none; z-index: 9998; transform: translate(-50%, -50%);
  transition: opacity 0.3s ease; opacity: 0;
}
@media (hover: hover) { body:hover .cursor-glow { opacity: 1; } }
@media (hover: none) { .cursor-glow { display: none; } }
.cursor-trail { position: fixed; inset: 0; z-index: 9997; pointer-events: none; }
@media (hover: none) { .cursor-trail { display: none; } }

/* ============ SECTION DIVIDERS ============ */
/* section-dividers removed */

/* ============ GITHUB CONTRIBUTION GRAPH ============ */
.contrib-card { padding: 28px; }
.contrib-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.contrib-total { font-size: 28px; font-weight: 800; color: var(--accent); }
.contrib-label { font-size: 13px; color: var(--gray); }

/* Streak badge */
.contrib-streak { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--gray); display: flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); background: color-mix(in srgb, var(--accent-solid) 4%, transparent); }

/* Summary stats bar */
.contrib-summary { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.contrib-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: color-mix(in srgb, var(--accent-solid) 2%, transparent); }
.contrib-stat-value { font-size: 18px; font-weight: 800; color: var(--accent); }
.contrib-stat-label { font-family: var(--mono); font-size: 10px; color: var(--gray-dim); text-transform: uppercase; letter-spacing: 0.5px; }

/* Scrollable wrapper for months + grid */
.contrib-scroll { overflow-x: auto; max-width: 100%; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--border-hover) transparent; }
.contrib-scroll::-webkit-scrollbar { height: 6px; }
.contrib-scroll::-webkit-scrollbar-track { background: transparent; }
.contrib-scroll::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
.contrib-scroll::-webkit-scrollbar-thumb:hover { background: var(--gray); }

/* Month labels */
.contrib-months { display: flex; position: relative; height: 16px; margin-bottom: 4px; min-width: max-content; }
.contrib-month-label { position: absolute; font-family: var(--mono); font-size: 9px; color: var(--gray-dim); text-transform: uppercase; letter-spacing: 0.5px; }

/* Grid */
.contrib-grid { display: flex; gap: 3px; position: relative; }
.contrib-week { display: flex; flex-direction: column; gap: 3px; }
.contrib-day { width: 11px; height: 11px; border-radius: 2px; background: color-mix(in srgb, var(--accent-solid) 10%, transparent); position: relative; cursor: pointer; transition: transform 0.1s, outline 0.1s; outline: 2px solid transparent; outline-offset: 1px; }
.contrib-day:hover { transform: scale(1.4); z-index: 2; outline-color: var(--accent); border-radius: 3px; }
.contrib-day[data-level="1"] { background: color-mix(in srgb, var(--accent-solid) 25%, transparent); }
.contrib-day[data-level="2"] { background: color-mix(in srgb, var(--accent-solid) 45%, transparent); }
.contrib-day[data-level="3"] { background: color-mix(in srgb, var(--accent-solid) 70%, transparent); }
.contrib-day[data-level="4"] { background: var(--accent-solid); }

/* Busy day highlight */
.contrib-day.busiest::after { content: ''; position: absolute; top: -3px; right: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: contrib-pulse 2s ease-in-out infinite; }
@keyframes contrib-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.5); } }

/* Skeleton grid */
.contrib-skeleton-grid { display: flex; gap: 3px; }
/* Custom glass tooltip */
.contrib-tip { position: fixed; z-index: 9000; pointer-events: none; background: rgba(12,12,16,0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font-family: var(--mono); font-size: 11px; color: var(--gray); white-space: nowrap; opacity: 0; transition: opacity 0.15s ease; box-shadow: 0 6px 20px rgba(0,0,0,0.4); display: flex; flex-direction: column; gap: 4px; }
html.light .contrib-tip { background: rgba(255,255,255,0.95); border-color: rgba(0,0,0,0.1); color: #555; box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.contrib-tip.visible { opacity: 1; }
.contrib-tip-date { color: var(--white); font-weight: 600; font-size: 12px; }
.contrib-tip-day { color: var(--gray); font-weight: 400; }
.contrib-tip-count { color: var(--accent); font-weight: 700; font-size: 12px; }
.contrib-legend { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-family: var(--mono); font-size: 10px; color: var(--gray-dim); }
.contrib-legend-boxes { display: flex; gap: 3px; }
.contrib-legend-boxes i { width: 11px; height: 11px; border-radius: 2px; background: var(--accent-solid); display: inline-block; }

/* ============ TESTIMONIALS ============ */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.testimonial-card { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.testimonial-text { font-size: 15px; line-height: 1.7; color: var(--gray); font-style: italic; }
.testimonial-author { font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* ============ GAME SOUND TOGGLE ============ */
.sound-toggle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); color: var(--gray); display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; flex-shrink: 0; }
.sound-toggle:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sound-toggle.muted { opacity: 0.4; }

/* ============ VISITOR COUNTER BADGE ============ */
.visitor-badge {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 800; padding: 8px 16px; border-radius: 999px;
  background: rgba(18,18,24,0.6); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border); font-family: var(--mono); font-size: 11px;
  color: var(--gray); letter-spacing: 0.05em; white-space: nowrap;
  opacity: 0; animation: visitorFadeIn 0.6s ease 1s forwards;
  display: flex; align-items: center; gap: 6px;
}
html.light .visitor-badge { background: rgba(255,255,255,0.6); }
.visitor-badge::before { content: 'group'; font-family: 'Material Symbols Outlined'; font-size: 14px; color: var(--accent); font-variation-settings: 'FILL' 1, 'wght' 400, 'opsz' 24; }
@keyframes visitorFadeIn { to { opacity: 0.8; } }
@media (max-width: 600px) {
  .visitor-badge { bottom: 14px; font-size: 10px; padding: 6px 12px; }
}

/* Extra-small screen — compact now-playing */
@media (max-width: 380px) {
  .lfm-nowplaying { padding: 12px; gap: 10px; }
  .lfm-np-art { width: 56px; height: 56px; border-radius: 10px; }
  .lfm-np-track { font-size: 13px; }
  .lfm-np-artist { font-size: 10px; }
  .lfm-period-tabs { gap: 3px; }
  .lfm-period-tab { padding: 3px 8px; font-size: 8px; }
}

/* ============ WAKATIME ============ */
.wakatime-card { padding: 28px; }
.wt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.wt-icon { font-size: 24px; color: var(--accent); }
.wt-title { font-weight: 800; font-size: 16px; }
.wt-sub { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); }
.wt-total { font-size: 22px; font-weight: 800; color: var(--accent); margin-left: auto; }
.wt-daily { font-family: var(--mono); font-size: 12px; color: var(--gray); }

/* Range selector */
.wt-range-selector { display: flex; gap: 6px; margin-bottom: 16px; }
.wt-range-btn { font-family: var(--mono); font-size: 10px; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--gray-dim); cursor: pointer; transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.5px; }
.wt-range-btn:hover { color: var(--gray); border-color: var(--border-hover); }
.wt-range-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 700; }

/* Streak */
.wt-streak { font-family: var(--mono); font-size: 12px; color: var(--gray); margin-bottom: 18px; display: flex; align-items: center; gap: 6px; }
.wt-streak-count { font-weight: 800; color: var(--accent); font-size: 15px; }
.wt-streak-slash { color: var(--gray-dim); }

/* Daily heatmap */
.wt-heatmap-section { margin-bottom: 22px; }
.wt-heatmap-label { font-family: var(--mono); font-size: 10px; color: var(--gray-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.wt-heatmap { display: flex; align-items: flex-end; gap: 8px; height: 80px; }
.wt-heatmap-bar { flex: 1; height: 100%; border-radius: 6px 6px 3px 3px; background: rgba(255,255,255,0.04); overflow: hidden; position: relative; cursor: pointer; transition: background 0.2s; min-width: 0; }
.wt-heatmap-bar:hover { background: rgba(255,255,255,0.08); }
.wt-heatmap-fill { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 6px 6px 0 0; background: var(--accent); opacity: 0.7; transition: height 0.6s cubic-bezier(0.22,1,0.36,1), opacity 0.2s; }
.wt-heatmap-bar:hover .wt-heatmap-fill { opacity: 1; }
.wt-heatmap-bar .wt-heatmap-tooltip { position: absolute; top: -32px; left: 50%; transform: translateX(-50%); background: var(--white); color: var(--bg); font-family: var(--mono); font-size: 10px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 5; }
.wt-heatmap-bar:hover .wt-heatmap-tooltip { opacity: 1; }
.wt-heatmap-days { display: flex; gap: 8px; margin-top: 6px; }
.wt-heatmap-days span { flex: 1; text-align: center; font-family: var(--mono); font-size: 9px; color: var(--gray-dim); text-transform: uppercase; letter-spacing: 0.5px; }

/* Languages */
.wt-languages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.wt-lang { display: flex; align-items: center; gap: 12px; }
.wt-lang-name { font-size: 13px; font-weight: 600; min-width: 90px; display: flex; align-items: center; gap: 6px; }
.wt-lang-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wt-lang-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.06); overflow: hidden; }
.wt-lang-fill { height: 100%; border-radius: 4px; transition: width 0.8s cubic-bezier(0.22,1,0.36,1); }
.wt-lang-time { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); min-width: 50px; text-align: right; }
.wt-lang-pct { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--gray); min-width: 36px; text-align: right; }

/* Section title */
.wt-section-title { font-family: var(--mono); font-size: 10px; color: var(--gray-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.wt-section-title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.5; }

/* Editors with progress */
.wt-editors { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.wt-editor { display: flex; align-items: center; gap: 10px; }
.wt-editor-name { font-family: var(--mono); font-size: 11px; font-weight: 600; min-width: 80px; color: var(--gray); }
.wt-editor-bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.06); overflow: hidden; }
.wt-editor-fill { height: 100%; border-radius: 3px; background: var(--accent); opacity: 0.5; transition: width 0.8s cubic-bezier(0.22,1,0.36,1); }
.wt-editor-pct { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); min-width: 36px; text-align: right; }

/* Projects */
.wt-projects { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.wt-project { display: flex; align-items: center; gap: 10px; }
.wt-project-name { font-size: 12px; font-weight: 600; min-width: 100px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gray); }
.wt-project-bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.06); overflow: hidden; }
.wt-project-fill { height: 100%; border-radius: 3px; background: var(--accent); opacity: 0.35; transition: width 0.8s cubic-bezier(0.22,1,0.36,1); }
.wt-project-time { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); min-width: 56px; text-align: right; }

/* Loading / error state */
.wt-loading { font-family: var(--mono); font-size: 12px; color: var(--gray-dim); text-align: center; padding: 20px; }

/* ============ EMOJI REACTIONS (AMA) ============ */
.ama-q-reactions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.ama-react-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  font-size: 13px; transition: all 0.15s ease; cursor: pointer;
}
.ama-react-btn span { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); }
.ama-react-btn:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.06); transform: translateY(-1px); }
.ama-react-btn.react-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 10%, transparent); }
.ama-react-btn.react-active span { color: var(--accent); }

/* ── AMA Pin Badge ── */
.ama-pin-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  padding: 3px 10px 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-solid) 12%, transparent); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 25%, transparent);
  margin-bottom: 8px;
}
.ama-pin-icon {
  font-size: 13px !important; font-variation-settings: 'FILL' 1, 'wght' 500, 'opsz' 20;
  line-height: 1; flex-shrink: 0;
}
.ama-q-pinned {
  border-color: color-mix(in srgb, var(--accent-solid) 20%, transparent) !important;
  background: color-mix(in srgb, var(--accent-solid) 2%, transparent) !important;
}
html.light .ama-pin-badge {
  background: color-mix(in srgb, var(--accent-solid) 10%, transparent); color: var(--accent);
  border-color: color-mix(in srgb, var(--accent-solid) 20%, transparent);
}
html.light .ama-pin-icon {
  color: var(--accent);
}
html.light .ama-q-pinned {
  border-color: color-mix(in srgb, var(--accent-solid) 15%, transparent) !important;
  background: color-mix(in srgb, var(--accent-solid) 2%, transparent) !important;
}

/* ── AMA Reaction Summary Line ── */
.ama-reaction-summary {
  display: flex; gap: 10px; margin-top: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--gray-dim);
}
.ama-reaction-summary span {
  display: inline-flex; align-items: center; gap: 3px;
}

/* ============ G. PROJECT IMAGE HOVER ZOOM ============ */
.project-card { overflow: hidden; }
.project-thumb-img { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.project-card:hover .project-thumb-img { transform: scale(1.08); }

/* ============ E. GLASSMORPHISM CARD GLOW ============ */
.glass-card {
  position: relative; overflow: hidden;
}
.contrib-card { overflow: visible; }
.contrib-card .contrib-scroll { margin-left: -4px; margin-right: -4px; padding-left: 4px; padding-right: 4px; }
.glass-card::before {
  content: '';
  position: absolute; top: var(--mouse-y, 50%); left: var(--mouse-x, 50%); border-radius: 50%; pointer-events: none;
  width: 300px; height: 300px; transform: translate(-50%, -50%);
  background: radial-gradient(color-mix(in srgb, var(--accent-solid) 10%, transparent) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.3s ease; z-index: -1;
}
.glass-card:hover::before { opacity: 1; }

/* ============ D. SECTION TRANSITIONS ============ */
.section-head, .about-grid, .gh-card, .skill-panel, .projects-grid, .lastfm-card, .anilist-card, .interests-grid, .ama-card, .pg-cards {
  animation: slideUpFade 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ N. TOUCH RIPPLE EFFECT ============ */
.ripple {
  position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.4);
  transform: scale(0); animation: rippleEffect 0.6s linear; pointer-events: none;
}
@keyframes rippleEffect {
  to { transform: scale(4); opacity: 0; }
}

/* ============ P. SKELETON LOADING ============ */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% {background-position: 200% 0;} 100% {background-position: -200% 0;} }

/* ============ B. AURORA HERO TEXT ============ */
.hero-h1-grad {
  background: linear-gradient(120deg,
    var(--accent-solid),
    color-mix(in hsl, var(--accent-solid) 40%, hsl(340, 85%, 62%)),
    color-mix(in hsl, var(--accent-solid) 35%, var(--accent2)),
    color-mix(in hsl, var(--accent-solid) 30%, hsl(175, 100%, 45%)),
    color-mix(in hsl, var(--accent-solid) 38%, hsl(90, 80%, 55%)),
    var(--accent-solid));
  background-size: 300% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: auroraShift 8s linear infinite;
  filter: drop-shadow(0 2px 15px color-mix(in srgb, var(--accent-solid) 25%, transparent));
}
@keyframes auroraShift { to { background-position: 300% center; } }

/* ============ H. GITHUB LANG DONUT CHART ============ */
.gh-langs-wrap { display: flex; align-items: center; gap: 24px; padding: 20px 0 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.gh-lang-chart { width: 120px; height: 120px; border-radius: 50%; position: relative; flex-shrink: 0; }
.gh-lang-chart::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,0.12); z-index: 2; pointer-events: none; }
.gh-lang-chart::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; background: var(--bg); z-index: 1; box-shadow: 0 0 12px 3px rgba(0,0,0,0.7); }
.gh-lang-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; flex: 1; min-width: 180px; }
.gh-lang-pill { display: flex; align-items: center; gap: 8px; font-size: 12px; font-family: var(--mono); color: var(--gray); padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); transition: all 0.2s ease; }
.gh-lang-pill:hover { border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); background: color-mix(in srgb, var(--accent-solid) 4%, transparent); }
.gh-lang-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ============ M. KEYBOARD SHORTCUT OVERLAY ============ */
.shortcut-overlay { position: fixed; inset: 0; z-index: 9500; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; }
.shortcut-overlay.open { display: flex; }
.shortcut-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; max-width: 400px; width: 90%; }
.shortcut-head { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.shortcut-close { color: var(--gray); }
.shortcut-list div { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 14px; color: var(--gray); }
kbd { background: var(--surface2); border: 1px solid var(--border-hover); border-radius: 4px; padding: 4px 8px; font-family: var(--mono); font-size: 12px; color: var(--accent); min-width: 20px; text-align: center; }

/* ============ I. DAY IN THE LIFE TIMELINE ============ */
.timeline-section { margin-top: 60px; padding: 28px; border-radius: 20px; background: rgba(12,12,12,0.15); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border: 1px solid rgba(255,255,255,0.08); }
.timeline-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 32px; }
.timeline-head-icon { font-size: 16px !important; color: var(--accent); }
.timeline-title { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--gray-dim); text-transform: uppercase; }
.timeline-track { display: flex; justify-content: space-between; position: relative; }
.timeline-track::before { content: ''; position: absolute; top: 22px; left: 10%; right: 10%; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), var(--accent), transparent); z-index: 0; }
.timeline-item { flex: 1; text-align: center; position: relative; z-index: 1; padding: 0 12px; }
.timeline-node { width: 46px; height: 46px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 18px color-mix(in srgb, var(--accent-solid) 18%, transparent), 0 2px 8px rgba(0,0,0,0.3); }
.timeline-node .material-symbols-outlined { font-size: 20px !important; color: var(--accent); }
.timeline-time { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent); margin-bottom: 10px; }
.timeline-card { padding: 14px 12px; border-radius: 10px; border: 1px solid var(--border); background: color-mix(in srgb, var(--accent-solid) 3%, transparent); transition: all 0.25s ease; }
.timeline-card:hover { border-color: color-mix(in srgb, var(--accent-solid) 20%, transparent); background: color-mix(in srgb, var(--accent-solid) 6%, transparent); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.timeline-desc { font-size: 12px; color: var(--gray); line-height: 1.6; margin: 0; }

/* ============ L. ACHIEVEMENT TOAST ============ */
.achievement-toast {
  position: fixed; bottom: calc(30px + env(safe-area-inset-bottom, 0px)); left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 60px));
  background: rgba(12,12,16,0.9); border: 1px solid var(--accent); border-radius: 12px;
  padding: 16px 24px; display: flex; align-items: center; gap: 16px; z-index: 9999;
  width: max-content; min-width: 260px; max-width: calc(100vw - 32px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px color-mix(in srgb, var(--accent-solid) 20%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
}
.achievement-toast.show { transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast-icon { font-size: 24px; flex-shrink: 0; }
.toast-content { min-width: 0; }
.toast-title { font-weight: 700; font-size: 14px; color: var(--white); }
.toast-desc { font-size: 12px; color: var(--gray); font-family: var(--mono); }

/* ============ K. GAME DIFFICULTY SELECTOR ============ */
.diff-selector { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.diff-btn { padding: 4px 12px; border-radius: 6px; border: 1px solid var(--border); background: rgba(255,255,255,0.05); color: var(--gray-dim); font-size: 12px; font-family: var(--mono); cursor: pointer; transition: all 0.2s ease; }
.diff-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }

/* ============ 1. COMMAND PALETTE ============ */
.cmd-palette-overlay {
  position: fixed; inset: 0; z-index: 9800;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: none; align-items: flex-start; justify-content: center; padding-top: 15vh;
}
.cmd-palette-overlay.open { display: flex; animation: cmdFadeIn 0.15s ease; }
@keyframes cmdFadeIn { from { opacity: 0; } to { opacity: 1; } }
.cmd-palette {
  width: 90%; max-width: 560px;
  background: rgba(12,12,16,0.95);
  border: 1px solid color-mix(in srgb, var(--accent-solid) 20%, transparent);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px color-mix(in srgb, var(--accent-solid) 10%, transparent);
  animation: cmdSlideDown 0.2s cubic-bezier(0.22,1,0.36,1);
}
@keyframes cmdSlideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
/* ── Command Palette: Search Bar (expand/collapse) ── */
.cmd-input-wrap { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); position: relative; }

/* Collapsed: just the search icon button */
.cmd-search-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent-solid) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent-solid) 20%, transparent);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer; transition: all 0.25s cubic-bezier(0.22,1,0.36,1);
}
.cmd-search-toggle .material-symbols-outlined { font-size: 20px; font-variation-settings: 'FILL' 0, 'wght' 400, 'opsz' 24; }
.cmd-search-toggle:hover { background: color-mix(in srgb, var(--accent-solid) 15%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 40%, transparent); transform: scale(1.05); }

/* Input bar: hidden until expanded */
.cmd-input-bar {
  display: flex; align-items: center; gap: 8px; flex: 1;
  max-width: 0; opacity: 0; overflow: hidden;
  transition: max-width 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.25s ease 0.1s;
}
.cmd-input-bar.expanded {
  max-width: 500px; opacity: 1;
}

/* Search input */
.cmd-input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: #fff; font-size: 15px; font-family: var(--sans);
}
.cmd-input::placeholder { color: var(--gray-dim); }

/* Submit / show-results button */
.cmd-submit-btn {
  width: 34px; height: 34px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent-solid) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent-solid) 20%, transparent);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer; transition: all 0.2s ease;
}
.cmd-submit-btn .material-symbols-outlined { font-size: 18px; font-variation-settings: 'FILL' 1, 'wght' 500, 'opsz' 24; }
.cmd-submit-btn:hover { background: color-mix(in srgb, var(--accent-solid) 20%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 50%, transparent); transform: scale(1.05); }

/* ESC key badge */
.cmd-esc-kbd { flex-shrink: 0; }

/* When expanded, shrink the toggle icon */
.cmd-input-wrap.expanded .cmd-search-toggle {
  width: 32px; height: 32px; border-radius: 8px; background: transparent; border-color: transparent;
}
.cmd-input-wrap.expanded .cmd-search-toggle .material-symbols-outlined { font-size: 18px; color: var(--gray-dim); }
.cmd-input-wrap.expanded .cmd-search-toggle:hover { background: rgba(255,255,255,0.06); border-color: var(--border); }

/* Light mode */
html.light .cmd-search-toggle { background: color-mix(in srgb, var(--accent-solid) 6%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 15%, transparent); color: var(--accent); }
html.light .cmd-search-toggle:hover { background: color-mix(in srgb, var(--accent-solid) 12%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); }
html.light .cmd-submit-btn { background: color-mix(in srgb, var(--accent-solid) 6%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 15%, transparent); }
html.light .cmd-submit-btn:hover { background: color-mix(in srgb, var(--accent-solid) 12%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); }
html.light .cmd-input-wrap.expanded .cmd-search-toggle:hover { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
.cmd-results { max-height: 340px; overflow-y: auto; padding: 8px; }
.cmd-results::-webkit-scrollbar { width: 4px; }
.cmd-results::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; }
.cmd-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; cursor: pointer; transition: background 0.1s ease; }
.cmd-item.selected, .cmd-item:hover { background: color-mix(in srgb, var(--accent-solid) 10%, transparent); }
.cmd-item-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; color: var(--accent); font-variation-settings: 'FILL' 1, 'wght' 400, 'opsz' 24; }
.cmd-item-label { flex: 1; font-size: 14px; color: var(--gray); }
.cmd-item-label mark { background: color-mix(in srgb, var(--accent-solid) 20%, transparent); color: var(--accent); border-radius: 2px; padding: 0 2px; }
.cmd-item-hint { font-family: var(--mono); font-size: 10px; color: var(--gray-dim); }
.cmd-footer { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 11px; color: var(--gray-dim); }
.cmd-footer kbd { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; padding: 2px 6px; font-family: var(--mono); font-size: 10px; margin-right: 4px; }
.cmd-hint { margin-left: auto; font-family: var(--mono); }

/* ============ 2. SPOTLIGHT BORDER HOVER (Stripe-style) ============ */
.glass-card { position: relative; border: 1px solid transparent; }
.glass-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: radial-gradient(120px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), color-mix(in srgb, var(--accent-solid) 50%, transparent), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.glass-card:hover::after { opacity: 1; }





/* ============ ARTIST FALLBACK (Site Theme Match) ============ */
.lfm-artist-gradient {
  display: flex !important; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9) !important; /* dark shadow for readability */
  text-transform: uppercase; letter-spacing: -0.02em;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background-color: #0c0c0c !important;
}

/* ============ G. LIGHT THEME POLISH FOR NEW FEATURES ============ */
html.light .hero-terminal { background: rgba(240,240,248,0.8); border-color: rgba(0,0,0,0.1); }
html.light .term-dots { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
html.light .term-line { color: #059669; }
html.light .term-caret { color: var(--accent); }

html.light .cmd-palette { background: rgba(255,255,255,0.98); border-color: rgba(0,0,0,0.1); }
html.light .cmd-input { color: #000; }
html.light .cmd-item.selected, html.light .cmd-item:hover { background: rgba(0,0,0,0.05); }
html.light .cmd-footer { color: #555566; border-top-color: rgba(0,0,0,0.08); }
html.light .cmd-footer kbd { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); color: #44445a; }
html.light .cmd-hint { color: #777788; }
html.light .cmd-esc-kbd { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); color: #44445a; }

html.light .cursor-glow { background: radial-gradient(circle, color-mix(in srgb, var(--accent-solid) 10%, transparent), transparent 60%); background: radial-gradient(circle, color-mix(in srgb, var(--accent-solid) 16%, transparent), transparent 60%); }

/* H. MOBILE MUSIC PLAYER FULL SCREEN */
@media (max-width: 600px) {
  .slide-player-panel {
    width: 100vw; max-width: 100vw;
    padding-top: 80px;
  }
  .sp-cd-sleeve { width: 160px; height: 160px; }
  .sp-cd-disc { width: 140px; height: 140px; margin-top: -70px; margin-left: -70px; }
  .sp-cd-disc.playing { margin-left: -40px; }
  .sp-title { font-size: 20px; }
}

/* I. SMOOTH SCROLL SNAP (Optional, subtle) */
/* Subtle scroll snap — sections land cleanly */
/* Scroll snap removed — was causing jank during scroll through content-heavy sections (AniList, etc.).
   scroll-behavior: smooth on html handles section navigation cleanly. */

/* ============ COMPREHENSIVE LIGHT MODE FIXES ============ */

/* Intro overlay */
html.light .intro-char.scrambling { color: var(--accent); text-shadow: 0 0 20px rgba(0,150,220,0.2); }
html.light .intro-char.locked { color: var(--white); text-shadow: none; }
html.light .intro-progress-bar { background: rgba(0,0,0,0.06); }
html.light .intro-progress-fill { box-shadow: 0 0 12px color-mix(in srgb, var(--accent-solid) 20%, transparent); }
html.light .intro-topbar { color: var(--gray); }
html.light .intro-tag { color: var(--gray-dim); }
html.light .intro-dot { background: #059669; box-shadow: 0 0 8px rgba(5,150,105,0.5); }

/* Hero "View Projects" button */
html.light .btn-primary { background: var(--white); color: #fff; }
html.light .project-dl-btn { background: var(--white); color: #fff; border-color: var(--white); }
html.light .project-dl-btn:hover { box-shadow: 0 0 24px rgba(0,0,0,0.15); }
html.light .project-live-btn { background: color-mix(in srgb, var(--accent-solid) 10%, transparent); color: color-mix(in srgb, var(--accent-solid) 65%, #000); border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); }
html.light .btn-primary:hover { box-shadow: 0 0 28px rgba(0,0,0,0.15); }
html.light .btn-ghost { border-color: rgba(80,80,140,0.3); }

/* GitHub card with chart */
html.light .gh-card { background: rgba(255,255,255,0.6); }
html.light .gh-stats-row { background: rgba(0,0,0,0.02); }
html.light .gh-lang-chart::before { border: 3px solid rgba(0,0,0,0.15); }
html.light .gh-lang-chart::after { box-shadow: 0 0 14px 4px rgba(0,0,0,0.3); }

/* Tech stack orbital pills */
html.light .orbit-item { background: rgba(240,240,248,0.8); border-color: rgba(80,80,140,0.15); color: var(--white); }

/* Day in the Life Timeline */
html.light .timeline-section { background: rgba(255,255,255,0.5); }
html.light .timeline-node { background: var(--bg); }
html.light .timeline-card { background: rgba(0,0,0,0.02); }
html.light .timeline-track::before { opacity: 0.5; }

/* Skill tabs + items */
html.light .skill-panel { background: rgba(255,255,255,0.6); }
html.light .skill-tab { color: var(--gray-dim); border-color: var(--border); }
html.light .skill-tab.active { background: var(--white); color: #fff; }
html.light .skill-item { background: rgba(0,0,0,0.02); }
html.light .skill-item:hover { background: rgba(0,0,0,0.05); }
html.light .skill-role-pill { color: #0e7490; border-color: rgba(6,182,212,0.25); background: rgba(6,182,212,0.08); }
html.light .skill-role-pill:hover { background: rgba(6,182,212,0.16); box-shadow: 0 0 12px rgba(6,182,212,0.15); }

/* Project cards */
html.light .project-card { background: rgba(255,255,255,0.6); }
html.light .project-card:hover { box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 0 40px color-mix(in srgb, var(--accent-solid) 8%, transparent); }
html.light .project-cat { background: color-mix(in srgb, var(--accent-solid) 8%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); }
html.light .project-tags span { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: var(--gray); }
html.light .gh-live-label { background: color-mix(in srgb, var(--accent-solid) 8%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); }

/* AMA Send button + Sort pills */
html.light .ama-card { background: rgba(255,255,255,0.6); }
html.light .ama-deco-icon { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent-solid) 25%, transparent)); }
html.light .ama-counter { background: rgba(0,0,0,0.04); border-color: var(--border); }
html.light .ama-counter-bar { background: rgba(0,0,0,0.08); }
html.light .ama-input-icon { color: var(--gray-dim); }
html.light .ama-input-wrap:focus-within .ama-input-icon,
html.light .ama-textarea-wrap:focus-within .ama-input-icon { color: var(--accent); }
html.light .ama-sort-btn { color: var(--gray-dim); border-color: var(--border); }
html.light .ama-sort-btn.active { background: var(--white); color: #fff; }
html.light .ama-name-input { background: rgba(0,0,0,0.03); color: var(--white); }
html.light .ama-name-input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-solid) 10%, transparent), 0 0 16px color-mix(in srgb, var(--accent-solid) 6%, transparent); }
html.light .ama-input { background: rgba(0,0,0,0.03); color: var(--white); }
html.light .ama-input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-solid) 10%, transparent), 0 0 16px color-mix(in srgb, var(--accent-solid) 6%, transparent); }
html.light .ama-q { border-color: var(--border); background: transparent; }
html.light .ama-q:hover { border-color: color-mix(in srgb, var(--accent-solid) 25%, var(--border)); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
html.light .ama-divider { background: linear-gradient(90deg, transparent, var(--border), transparent); }
html.light .ama-vote-btn { border-color: var(--border); color: var(--gray); }
html.light .ama-react-btn { border-color: var(--border); background: rgba(0,0,0,0.03); }
html.light .ama-page { border-color: var(--border); color: var(--gray-dim); }
html.light .ama-page.active { background: var(--white); color: #fff; border-color: var(--white); }
html.light .ama-page:hover:not(.active) { border-color: var(--border-hover); background: rgba(0,0,0,0.03); }

/* AniList tabs + pagination */
html.light .anilist-card { background: rgba(255,255,255,0.6); }
html.light .al-sub { background: color-mix(in srgb, var(--accent-solid) 8%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); }
html.light .al-tab { color: var(--gray); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); background: color-mix(in srgb, var(--accent-solid) 8%, transparent); }
html.light .al-tab.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
html.light .al-sort-btn { color: var(--gray); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); background: color-mix(in srgb, var(--accent-solid) 8%, transparent); }
html.light .al-sort-btn.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
html.light .al-genre-pill { color: var(--gray); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); background: color-mix(in srgb, var(--accent-solid) 8%, transparent); }
html.light .al-genre-pill.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
html.light .al-stat-card { border-color: var(--border); background: rgba(0,0,0,0.03); }
html.light .al-sc-val { color: var(--gray); }
html.light .al-sc-accent { border-color: rgba(16,185,129,0.25); background: rgba(16,185,129,0.06); }
html.light .al-sc-accent .al-sc-val { color: #059669; }
html.light .al-genre-tag { border-color: var(--border); background: rgba(0,0,0,0.02); }
html.light .al-genre-tag::before { background: var(--accent); }
html.light .al-gt-name { color: var(--gray); }
html.light .al-item-bar { background: rgba(0,0,0,0.07); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04); }
html.light .al-item-bar i { box-shadow: 0 0 8px rgba(0,120,200,0.35); }
html.light .al-item-score { background: color-mix(in srgb, var(--accent-solid) 8%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); }
html.light .al-item-score b { color: var(--gray); }
@media (prefers-reduced-motion: reduce) { .al-item-bar i::after { animation: none; } .al-item-bar i { transition: none; } }
html.light .al-page-btn { border-color: var(--border); color: var(--gray); }
html.light .al-page-btn.active { background: var(--white); color: #fff; border-color: var(--white); }
html.light .al-page-btn:hover:not(.active):not(:disabled) { border-color: var(--border-hover); background: rgba(0,0,0,0.03); }
html.light .al-page-dots { color: var(--gray-dim); }

/* Full Music Player */
html.light .slide-player-panel { background: rgba(245,245,250,0.95); }
html.light .sp-title { color: var(--white); }
html.light .sp-artist { color: var(--gray); }
html.light .sp-times span { color: var(--gray-dim); }
html.light .sp-progress-bar { background: rgba(0,0,0,0.1); }
html.light .sp-progress-fill { background: var(--accent); }
html.light .sp-vol-slider { background: rgba(0,0,0,0.15); }
html.light .sp-vol-slider::-webkit-slider-thumb { background: #fff; border: 1px solid var(--border-hover); }
html.light .sp-close { color: rgba(0,0,0,0.5); border-color: rgba(0,0,0,0.12); }
html.light .sp-yt-link { color: var(--gray); }
html.light .sp-cd-disc {
  background:
    radial-gradient(circle at 50% 50%, var(--accent) 0 12%, color-mix(in srgb, var(--accent-solid) 30%, transparent) 13%, transparent 14%),
    radial-gradient(circle at 50% 50%, #aaa 0 4%, transparent 4.5%),
    repeating-radial-gradient(circle at 50% 50%, #bbb 0 1px, #999 1px 3px);
  border-color: rgba(0,0,0,0.4);
}
html.light .sp-cd-disc::before {
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(59,130,246,0.35) 20deg,
    rgba(80,160,255,0.4) 50deg,
    rgba(120,80,255,0.35) 80deg,
    rgba(200,60,255,0.3) 110deg,
    rgba(240,80,180,0.25) 140deg,
    transparent 170deg,
    transparent 240deg,
    rgba(59,130,246,0.2) 280deg,
    rgba(120,80,255,0.15) 320deg,
    transparent 360deg
  );
  mix-blend-mode: multiply;
}
html.light .sp-cd-label { background: linear-gradient(135deg, color-mix(in srgb, var(--accent-solid) 20%, transparent), rgba(0,150,220,0.15)); }
html.light .sp-cd-cover { box-shadow: 0 4px 20px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(0,0,0,0.06); }
html.light .tb-cd-disc {
  background:
    radial-gradient(circle at 50% 50%, var(--accent) 0 22%, transparent 22%),
    radial-gradient(circle at 50% 50%, #ddd 0 8%, transparent 8%),
    repeating-radial-gradient(circle at 50% 50%, #e0e0e0 0 1px, #ccc 1px 2px);
}
html.light .tb-cd-disc::before {
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    color-mix(in srgb, var(--accent-solid) 20%, transparent) 30deg,
    rgba(120,80,255,0.18) 60deg,
    rgba(200,60,220,0.15) 90deg,
    transparent 120deg,
    transparent 360deg
  );
}
html.light .tb-cd-cover { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* Last.fm card */
html.light .lastfm-card { background: rgba(255,255,255,0.6); }
html.light .lfm-stat-pill { background: color-mix(in srgb, var(--accent-solid) 8%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); }
html.light .lfm-stat-pill b { color: var(--gray); }
html.light .lfm-nowplaying { background: rgba(255,255,255,0.95); border-color: rgba(0,0,0,0.08); }
html.light .lfm-nowplaying.live { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 0 16px rgba(16, 185, 129, 0.1); }
html.light .lfm-np-bg { filter: blur(50px) saturate(1.8) brightness(1.05); }
html.light .lfm-nowplaying.live .lfm-np-bg { opacity: 0.4; }
html.light .lfm-np-bg-ghost { filter: blur(4px) saturate(0.8) brightness(0.95); }
html.light .lfm-nowplaying.live .lfm-np-bg-ghost { opacity: 0.8; }
html.light .lfm-np-label { color: var(--accent); }
html.light .lfm-np-track { color: #18181b; }
html.light .lfm-np-artist { color: #52525b; }
html.light .lfm-np-album { color: #71717a; background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.08); }
html.light .lfm-np-label, html.light .lfm-np-track, html.light .lfm-np-artist { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.08); }
html.light .lfm-nowplaying.live .lfm-np-label, html.light .lfm-nowplaying.live .lfm-np-track, html.light .lfm-nowplaying.live .lfm-np-artist, html.light .lfm-nowplaying.live .lfm-np-album { background: rgba(255,255,255,0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-color: rgba(255,255,255,0.3); }
html.light .lfm-nowplaying.live .lfm-np-track { color: #18181b; }
html.light .lfm-nowplaying.live .lfm-np-artist { color: #52525b; }
html.light .lfm-nowplaying.live .lfm-np-album { color: #71717a; }
html.light .lfm-track:hover, html.light .lfm-artist:hover { background: rgba(0,0,0,0.03); }

html.light .lfm-activity-bar { background: color-mix(in srgb, var(--accent-solid) 40%, transparent); }
html.light .lfm-activity-label { background: color-mix(in srgb, var(--accent-solid) 8%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); }
html.light .lfm-activity-label b { color: var(--gray); }
html.light .lfm-col-title { background: color-mix(in srgb, var(--accent-solid) 8%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); }
html.light .lfm-period-tab { color: var(--gray); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); background: color-mix(in srgb, var(--accent-solid) 8%, transparent); }
html.light .lfm-period-tab.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
html.light .lfm-vibe-label { color: var(--gray); }
html.light .lfm-vibe-pill { font-weight: 500; }
html.light .lfm-genre-chart { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
html.light .lfm-genre-pie-center { background: var(--card-bg, #fff); }
html.light .lfm-genre-legend-name { color: #333; }
html.light .lfm-heatmap { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
html.light .lfm-heatmap-cell { border-color: rgba(0,0,0,0.06); }
html.light .lfm-heatmap-cell:hover { border-color: rgba(0,0,0,0.12); }
html.light .lfm-heatmap-count { color: #222; }
html.light .lfm-heatmap-day { color: #777; }
html.light .lfm-heatmap-cell-peak .lfm-heatmap-day { color: var(--accent); }
html.light .lfm-heatmap-title { color: #333; }
html.light .lfm-playcount-badge { background: color-mix(in srgb, var(--accent-solid) 10%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 18%, transparent); }
html.light .lfm-np-progress { background: rgba(0,0,0,0.06); }

/* Contributions card */
html.light .contrib-card { background: rgba(255,255,255,0.6); }

/* WakaTime card */
html.light .wakatime-card { background: rgba(255,255,255,0.6); }

/* Glass card glow in light mode */
html.light .glass-card::after {
  background: radial-gradient(120px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), color-mix(in srgb, var(--accent-solid) 20%, transparent), transparent 40%);
}

/* Playground cards */
html.light .pg-overlay { background: rgba(245,245,250,0.96); }
html.light .pg-close { color: rgba(0,0,0,0.5); border-color: rgba(0,0,0,0.12); }
html.light .pg-canvas { background: #f0f0f8; }

/* Section dividers */
/* section-dividers light mode removed */

/* Shortcut overlay */
html.light .shortcut-card { background: rgba(255,255,255,0.98); border-color: rgba(0,0,0,0.1); }
html.light kbd { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: var(--accent); }

/* Achievement toast */
html.light .achievement-toast { background: rgba(255,255,255,0.98); border-color: var(--accent); }

/* Skeleton loading */
html.light .skeleton { background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.09) 50%, rgba(0,0,0,0.04) 75%); }

/* Footer bar */
/* Presence grid */
html.light .presence-link { background: color-mix(in srgb, var(--accent-solid) 5%, transparent); border-color: color-mix(in srgb, var(--accent-solid) 14%, transparent); }
html.light .presence-link:hover { border-color: color-mix(in srgb, var(--accent-solid) 30%, transparent); background: color-mix(in srgb, var(--accent-solid) 12%, transparent); box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
html.light .presence-name { color: var(--gray-dim); }
html.light .presence-link:hover .presence-name { color: var(--gray); }

/* Footer bar */
html.light .footer-line { background: linear-gradient(90deg, transparent, rgba(80,80,140,0.2), transparent); }
html.light .footer-logo { color: #fff; }
html.light .footer-brand { color: var(--gray); }
html.light .footer-copy { color: var(--gray-dim); background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
html.light .footer-link { border-color: rgba(80,80,140,0.15); color: var(--gray-dim); }
html.light .footer-link:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 6%, transparent); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent-solid) 10%, transparent); }
html.light .footer-nav a:hover { color: var(--accent); background: color-mix(in srgb, var(--accent-solid) 6%, transparent); }

/* ============ AMA Featured / Spotlight ============ */
:root {
  --ama-featured-purple: #D0BCFF;
  --ama-featured-purple-line: rgba(208,188,255,0.28);
  --ama-pinned-blue: #00C8FF;
  --ama-pinned-blue-line: rgba(0,200,255,0.20);
  --ama-card-bg: rgba(255,255,255,0.035);
}
html.light {
  --ama-featured-purple: #6750A4;
  --ama-featured-purple-line: rgba(103,80,164,0.26);
  --ama-pinned-blue: #006CBA;
  --ama-pinned-blue-line: rgba(0,108,186,0.20);
  --ama-card-bg: rgba(255,255,255,0.6);
}

.ama-featured { margin: 22px 0 26px; }
.ama-featured-label { display: none !important; }

/* Badge layout */
.ama-badge-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.ama-badge-row .ama-pin-badge,
.ama-badge-row .ama-spotlight-badge { margin: 0; }
.ama-badge-row .ama-pin-badge:nth-child(2) { margin-left: auto; }

.ama-spotlight-badge,
.ama-pin-badge,
.ama-topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 4px 9px;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}
.ama-spotlight-badge {
  color: var(--ama-featured-purple) !important;
  background: rgba(208,188,255,0.12) !important;
  border: 1px solid var(--ama-featured-purple-line) !important;
}
.ama-pin-badge {
  color: var(--ama-pinned-blue) !important;
  background: rgba(0,200,255,0.10) !important;
  border: 1px solid var(--ama-pinned-blue-line) !important;
}
.ama-topic-badge {
  color: var(--gray);
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--border);
  margin-left: auto;
}
.ama-badge-row .ama-topic-badge:first-child { margin-left: 0; }
.ama-badge-row .ama-pin-badge:nth-child(2) + .ama-topic-badge { margin-left: 8px; }
html.light .ama-spotlight-badge { background: rgba(103,80,164,0.10) !important; }
html.light .ama-pin-badge { background: rgba(0,108,186,0.08) !important; }
html.light .ama-topic-badge { background: rgba(0,0,0,0.035); border-color: var(--border); }

.ama-spotlight-icon,
.ama-q-meta-spotlight,
.ama-q-meta-spotlight .ama-q-meta-icon { color: var(--ama-featured-purple) !important; }
.ama-pin-icon { color: var(--ama-pinned-blue) !important; }
.ama-spotlight-icon,
.ama-pin-icon { font-size: 13px !important; font-variation-settings: 'FILL' 1, 'wght' 700, 'opsz' 20; }

.ama-empty-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gray-dim);
  text-align: center;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 14px;
}

/* State cards: no glow, no body tint. */
.ama-q.ama-q-spotlight,
.ama-q.ama-q-featured-card {
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  background: var(--ama-card-bg) !important;
}
.ama-q.ama-q-spotlight:not(.ama-q-pinned) {
  border-color: var(--ama-featured-purple-line) !important;
}
.ama-q.ama-q-pinned:not(.ama-q-spotlight) {
  border-color: var(--ama-pinned-blue-line) !important;
  background: var(--ama-card-bg) !important;
}

/* Featured + pinned: TRUE border-only split, no body tint. */
.ama-q.ama-q-spotlight.ama-q-pinned,
.ama-q.ama-q-featured-card.ama-q-spotlight.ama-q-pinned {
  position: relative !important;
  border-color: transparent !important;
  background: var(--ama-card-bg) !important;
  overflow: hidden !important;
}
.ama-q.ama-q-spotlight.ama-q-pinned::before,
.ama-q.ama-q-featured-card.ama-q-spotlight.ama-q-pinned::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  padding: 1px !important;
  border-radius: inherit !important;
  background: linear-gradient(to bottom,
    var(--ama-featured-purple-line) 0%,
    var(--ama-featured-purple-line) 50%,
    var(--ama-pinned-blue-line) 50%,
    var(--ama-pinned-blue-line) 100%) !important;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
  mask-composite: exclude !important;
  pointer-events: none !important;
  z-index: 1 !important;
  box-shadow: none !important;
  filter: none !important;
}
.ama-q.ama-q-spotlight.ama-q-pinned > *,
.ama-q.ama-q-featured-card.ama-q-spotlight.ama-q-pinned > * {
  position: relative;
  z-index: 2;
}
.ama-q.ama-q-spotlight::after,
.ama-q.ama-q-featured-card::after,
.ama-spotlight-badge::before,
.ama-spotlight-badge::after {
  content: none !important;
  display: none !important;
}

/* AMA topic pill icon */
.ama-topic-icon {
  font-size: 13px !important;
  line-height: 1;
  color: var(--gray-dim);
  font-variation-settings: 'FILL' 1, 'wght' 600, 'opsz' 20;
}
html.light .ama-topic-icon { color: var(--gray-dim); }

/* ============ Global mobile tap/hold highlight reset ============ */
html, body,
a, button, input, textarea, select, label,
[role="button"], [tabindex], summary,
.topbar-music-widget, .tb-icon-btn, .theme-toggle,
.btn-primary, .btn-ghost, .project-dl-btn, .project-live-btn,
.skill-tab, .al-tab, .ama-sort-btn, .ama-vote-btn, .ama-react-btn,
.ama-page, .ama-refresh-btn, .pg-card, .diff-btn,
.sp-close, .sp-play-btn, .sp-progress-bar, .sp-vol-slider,
.cmd-search-toggle, .cmd-submit-btn, .cmd-item,
.lfm-link, .al-link, .presence-link, .footer-link, .footer-nav a,
.interest-card, .project-card, .gh-card, .glass-card {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  -webkit-touch-callout: none;
}

button, a, [role="button"], summary,
.topbar-music-widget, .tb-icon-btn, .theme-toggle,
.btn-primary, .btn-ghost, .project-dl-btn, .project-live-btn,
.skill-tab, .al-tab, .ama-sort-btn, .ama-vote-btn, .ama-react-btn,
.ama-page, .ama-refresh-btn, .pg-card, .diff-btn,
.sp-close, .sp-play-btn, .cmd-search-toggle, .cmd-submit-btn, .cmd-item,
.presence-link, .footer-link, .footer-nav a {
  touch-action: manipulation;
}

/* Keep UI chrome from showing browser/native red press surfaces. */
button:active, a:active, [role="button"]:active, summary:active,
.topbar-music-widget:active, .tb-icon-btn:active, .theme-toggle:active,
.btn-primary:active, .btn-ghost:active, .project-dl-btn:active, .project-live-btn:active,
.skill-tab:active, .al-tab:active, .ama-sort-btn:active, .ama-vote-btn:active, .ama-react-btn:active,
.ama-page:active, .ama-refresh-btn:active, .pg-card:active, .diff-btn:active,
.sp-close:active, .sp-play-btn:active, .cmd-search-toggle:active, .cmd-submit-btn:active, .cmd-item:active,
.presence-link:active, .footer-link:active, .footer-nav a:active {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  outline: none;
}

/* Inputs keep focus usability but remove native mobile hold/tap overlays. */
input:active, textarea:active, select:active,
input:focus, textarea:focus, select:focus {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}

/* Preserve readable text selection, but make selected text blue/cyan instead of red. */
::selection {
  background: color-mix(in srgb, var(--accent-solid) 24%, transparent) !important;
  color: var(--white);
}
html.light ::selection {
  background: rgba(103,80,164,0.22) !important;
  color: var(--white);
}
