:root {
  --bg: #0b0b12;
  --bg2: #1b1430;
  --text: #ffffff;
  --muted: #a1a1b5;
  --btn: #ffffff14;
  --btn-text: #ffffff;
  --btn-border: #ffffff22;
  --accent: #8b5cf6;
  --radius: 16px;
  --logo-radius: 50%;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --heading-font: var(--font);
  --badge-check: var(--bg);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
body.bg-gradient {
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--bg2), transparent 70%),
    radial-gradient(800px 500px at 100% 100%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
body.bg-image {
  background: var(--bg) var(--bg-image) center / cover fixed no-repeat;
}
body.bg-image::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}

body:not(.ready) .wrap { visibility: hidden; }
.wrap {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 56px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---------- Profile ---------- */
.profile { text-align: center; display: flex; flex-direction: column; align-items: center; }
.logo {
  width: 96px; height: 96px; object-fit: cover;
  border-radius: var(--logo-radius);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 10%, transparent), 0 12px 40px -12px color-mix(in srgb, var(--accent) 60%, transparent);
  margin-bottom: 16px;
  animation: pop .5s cubic-bezier(.2,.9,.3,1.3) both;
}
.name {
  font-family: var(--heading-font);
  font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em;
  display: inline-flex; align-items: center; gap: 6px;
}
.badge { color: var(--accent); display: inline-flex; }
.logo.wide {
  width: auto; height: auto; max-width: min(300px, 80%); max-height: 84px;
  object-fit: contain; box-shadow: none; border-radius: 0;
}
body.mode-light .logo.wide { mix-blend-mode: multiply; } /* hides white box around jpg logos */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.handle { color: var(--muted); font-size: .95rem; margin-top: 2px; }
.bio { color: var(--text); opacity: .85; margin-top: 12px; max-width: 42ch; line-height: 1.5; font-size: .98rem; text-wrap: pretty; }
.handle:empty, .bio:empty { display: none; }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.socials a {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; color: var(--text);
  transition: transform .15s ease, background-color .15s ease;
}
.socials a:hover { background: color-mix(in srgb, var(--text) 10%, transparent); transform: translateY(-2px); }
.socials a:active { transform: scale(.94); }

/* icon rendered via CSS mask so it takes the text color */
.ico {
  width: 22px; height: 22px; flex: none;
  background-color: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
          mask: var(--src) center / contain no-repeat;
}
.ico.img { background: var(--src) center / contain no-repeat; -webkit-mask: none; mask: none; }

/* ---------- Links ---------- */
.links { display: flex; flex-direction: column; gap: 12px; }
.section-title {
  font-family: var(--heading-font);
  font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--text); margin: 18px 0 0;
  display: flex; align-items: center; gap: 12px;
}
.section-title::before { content: ""; width: 4px; height: 1.1em; background: var(--accent); flex: none; }
.section-title::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--text) 18%, transparent); }
.link {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; padding: 12px 52px;
  border-radius: var(--radius);
  color: var(--btn-text); text-decoration: none;
  background: var(--btn);
  border: 1px solid var(--btn-border);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
  animation: rise .45s ease both;
  animation-delay: calc(var(--i) * 45ms + 80ms);
}
.link .ico { position: absolute; left: 18px; }
.link .txt { flex: 1; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.link .title { font-weight: 600; font-size: 1rem; }
.link .sub { font-size: .8rem; opacity: .7; }
.link .arrow { width: 16px; height: 16px; position: absolute; right: 18px; opacity: 0; transform: translateX(-4px); transition: opacity .18s, transform .18s; }
.link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
.link:hover .arrow { opacity: .8; transform: none; }
.link:active { transform: scale(.98); }
.link:focus-visible, .socials a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.link.featured {
  background: var(--accent); border-color: transparent; color: #fff;
}
.link.featured::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, #ffffff40 50%, transparent 70%);
  background-size: 250% 100%; animation: shine 3.5s ease-in-out infinite;
}

body.fill-outline .link:not(.featured) { background: transparent; border: 2px solid var(--btn-text); }
body.fill-glass .link:not(.featured) {
  background: color-mix(in srgb, var(--btn-text) 8%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
}

.tag {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: 2px;
  font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 6px; margin-right: 8px; border-radius: 3px;
  background: var(--accent); color: #fff; line-height: 1;
}
.link.featured .tag { background: #fff; color: var(--accent); }
.tag.live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: blink 1.2s ease-in-out infinite;
}

/* ---------- Breaking ticker ---------- */
.ticker {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: stretch; height: 38px;
  background: var(--text); color: var(--bg); text-decoration: none;
  font-size: .85rem; font-weight: 600; overflow: hidden;
}
.ticker-label {
  flex: none; display: flex; align-items: center; gap: 7px; padding: 0 12px;
  background: var(--accent); color: #fff; font-weight: 800; letter-spacing: .08em; font-size: .72rem;
}
.ticker-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s ease-in-out infinite; }
.ticker-track { flex: 1; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); }
.ticker-move { display: inline-flex; white-space: nowrap; animation: ticker var(--dur, 30s) linear infinite; }
.ticker:hover .ticker-move { animation-play-state: paused; }
.ticker-item { padding: 0 18px; }
.ticker-item::after { content: "■"; color: var(--accent); font-size: .5rem; vertical-align: 2px; margin-left: 36px; }
body:has(.ticker:not([hidden])) .theme-toggle { top: 52px; }

/* ---------- Footer ---------- */
.foot { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 12px; }
.foot p { color: var(--muted); font-size: .8rem; }
.foot p:empty { display: none; }
.share, .theme-toggle {
  font: inherit; cursor: pointer; color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  transition: background-color .15s, transform .15s;
}
.share { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-size: .88rem; font-weight: 500; }
.share:hover, .theme-toggle:hover { background: color-mix(in srgb, var(--text) 14%, transparent); }
.share:active, .theme-toggle:active { transform: scale(.96); }
.theme-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
[hidden] { display: none !important; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px;
  font-size: .88rem; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes shine { 0%, 60% { background-position: 150% 0; } 100% { background-position: -100% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ticker-track { overflow-x: auto; }
}
