:root {
  --yellow: #FFD400;
  --ink: #111111;
  --ink-soft: #3a3200;
  --card: #111111;
  --card-ink: #FFD400;
  --font: "Inter Tight", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--yellow); }
body {
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 480px; margin: 0 auto; padding: 48px 16px 64px; }
a { color: inherit; }

header { text-align: center; }
.avatar {
  display: block; width: 128px; height: 128px; border-radius: 50%;
  object-fit: cover; border: 4px solid var(--ink);
  margin: 0 auto 16px;
}
h1 { font-size: 44px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.handle { margin-top: 6px; font-size: 16px; color: var(--ink-soft); }

.total {
  margin-top: 20px; display: inline-flex; gap: 8px; align-items: baseline;
  background: var(--ink); color: var(--yellow); padding: 8px 16px; border-radius: 999px; font-weight: 800;
}
.total span { font-weight: 500; opacity: .8; font-size: 14px; }

.links { display: grid; gap: 12px; margin-top: 32px; }
.links a {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); color: var(--card-ink);
  text-decoration: none; padding: 18px 20px; border-radius: 16px;
  font-size: 18px; font-weight: 800; letter-spacing: -0.01em;
}
.links a small { font-weight: 500; font-size: 14px; opacity: .75; }
.links a.cta { background: transparent; color: var(--ink); border: 3px solid var(--ink); }

h2 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; margin: 40px 0 12px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--card); color: #fff; border-radius: 16px; padding: 16px; }
.stat b { display: block; font-size: 30px; font-weight: 900; letter-spacing: -0.03em; color: var(--yellow); }
.stat span { font-size: 14px; opacity: .8; }
.note { margin-top: 10px; font-size: 13px; color: var(--ink-soft); }

.brands { display: flex; flex-wrap: wrap; gap: 8px; }
.brands div {
  display: inline-flex; align-items: center; gap: 8px;
  border: 3px solid var(--ink); border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 15px;
}
/* Single-color brand marks from Simple Icons, tinted to match the text */
.logo {
  width: 20px; height: 20px; flex: none; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}

.back { display: inline-block; font-weight: 800; text-decoration: none; margin-bottom: 24px; }

/* ---------- Motion ---------- */

/* Buttons and chips pop up on load, one after another */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
header, .links a, .stat, .brands div { animation: rise .5s cubic-bezier(.2, .8, .2, 1) backwards; }
.links a:nth-child(1), .stat:nth-child(1) { animation-delay: .06s; }
.links a:nth-child(2), .stat:nth-child(2) { animation-delay: .12s; }
.links a:nth-child(3), .stat:nth-child(3) { animation-delay: .18s; }
.links a:nth-child(4), .stat:nth-child(4) { animation-delay: .24s; }
.links a:nth-child(5) { animation-delay: .30s; }
.brands div { animation-delay: .3s; }

.links a, .brands div, .stat, .avatar {
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s cubic-bezier(.2, .8, .2, 1),
              background-color .18s, color .18s;
}

/* Arrow that slides in next to the follower count on hover */
.links a small::after {
  content: "→"; display: inline-block; margin-left: 0; max-width: 0; opacity: 0; overflow: hidden;
  vertical-align: bottom; transition: max-width .18s, margin .18s, opacity .18s;
}

