/* ============================================================
   asdf.css — 2PC.WTF / black hole profile
   ============================================================ */

:root {
  --bg: #040109;
  --violet: #a855f7;
  --magenta: #e879f9;
  --lavender: #e9d5ff;
  --ink: rgba(255, 255, 255, 0.62);

  /* size of the "singularity" (logo box). the black hole scales from this */
  --core: clamp(120px, min(24vmin, 18vh), 200px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Syncopate", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;

  --px: 0px;
  --py: 0px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  background: #040109;
  overflow: hidden;
}

html {
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
}

body {
  font-family: var(--font-body);
  color: #fff;
  background: #040109;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(168, 85, 247, 0.45); color: #fff; }

/* ------------------------------------------------------------
   background layers
   ------------------------------------------------------------ */
#space {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  display: block;
  background: #040109;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 42%, rgba(0, 0, 0, 0.62) 100%);
}

.grain {
  position: fixed;
  inset: -20%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.06 0 0 0 0 0.18 0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 260px 260px;
  animation: grain 1.4s steps(5) infinite;
  will-change: transform;
}
body.entered .grain { opacity: 0.04; }

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2%, 1.5%); }
  40%  { transform: translate(1.5%, -2%); }
  60%  { transform: translate(-1%, -1%); }
  80%  { transform: translate(2%, 1%); }
  100% { transform: translate(0, 0); }
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5;
  width: 380px;
  height: 380px;
  margin: -190px 0 0 -190px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.17), rgba(168, 85, 247, 0.06) 42%, transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.7s ease;
  will-change: transform;
}
body.has-pointer .cursor-glow { opacity: 1; }

/* ------------------------------------------------------------
   click to enter
   ------------------------------------------------------------ */
#enter-music {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 320px;
  height: 180px;
  border: 0;
  transform: translateY(100%);
  pointer-events: none;
  z-index: 0;
}

.enter {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  background: rgba(4, 1, 9, 0.78);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  backdrop-filter: blur(10px) saturate(110%);
  transition:
    opacity 0.9s var(--ease),
    -webkit-backdrop-filter 1.1s var(--ease),
    backdrop-filter 1.1s var(--ease),
    visibility 0s linear 1.2s;
}
.enter:focus,
.enter:focus-visible { outline: none; box-shadow: none; }

.enter.leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  backdrop-filter: blur(0px) saturate(100%);
}

.enter-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  transition: transform 0.9s var(--ease), opacity 0.5s ease;
}
.enter.leaving .enter-inner { transform: scale(1.18); opacity: 0; }

.enter-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(10px, 1.3vw, 12px);
  letter-spacing: 0.55em;
  padding-left: 0.55em;
  color: rgba(233, 213, 255, 0.5);
}

