:root {
  --bg: #000;
  --ink: #fff;
  --muted: rgba(255, 255, 255, 0.45);
  --faint: rgba(255, 255, 255, 0.22);
  --line: rgba(255, 255, 255, 0.28);
  --panel: rgba(0, 0, 0, 0.82);
  --panel-soft: rgba(10, 10, 10, 0.62);
  --ease: cubic-bezier(0.33, 1, 0.68, 1);

  --font-display: "Bilbo", "Instrument Serif", serif;
  --font-ui: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  cursor: crosshair;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

::selection {
  background: #fff;
  color: #000;
}

a,
button {
  cursor: crosshair;
  font: inherit;
  color: inherit;
}

.fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.fx__bg {
  position: absolute;
  inset: 0;
  background: #000;
}

.fx__bg.has-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  background-image: var(--bg-image);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: none;
}

.fx__bg.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.45) 0%,
    transparent 30%
  );
}

.fx__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: brightness(0.35) contrast(1.05) saturate(0.75);
  transition: opacity 1.2s var(--ease);
}

.fx__video.is-on {
  opacity: 1;
}

.fx__dither {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  mix-blend-mode: color-dodge;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='8' height='8' fill='%23000'/%3E%3Ccircle cx='1' cy='1' r='0.7' fill='%23fff'/%3E%3Ccircle cx='5' cy='5' r='0.7' fill='%23fff'/%3E%3C/svg%3E");
  background-size: 4px 4px;
  filter: contrast(0.55);
  image-rendering: pixelated;
}

.fx__noise {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise-shift 0.14s steps(2) infinite;
}

.fx__crt {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%) 0 0 / 100% 3px;
  opacity: 0.2;
}

.fx__vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.4);
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(28px);
  transition: opacity 0.85s var(--ease), visibility 0.85s;
}

.splash.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash__chrome {
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 22vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  font-style: italic;
  background: linear-gradient(
    185deg,
    #ffffff 0%,
    #d7d7d7 18%,
    #8e8e8e 38%,
    #3a3a3a 52%,
    #cfcfcf 68%,
    #f5f5f5 82%,
    #9a9a9a 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 12px 28px rgba(255, 255, 255, 0.08));
  animation: splash-sway 4s ease-in-out infinite;
  text-align: center;
  padding: 0 1rem;
}

.splash__hint {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  animation: blink 1.6s ease-in-out infinite;
  white-space: nowrap;
}

.shell {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 4.5rem) 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

.shell.is-in {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vw, 3.75rem);
  width: 100%;
}

.portrait {
  position: relative;
  width: min(260px, 42vw);
  aspect-ratio: 2 / 3;
  flex-shrink: 0;
  background: var(--panel);
  outline: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.portrait__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05);
}

.portrait__grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='64' height='64' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: color-dodge;
  opacity: 0.12;
  pointer-events: none;
}

.profile__info {
  display: flex;
  flex-direction: column;
  max-width: 320px;
  min-width: 0;
}

.profile__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 1px;
  line-height: 1;
}

.profile__tag {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink);
}

.profile__bio {
  margin: 0.85rem 0 1.35rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 34ch;
}

.presence {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1.15rem;
  background: var(--panel-soft);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  outline: 1px dotted rgba(255, 255, 255, 0.18);
}

.presence[hidden] {
  display: none;
}

.presence__avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.presence__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.presence__dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #000;
  background: #747f8d;
}

.presence__dot[data-status="online"] {
  background: #23a559;
}
.presence__dot[data-status="idle"] {
  background: #f0b132;
}
.presence__dot[data-status="dnd"] {
  background: #f23f42;
}

.presence__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.presence__name {
  font-size: 0.85rem;
  font-weight: 500;
}

.presence__activity {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presence__copy {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 0.62rem;
  font-style: italic;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.35rem;
  transition: color 0.25s ease;
}

.presence__copy:hover {
  color: #fff;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.link {
  appearance: none;
  border: 0;
  display: inline-block;
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.9rem;
  background: rgba(0, 0, 0, 0.9);
  outline: 1px dotted rgba(255, 255, 255, 0.28);
  color: #fff;
  transition: background 0.3s ease, color 0.3s ease, outline-color 0.3s ease;
}

.link:hover,
.link:focus-visible {
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  outline: 1px solid #fff;
}

.np {
  margin-top: 1.6rem;
  font-size: 0.68rem;
  font-style: italic;
  opacity: 0.55;
  line-height: 1.45;
}

.np[hidden] {
  display: none;
}

.np__label {
  display: block;
  font-weight: 500;
  font-style: normal;
  color: #555;
  margin-bottom: 0.15rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.np__track,
.np__artist {
  display: block;
  color: #fff;
}

.player {
  width: min(420px, 100%);
  text-align: center;
}

.player[hidden] {
  display: none;
}

.player__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
}

.player__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.65rem;
  color: var(--muted);
}

.player__bar {
  height: 3px;
  background: #111;
  outline: 1px solid #222;
  overflow: hidden;
}

.player__fill {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 0.2s linear;
}

.player__controls {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
}

.player__controls button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #555;
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.player__controls button:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.vol {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.62rem;
  font-style: italic;
  letter-spacing: 0.1em;
  color: #555;
}

.vol__label {
  user-select: none;
}

.vol__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 96px;
  height: 3px;
  background: #111;
  outline: 1px solid #333;
  border: 0;
  cursor: crosshair;
}

.vol__slider::-webkit-slider-runnable-track {
  height: 3px;
  background: transparent;
}

.vol__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 9px;
  height: 9px;
  margin-top: -3px;
  background: #fff;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px #000;
}

.vol__slider::-moz-range-track {
  height: 3px;
  background: #111;
  border: 1px solid #333;
}

.vol__slider::-moz-range-thumb {
  width: 9px;
  height: 9px;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 0;
  cursor: crosshair;
}

.vol:hover,
.vol:focus-within {
  color: rgba(255, 255, 255, 0.75);
}

.vol:hover .vol__slider,
.vol:focus-within .vol__slider {
  outline-color: rgba(255, 255, 255, 0.55);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 3.5rem;
  transform: translateX(-50%);
  z-index: 200;
  background: #fff;
  color: #000;
  padding: 0.4rem 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.toast.is-on {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 720px) {
  .profile {
    flex-direction: column;
    text-align: center;
  }

  .profile__info {
    align-items: center;
  }

  .links {
    align-items: center;
  }

  .portrait {
    width: min(180px, 48vw);
  }

  .presence {
    width: 100%;
    max-width: 300px;
    text-align: left;
  }

  .splash__chrome {
    font-size: clamp(4.2rem, 24vw, 6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash__chrome,
  .splash__hint,
  .fx__noise {
    animation: none;
  }

  .shell,
  .splash {
    transition: none;
  }
}

@keyframes splash-sway {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.92;
  }
  50% {
    transform: translateY(10px) scale(1.015);
    opacity: 1;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@keyframes noise-shift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-1.5%, 1%);
  }
}
