:root {
  --panel-a: rgba(31, 55, 66, .78);
  --panel-b: rgba(58, 76, 90, .76);
  --panel-c: rgba(94, 111, 122, .68);
  --accent: #e45b49;
  --white: #fff;
  --shadow: 0 1.625rem 4.375rem rgba(4, 18, 25, .42);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  cursor: url("assets/cursor.svg") 16 15, auto;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  overflow: hidden;
  background: #cfd9dd;
}

body.is-gated {
  cursor: url("assets/cursor.svg") 16 15, auto;
}

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

:is(a, button, input):focus-visible {
  outline: .1875rem solid #fff;
  outline-offset: .25rem;
}

.page-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
}

.page-shell::before {
  position: absolute;
  inset: -2vmax;
  z-index: -3;
  content: "";
  background:
    radial-gradient(ellipse at 78% 22%, rgba(255,255,255,.78) 0 8%, transparent 22%),
    radial-gradient(ellipse at 30% 46%, rgba(0,72,83,.76) 0 16%, transparent 31%),
    linear-gradient(112deg, transparent 0 11%, #d8f0ff 11.2% 25%, transparent 25.4%),
    linear-gradient(18deg, transparent 0 39%, #effaff 39.3% 52%, transparent 52.4%),
    linear-gradient(147deg, transparent 0 45%, #111b2b 45.2% 52%, transparent 52.4%),
    linear-gradient(162deg, transparent 0 38%, #ffe1cc 38.4% 50%, transparent 50.5%),
    linear-gradient(25deg, transparent 0 61%, #fff9f5 61.2% 76%, transparent 76.5%),
    linear-gradient(135deg, #d8d4c8 0%, #bcc7c4 45%, #f7f9fb 100%);
  transform: scale(1.03);
  transition: filter .65s ease, opacity .65s ease;
}

.page-shell::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    url("assets/reze.webp") center / cover no-repeat,
    radial-gradient(circle at 50% 50%, transparent 0 40%, rgba(255,255,255,.22) 72%, rgba(255,255,255,.55) 100%);
  filter: saturate(1.08) contrast(1.04);
  transition: filter .65s ease, opacity .65s ease;
}

body.is-gated .page-shell::before,
body.is-gated .page-shell::after {
  filter: grayscale(1) blur(.6875rem) brightness(.72);
}

body.is-gated .profile-stack,
body.is-gated .rain-layer {
  filter: grayscale(1) blur(.4375rem);
  opacity: .52;
  transform: scale(.985);
}

.profile-stack,
.rain-layer {
  transition: filter .65s ease, opacity .65s ease, transform .65s ease;
}

.enter-gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  width: 100%;
  min-height: 100vh;
  place-items: center;
  padding: 0;
  color: rgba(255,255,255,.92);
  cursor: url("assets/cursor.svg") 16 15, auto;
  background: rgba(59, 68, 72, .62);
  border: 0;
  font: inherit;
  font-size: clamp(1.15rem, 2.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 0 1.375rem rgba(217,235,241,.45), 0 .125rem 1.125rem rgba(0,0,0,.34);
  backdrop-filter: blur(.1875rem) grayscale(1);
  transition: opacity .45s ease, visibility .45s ease;
}

body.has-entered .enter-gate {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.effects-reduced .page-shell::before,
body.effects-reduced .page-shell::after,
body.effects-reduced .profile-stack,
body.effects-reduced .rain-layer,
body.effects-reduced .enter-gate,
body.effects-reduced .glass-panel,
body.effects-reduced .social-links a {
  transition: none;
}

body.effects-reduced .page-shell::before,
body.effects-reduced .page-shell::after,
body.effects-reduced .profile-stack,
body.effects-reduced .enter-gate {
  filter: none;
}

body.effects-reduced.is-gated .page-shell::before,
body.effects-reduced.is-gated .page-shell::after {
  opacity: .46;
}

body.effects-reduced.is-gated .profile-stack {
  opacity: .55;
  transform: none;
}

body.effects-reduced .enter-gate {
  background: rgba(58, 66, 70, .8);
  backdrop-filter: none;
}

body.effects-reduced .rain-layer {
  filter: none;
  opacity: .5;
}

body.effects-reduced .glass-panel {
  background: rgba(42, 63, 73, .84);
  box-shadow: 0 1rem 2rem rgba(4, 18, 25, .32);
  backdrop-filter: none;
}

body.effects-reduced .glass-panel::before {
  display: none;
}

.profile-stack {
  display: grid;
  width: min(90vw, 45rem);
  gap: 1.125rem;
  margin-top: 1.5rem;
}

.glass-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 10%, rgba(228, 91, 73, .12), transparent 19%),
    radial-gradient(circle at 22% 82%, rgba(181, 224, 232, .12), transparent 26%),
    linear-gradient(110deg, var(--panel-a), var(--panel-c) 46%, var(--panel-b));
  border: .0625rem solid rgba(226, 245, 249, .18);
  box-shadow: var(--shadow);
  backdrop-filter: blur(.8125rem);
}

.glass-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 42% 20%, rgba(222,246,250,.1), transparent 15%),
    linear-gradient(90deg, transparent, rgba(221,242,246,.08), transparent);
  opacity: .78;
  mix-blend-mode: screen;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 21.25rem;
  padding: 3.625rem 1.5rem 2.125rem;
  text-align: center;
  border-radius: 1.375rem;
}

.profile-card h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 .5rem;
  font-size: clamp(2.45rem, 4vw, 3.3rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow:
    0 0 1.375rem rgba(186, 226, 235, .72),
    0 .125rem 0 rgba(255,255,255,.16);
}

.tagline {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 700;
  color: rgba(237, 247, 249, .92);
  text-shadow: 0 .125rem .875rem rgba(7, 26, 35, .4);
}

.discord-activity[hidden] {
  display: none;
}

.discord-activity {
  --activity-avatar-size: clamp(3.5rem, 16%, 4.625rem);
  --activity-art-size: clamp(4.25rem, 18%, 5.75rem);
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--activity-avatar-size) minmax(0, 1fr) var(--activity-art-size);
  align-items: center;
  width: min(100%, 32.5rem);
  min-height: calc(var(--activity-art-size) + 2rem);
  gap: 1rem;
  margin-top: 1.875rem;
  padding: .875rem 1.125rem;
  text-align: left;
  background:
    radial-gradient(circle at 34% 24%, rgba(238, 148, 160, .15), transparent 28%),
    rgba(231, 244, 247, .1);
  border: .0625rem solid rgba(235, 250, 252, .12);
  border-radius: 2.125rem;
  box-shadow: inset 0 0 0 .1875rem rgba(236, 249, 252, .05);
}

.discord-avatar-wrap {
  position: relative;
  width: var(--activity-avatar-size);
  height: var(--activity-avatar-size);
}

.discord-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.discord-status-dot {
  position: absolute;
  right: -.125rem;
  bottom: .1875rem;
  width: 32%;
  height: 32%;
  background: #23a55a;
  border: .1875rem solid rgba(88, 112, 122, .96);
  border-radius: 50%;
}

.discord-status-dot.is-idle {
  background: #f0b232;
}

.discord-status-dot.is-dnd {
  background: #f23f43;
}

.discord-status-dot.is-offline {
  background: #80848e;
}

.discord-presence-copy {
  min-width: 0;
  overflow: hidden;
  padding-block: .12em .22em;
}

.discord-name-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .5625rem;
  margin-bottom: .25rem;
  padding-bottom: .14em;
}

