:root {
  color-scheme: dark;
  --ink: #f2eaff;
  --muted: #aaa1b8;
  --purple: #b36cff;
  --purple-bright: #d39bff;
  --purple-deep: #180b2d;
  --night: #09050e;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(circle at 18% 20%, rgba(103, 35, 166, 0.3), transparent 28rem),
    linear-gradient(135deg, #08040d 0%, #1b0b2b 52%, #0a050f 100%) fixed;
  background-size: cover;
  color: var(--ink);
  font-family: "Trebuchet MS", sans-serif;
}

.page-shell {
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  padding: 0 1.5rem;
  background: transparent;
}

.marquee-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  opacity: 0.46;
  pointer-events: none;
}

.profile-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 4rem 0;
}

.marquee-row {
  overflow: hidden;
  white-space: nowrap;
  color: rgba(194, 113, 255, 0.48);
  font-family: "DM Mono", monospace;
  font-size: clamp(0.82rem, 1.8vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 1;
  text-shadow: 0 0 2.5rem rgba(159, 67, 255, 0.35);
}

.marquee-row--faint {
  opacity: 0.45;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: drift-left 34s linear infinite;
  will-change: transform;
}

.marquee-row--right .marquee-track {
  animation-name: drift-right;
  animation-duration: 39s;
}

.marquee-track span {
  padding-right: 1.2em;
}

@keyframes drift-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes drift-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.profile {
  position: relative;
  min-width: 0;
  width: min(100%, 43rem);
  padding: clamp(1.6rem, 4vw, 2.8rem);
  border-radius: 1.5rem;
  border: 1px solid rgba(203, 143, 255, 0.18);
  background: rgba(7, 4, 12, 0.79);
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, 0.56), inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  animation: appear 850ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.profile-heading {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  width: clamp(6rem, 17vw, 10.5rem);
  aspect-ratio: 1;
}

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

.avatar {
  display: block;
  object-fit: cover;
  border: 2px solid rgba(211, 155, 255, 0.76);
  box-shadow: 0 0 0 0.55rem rgba(158, 79, 226, 0.1), 0 1rem 2.5rem rgba(0, 0, 0, 0.5);
}

.avatar-fallback {
  display: none;
  place-items: center;
  border: 2px solid rgba(211, 155, 255, 0.76);
  background: linear-gradient(140deg, #4b1e79, #160a27);
  color: var(--purple-bright);
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 700;
}

.identity {
  min-width: 0;
}

.name-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", sans-serif;
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.pronouns {
  color: var(--muted);
  font-family: "Trebuchet MS", sans-serif;
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  letter-spacing: 0.03em;
}

.identity p {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-family: "Trebuchet MS", sans-serif;
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  letter-spacing: 0.03em;
}

.bio {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bio img {
  width: 1.05em;
  height: 1.05em;
  object-fit: cover;
  border-radius: 0.2rem;
}

.links-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 -1.5rem;
  padding: 5rem 1.5rem;
  background: rgba(7, 4, 12, 0.92);
  border-top: 1px solid rgba(203, 143, 255, 0.16);
}

.links-section__inner {
  width: min(100%, 43rem);
  margin: 0 auto;
}

.links-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 600;
}

.simple-links {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.simple-links a {
  color: var(--purple-bright);
  font-size: 1rem;
  text-decoration: none;
  transition: color 180ms ease, padding-left 180ms ease;
}

.simple-links a:hover,
.simple-links a:focus-visible {
  color: var(--ink);
  padding-left: 0.35rem;
}

.simple-links a:focus-visible {
  outline: 2px solid var(--purple-bright);
  outline-offset: 0.25rem;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(1.2rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 0 1rem;
  }

  .profile {
    padding: 2.2rem 1.25rem 1.5rem;
  }

  .links-section {
    margin: 0 -1rem;
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .profile-heading {
    align-items: flex-start;
  }

}

@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;
  }
}
