:root {
  --bg: #0f172a;
  --button: #38bdf8;
  --text: #f8fafc;
  --radius: 14px;
  --ink: #10131e;
  --accent-red: #ef4444;
  --accent-blue: #2563eb;
  --accent-yellow: #facc15;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  position: relative;
  background:
    linear-gradient(118deg, rgba(255, 212, 59, .14) 0 14%, transparent 14% 100%),
    linear-gradient(244deg, rgba(239, 62, 66, .16) 0 13%, transparent 13% 100%),
    linear-gradient(145deg, var(--bg), color-mix(in srgb, var(--bg) 72%, #050816));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  justify-content: center;
  padding: 32px 16px 48px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.72), transparent 70%);
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- profile ---- */
.profile {
  text-align: center;
  margin-bottom: 18px;
  width: 100%;
}

.hero-media {
  position: relative;
  height: 152px;
  margin: 2px auto 14px;
  isolation: isolate;
}

.hero-card {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 96px;
  height: 128px;
  border: 4px solid #f8fafc;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,255,255,0) 34%),
    linear-gradient(160deg, var(--accent-yellow), #f97316 46%, var(--accent-red));
  box-shadow: 0 18px 34px rgba(0,0,0,.24);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 9px;
  border: 2px solid rgba(16,19,30,.42);
  background:
    radial-gradient(circle at 52% 42%, #fff 0 14px, var(--accent-blue) 15px 33px, transparent 34px),
    repeating-linear-gradient(-18deg, rgba(16,19,30,.22) 0 6px, transparent 7px 15px);
}

.hero-card-left {
  transform: translateX(-110px) rotate(-12deg);
}

.hero-card-right {
  transform: translateX(12px) rotate(11deg);
  background:
    linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,0) 34%),
    linear-gradient(160deg, #38bdf8, var(--accent-blue) 52%, #312e81);
}

.hero-orb {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 40px;
  width: 100px;
  height: 100px;
  transform: translateX(-50%);
  border: 5px solid #f8fafc;
  border-radius: 50%;
  background:
    linear-gradient(to bottom, var(--accent-red) 0 45%, #10131e 46% 54%, #f8fafc 55% 100%);
  box-shadow: 0 20px 42px rgba(0,0,0,.3), inset 0 6px 0 rgba(255,255,255,.28);
}

.hero-orb span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border: 5px solid #10131e;
  border-radius: 50%;
  background: #f8fafc;
}

.hero-spark {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 36px;
  clip-path: polygon(48% 0, 100% 0, 67% 42%, 100% 42%, 32% 100%, 45% 57%, 8% 57%);
  background: var(--accent-yellow);
  filter: drop-shadow(0 6px 10px rgba(250, 204, 21, .35));
}

.spark-a { left: calc(50% - 94px); top: 14px; transform: rotate(-14deg); }
.spark-b { left: calc(50% + 74px); top: 88px; transform: rotate(18deg) scale(.8); }

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid color-mix(in srgb, var(--text) 38%, transparent);
  margin: 0 auto 12px;
  display: block;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  background: var(--button);
  color: var(--bg);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 11px;
  margin: 0 0 10px;
  border: 1px solid color-mix(in srgb, var(--button) 50%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 74%, var(--button));
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.name {
  font-size: 34px;
  line-height: 1.03;
  font-weight: 900;
  margin: 0 0 8px;
  text-wrap: balance;
}

.bio {
  font-size: 15px;
  line-height: 1.45;
  opacity: 0.9;
  margin: 0 auto 16px;
  max-width: 38ch;
}

/* ---- socials ---- */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.social {
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--text) 24%, transparent);
  background: color-mix(in srgb, var(--text) 9%, transparent);
  transition: background 0.15s, transform 0.1s;
}

.social:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
.social:active { transform: scale(0.97); }

.disclosure {
  width: 100%;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--button) 38%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 68%, #fff);
  color: color-mix(in srgb, var(--text) 82%, #fff);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

/* ---- links ---- */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 72px;
  padding: 14px 48px 14px 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,0) 44%),
    var(--button);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,.42);
  box-shadow: 0 8px 0 rgba(0,0,0,.18), 0 18px 34px rgba(0,0,0,.18);
  transition: transform 0.1s, filter 0.15s;
  text-align: left;
  overflow: hidden;
}

.link::before {
  content: "";
  position: absolute;
  right: -36px;
  top: -44px;
  width: 110px;
  height: 110px;
  border: 12px solid rgba(255,255,255,.25);
  border-radius: 50%;
}

.link:hover { filter: brightness(1.05); }
.link:active { transform: translateY(2px); box-shadow: 0 5px 0 rgba(0,0,0,.18), 0 12px 24px rgba(0,0,0,.18); }

.link.featured {
  min-height: 92px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,0) 40%),
    linear-gradient(145deg, var(--accent-yellow), #f97316);
}

.link.has-thumb { padding-left: 70px; }

.thumb {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 6px);
}

.link-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.link-title {
  overflow-wrap: anywhere;
}

.link-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.link-badge {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(16, 19, 30, .14);
  color: var(--ink);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .05em;
}

.link-desc {
  flex: 1 1 180px;
}

.link-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  font-size: 30px;
  line-height: 1;
}

.empty { opacity: 0.6; text-align: center; }

/* ---- subpage navigation (hub mode) ---- */
.subpages { margin-top: 14px; }

.link.subpage {
  justify-content: space-between;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--button);
  box-shadow: none;
}

.link.subpage:hover { background: color-mix(in srgb, var(--button) 16%, transparent); filter: none; }
.link.subpage .chev { font-size: 22px; line-height: 1; opacity: 0.7; }

/* ---- footer ---- */
.foot {
  margin-top: 36px;
  font-size: 12px;
  opacity: 0.45;
  text-align: center;
}

body[data-slug="pokemon"] {
  --ink: #111827;
  --accent-red: #ef3e42;
  --accent-blue: #2563eb;
  --accent-yellow: #ffd43b;
}

@media (max-width: 420px) {
  body { padding: 20px 12px 36px; }
  .hero-media { height: 132px; }
  .hero-card { width: 82px; height: 110px; }
  .hero-card-left { transform: translateX(-94px) rotate(-12deg); }
  .hero-card-right { transform: translateX(12px) rotate(11deg); }
  .hero-orb { width: 86px; height: 86px; top: 36px; }
  .hero-orb span { width: 27px; height: 27px; }
  .name { font-size: 29px; }
  .link { min-height: 76px; padding-right: 42px; }
}