.enter-text {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16px, 3vw, 26px);
  letter-spacing: 0.38em;
  padding-left: 0.38em;
  color: #fff;
  text-shadow: 0 0 26px rgba(216, 180, 254, 0.65), 0 0 60px rgba(168, 85, 247, 0.35);
  animation: flicker 5s infinite;
}
.enter-text::before,
.enter-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  padding-left: 0.38em;
  opacity: 0;
  text-shadow: none;
  pointer-events: none;
}
.enter-text::before { color: #f0abfc; animation: glitchA 5s infinite; }
.enter-text::after  { color: #a5b4fc; animation: glitchB 5s infinite; }

.enter-hint {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  91% { opacity: 1; }
  92% { opacity: 0.55; }
  93% { opacity: 1; }
  95% { opacity: 0.7; }
  96% { opacity: 1; }
}
@keyframes glitchA {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  91% { opacity: 0.9; transform: translate(-4px, -1px); clip-path: inset(8% 0 58% 0); }
  93% { opacity: 0.9; transform: translate(4px, 1px);  clip-path: inset(48% 0 18% 0); }
  95% { opacity: 0.8; transform: translate(-2px, 0);   clip-path: inset(70% 0 0 0); }
  96% { opacity: 0; }
}
@keyframes glitchB {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  91% { opacity: 0.9; transform: translate(4px, 1px);  clip-path: inset(55% 0 10% 0); }
  93% { opacity: 0.9; transform: translate(-4px, -1px); clip-path: inset(0 0 70% 0); }
  95% { opacity: 0.8; transform: translate(2px, 0);    clip-path: inset(30% 0 40% 0); }
  96% { opacity: 0; }
}

/* ------------------------------------------------------------
   stage / profile
   ------------------------------------------------------------ */
.stage {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(11vh + env(safe-area-inset-top)) 20px calc(7vh + env(safe-area-inset-bottom));
  transform: translate3d(var(--px), var(--py), 0);
  will-change: transform;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* the singularity — the black hole is drawn around this box */
.core {
  position: relative;
  width: var(--core);
  height: var(--core);
  margin-bottom: calc(var(--core) * 0.72);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: transform 0.7s var(--ease);
}
body.entered .core {
  opacity: 1;
  animation: bloom 1.6s var(--ease) 0.15s backwards;
}
.core:hover { transform: scale(1.05); }

@keyframes bloom {
  from { opacity: 0; transform: scale(0.25); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 0 16px rgba(216, 140, 255, 0.55)) drop-shadow(0 0 60px rgba(168, 85, 247, 0.35));
  animation: float 7s ease-in-out infinite, breathe 4.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
@keyframes breathe {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(216, 140, 255, 0.5)) drop-shadow(0 0 50px rgba(168, 85, 247, 0.3)); }
  50%      { filter: drop-shadow(0 0 26px rgba(236, 180, 255, 0.85)) drop-shadow(0 0 90px rgba(168, 85, 247, 0.5)); }
}

/* ------------------------------------------------------------
   card
   ------------------------------------------------------------ */
.card-anim {
  width: min(460px, 100%);
  opacity: 0;
}
body.entered .card-anim {
  opacity: 1;
  animation: rise 1.2s var(--ease) 0.45s backwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.rise { opacity: 0; }
body.entered .rise {
  opacity: 1;
  animation: rise 1s var(--ease) var(--d, 0.7s) backwards;
}
.head { --d: 0.7s; }
.bio  { --d: 0.82s; }
.link:nth-of-type(1) { --d: 0.95s; }
.link:nth-of-type(2) { --d: 1.08s; }

.card {
  --mx: 50%;
  --my: 50%;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  border-radius: 26px;
  padding: 30px 26px 26px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025) 55%, rgba(168, 85, 247, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(168, 85, 247, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: box-shadow 0.6s var(--ease);
  will-change: transform;
}
.card:hover {
  box-shadow:
    0 40px 110px rgba(0, 0, 0, 0.65),
    0 0 60px -10px rgba(168, 85, 247, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* glowing border that follows the cursor */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(280px circle at var(--mx) var(--my), rgba(236, 180, 255, 0.9), rgba(168, 85, 247, 0.35) 40%, transparent 72%);
  -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;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }

.card-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.075), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.card:hover .card-glare { opacity: 1; }

/* header */
.head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.name {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1.1;
  letter-spacing: 0.16em;
  padding-left: 0.16em;
  color: #fff;
}
.name span {
  background: linear-gradient(180deg, #ffffff 15%, #e9d5ff 55%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(192, 132, 252, 0.45));
}
.name::before,
.name::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  padding-left: 0.16em;
  opacity: 0;
  pointer-events: none;
}
.name::before { color: #f0abfc; }
.name::after  { color: #93c5fd; }
.card:hover .name::before { animation: glitchA 2.4s infinite; }
.card:hover .name::after  { animation: glitchB 2.4s infinite; }

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--lavender);
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(216, 180, 254, 0.22);
}
.badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 10px var(--magenta);
  animation: pulse 2s ease-in-out infinite;
}
.badge-undetected {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(74, 222, 128, 0.28);
  letter-spacing: 0.22em;
}
.badge-undetected i {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.85);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.7); }
}

/* bio */
.bio {
  margin: 18px 0 24px;
  min-height: 24px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--magenta);
  box-shadow: 0 0 8px var(--magenta);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* links — icon row, stretch on hover */
