@font-face { font-family: "Metropolis"; src: url("/fonts/metropolis-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Metropolis"; src: url("/fonts/metropolis-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Metropolis"; src: url("/fonts/metropolis-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Metropolis"; src: url("/fonts/metropolis-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
:root {
  --bg: #030403;
  --text: #ece8e1;
  --muted: #8a8f8b;
  --faint: #232825;
  --c1: #0d7a45;
  --c2: #06402a;
  --c3: #1db954;
  --font: "Metropolis", system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }

.ambient {
  position: fixed;
  inset: -20%;
  z-index: 0;
  filter: blur(110px);
  opacity: 0.32;
}
.ambient i {
  position: absolute;
  width: 42vmax;
  height: 42vmax;
  border-radius: 50%;
  transition: background 3s ease;
}
.ambient i:nth-child(1) { background: var(--c1); top: 5%; left: 0; animation: drift-a 38s ease-in-out infinite alternate; }
.ambient i:nth-child(2) { background: var(--c2); top: 40%; right: -5%; animation: drift-b 46s ease-in-out infinite alternate; }
.ambient i:nth-child(3) { background: var(--c3); bottom: -5%; left: 25%; opacity: 0.35; animation: drift-c 54s ease-in-out infinite alternate; }

.art-ambience {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}
.art-ambience.on { opacity: 1; }
.art-ambience canvas { width: 100%; height: 100%; display: block; }
/* Same 0.65 brightness Lyssna puts over its artwork, a bit darker so the text keeps contrast. */
.art-ambience::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }

@keyframes drift-a { to { transform: translate(18vw, 12vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-22vw, -8vh) scale(0.9); } }
@keyframes drift-c { to { transform: translate(-10vw, -20vh) scale(1.2); } }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, 0.85));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.frame {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(24px, 4vw, 48px);
}

main {
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 600px;
}

.intro { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }

.avatar {
  width: clamp(64px, 9vw, 96px);
  height: clamp(64px, 9vw, 96px);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 40px rgba(0, 0, 0, 0.5);
}

h1 {
  margin: 0;
  font: 800 clamp(3.5rem, 10vw, 6.5rem)/0.95 var(--font);
  letter-spacing: -0.045em;
}

.about {
  max-width: 46ch;
  margin: 24px auto 40px;
  text-align: center;
  color: var(--muted);
}

.work {
  list-style: none;
  margin: 0;
  padding: 0 20px;
  border: 1px solid var(--faint);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}
.work li + li { border-top: 1px solid var(--faint); }
.work a {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name role" "desc role";
  column-gap: 24px;
  padding: 18px 0;
}
.name { grid-area: name; justify-self: start; font: 700 1.6rem/1.2 var(--font); letter-spacing: -0.02em; transition: transform 0.4s ease; }
.desc { grid-area: desc; }
.role { grid-area: role; align-self: center; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.desc { color: var(--muted); font-size: 14px; transition: color 0.3s; }
.work a:hover .name { transform: translateX(8px); }
.work a:hover .desc { color: var(--text); }

footer { font-size: 13px; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; color: var(--muted); }
footer nav a { transition: color 0.2s; }
footer nav a:hover { color: var(--text); }

.now-playing {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 14px;
  border: 1px solid var(--faint);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s;
}
.now-playing[hidden] { display: none; }
.now-playing:hover { border-color: rgba(30, 215, 96, 0.35); }
.np-art { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--faint); }
.np-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.np-status { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.np-title { font-weight: 700; margin-top: 2px; }
.np-title, .np-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { color: var(--muted); font-size: 14px; }
.np-playback { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.np-time { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; min-width: 3ch; }
.np-bar { flex: 1; height: 3px; border-radius: 2px; background: var(--faint); overflow: hidden; }
.np-bar span { display: block; height: 100%; width: 0; background: #1ed760; transition: width 1s linear; }
.now-playing:not(.playing) .np-playback { display: none; }
.now-playing.playing .np-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: #1ed760;
  vertical-align: 1px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }
main > *, footer { animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
main > :nth-child(2) { animation-delay: 0.1s; }
main > :nth-child(3) { animation-delay: 0.2s; }
main > :nth-child(4) { animation-delay: 0.3s; }
footer { animation-delay: 0.35s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

@media (max-height: 860px) {
  .frame { padding-block: 20px; }
  .avatar { width: 64px; height: 64px; }
  .intro { gap: 12px; }
  h1 { font-size: clamp(3rem, 9vh, 5rem); }
  .about { margin: 14px auto 22px; }
  .work a { padding: 12px 0; }
  .now-playing { margin-top: 16px; padding: 10px; }
  .np-art { width: 52px; height: 52px; }
}

@media (max-width: 640px) {
  .about { margin-bottom: 32px; }
  footer { margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, .ambient i { animation: none !important; transition: none !important; }
}
