:root {
  --bg: #050308;
  --ink: #f6f3fb;
  --muted: rgba(246, 243, 251, 0.62);
  --faint: rgba(246, 243, 251, 0.42);
  --line: rgba(255, 255, 255, 0.08);
  --accent: #c4b5fd;
  --icon: #ffffff;
  --primary: #8b6cf6;
  --card: 440px;
  --card-alpha: 0.72;
  --card-alpha-2: 0.62;
  --card-blur: 22px;
  --radius: 22px;
  --border-width: 1px;
  --border-color: rgba(255, 255, 255, 0.08);
  --avatar-radius: 50%;
  --banner-radius: 16px;
  --name-size: 28px;
  --font-size: 15px;
  --tracking: 0px;
  --bg-blur: 0px;
  --effect: #c4b5fd;
  --font: "Onest", "Segoe UI", sans-serif;
  font-family: var(--font);
  font-size: var(--font-size);
  letter-spacing: var(--tracking);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
  overflow: hidden;
}

body.entered {
  overflow-x: hidden;
  overflow-y: auto;
}

body.has-media .scene { background: #000; }
body.has-media #bg-fill { background-image: url("/assets/uploads/bg-still.jpg"); }
body.has-media .bg-video { opacity: 0; transition: opacity 0.9s ease; }
body.has-media .bg-video.is-on { opacity: 1; }
body.has-media .orb,
body.has-media .grain,
body.has-media .spotlight,
body.has-media #particles { display: none; }
body.has-media .vignette { background: rgba(0, 0, 0, 0.38); }
body.has-media .card {
  width: min(620px, calc(100vw - 36px));
  min-height: 148px;
  padding: 78px 22px 16px 24px;
  background: rgba(0, 0, 0, 0.13);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}
body.has-media .card::before { display: none; }
body.has-media .avatar-wrap {
  position: absolute;
  top: 0;
  left: 22px;
  width: 96px;
  height: 96px;
  margin: 0;
  transform: translateY(-46%);
}
body.has-media .avatar {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: none;
  border: 2px solid rgba(18, 18, 18, 0.3);
  background: #111;
}
body.has-media .avatar-wrap .status { display: none; }
body.has-media .identity { margin-top: 6px; text-align: left; }
body.has-media .name-row { justify-content: flex-start; }
body.has-media h1 { font-weight: 600; letter-spacing: -0.02em; font-size: 28px; }
body.has-media h1.is-typing::after,
body.has-media .discord-widget strong.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 3px;
  background: #fff;
  vertical-align: -0.08em;
  animation: caret 0.9s steps(1) infinite;
}
body.has-media .badge {
  width: 22px;
  height: 22px;
  background: transparent;
  color: #fff;
  border-radius: 0;
}
body.has-media .badge svg { width: 22px; height: 22px; }
body.has-media .socials { gap: 14px; margin-top: 12px; justify-content: center; }
body.has-media .social {
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
body.has-media .social svg { width: 30px; height: 30px; }
body.has-media .social:hover,
body.has-media .social:focus-visible {
  background: transparent;
  transform: none;
  opacity: 0.72;
}
body.has-media .meta {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
  padding: 3px 8px;
  border-radius: 999px;
  border: 2px solid rgba(18, 18, 18, 0.3);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}
body.has-media .discord-widget {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  width: fit-content;
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(0, 0, 0, 0.1);
}
body.has-media .discord-widget strong { font-size: 13px; font-weight: 550; }
body.has-media .discord-widget .pin {
  width: 14px;
  height: 14px;
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
body.has-media .discord-widget .pin svg { width: 14px; height: 14px; }
body.has-media .discord-widget p { font-size: 11px; }
body.has-media .discord-widget div { min-width: 0; }
body.has-media .stage { padding-bottom: 160px; }
body.has-media .player {
  top: 16px;
  bottom: auto;
  left: 16px;
  min-width: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  backdrop-filter: none;
  justify-content: center;
}
body.has-media .player-title,
body.has-media .player input { display: none; }
body.has-media .player button {
  width: 42px;
  height: 42px;
  background: transparent;
}
body.has-media .gate-text {
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0;
  text-indent: 0;
}

button, a { font: inherit; color: inherit; }

.scene {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 70% at 50% 100%, rgba(88, 28, 120, 0.45), transparent 55%),
    radial-gradient(80% 50% at 50% 0%, #120816, transparent 70%),
    var(--bg);
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.orb-a {
  width: min(680px, 90vw);
  height: 280px;
  left: 50%;
  bottom: -40px;
  transform: translateX(-50%);
  background: rgba(124, 58, 180, 0.55);
  animation: drift 16s ease-in-out infinite;
}

.orb-b {
  width: 240px;
  height: 240px;
  right: 12%;
  bottom: 8%;
  background: rgba(190, 24, 93, 0.28);
  animation: drift 22s ease-in-out infinite reverse;
}

.orb-c {
  width: 180px;
  height: 180px;
  left: 14%;
  bottom: 18%;
  background: rgba(99, 102, 241, 0.22);
  animation: drift 19s ease-in-out infinite 2s;
}

canvas#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 50% 42%, transparent 30%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--x, 50%) var(--y, 40%), rgba(255, 255, 255, 0.05), transparent 60%);
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.6s ease;
}

.gate-text {
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.88);
  animation: pulse 2.4s ease-in-out infinite;
}

.gate:hover .gate-text,
.gate:focus-visible .gate-text {
  animation: none;
  opacity: 1;
}

.gate:focus-visible {
  outline: none;
}

.gate:focus-visible .gate-text {
  text-decoration: underline;
  text-underline-offset: 6px;
}

body.entered .gate {
  opacity: 0;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 96px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.985);
  filter: blur(8px);
}

