@font-face {
  font-family: "Coolvetica";
  src:
    local("Coolvetica"),
    local("Coolvetica Rg"),
    local("CoolveticaRg-Regular"),
    url("assets/coolvetica.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg-card: rgba(7, 7, 9, 0.84);
  --bg-button: rgba(16, 16, 19, 0.84);
  --bg-button-hover: rgba(31, 31, 35, 0.9);
  --border: rgba(255, 255, 255, 0.13);
  --text-white: #ffffff;
  --text-gray: #8c8c94;
  --text-light: #d4d4d8;
  --status-online: #23a55a;
  --status-idle: #f0b232;
  --status-dnd: #f23f43;
  --status-offline: #80848e;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #050505;
  color: var(--text-white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* ── Disable text selection & copy highlight across the whole page ── */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Remove blue selection box */
::selection {
  background: transparent;
  color: inherit;
}

::-moz-selection {
  background: transparent;
  color: inherit;
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Welcome */
.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.045), transparent 28%),
    #000;
  outline: none;
  transition:
    opacity 0.58s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.58s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-screen::before {
  content: "";
  position: absolute;
  width: min(74vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.065), transparent 66%);
  filter: blur(26px);
  opacity: 0;
  animation: welcomeAura 1.5s ease-out 0.15s forwards;
}

.welcome-copy {
  position: relative;
  z-index: 1;
  padding: 24px;
  text-align: center;
  user-select: none;
}

.welcome-title {
  margin: 0;
  color: #fff;
  font-size: clamp(3rem, 10vw, 5.8rem);
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  opacity: 0;
  transform: translateY(24px) scale(0.94);
  filter: blur(8px);
  animation: welcomeReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.08s forwards;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.welcome-subtitle {
  position: relative;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: clamp(0.75rem, 2.6vw, 0.96rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.58em;
  text-indent: 0.58em;
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  animation:
    accessReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.42s forwards,
    accessGlow 2.4s ease-in-out 1.35s infinite;
}

.welcome-subtitle::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: rgba(255, 255, 255, 0.32);
  filter: blur(8px);
  opacity: 0.4;
  pointer-events: none;
}

.welcome-screen.is-leaving {
  opacity: 0;
  filter: blur(8px);
  transform: scale(1.02);
  pointer-events: none;
}

.welcome-screen.is-hidden {
  display: none;
}

/* Main background */
.profile-screen {
  position: relative;
  display: none;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 30px 16px 110px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.4), transparent 28%),
    radial-gradient(circle at 82% 82%, rgba(200, 200, 200, 0.2), transparent 30%),
    linear-gradient(145deg, #c9c9c9 0%, #626267 30%, #1b1b1e 62%, #050505 100%);
}

.profile-screen::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: -3;
  background:
    radial-gradient(circle at 26% 22%, rgba(255, 255, 255, 0.56), transparent 25%),
    radial-gradient(circle at 72% 64%, rgba(160, 160, 166, 0.34), transparent 28%),
    radial-gradient(circle at 50% 96%, rgba(255, 255, 255, 0.12), transparent 30%);
  filter: blur(72px);
  transform: scale(1.08);
  opacity: 0.88;
  pointer-events: none;
}

.profile-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.35)),
    radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}

.profile-screen.is-visible {
  display: grid;
  animation: profileFadeIn 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.background-light {
  position: fixed;
  z-index: -1;
  width: 34vw;
  min-width: 300px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  pointer-events: none;
}

.background-light-one {
  top: -15%;
  left: -8%;
  background: #fff;
}

.background-light-two {
  right: -12%;
  bottom: -20%;
  background: #a9a9a9;
}

.profile-stage {
  width: min(100%, 740px);
  perspective: 1200px;
}

.profile-card {
  width: 100%;
  padding: 58px 26px 30px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 10, 13, 0.58), rgba(3, 3, 5, 0.48));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 42px;
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(30px) saturate(0.9);
  -webkit-backdrop-filter: blur(30px) saturate(0.9);
}

.profile-screen.is-visible .profile-card {
  transform-origin: 50% 42%;
  animation: profileCardEnter 1.05s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

.profile-screen.is-visible .profile-footer,
.profile-screen.is-visible .connection-note {
  animation: profileFooterEnter 0.7s ease-out 0.7s both;
}

.hero-section {
  display: grid;
  justify-items: center;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.48);
}

.avatar,
.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.avatar {
  position: relative;
  z-index: 1;
  display: block;
  object-fit: cover;
  background: #222;
}

.avatar:not([src]),
.avatar[src=""] {
  visibility: hidden;
}

.avatar-decoration {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 122%;
  height: 122%;
  max-width: none;
  transform: translate(-50%, -50%);
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.avatar-decoration[hidden],
.avatar-decoration:not([src]),
.avatar-decoration[src=""] {
  display: none;
}

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ddd;
  background: linear-gradient(145deg, #353538, #1f1f21);
  font-size: 4rem;
  font-weight: 800;
}

.status-indicator {
  position: absolute;
  right: 3px;
  bottom: 11px;
  z-index: 4;
  width: 35px;
  height: 35px;
  border: 7px solid rgba(7, 7, 9, 0.96);
  border-radius: 50%;
  background: var(--status-offline);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.5);
}

.status-online { background: var(--status-online); }
.status-idle { background: var(--status-idle); }
.status-dnd { background: var(--status-dnd); }
.status-offline { background: var(--status-offline); }

.identity {
  width: 100%;
  margin-top: 34px;
}

