* {
  box-sizing: border-box;
}

:root {
  --bg: #090a0f;
  --ink: #f5f7fb;
  --muted: #9aa3b5;
  --line: rgba(255, 255, 255, .12);
  --panel: rgba(22, 24, 34, .82);
  --shadow: 0 22px 70px rgba(0, 0, 0, .38);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", system-ui, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 18% 8%, rgba(34, 197, 94, .15), transparent 32%),
    radial-gradient(circle at 88% 22%, rgba(96, 165, 250, .13), transparent 30%),
    linear-gradient(115deg, rgba(9, 10, 15, .98) 0 42%, rgba(16, 20, 31, .96) 42% 66%, rgba(8, 22, 20, .94) 66% 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 86px);
}

.page-accent {
  position: fixed;
  top: 0;
  right: 0;
  z-index: -1;
  width: min(42vw, 520px);
  height: 100vh;
  background: linear-gradient(180deg, rgba(16, 185, 129, .17), rgba(244, 63, 94, .1));
  clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%);
  animation: accentDrift 9s ease-in-out infinite alternate;
}

.shell {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 168px;
  margin-bottom: 20px;
}

.avatar-wrap {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border-radius: 8px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: var(--shadow);
  animation: heroIn .72s cubic-bezier(.2, .8, .2, 1) both, avatarFloat 4.8s ease-in-out .9s infinite;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  object-position: center 46%;
  transform: scale(1.04);
  background: #111827;
}

.hero-copy {
  min-width: 0;
  animation: heroIn .72s cubic-bezier(.2, .8, .2, 1) .08s both;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 78px);
  line-height: .9;
  letter-spacing: 0;
}

.sub {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
  color: #c9d1df;
  font-size: 13px;
  font-weight: 800;
  animation: softRise .56s ease .14s both;
}

.grid {
  display: grid;
  gap: 12px;
}

.card {
  --accent: #2563eb;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 18px 34px rgba(0, 0, 0, .26);
  backdrop-filter: blur(16px);
  animation: cardIn .52s cubic-bezier(.2, .8, .2, 1) var(--delay, 0ms) both;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0 34%, color-mix(in srgb, var(--accent), white 16%) 48%, transparent 62% 100%);
  opacity: 0;
  transform: translateX(-70%);
  transition: opacity .2s ease, transform .62s ease;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: color-mix(in srgb, var(--accent), transparent 45%);
  background: rgba(31, 34, 47, .92);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .34);
}

.card:hover::before {
  opacity: .34;
  transform: translateX(70%);
}

.card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), transparent 58%);
  outline-offset: 3px;
}

.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent), #10131c 78%);
  border: 1px solid color-mix(in srgb, var(--accent), transparent 52%);
  font-size: 22px;
}

.card-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.card-icon-img.is-fallback-img {
  width: 32px;
  height: 32px;
}

.card-icon.is-fallback {
  background: #111827;
}

.card-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.card-label {
  font-weight: 800;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.card small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.card-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent), #10131c 84%);
  font-size: 16px;
  font-weight: 800;
}

.discord { --accent: #5865f2; }
.youtube { --accent: #ff0033; }
.tiktok { --accent: #00f2ea; }
.roblox { --accent: #cbd5e1; }
.donate { --accent: #22c55e; }
.facebook { --accent: #1877f2; }
.instagram { --accent: #f472b6; }
.line { --accent: #06c755; }
.reddit { --accent: #ff4500; }
.bio { --accent: #0f766e; }
.twitch { --accent: #9146ff; }
.twitter { --accent: #60a5fa; }

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: rgba(22, 24, 34, .72);
}

.error {
  border-color: rgba(248, 113, 113, .38);
  color: #fca5a5;
}

footer {
  margin-top: 22px;
  text-align: center;
  animation: softRise .56s ease .34s both;
}

.home-footer-link {
  display: inline-grid;
  grid-template-columns: 28px auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 14px 8px 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(22, 24, 34, .82);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.home-footer-link:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, .36);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .36);
}

.home-footer-link img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes avatarFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes accentDrift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(22px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 24px, 820px);
    padding-top: 18px;
  }

  .hero {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 0;
    margin-bottom: 24px;
  }

  .avatar-wrap {
    width: 92px;
    height: 92px;
  }

  .avatar {
    width: 100%;
    height: 100%;
    transform: scale(1.04);
  }

  .page-accent {
    width: 44vw;
    opacity: .7;
    clip-path: polygon(44% 0, 100% 0, 100% 100%, 12% 100%);
  }

  h1 {
    font-size: clamp(42px, 13vw, 54px);
    line-height: .9;
  }

  .sub {
    max-width: 220px;
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.45;
  }

  .section-head {
    align-items: end;
    margin-bottom: 10px;
    font-size: 12px;
  }

  .card {
    grid-template-columns: 44px minmax(0, 1fr) 30px;
    gap: 10px;
    min-height: 74px;
    animation: none;
    opacity: 1;
    transform: none;
  }

  .card small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .card-arrow {
    align-self: center;
    justify-self: end;
    flex-shrink: 0;
  }

  .card-icon {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  :root {
    --shadow: 0 10px 28px rgba(0, 0, 0, .24);
    --panel: rgba(22, 24, 34, .96);
  }

  body {
    background:
      linear-gradient(145deg, #090a0f 0%, #10141f 58%, #091513 100%);
  }

  body::before,
  .page-accent {
    display: none;
  }

  .avatar-wrap,
  .hero-copy,
  .section-head,
  footer {
    animation: none;
  }

  .avatar-wrap {
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  }

  .card {
    background: rgba(22, 24, 34, .96);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: border-color .12s ease, background .12s ease;
    contain: layout paint;
  }

  .card::before {
    display: none;
  }

  .card:hover,
  .card:active {
    transform: none;
    background: rgba(28, 31, 43, .98);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
  }

  .home-footer-link {
    box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
    transition: border-color .12s ease, background .12s ease;
  }

  .home-footer-link:hover,
  .home-footer-link:active {
    transform: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
  }
}