body.entered .stage {
  opacity: 1;
  visibility: visible;
  transform: none;
  filter: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1), filter 0.7s ease, visibility 0s;
}

.card {
  position: relative;
  width: min(var(--card), 100%);
  padding: 34px 26px 16px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(24, 18, 32, var(--card-alpha)), rgba(8, 6, 12, var(--card-alpha-2)));
  border: var(--border-width) solid var(--border-color);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(var(--card-blur)) saturate(1.25);
  -webkit-backdrop-filter: blur(var(--card-blur)) saturate(1.25);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(196, 181, 253, 0.75), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.avatar-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 auto;
}

.avatar {
  width: 92px;
  height: 92px;
  border-radius: var(--avatar-radius);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.38), transparent 36%),
    linear-gradient(160deg, #4c3568 0%, #16101f 72%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0 7px rgba(167, 139, 250, 0.12),
    0 16px 40px rgba(76, 29, 149, 0.35);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.status {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3dd68c;
  border: 3px solid #141018;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.status.idle { background: #f0b232; }
.status.dnd { background: #f23f43; }
.status.offline { background: #80848e; }
.discord-widget .status {
  position: static;
  width: 10px;
  height: 10px;
  border: 0;
  box-shadow: none;
  flex: 0 0 auto;
}

.identity {
  margin-top: 16px;
  text-align: center;
}

.name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

h1 {
  margin: 0;
  font-size: var(--name-size);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.badge {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #8b6cf6;
  color: white;
  flex: 0 0 auto;
}

.badge svg { width: 11px; height: 11px; }

.handle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.bio {
  margin: 10px auto 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
  font-weight: 300;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.social {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.social svg { width: 18px; height: 18px; }

.social:hover,
.social:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  transform: translateY(-1px);
  outline: none;
}

.links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 44px;
  border-radius: 14px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.link-icon {
  position: absolute;
  left: 16px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.link-icon svg { width: 18px; height: 18px; }

.link-label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.08), transparent 70%);
  transform: translateX(-120%);
}

.link:hover::after,
.link:focus-visible::after {
  transform: translateX(120%);
  transition: transform 0.6s ease;
}

.link:hover,
.link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(196, 181, 253, 0.38);
  transform: translateY(-1px);
  outline: none;
}

.meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.meta svg { width: 14px; height: 14px; }

.player {
  position: fixed;
  z-index: 4;
  left: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 36px));
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  background: rgba(12, 10, 16, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.player[hidden] { display: none; }

.player button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.player button svg { width: 12px; height: 12px; }

.player-title {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}

.player input[type="range"] {
  width: 72px;
  accent-color: var(--accent);
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes drift {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-46%) translateY(-18px); }
}

.orb-b, .orb-c {
  animation-name: float;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-24px); }
}

@media (max-height: 760px) {
  .stage { align-items: flex-start; }
}

@media (max-width: 520px) {
  .card { padding: 28px 16px 14px; }
  .gate-text { letter-spacing: 0.28em; text-indent: 0.28em; font-size: 12px; }
  .player { left: 12px; right: 12px; max-width: none; }
  body.layout-portfolio .card { grid-template-columns: 1fr; }
}

.bg-fill, .bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: blur(var(--bg-blur));
}

.bg-fill {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}


#gate-icon {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 16px;
}

.gate-sub {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
}

.social { color: var(--icon); }
.social svg, .link-icon svg, .badge svg, .meta svg { width: 18px; height: 18px; }
.social img, .link-icon img, .badge img { width: 18px; height: 18px; object-fit: cover; border-radius: 4px; }
.badge img { width: 12px; height: 12px; }

.location {
  display: flex;
  align-items: center;
  justify-content: var(--justify, center);
  gap: 6px;
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 13px;
}
.location svg { width: 14px; height: 14px; }