.links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.link {
  --link-expand: cubic-bezier(0.34, 1.28, 0.64, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 52px;
  width: 52px;
  max-width: 100%;
  gap: 0;
  padding: 5px;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  isolation: isolate;
  transition:
    flex 0.58s var(--link-expand),
    width 0.58s var(--link-expand),
    gap 0.5s var(--link-expand),
    padding 0.5s var(--ease),
    transform 0.45s var(--ease),
    background 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease;
}
.link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(140% 160% at 0% 50%, rgba(168, 85, 247, 0.28), transparent 60%);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.link::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
.link:hover,
.link:focus-visible {
  flex: 1 1 220px;
  width: auto;
  min-width: 52px;
  gap: 14px;
  padding: 13px 16px;
  justify-content: flex-start;
  transform: translateY(-2px);
  border-color: rgba(216, 180, 254, 0.45);
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 16px 40px -12px rgba(168, 85, 247, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.links:hover .link:not(:hover):not(:focus-visible) {
  flex: 0 0 52px;
  width: 52px;
}
.link:hover::before { opacity: 1; }
.link:hover::after { animation: shine 0.9s var(--ease) forwards; }
.link:active { transform: translateY(0) scale(0.99); }
.link:focus-visible {
  outline: 2px solid rgba(216, 180, 254, 0.7);
  outline-offset: 3px;
}
@keyframes shine { to { left: 130%; } }

.ico {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.45s var(--ease), background 0.45s ease, box-shadow 0.45s ease;
}
.ico svg { width: 20px; height: 20px; fill: currentColor; display: block; }

.link-x .ico { color: #fff; }
.link-dc .ico {
  color: #9aa7ff;
  background: rgba(88, 101, 242, 0.16);
  border-color: rgba(88, 101, 242, 0.32);
}
.link:hover .ico { transform: scale(1.08) rotate(-5deg); }
.link-x:hover .ico { background: rgba(255, 255, 255, 0.12); box-shadow: 0 0 22px rgba(255, 255, 255, 0.12); }
.link-dc:hover .ico { color: #fff; background: rgba(88, 101, 242, 0.55); box-shadow: 0 0 22px rgba(88, 101, 242, 0.5); }

.txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition:
    max-width 0.58s var(--link-expand),
    opacity 0.32s ease 0.06s,
    flex 0.58s var(--link-expand);
}
.link:hover .txt,
.link:focus-visible .txt {
  flex: 1 1 auto;
  max-width: 200px;
  opacity: 1;
}
.lbl { font-weight: 600; font-size: 15px; letter-spacing: 0.01em; }
.sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arrow {
  flex: 0 0 auto;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.38);
  font-size: 16px;
  transition:
    max-width 0.5s var(--link-expand),
    opacity 0.3s ease 0.08s,
    transform 0.45s var(--ease),
    color 0.45s ease;
}
.link:hover .arrow,
.link:focus-visible .arrow {
  max-width: 24px;
  opacity: 1;
  transform: translate(3px, -3px);
  color: #fff;
}

/* ------------------------------------------------------------
   footer
   ------------------------------------------------------------ */
.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 10;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.26);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease 1.4s;
}
body.entered .foot { opacity: 1; }

/* ------------------------------------------------------------
   responsive / a11y
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  .card { padding: 24px 18px 20px; border-radius: 22px; }
  .link {
    flex-basis: 48px;
    width: 48px;
  }
  .link:hover,
  .link:focus-visible {
    flex: 1 1 160px;
    padding: 12px 14px;
    gap: 12px;
  }
  .links:hover .link:not(:hover):not(:focus-visible) {
    flex: 0 0 48px;
    width: 48px;
  }
  .ico { width: 38px; height: 38px; }
  .lbl { font-size: 14px; }
  .link:hover .txt,
  .link:focus-visible .txt { max-width: 140px; }
  .core { margin-bottom: calc(var(--core) * 0.62); }
}

@media (max-height: 640px) {
  .stage { padding-top: calc(8vh + env(safe-area-inset-top)); }
  .core { margin-bottom: calc(var(--core) * 0.55); }
}

@media (prefers-reduced-motion: reduce) {
  .grain,
  .avatar,
  .badge i,
  .enter-text,
  .enter-text::before,
  .enter-text::after { animation: none; }
  .card:hover .name::before,
  .card:hover .name::after { animation: none; }
}
