:root {
  --ink: #07080a;
  --paper: #f4f4f0;
  --muted: #b8b9b8;
  --line: rgba(255, 255, 255, .13);
  --panel: rgba(12, 13, 16, .7);
  --online: #65d783;
  --idle: #f1c65d;
  --dnd: #ed6a6a;
  --offline: #767983;
  --parallax-x: 0px;
  --parallax-y: 0px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button { font: inherit; }

.scene, .scene > * { position: fixed; inset: 0; pointer-events: none; }
.scene { z-index: -1; overflow: hidden; background: #050608; }
.scene__art {
  background: url("assets/moonlit-tide.png") center center / cover no-repeat;
  opacity: .84;
  filter: contrast(1.12) brightness(.76);
  transform: scale(1.045) translate3d(calc(var(--parallax-x) * -.025), calc(var(--parallax-y) * -.025), 0);
  animation: slow-drift 20s ease-in-out infinite alternate;
}
.scene__veil {
  background:
    radial-gradient(circle at 66% 16%, rgba(183, 203, 225, .12), transparent 20%),
    linear-gradient(90deg, rgba(3, 4, 6, .74) 0%, rgba(3, 4, 6, .30) 55%, rgba(3, 4, 6, .52) 100%),
    linear-gradient(0deg, rgba(3, 4, 6, .7), transparent 55%);
}
.aurora { filter: blur(60px); opacity: .18; mix-blend-mode: screen; }
.aurora--one {
  inset: 14% auto auto 5%; width: 45vw; height: 20vw; min-width: 400px; min-height: 160px;
  background: radial-gradient(ellipse, #6d91b8 0%, transparent 67%);
  animation: breathe 10s ease-in-out infinite;
}
.aurora--two {
  inset: auto 0 4% auto; width: 36vw; height: 24vw; min-width: 350px;
  background: radial-gradient(ellipse, #8f7fba 0%, transparent 70%);
  animation: breathe 13s ease-in-out -5s infinite reverse;
}
.orb { inset: auto; width: 10px; height: 10px; border-radius: 50%; background: #f9fbff; box-shadow: 0 0 24px 8px rgba(202, 223, 255, .5); opacity: .5; }
.orb--one { top: 27%; left: 23%; animation: orbit-a 17s ease-in-out infinite; }
.orb--two { bottom: 16%; right: 16%; width: 5px; height: 5px; animation: orbit-b 12s ease-in-out -4s infinite; }
#starfield { width: 100%; height: 100%; opacity: .7; }
.grain {
  opacity: .18;
  background-image: repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.22) 0 1px, transparent 1px 3px);
  background-size: 5px 5px;
  mix-blend-mode: soft-light;
  animation: grain-shift .22s steps(2) infinite;
}

.page-shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 40px; }
.site-nav { display: flex; align-items: center; justify-content: space-between; padding: 0 3px; animation: enter .8s both; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.wordmark__mark { width: 13px; height: 13px; border: 1px solid rgba(255,255,255,.78); border-radius: 50%; box-shadow: inset 0 0 0 3px #0a0b0e, inset 0 0 0 4px rgba(255,255,255,.5); }
.nav-status { color: rgba(255,255,255,.66); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.nav-status__pulse { display: inline-block; width: 6px; height: 6px; margin: 0 7px 1px 0; border-radius: 99px; background: var(--online); box-shadow: 0 0 12px var(--online); animation: pulse 2s infinite; }

.profile {
  position: relative;
  isolation: isolate;
  margin-top: clamp(58px, 13vh, 140px);
  padding: clamp(25px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(24, 25, 30, .78), rgba(8, 9, 12, .6));
  box-shadow: 0 35px 100px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(17px) saturate(115%);
  animation: profile-in 1s cubic-bezier(.16, 1, .3, 1) .12s both;
}
.profile::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .4; background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.06) 42%, transparent 57%); transform: translateX(-125%); animation: gleam 9s ease-in-out 2s infinite; }
.profile__glow { position: absolute; z-index: -1; top: -140px; right: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(220,230,242,.14), transparent 65%); animation: glow 8s ease-in-out infinite; }
.profile__topline, .profile__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.kicker, .card-heading p, .card-index, .spotify-now, .profile__footer, .eyebrow { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.kicker { color: rgba(255,255,255,.5); }
.kicker span { color: rgba(255,255,255,.25); padding: 0 5px; }
.refresh { border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 7px 11px; color: rgba(255,255,255,.76); background: rgba(255,255,255,.04); cursor: pointer; font-size: 11px; letter-spacing: .04em; transition: transform .25s ease, background .25s ease, border-color .25s ease; }
.refresh:hover, .refresh:focus-visible { outline: 0; transform: translateY(-2px); border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.11); }
.refresh.is-loading span { display: inline-block; animation: spin 1s linear infinite; }

.identity { display: flex; align-items: center; gap: clamp(20px, 4vw, 34px); margin-top: clamp(35px, 7vw, 68px); }
.avatar-wrap { position: relative; flex: 0 0 auto; width: clamp(96px, 15vw, 142px); aspect-ratio: 1; padding: 4px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.02)); box-shadow: 0 0 0 8px rgba(255,255,255,.025), 0 12px 50px rgba(0,0,0,.34); }
.avatar { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); border-radius: 50%; object-fit: cover; background: #22252b; }
.avatar { z-index: 1; display: block; }
.status-dot { position: absolute; z-index: 2; right: 7%; bottom: 7%; width: clamp(19px, 3vw, 25px); height: clamp(19px, 3vw, 25px); border: 4px solid #18191d; border-radius: 50%; background: var(--offline); box-shadow: 0 0 12px rgba(0,0,0,.4); transition: background .35s ease, box-shadow .35s ease; }
.status-dot--online { background: var(--online); box-shadow: 0 0 14px rgba(101,215,131,.6); }
.status-dot--idle { background: var(--idle); }
.status-dot--dnd { background: var(--dnd); }
.identity__copy { min-width: 0; }
.eyebrow { color: #9be9b1; margin-bottom: 8px; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 8vw, 78px); font-weight: 400; letter-spacing: -.065em; line-height: .89; text-shadow: 0 4px 30px rgba(0,0,0,.45); }
.username { margin: 12px 0 0; color: rgba(255,255,255,.68); font-size: 14px; letter-spacing: .02em; }
.custom-status { max-width: 550px; margin: 18px 0 0; color: rgba(255,255,255,.89); font-size: clamp(13px, 2vw, 15px); line-height: 1.5; }
.custom-status:empty { display: none; }
.custom-emoji { display: inline-block; width: 1.2em; height: 1.2em; margin: 0 5px -3px 0; object-fit: contain; vertical-align: baseline; }
.rule { height: 1px; margin: clamp(34px, 6vw, 58px) 0 24px; background: linear-gradient(90deg, rgba(255,255,255,.32), rgba(255,255,255,.04) 70%, transparent); }

.presence-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 13px; }
.presence-grid--single { grid-template-columns: minmax(0, 1fr); }
.presence-card { min-height: 183px; padding: 20px; border: 1px solid rgba(255,255,255,.10); border-radius: 17px; background: rgba(6,7,10,.44); box-shadow: inset 0 1px rgba(255,255,255,.05); transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .35s ease, background .35s ease; }
.presence-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.23); background: rgba(14,15,19,.62); }
.card-heading { display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.55); }
.card-index { color: rgba(255,255,255,.26); }
.activity-body, .spotify-body { display: flex; align-items: center; gap: 15px; margin-top: 22px; }
.activity-art { display: grid; flex: 0 0 57px; width: 57px; height: 57px; overflow: hidden; place-items: center; border-radius: 13px; background: #20242d center / cover no-repeat; color: rgba(255,255,255,.75); font-size: 25px; }
.activity-art--fallback { background: linear-gradient(135deg, #2e3851, #15161d 70%); }
.activity-body h2, .spotify-copy h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.activity-body p:not(.activity-time), .spotify-copy > p:not(.spotify-now) { margin: 4px 0 0; color: rgba(255,255,255,.58); font-size: 12px; line-height: 1.35; }
.activity-time { margin: 8px 0 0; color: #a5c8e8; font-size: 10px; letter-spacing: .035em; }
.spotify-art { width: 74px; height: 74px; border-radius: 12px; object-fit: cover; box-shadow: 0 8px 26px rgba(0,0,0,.34); }
.spotify-copy { min-width: 0; flex: 1; }
.spotify-now { display: flex; align-items: center; margin-bottom: 8px; color: #a4ebba; font-size: 9px; }
.spotify-now span { width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: #67df87; box-shadow: 0 0 10px #67df87; animation: pulse 1.4s infinite; }
.progress { height: 3px; margin-top: 17px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.14); }
.progress span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #86e3a2, #d4ffe1); transition: width 1s linear; }
.profile__footer { margin-top: 25px; color: rgba(255,255,255,.42); font-weight: 500; letter-spacing: .055em; }
.profile__footer p { margin: 0; }
.credit { margin: 28px 2px 0; color: rgba(255,255,255,.36); font-family: Georgia, serif; font-size: 13px; font-style: italic; letter-spacing: .04em; animation: enter .7s .55s both; }

@keyframes profile-in { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes enter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slow-drift { from { transform: scale(1.045) translate3d(calc(var(--parallax-x) * -.025), calc(var(--parallax-y) * -.025), 0); } to { transform: scale(1.085) translate3d(calc(var(--parallax-x) * .025), calc(var(--parallax-y) * .025), 0); } }
@keyframes breathe { 0%,100% { transform: scale(.85) translate(0,0); opacity: .1; } 50% { transform: scale(1.2) translate(7%, -10%); opacity: .24; } }
@keyframes orbit-a { 0%,100% { transform: translate(0,0); opacity: .26; } 50% { transform: translate(60px, 36px); opacity: .75; } }
@keyframes orbit-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-82px, -60px) scale(1.8); } }
@keyframes grain-shift { 0% { transform: translate(0,0); } 25% { transform: translate(2%,-1%); } 50% { transform: translate(-1%,2%); } 75% { transform: translate(1%,1%); } 100% { transform: translate(-2%,-1%); } }
@keyframes pulse { 50% { opacity: .4; transform: scale(.76); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes gleam { 0%, 70%, 100% { transform: translateX(-125%); } 82% { transform: translateX(125%); } }
@keyframes glow { 50% { transform: scale(1.2); opacity: .7; } }

@media (max-width: 690px) {
  .page-shell { width: min(100% - 24px, 600px); padding-top: 18px; }
  .nav-status { font-size: 9px; }
  .profile { margin-top: 64px; border-radius: 22px; }
  .presence-grid { grid-template-columns: 1fr; }
  .profile__footer { align-items: flex-start; flex-direction: column; gap: 7px; }
}
@media (max-width: 420px) {
  .identity { align-items: flex-start; flex-direction: column; }
  .profile__topline { align-items: flex-start; }
  .kicker { max-width: 200px; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