/* Hover effects only on devices with a real pointer, so phones don't get "stuck" hover states */
@media (hover: hover) {
  /* Comic "pop": the button jumps up-left and drops a hard shadow */
  .links a:hover {
    transform: translate(-4px, -4px);
    box-shadow: 6px 6px 0 var(--ink);
    background: #fff; color: var(--ink);
  }
  .links a.cta:hover { background: var(--ink); color: var(--yellow); box-shadow: 6px 6px 0 #fff; }
  .links a:hover small::after { max-width: 1em; margin-left: 6px; opacity: 1; }

  .brands div:hover { transform: translate(-3px, -3px) rotate(-1.5deg); box-shadow: 4px 4px 0 var(--ink); background: var(--ink); color: var(--yellow); }
  .stat:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 #fff; }

  .avatar:hover { transform: rotate(-6deg) scale(1.06); }
}

/* Press feedback everywhere (including phones) */
.links a:active, .brands div:active { transform: translate(0, 0) scale(.98); box-shadow: none; }

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

/* ---------- Bio, video grid, home brands ---------- */
.bio { margin: 14px auto 0; max-width: 34ch; font-size: 16px; line-height: 1.4; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile {
  position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden;
  background: var(--ink); border: 3px solid var(--ink);
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) backwards;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s cubic-bezier(.2, .8, .2, 1);
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile:nth-child(2) { animation-delay: .05s; } .tile:nth-child(3) { animation-delay: .1s; }
.tile:nth-child(4) { animation-delay: .15s; } .tile:nth-child(5) { animation-delay: .2s; }
.tile:nth-child(6) { animation-delay: .25s; }
.tile:active { transform: scale(.97); }
@media (hover: hover) {
  .tile:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 5px 5px 0 var(--ink); }
}

.more { margin-top: 16px; }
.more a { font-weight: 800; text-decoration: none; border-bottom: 3px solid var(--ink); }

/* Video stats: a small views badge, with the full breakdown sliding up on hover */
.tile-views {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 7px 3px 5px; border-radius: 999px; background: rgba(17, 17, 17, .8); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 1.2; transition: opacity .18s;
}
.tile-views svg { width: 10px; height: 10px; fill: var(--yellow); }
.tile-stats {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 10px;
  background: linear-gradient(transparent 30%, rgba(17, 17, 17, .92)); color: #fff;
  font-size: 12px; line-height: 1.2; opacity: 0; transform: translateY(8px);
  transition: opacity .18s, transform .18s cubic-bezier(.2, .8, .2, 1);
}
.tile-stats span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.tile-stats b { font-weight: 900; font-size: 14px; }
.tile-stats svg { width: 12px; height: 12px; fill: var(--yellow); flex: none; }
@media (hover: hover) {
  .tile:hover .tile-stats, .tile:focus-visible .tile-stats { opacity: 1; transform: none; }
  .tile:hover .tile-views, .tile:focus-visible .tile-views { opacity: 0; }
}

/* Music releases: artwork + title, then a button per streaming service */
.release { background: var(--card); color: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px; animation: rise .5s cubic-bezier(.2, .8, .2, 1) backwards; }
.release-head { display: flex; align-items: center; gap: 12px; }
.release-head img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.release-head b { display: block; font-size: 18px; font-weight: 900; letter-spacing: -0.02em; color: var(--yellow); }
.release-head span { font-size: 14px; opacity: .8; }
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.platforms a {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px;
  background: var(--yellow); color: var(--ink); text-decoration: none; font-weight: 800; font-size: 14px;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s cubic-bezier(.2, .8, .2, 1), background-color .18s;
}
.platforms .logo { width: 16px; height: 16px; }
.platforms a:active { transform: scale(.97); }
@media (hover: hover) {
  .platforms a:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 #fff; background: #fff; }
}

/* Twitch button while live: jumps to the top with a pulsing badge and the stream title */
.links a.live { flex-wrap: wrap; background: #9146FF; color: #fff; row-gap: 4px; }
.links a.live .live-main { display: inline-flex; align-items: center; gap: 10px; }
.links a.live .live-title { flex-basis: 100%; order: 3; font-size: 14px; font-weight: 500; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px;
  background: #E91916; color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .06em;
}
.live-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff;
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.7); } }
@media (hover: hover) {
  .links a.live:hover { background: #fff; color: #9146FF; }
}
/* Long stream titles must truncate rather than widen the column */
.links { grid-template-columns: minmax(0, 1fr); }
.links a.live .live-title { min-width: 0; max-width: 100%; }

/* Platform logo on each video tile */
.tile-platform {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.tile-platform img { width: 13px; height: 13px; }

/* Brands page: one-line audience summary */
.audience-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.audience-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; width: 100%; }
.fact { background: var(--ink); color: var(--yellow); font-weight: 800; font-size: 15px; padding: 8px 12px; border-radius: 999px; }

/* Brands page: one row per social; tap to open its stats */
.social-data { display: grid; gap: 10px; }
.sd-item { background: var(--card); color: #fff; border-radius: 16px; overflow: hidden; }
.sd-item > summary, .sd-static {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none;
}
.sd-static { cursor: default; }
.sd-item > summary::-webkit-details-marker { display: none; }
.sd-item img { width: 22px; height: 22px; filter: invert(1); flex: none; }
.sd-name { font-size: 18px; font-weight: 800; }
.sd-count { margin-left: auto; font-size: 14px; opacity: .85; white-space: nowrap; }
.sd-count b { font-size: 20px; font-weight: 900; color: var(--yellow); opacity: 1; margin-right: 2px; }
.sd-chevron { width: 10px; height: 10px; border-right: 3px solid var(--yellow); border-bottom: 3px solid var(--yellow); transform: rotate(45deg) translateY(-3px); transition: transform .2s; flex: none; margin-left: 4px; }
.sd-item[open] .sd-chevron { transform: rotate(225deg) translate(-2px, -2px); }
.sd-item[open] > summary { border-bottom: 2px solid rgba(255, 255, 255, .12); }
.sd-body { padding: 14px; animation: sd-open .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes sd-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sd-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sd-tile { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 12px 14px; }
.sd-tile span { display: block; font-size: 13px; opacity: .8; }
.sd-tile b { display: block; font-size: 24px; font-weight: 900; letter-spacing: -0.03em; color: var(--yellow); margin-top: 2px; }
.sd-sub { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin: 16px 0 8px; opacity: .8; }
@media (hover: hover) { .sd-item > summary:hover .sd-name { text-decoration: underline; text-underline-offset: 4px; } }
.sd-card { color: var(--ink); }
.sd-cards { display: grid; gap: 10px; }
.sd-card { background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 14px; }
.sd-card > p { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin-bottom: 8px; }
.sd-bar { position: relative; height: 36px; border-radius: 10px; background: #f0eee6; overflow: hidden; margin-top: 6px; }
.sd-bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--yellow); }
.sd-bar-text { position: relative; display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 12px; font-weight: 800; font-size: 15px; }
.sd-bar-text em { font-style: normal; font-weight: 500; color: var(--ink-soft); min-width: 34px; }
.sd-toggle { display: flex; gap: 6px; margin-bottom: 6px; }
.sd-toggle button { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.sd-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.sd-places { list-style: none; padding: 0; margin: 0; counter-reset: place; }
.sd-places li { counter-increment: place; display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; font-size: 15px; border-bottom: 1px solid #eee; }
.sd-places li:last-child { border-bottom: 0; }
.sd-places li span::before { content: counter(place); display: inline-block; width: 20px; color: #999; font-weight: 500; }
.sd-places li b { font-weight: 900; }

/* Full-color brand logos (app icons / site icons) */
.brand-img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; flex: none; background: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 404: a comic "burst" behind big 404 numbers */
.not-found main { padding-top: 32px; }
.nf-burst {
  position: relative; width: 220px; height: 150px; margin: 0 auto 8px; display: grid; place-items: center;
  font-size: 72px; font-weight: 900; letter-spacing: -0.04em; color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--ink);
  animation: nf-pop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.nf-burst::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #fff;
  border: 0; filter: drop-shadow(0 0 0 var(--ink));
  clip-path: polygon(50% 0%, 59% 22%, 82% 8%, 76% 32%, 100% 34%, 80% 52%, 98% 72%, 72% 70%, 74% 96%, 54% 78%, 40% 100%, 34% 76%, 8% 90%, 18% 64%, 0% 50%, 20% 38%, 6% 14%, 32% 24%);
}
.nf-burst::after {
  content: ""; position: absolute; inset: -6px; z-index: -2; background: var(--ink);
  clip-path: polygon(50% 0%, 59% 22%, 82% 8%, 76% 32%, 100% 34%, 80% 52%, 98% 72%, 72% 70%, 74% 96%, 54% 78%, 40% 100%, 34% 76%, 8% 90%, 18% 64%, 0% 50%, 20% 38%, 6% 14%, 32% 24%);
}
@keyframes nf-pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: rotate(-4deg); opacity: 1; } }
.not-found h1 { font-size: 38px; }
@media (prefers-reduced-motion: reduce) { .nf-burst { animation: none; transform: rotate(-4deg); } }

/* Growth tile in a social's stats (full width, with a sparkline) */
.sd-growth { grid-column: 1 / -1; position: relative; }
.sd-growth b small { font-size: 15px; font-weight: 800; color: #fff; opacity: .8; margin-left: 4px; }
.sd-growth .spark { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 46%; max-width: 260px; height: 40px; color: var(--yellow); }