.display-name {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-family: "Coolvetica", "Arial Black", Impact, sans-serif;
  font-size: clamp(2.3rem, 6vw, 3.3rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0.005em;
}

.username {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.35;
}

.bio {
  max-width: 94%;
  margin: 30px auto 0;
  color: var(--text-light);
  text-align: center;
  font-size: clamp(1rem, 2.4vw, 1.22rem);
  line-height: 1.6;
  white-space: pre-line;
}

.profile-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
}

.profile-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 18px 0 14px;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(10, 10, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 18px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
  touch-action: manipulation;
  white-space: nowrap;
}

.profile-link:hover {
  transform: translateY(-2px);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(20, 20, 24, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 28px rgba(0, 0, 0, 0.36);
}

.profile-link:active {
  transform: translateY(0) scale(0.97);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(0, 0, 0, 0.9);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.1),
    0 4px 14px rgba(0, 0, 0, 0.38);
}

.profile-link:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Thin separator between icon and label */
.profile-link::after {
  content: "";
  display: block;
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.14);
  order: 1;
  flex-shrink: 0;
}

.profile-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
  order: 0;
}

.profile-link span {
  order: 2;
  /* visible label — no longer sr-only */
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
}

.meta-divider-line {
  height: 1px;
  margin-top: 54px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.13) 8%, rgba(255, 255, 255, 0.13) 92%, transparent);
}

.profile-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  color: rgba(244, 244, 244, 0.8);
  font-size: 0.82rem;
  font-weight: 650;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.meta-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.meta-divider {
  color: rgba(255, 255, 255, 0.48);
}

.profile-footer {
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
}

.profile-footer p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.connection-note {
  min-height: 1.2em;
  margin: 15px 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  text-align: center;
}

.noscript-message {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 30;
  padding: 12px;
  text-align: center;
  background: #222;
  border: 1px solid #444;
  border-radius: 8px;
}

@keyframes welcomeReveal {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.94);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes accessReveal {
  0% {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes accessGlow {
  0%,
  100% {
    color: rgba(255, 255, 255, 0.55);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.08);
  }
  50% {
    color: rgba(255, 255, 255, 0.92);
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.3),
      0 0 28px rgba(255, 255, 255, 0.14);
  }
}

@keyframes welcomeAura {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes profileFadeIn {
  from {
    opacity: 0;
    transform: scale(0.99);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes profileCardEnter {
  0% {
    opacity: 0;
    transform: translateY(58px) scale(0.9) rotateX(7deg);
    filter: blur(18px);
    box-shadow:
      0 10px 36px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.02);
  }
  58% {
    opacity: 1;
    transform: translateY(-7px) scale(1.012) rotateX(-0.8deg);
    filter: blur(0);
    box-shadow:
      0 42px 120px rgba(0, 0, 0, 0.46),
      0 0 36px rgba(255, 255, 255, 0.055),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
    filter: blur(0);
    box-shadow:
      0 32px 100px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.035);
  }
}

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

@media (max-width: 760px) {
  .profile-screen {
    align-content: start;
    padding: max(18px, env(safe-area-inset-top)) 16px max(110px, calc(env(safe-area-inset-bottom) + 90px));
  }

  .profile-card {
    padding: 44px 20px 26px;
    border-radius: 34px;
  }

  .avatar-wrap {
    width: 190px;
    height: 190px;
    padding: 0;
  }

  .avatar-fallback {
    inset: 0;
  }

  .status-indicator {
    right: 2px;
    bottom: 9px;
    width: 31px;
    height: 31px;
    border-width: 6px;
  }

  .identity {
    margin-top: 29px;
  }

  .profile-links {
    gap: 9px;
    margin-top: 34px;
  }

  .profile-link {
    height: 40px;
    padding: 0 14px 0 12px;
    gap: 8px;
    font-size: 0.78rem;
  }

  .profile-link svg {
    width: 16px;
    height: 16px;
  }

  .meta-divider-line {
    margin-top: 42px;
  }

  .profile-meta {
    margin-top: 26px;
    font-size: 0.76rem;
  }
}

@media (max-width: 420px) {
  .profile-card {
    padding: 34px 14px 24px;
    border-radius: 28px;
  }

  .avatar-wrap {
    width: 160px;
    height: 160px;
    padding: 0;
  }

  .avatar-fallback {
    inset: 0;
    font-size: 3rem;
  }

  .status-indicator {
    right: 1px;
    bottom: 7px;
    width: 28px;
    height: 28px;
    border-width: 5px;
  }

  .identity {
    margin-top: 25px;
  }

  .display-name {
    font-size: 2.25rem;
  }

  .username {
    margin-top: 6px;
    font-size: 0.9rem;
  }

  .bio {
    max-width: 100%;
    margin-top: 24px;
    font-size: 0.97rem;
  }

  .profile-links {
    gap: 8px;
    margin-top: 30px;
  }

  .profile-link {
    height: 38px;
    padding: 0 13px 0 11px;
    gap: 7px;
    font-size: 0.75rem;
  }

  .profile-link svg {
    width: 15px;
    height: 15px;
  }

  .profile-meta {
    gap: 12px;
    margin-top: 24px;
    font-size: 0.72rem;
  }

  .meta-item {
    gap: 6px;
  }

  .meta-item svg {
    width: 16px;
    height: 16px;
  }

  .profile-footer {
    margin-top: 24px;
  }

  .profile-footer p {
    margin: 0;
    font-size: 0.68rem;
  }
}

@media (max-width: 350px) {
  .profile-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

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