:root {
  --bg: #0f1115;
  --card: #181c22;
  --border: #262b33;
  --text: #e6e8eb;
  --text-muted: #9aa3af;
  --accent: #4f8ef7;
  --accent-soft: rgba(79, 142, 247, 0.14);
  --tab-track: #1f242c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 48px -24px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 16px 64px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background:
    radial-gradient(40% 50% at 20% 10%, rgba(79, 142, 247, 0.14), transparent 70%),
    radial-gradient(45% 55% at 85% 20%, rgba(34, 211, 238, 0.12), transparent 70%),
    radial-gradient(50% 60% at 60% 90%, rgba(167, 139, 250, 0.12), transparent 70%),
    var(--bg);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}

body::before {
  width: 45vw;
  height: 45vw;
  top: -12vw;
  left: -10vw;
  background: radial-gradient(circle, #2563eb, transparent 70%);
  animation: drift-a 22s ease-in-out infinite alternate;
}

body::after {
  width: 38vw;
  height: 38vw;
  bottom: -8vw;
  right: -6vw;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  animation: drift-b 26s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to { transform: translate(14vw, 10vh) scale(1.15); }
}

@keyframes drift-b {
  to { transform: translate(-12vw, -8vh) scale(1.2); }
}

#fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.card {
  position: relative;
  z-index: 1;
  width: 400px;
  max-width: 100%;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 40px 24px 32px;
  text-align: center;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(rgba(79, 142, 247, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 142, 247, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(circle 110px at var(--gx, 50%) var(--gy, 50%), rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.5) 55%, transparent 78%);
  mask-image: radial-gradient(circle 110px at var(--gx, 50%) var(--gy, 50%), rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.5) 55%, transparent 78%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  border-color: rgba(79, 142, 247, 0.45);
}

.profile {
  margin-bottom: 24px;
}

.pfp {
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #e6e8eb, #4f8ef7, #06b6d4, #e6e8eb);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s linear infinite;
}

@keyframes shimmer {
  to { background-position: 300% 0; }
}

h1.pop {
  animation: pop 0.35s ease, shimmer 8s linear infinite;
}

@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* --- Tabs --- */
.tab-bar {
  position: relative;
  display: flex;
  gap: 0;
  margin: 0 auto 24px;
  max-width: 320px;
  background: var(--tab-track);
  border-radius: 999px;
  padding: 4px;
}

.tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: var(--card);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: left 0.25s ease;
}

.tab-bar[data-active="devstandgames"] .tab-indicator {
  left: calc(50%);
}

.tab-btn {
  flex: 1;
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.tab-btn.active {
  color: var(--text);
}

.tab-btn:hover:not(.active) {
  color: var(--text);
}

/* --- Panels --- */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* --- Links --- */
.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-weight: 550;
  text-decoration: none;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card::after {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.link-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) - 2px), 0);
  box-shadow: 0 0 0 1px rgba(79, 142, 247, 0.2), 0 12px 28px -12px rgba(79, 142, 247, 0.5);
}

.link-card:hover::after {
  opacity: 1;
  transform: rotate(45deg) translate(-2px, 2px);
}

.link-card:focus-visible,
.tab-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .tab-panel.active,
  h1,
  h1.pop,
  body::before,
  body::after {
    animation: none;
  }

  h1 {
    background: none;
    color: var(--text);
  }

  .link-card,
  .link-card::after,
  .tab-btn,
  .tab-indicator,
  .card::before {
    transition: none;
  }
}