body.align-left .identity, body.align-left .location { text-align: left; justify-content: flex-start; }
body.align-left .name-row, body.align-left .socials, body.align-left .avatar-wrap { justify-content: flex-start; margin-left: 0; margin-right: auto; }
body.align-right .identity, body.align-right .location { text-align: right; justify-content: flex-end; }
body.align-right .name-row, body.align-right .socials { justify-content: flex-end; }
body.align-right .avatar-wrap { margin-left: auto; margin-right: 0; }
.links.align-left .link { justify-content: flex-start; padding-left: 46px; }
.links.align-right .link { justify-content: flex-end; padding-right: 46px; }
.links.align-right .link-icon { left: auto; right: 16px; }

body.glow-name h1 { text-shadow: 0 0 22px var(--accent); }
body.glow-socials .social { filter: drop-shadow(0 0 8px var(--accent)); }
body.glow-badges .badge { box-shadow: 0 0 10px var(--accent); }
body.monochrome .social, body.monochrome .link-icon { filter: grayscale(1); }
body.animated-icons .social svg { animation: wiggle 1.8s ease-in-out infinite; }
body.swap-boxes .link { background: var(--ink); color: var(--bg); }
body.no-gradient .card { background: rgba(12, 10, 16, var(--card-alpha)); }
body.fx-none .orb, body.fx-aurora .orb, body.fx-dither .orb { opacity: 0; }
body.fx-none .scene { background: var(--bg); }
body.fx-aurora .scene {
  background:
    radial-gradient(40% 30% at 20% 80%, color-mix(in srgb, var(--effect) 55%, transparent), transparent 70%),
    radial-gradient(30% 40% at 80% 20%, rgba(56, 189, 248, 0.25), transparent 70%),
    var(--bg);
  animation: aurora 10s ease-in-out infinite;
}
body.fx-plasma .orb { opacity: 0.9; }
body.fx-dither .grain { opacity: 0.55; mix-blend-mode: soft-light; }
body.deco .avatar { box-shadow: 0 0 0 3px var(--accent), 0 0 22px var(--accent); }
body.has-cursor, body.has-cursor * { cursor: var(--cursor); }
body.has-crosshair, body.has-crosshair * { cursor: none; }
.crosshair {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  pointer-events: none;
  z-index: 80;
}
.crosshair i {
  position: absolute;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
  border-radius: 1px;
}
.crosshair .h1, .crosshair .h2 { top: 12px; height: 2px; width: 8px; }
.crosshair .h1 { left: 0; }
.crosshair .h2 { right: 0; }
.crosshair .v1, .crosshair .v2 { left: 12px; width: 2px; height: 8px; }
.crosshair .v1 { top: 0; }
.crosshair .v2 { bottom: 0; }
body.layout-simplistic .card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body.layout-simplistic .link { border-radius: 999px; background: transparent; }
body.layout-portfolio .card {
  display: grid;
  grid-template-columns: 260px 1fr;
  column-gap: 28px;
  align-items: start;
}
body.layout-portfolio .banner, body.layout-portfolio .tabs { grid-column: 1 / -1; }
body.layout-portfolio .tab-panel { display: contents; }
body.anim-pop.entered .card { animation: pop-in 0.45s cubic-bezier(.2, .8, .2, 1); }
body.border-animated .card { box-shadow: 0 0 0 1px var(--accent), 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent); }

.name-effect-rainbow {
  background: linear-gradient(90deg, #fb7185, #c4b5fd, #67e8f9, #fb7185);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hue 4s linear infinite;
}
.name-effect-fuzzy { animation: fuzzy 0.35s infinite; }

.banner img {
  width: calc(100% + 52px);
  height: 128px;
  object-fit: cover;
  margin: -34px -26px 0;
  border-radius: var(--banner-radius) var(--banner-radius) 0 0;
}
.card.has-banner .avatar-wrap { margin-top: -36px; }

.tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.tab {
  border: 0;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.tab.on { background: var(--primary); color: white; }
.widget, .embed-card, .project {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
}
.widget strong, .project strong { display: block; }
.widget span, .project span, .widget p { margin: 0; color: var(--muted); font-size: 13px; }
.guild {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  font-size: 11px;
}
.about { margin-top: 8px; }
.about h2 { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase; }
.about p { margin: 0; color: var(--muted); }
.skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.skills span { padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); font-size: 12px; }
.embed-frame { margin-top: 12px; border-radius: 14px; overflow: hidden; }
.embed-frame iframe { width: 100%; height: 180px; border: 0; }
.embed-frame.tall iframe { height: 152px; }
.toast {
  position: fixed;
  z-index: 6;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 8, 14, 0.86);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}

@keyframes wiggle { 50% { transform: translateY(-2px) rotate(-6deg); } }
@keyframes caret {
  50% { opacity: 0; }
}
@keyframes hue { to { background-position: 200% center; } }
@keyframes fuzzy { 50% { filter: blur(1px); transform: translateX(0.6px); } }
@keyframes pop-in { from { transform: scale(0.94); } to { transform: none; } }
@keyframes aurora { 50% { filter: hue-rotate(25deg); } }

@media (max-width: 720px) {
  body.layout-portfolio .card { grid-template-columns: 1fr; }
  body.layout-portfolio .tab-panel { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
