:root {
  --bg: #08070b;
  --text: #f2eef7;
  --muted: #a59db5;
  --tiny: #736b85;
  --line: rgba(255, 255, 255, 0.09);
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --pink: #ff7ac8;
  --violet: #a98bff;
  --cyan: #7fd8ff;
  --green: #5ee6a8;
  --amber: #ffcf6e;
  --red: #ff6e8a;
  --radius: 22px;
  --shell: min(1080px, calc(100% - 44px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(169, 139, 255, 0.18), transparent 62%),
    radial-gradient(700px 520px at 92% 2%, rgba(255, 122, 200, 0.13), transparent 62%),
    radial-gradient(900px 700px at 50% 118%, rgba(127, 216, 255, 0.09), transparent 65%);
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: var(--pink);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

/* --- Top bar ------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 7, 11, 0.72);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #140b17;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav a {
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.85rem;
}

.chip-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #0c0a12;
  font-weight: 800;
  font-size: 0.8rem;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.link-button:hover {
  color: var(--pink);
}

/* --- Buttons ------------------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  color: #140b17;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  color: #140b17;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(255, 122, 200, 0.25);
}

.button.small {
  padding: 7px 15px;
  font-size: 0.85rem;
}

.button.ghost {
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button.ghost:hover {
  color: var(--text);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.12);
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 42px;
  align-items: end;
  padding: 74px 0 54px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--tiny);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(3.2rem, 8.5vw, 6.4rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.hero h1 .accent {
  color: var(--pink);
}

.tagline {
  max-width: 30ch;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.small {
  font-size: 0.9rem;
}

.muted {
  color: var(--muted);
}

.tiny {
  margin: 0;
  color: var(--tiny);
  font-size: 0.8rem;
}

.account-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.account-card h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.account-card .button {
  margin-top: 12px;
}

.account-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #0b0911;
  font-size: 1.25rem;
  font-weight: 800;
}

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px solid rgba(255, 207, 110, 0.3);
  border-radius: 999px;
  color: var(--amber);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.kv {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.kv dt {
  color: var(--tiny);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  padding-top: 2px;
}

.kv dd {
  margin: 0;
  color: var(--muted);
  text-align: right;
}

/* --- Sections ------------------------------------------------------------ */

.section {
  padding: 34px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.hint {
  color: var(--tiny);
  font-size: 0.78rem;
}

.panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.panel-title {
  margin: 0 0 14px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.music-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 20px;
  align-items: stretch;
}

.now-panel {
  display: flex;
  gap: 26px;
  align-items: center;
  min-height: 234px;
  background:
    radial-gradient(360px 220px at 8% 20%, rgba(255, 122, 200, 0.1), transparent 70%),
    var(--panel);
}

.art {
  flex: 0 0 auto;
  width: 172px;
  height: 172px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(140deg, #2a2033, #16121d);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-fallback {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 3rem;
}

.now-meta {
  min-width: 0;
  flex: 1;
}

.now-meta h2 {
  margin: 0 0 6px;
  overflow: hidden;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-meta .muted {
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-meta .tiny {
  min-height: 1.2em;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tiny);
}

.status-online {
  background: var(--green);
  box-shadow: 0 0 10px rgba(94, 230, 168, 0.7);
}

.status-idle {
  background: var(--amber);
}

.status-dnd {
  background: var(--red);
}

.status-offline {
  background: var(--tiny);
}

.progress {
  height: 4px;
  margin: 18px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--violet));
  transition: width 0.9s linear;
}

/* --- Recently played ---------------------------------------------------- */

.plays {
  display: grid;
  gap: 2px;
  max-height: 248px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.play {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 4px;
  border-top: 1px solid var(--line);
}

.play:first-child {
  border-top: 0;
}

.play.empty {
  display: block;
  padding: 16px 4px;
  border-top: 0;
  color: var(--tiny);
  font-size: 0.85rem;
  line-height: 1.6;
}

.play-art {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(140deg, #2a2033, #16121d);
  color: rgba(255, 255, 255, 0.3);
}

.play-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.play-meta strong,
.play-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-meta strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.play-meta span {
  color: var(--tiny);
  font-size: 0.78rem;
}

.play time {
  color: var(--tiny);
  font-size: 0.72rem;
  white-space: nowrap;
}

/* --- Projects ----------------------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.project {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.project:hover {
  border-color: rgba(255, 122, 200, 0.35);
  background: var(--panel-strong);
  transform: translateY(-2px);
}

.project h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.project p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.project-arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--tiny);
  font-size: 0.95rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--tiny);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

/* --- Footer and error --------------------------------------------------- */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 40px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--tiny);
  font-size: 0.8rem;
}

.footer a {
  color: var(--muted);
}

.error-page {
  max-width: 620px;
  padding: 90px 0;
}

.error-page h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.04em;
}

.detail {
  margin: 20px 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
  font-size: 0.8rem;
  white-space: pre-wrap;
}

.error-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 26px;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.86em;
}

@media (max-width: 860px) {
  .hero,
  .music-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    padding-top: 52px;
  }

  .now-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .art {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 280px;
  }

  .hint {
    display: none;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .project,
  .progress span {
    transition: none;
  }
}

/* Dev deployment: no account card, so the hero is a single column. */
.hero.hero-solo {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
}
