/* ── Reset & base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #070707;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Grid background ────────────────────────────────────────────────── */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Glass card ─────────────────────────────────────────────────────── */
.glass-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.glass-card-sm {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.glass-card-sm:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}

/* ── Hub card ───────────────────────────────────────────────────────── */
.hub-card {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 32px 80px rgba(0,0,0,0.6),
    0 8px 24px rgba(0,0,0,0.4);
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  will-change: transform;
}
.hub-card:hover {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 40px 100px rgba(0,0,0,0.7),
    0 12px 32px rgba(0,0,0,0.5);
}

/* Tilt shine overlay */
.card-shine {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255,255,255,0.06) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
}
.hub-card:hover .card-shine { opacity: 1; }

/* ── Card divider ───────────────────────────────────────────────────── */
.card-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.07) 30%, rgba(255,255,255,0.07) 70%, transparent);
}

/* ── Inner card (project) ───────────────────────────────────────────── */
.inner-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  will-change: transform;
}

/* ── Project card hover ─────────────────────────────────────────────── */
.project-card {
  animation: fadeUp 0.5s ease both;
  will-change: transform;
}
.project-card:hover {
  background: rgba(255,255,255,0.055);
  border-color: rgba(255,255,255,0.13);
  transform: translateY(-2px);
}
.project-card:active {
  transform: translateY(0);
}

/* ── Section label ──────────────────────────────────────────────────── */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}

/* ── Social icon ────────────────────────────────────────────────────── */
.social-icon {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.social-icon:hover {
  transform: translateY(-2px);
}

/* ── Progress bar ───────────────────────────────────────────────────── */
.player-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.player-progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.6);
  border-radius: 99px;
  transition: width 0.8s linear;
}

/* ── Music bars animation ───────────────────────────────────────────── */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
}
.bars span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.25);
  height: 4px;
  transition: background 0.3s ease;
}

.bars--play span { background: rgba(255,255,255,0.7); }
.bars--play span:nth-child(1) { animation: bar 0.9s ease-in-out infinite; }
.bars--play span:nth-child(2) { animation: bar 0.7s ease-in-out infinite 0.15s; }
.bars--play span:nth-child(3) { animation: bar 1.1s ease-in-out infinite 0.05s; }
.bars--play span:nth-child(4) { animation: bar 0.8s ease-in-out infinite 0.3s; }

@keyframes bar {
  0%, 100% { height: 4px; }
  50%       { height: 18px; }
}

/* ── Fade-up entrance ───────────────────────────────────────────────── */
.fade-up {
  animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Scrollbar ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Selection ──────────────────────────────────────────────────────── */
::selection { background: rgba(255,255,255,0.12); color: #fff; }

/* ── Music player redesign ───────────────────────────────────────────── */
.player-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.player-art-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-art {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.player-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.04), transparent 60%);
}
.player-art--playing {
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 0 20px rgba(255,255,255,0.05);
}

.player-art-inner {
  position: relative;
  z-index: 1;
}

.player-art-ring {
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 50%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.player-art--playing .player-art-ring { opacity: 1; }

.player-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
  animation: pulse 2.5s ease-in-out infinite;
}

.player-progress-wrap {
  padding: 0 2px;
}



/* ── Responsive tweaks ──────────────────────────────────────────────── */
@media (max-width: 380px) {
  main { padding-left: 1rem; padding-right: 1rem; }
}
