:root {
  --grad-top: #0a1a3f;
  --grad-bottom: #050b1f;
  --accent: #4f8cff;
}

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

html, body { height: 100%; }

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: #eaf0ff;
  background: linear-gradient(160deg, var(--grad-top) 0%, var(--grad-bottom) 100%);
  background-attachment: fixed;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 20px 48px;
  overflow-x: hidden;
}

/* Rain canvas — full screen, behind content */
#rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  text-align: center;
  animation: fadeUp 0.7s ease both;
}

.avatar {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 40px rgba(79, 140, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.name {
  margin-top: 20px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bio {
  margin: 8px auto 0;
  max-width: 340px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(234, 240, 255, 0.62);
  font-weight: 400;
}

.links {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  border-radius: 14px;
  text-decoration: none;
  color: #eaf0ff;
  font-weight: 600;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.18s ease, background 0.18s ease,
              border-color 0.18s ease, box-shadow 0.18s ease;
}

.link:hover {
  transform: translateY(-2px) scale(1.01);
  background: rgba(79, 140, 255, 0.16);
  border-color: rgba(79, 140, 255, 0.55);
  box-shadow: 0 8px 30px rgba(79, 140, 255, 0.28);
}

.link:active { transform: translateY(0) scale(0.99); }

.link .icon { font-size: 1.15rem; line-height: 1; }

/* ---- Rich media cards (YouTube / Spotify) ---- */
.media {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.media:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 140, 255, 0.5);
  box-shadow: 0 8px 30px rgba(79, 140, 255, 0.25);
}

/* YouTube preview thumbnail */
.yt-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-color: #000;
}
.yt-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.35));
  transition: background 0.18s ease;
}
.yt-preview:hover::after { background: rgba(0,0,0,0.15); }
.yt-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transition: transform 0.18s ease;
}
.yt-preview:hover .yt-play { transform: scale(1.08); }

/* YouTube iframe after click */
.media iframe:not(.spotify) {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* Spotify embed */
.spotify {
  display: block;
  width: 100%;
  height: 152px;
  border: 0;
  border-radius: 12px;
}

/* Caption strip under media */
.media-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  text-decoration: none;
  color: #eaf0ff;
  font-weight: 600;
  font-size: 0.95rem;
}
.media-cap--center { justify-content: center; }
.media-cap:hover { color: var(--accent); }

/* Bio hyperlink */
.bio a {
  color: #eaf0ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 140, 255, 0.6);
  transition: color 0.18s ease;
}
.bio a:hover { color: var(--accent); }

.footer {
  margin-top: 40px;
  font-size: 0.8rem;
  color: rgba(234, 240, 255, 0.35);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 420px) {
  body { padding-top: 52px; }
  .avatar { width: 100px; height: 100px; }
  .name { font-size: 1.4rem; }
}