.discord-username {
  overflow: hidden;
  font-size: 1.55rem;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-server-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: .375rem;
  padding: .3125rem .5625rem;
  color: rgba(255,255,255,.94);
  font-size: .88rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(238, 248, 251, .12);
  border-radius: .6875rem;
  box-shadow: inset 0 0 0 .125rem rgba(238, 248, 251, .08);
}

.discord-server-badge[hidden] {
  display: none;
}

.discord-server-badge-icon {
  display: block;
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
}

.discord-server-badge-label {
  max-width: 6ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-presence-copy small {
  display: block;
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
}

.discord-presence-copy p {
  display: flex;
  min-width: 0;
  margin: 0;
  padding-bottom: .08em;
  font-size: 1.08rem;
  line-height: 1.36;
  white-space: nowrap;
}

.activity-type {
  flex: 0 0 auto;
  margin-right: .5rem;
}

.activity-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-name,
.activity-state,
.activity-elapsed {
  color: rgba(232, 241, 244, .72);
}

.activity-state {
  margin-top: .12rem;
  padding-bottom: .12em;
  font-size: 1rem;
  line-height: 1.36;
  display: -webkit-box;
  white-space: normal;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.activity-elapsed {
  margin-top: .02rem;
  font-size: .82rem;
  line-height: 1.3;
  white-space: nowrap;
}

.activity-elapsed[hidden] {
  display: none;
}

.activity-art {
  position: relative;
  display: grid;
  width: var(--activity-art-size);
  height: var(--activity-art-size);
  place-items: center;
  overflow: hidden;
  color: #14b9f0;
  background: rgba(17, 35, 43, .88);
  border-radius: 1rem;
}

.activity-art img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-art.has-image img {
  display: block;
}

.activity-art.has-image .activity-fallback-icon {
  display: none;
}

.activity-fallback-icon {
  width: 54%;
  height: 54%;
  fill: currentColor;
}

.social-links {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .875rem;
  margin-top: auto;
  padding-top: 1.75rem;
}

.social-links a {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  color: rgba(246, 252, 253, .95);
  text-decoration: none;
  transition: transform .18s ease, opacity .18s ease;
}

.social-links a:hover {
  transform: translateY(-.125rem) scale(1.03);
}

.social-links svg {
  width: 2.5rem;
  height: 2.5rem;
  fill: currentColor;
}

.osu-link {
  border-radius: 50%;
}

.osu-link svg {
  width: 2.75rem;
  height: 2.75rem;
}

.osu-link path {
  fill: currentColor;
}

.player {
  display: grid;
  grid-template-columns: 5.375rem minmax(0, 1fr) 9.875rem;
  align-items: center;
  column-gap: 1.375rem;
  min-height: 6.75rem;
  padding: 1rem 1.5rem 1rem 1.25rem;
  border-radius: 1rem;
}

.audio-source {
  display: none;
}

.album {
  display: grid;
  width: 4.375rem;
  height: 4.375rem;
  place-items: center;
  overflow: hidden;
  background: rgba(218, 240, 244, .16);
  border-radius: .625rem;
}

.album img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.track {
  min-width: 0;
}

.track strong {
  display: block;
  margin-bottom: .375rem;
  font-size: 1.05rem;
}

.timeline-row {
  display: grid;
  grid-template-columns: auto minmax(5.625rem, 1fr) auto;
  align-items: center;
  gap: .625rem;
  color: rgba(231,244,247,.78);
  font-size: 1rem;
}

.progress {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 1.25rem;
  margin: 0;
  padding: 0;
  cursor: url("assets/cursor.svg") 16 15, auto;
  background: linear-gradient(90deg, rgba(226,245,249,.9) var(--progress, 0%), rgba(225,242,246,.28) var(--progress, 0%)) center / 100% .125rem no-repeat;
  border: 0;
}

.progress-at-0 { --progress: 0%; }
.progress-at-5 { --progress: 5%; }
.progress-at-10 { --progress: 10%; }
.progress-at-15 { --progress: 15%; }
.progress-at-20 { --progress: 20%; }
.progress-at-25 { --progress: 25%; }
.progress-at-30 { --progress: 30%; }
.progress-at-35 { --progress: 35%; }
.progress-at-40 { --progress: 40%; }
.progress-at-45 { --progress: 45%; }
.progress-at-50 { --progress: 50%; }
.progress-at-55 { --progress: 55%; }
.progress-at-60 { --progress: 60%; }
.progress-at-65 { --progress: 65%; }
.progress-at-70 { --progress: 70%; }
.progress-at-75 { --progress: 75%; }
.progress-at-80 { --progress: 80%; }
.progress-at-85 { --progress: 85%; }
.progress-at-90 { --progress: 90%; }
.progress-at-95 { --progress: 95%; }
.progress-at-100 { --progress: 100%; }

.progress::-webkit-slider-runnable-track {
  width: 100%;
  height: .125rem;
  background: transparent;
  border-radius: 62.4375rem;
}

.progress::-moz-range-track {
  width: 100%;
  height: .125rem;
  background: transparent;
  border: 0;
  border-radius: 62.4375rem;
}

.progress::-moz-range-progress {
  height: .125rem;
  background: var(--accent);
  border-radius: 62.4375rem;
}

.progress::-webkit-slider-thumb {
  width: .75rem;
  height: .75rem;
  margin-top: -.3125rem;
  -webkit-appearance: none;
  appearance: none;
  background: var(--accent);
  border: .125rem solid rgba(255,255,255,.9);
  border-radius: 50%;
}

.progress::-moz-range-thumb {
  width: .5rem;
  height: .5rem;
  background: var(--accent);
  border: .125rem solid rgba(255,255,255,.9);
  border-radius: 50%;
}

.controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .8125rem;
}

.controls button {
  display: grid;
  width: 1.75rem;
  height: 2.125rem;
  place-items: center;
  padding: 0;
  color: rgba(241,250,251,.9);
  cursor: url("assets/cursor.svg") 16 15, auto;
  background: transparent;
  border: 0;
}

.controls svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.pause-icon,
.play.is-playing .play-icon {
  display: none;
}

.play.is-playing .pause-icon {
  display: block;
}

.rain-layer {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.rain-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 46.25em) {
  body {
    overflow: auto;
  }

  .page-shell {
    min-height: 100svh;
    padding: 2.75rem 1rem 1.75rem;
  }

  .profile-stack {
    width: 100%;
    margin-top: 0;
  }

  .profile-card {
    min-height: 26.25rem;
    padding-top: 2.75rem;
  }

  .discord-activity {
    --activity-avatar-size: 3.375rem;
    grid-template-columns: var(--activity-avatar-size) minmax(0, 1fr);
    gap: .75rem;
    min-height: auto;
    margin-top: 1.375rem;
    padding: .75rem;
    border-radius: 1.5rem;
  }

  .discord-avatar-wrap,
  .discord-avatar {
    width: var(--activity-avatar-size);
    height: var(--activity-avatar-size);
  }

  .discord-status-dot {
    width: 32%;
    height: 32%;
    border-width: .1875rem;
  }

  .discord-username {
    font-size: 1.25rem;
  }

  .discord-presence-copy p {
    font-size: .98rem;
  }

  .activity-state {
    font-size: .92rem;
  }

  .activity-elapsed {
    font-size: .78rem;
  }

  .discord-server-badge {
    display: none;
  }

  .activity-art {
    display: none;
  }

  .player {
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: .75rem;
    padding: .875rem;
  }

  .album {
    width: 3.625rem;
    height: 3.625rem;
  }

  .controls {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 26.25em) {
  .profile-card {
    min-height: 24.375rem;
  }

  .discord-activity {
    --activity-avatar-size: 3rem;
  }

  .discord-username {
    font-size: 1.12rem;
  }

  .discord-presence-copy p,
  .activity-state {
    font-size: .86rem;
  }

  .activity-elapsed {
    font-size: .74rem;
  }

  .timeline-row {
    grid-template-columns: auto minmax(3.625rem, 1fr) auto;
    font-size: .9rem;
  }
}

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