/* ItsLytraxx — red / black cinematic profile */
:root {
  --void: #050203;
  --oxblood: #28040f;
  --crimson: #b3122e;
  --ember: #ff2d4b;
  --bone: #ece6e1;
  --ash: #8a7c7f;
  --glass: rgba(18, 4, 8, 0.52);
  --line: rgba(255, 45, 75, 0.16);
  --display: "Bodoni Moda", "Didot", Georgia, serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --pulse: 0;            /* driven by music level (0..1) */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--void); color-scheme: dark; }
body {
  min-height: 100svh;
  background: var(--void);
  color: var(--bone);
  font: 400 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }

/* ---------- Background layers ---------- */
#smoke, #embers { position: fixed; inset: 0; width: 100%; height: 100%; }
#smoke { z-index: 0; }
#embers { z-index: 1; pointer-events: none; }
.vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(0,0,0,.55) 75%, #000 100%);
}
.grain {
  position: fixed; inset: -50%; z-index: 3; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .6s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0); } 25% { transform: translate(-3%,2%); }
  50% { transform: translate(2%,-3%); } 75% { transform: translate(-2%,-1%); } 100% { transform: translate(1%,3%); }
}

/* ---------- Enter gate ---------- */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; }
.bar {
  position: absolute; left: 0; right: 0; height: 50.5%; background: #000;
  transition: transform 1.6s cubic-bezier(.77,0,.18,1);
}
.bar--top { top: 0; } .bar--bottom { bottom: 0; }
.gate__btn {
  position: relative; z-index: 1; display: grid; gap: 14px; justify-items: center;
  padding: 40px 48px; transition: opacity .6s ease, filter .6s ease;
}
.gate__name {
  font: 700 italic clamp(44px, 9vw, 96px)/1 var(--display);
  letter-spacing: -.01em;
  color: transparent;
  background: linear-gradient(180deg, var(--bone) 30%, var(--crimson) 120%);
  -webkit-background-clip: text; background-clip: text;
  text-shadow: 0 0 40px rgba(179,18,46,.35);
  animation: breathe 3.2s ease-in-out infinite;
}
.gate__hint { color: var(--ash); font-size: 14px; letter-spacing: .04em; }
.gate__btn:hover .gate__hint { color: var(--bone); }
.gate__btn:focus-visible { outline: none; }
.gate__btn:focus-visible .gate__hint { color: var(--bone); text-decoration: underline; text-underline-offset: 4px; }
@keyframes breathe { 50% { filter: drop-shadow(0 0 18px rgba(255,45,75,.45)); } }

.gate.is-open .bar--top { transform: translateY(-88%); }
.gate.is-open .bar--bottom { transform: translateY(88%); }
.gate.is-open .gate__btn { opacity: 0; filter: blur(8px); pointer-events: none; }
.gate.is-gone { pointer-events: none; }
.gate.is-gone .bar { transform: translateY(-100%); }
.gate.is-gone .bar--bottom { transform: translateY(100%); }

/* ---------- Sound ---------- */
.sound {
  position: fixed; top: 16px; left: 16px; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: rgba(10,2,4,.55); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.sound__toggle { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.sound__toggle:hover { background: rgba(255,45,75,.12); }
.sound__toggle svg { width: 20px; fill: var(--bone); }
.sound__toggle .ico-off { display: none; }
.sound__toggle[aria-pressed="true"] .ico-on { display: none; }
.sound__toggle[aria-pressed="true"] .ico-off { display: inline; }
.sound__vol { width: 74px; accent-color: var(--crimson); }
.sound__track { font-size: 12px; color: var(--ash); white-space: nowrap; }
@media (max-width: 520px) { .sound__track, .sound__vol { display: none; } .sound { padding: 4px; } }

/* ---------- Stage ---------- */
.stage {
  position: relative; z-index: 10;
  width: min(460px, 100% - 28px); margin: 0 auto;
  padding: clamp(64px, 12vh, 120px) 0 56px;
  display: grid; gap: 14px;
  opacity: 0; transform: translateY(24px) scale(.98);
  transition: opacity 1.4s ease .5s, transform 1.4s cubic-bezier(.2,.8,.2,1) .5s;
}
body.is-entered .stage { opacity: 1; transform: none; }

/* ---------- Profile card ---------- */
.profile {
  position: relative; border-radius: 22px; overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(179,18,46,.45), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
}
.profile__banner { height: 128px; position: relative; overflow: hidden; }
.profile__banner img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2) contrast(1.1); }
.profile__banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(18,4,8,.95) 100%),
              linear-gradient(90deg, rgba(40,4,15,.45), transparent 60%);
}
.profile__head { display: grid; justify-items: center; text-align: center; padding: 0 22px 6px; margin-top: -62px; position: relative; }

.avatar { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.avatar__img {
  width: 104px; height: 104px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--void);
  box-shadow: 0 0 0 2px var(--crimson), 0 0 calc(18px + 40px * var(--pulse)) rgba(255,45,75, calc(.35 + .5 * var(--pulse)));
  transition: box-shadow .08s linear;
}
.avatar__pulse {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(255,45,75,.5);
  transform: scale(calc(1 + .14 * var(--pulse))); opacity: calc(.15 + .6 * var(--pulse));
}
.avatar__deco { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); pointer-events: none; }

.name {
  margin-top: 10px;
  font: 700 italic clamp(40px, 11vw, 54px)/1 var(--display);
  letter-spacing: -.015em;
  text-shadow: 0 0 30px rgba(255,45,75,.35);
}
.handle { color: var(--ash); font-size: 14px; margin-top: 4px; }

.badges { list-style: none; display: flex; gap: 6px; margin-top: 12px; padding: 4px 8px; border-radius: 10px; background: rgba(0,0,0,.35); border: 1px solid var(--line); }
.badge { position: relative; width: 24px; height: 24px; display: grid; place-items: center; }
.badge svg { width: 17px; fill: var(--ember); filter: drop-shadow(0 0 6px rgba(255,45,75,.6)); }
.badge img { width: 20px; height: 20px; }

[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translate(-50%, 4px); white-space: nowrap; pointer-events: none;
  font-size: 12px; padding: 5px 9px; border-radius: 7px;
  background: #000; color: var(--bone); border: 1px solid var(--line);
  opacity: 0; transition: opacity .15s, transform .15s; z-index: 5;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

.bio { margin-top: 14px; min-height: 48px; max-width: 34ch; color: #d6cbc7; font-size: 15px; }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--ember); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Tiles inside profile */
.tile {
  margin: 10px 14px 0; padding: 12px;
  display: flex; align-items: center; gap: 12px;
  border-radius: 14px; background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.05);
}
.presence__icon { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.presence__body { flex: 1; min-width: 0; }
.presence__title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.presence__sub { color: var(--ash); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #595053; }
.dot[data-status="online"] { background: #3ba55d; box-shadow: 0 0 8px #3ba55d; }
.dot[data-status="idle"] { background: #faa81a; }
.dot[data-status="dnd"] { background: var(--ember); box-shadow: 0 0 8px var(--ember); }
.copy {
  font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 9px;
  background: rgba(179,18,46,.18); border: 1px solid rgba(255,45,75,.3);
}
.copy:hover { background: rgba(179,18,46,.32); }

.clock__face { width: 48px; height: 48px; flex: none; }
.clock__face circle { fill: rgba(0,0,0,.5); stroke: rgba(255,255,255,.15); }
.clock__face line { stroke: var(--bone); stroke-linecap: round; stroke-width: 2.2; }
.clock__face #mHand { stroke-width: 1.6; }
.clock__face .sec { stroke: var(--ember); stroke-width: 1; }
.clock__face .pin { fill: var(--ember); stroke: none; }
.clock__time { font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.clock__sub { color: var(--ash); font-size: 13px; }

.socials { display: flex; justify-content: center; gap: 6px; padding: 16px 14px 4px; }
.socials a {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  transition: background .2s, transform .2s;
}
.socials a:hover { background: rgba(179,18,46,.18); transform: translateY(-2px); }
.socials svg { width: 22px; fill: var(--bone); filter: drop-shadow(0 0 8px rgba(255,45,75,.55)); }

.profile__foot { display: flex; justify-content: space-between; padding: 8px 20px 16px; color: var(--ash); font-size: 13px; }
.meta { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 15px; fill: currentColor; }

/* ---------- Work ---------- */
.section-title {
  margin: 34px 4px 2px;
  font: 500 italic 26px/1.2 var(--display);
  color: var(--bone);
}
.work {
  position: relative; border-radius: 18px; overflow: hidden;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color .25s, box-shadow .25s;
}
.work:hover { border-color: rgba(255,45,75,.42); box-shadow: 0 18px 50px -24px rgba(255,45,75,.45); }
.work__link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.work__text { min-width: 0; }
.work__role { color: var(--ash); font-size: 13px; }
.work__name { font: 700 italic 28px/1.1 var(--display); margin: 2px 0 6px; }
.work__desc { color: #d0c4c1; font-size: 14.5px; max-width: 46ch; }
.work__cta { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--ember); }
.work:hover .work__cta { text-decoration: underline; text-underline-offset: 3px; }

.work--netting { display: flex; gap: 16px; padding: 20px; align-items: flex-start; }
.work__logo { width: 56px; height: 56px; flex: none; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(0,0,0,.5); }

.reel { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.reel img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06); transition: opacity 1.2s ease, transform 6s linear;
  filter: saturate(.85) contrast(1.05);
}
.reel img.is-on { opacity: 1; transform: scale(1); }
.reel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(18,4,8,.96) 100%), linear-gradient(0deg, rgba(40,4,15,.25), rgba(40,4,15,.25));
}
.work__row { display: flex; gap: 14px; align-items: flex-start; padding: 0 20px 20px; margin-top: -40px; position: relative; z-index: 1; }
.work__icon { width: 64px; height: 64px; flex: none; border-radius: 16px; border: 2px solid var(--void); box-shadow: 0 0 0 1px var(--line), 0 10px 30px rgba(0,0,0,.6); }

.work--roblox { display: flex; align-items: center; gap: 8px; padding: 10px 20px 10px 6px; }
.work__avatar { width: 150px; height: 150px; flex: none; object-fit: contain; filter: drop-shadow(0 0 22px rgba(255,45,75,.35)); }

.signoff { text-align: center; color: #5d5154; font-size: 12px; margin-top: 26px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 16px; border-radius: 10px; font-size: 14px;
  background: #000; border: 1px solid rgba(255,45,75,.35);
  transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 420px) {
  .work--netting { padding: 16px; }
  .work__avatar { width: 112px; height: 112px; }
  .work__name { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .gate__name, .caret { animation: none; }
  .stage, .bar, .reel img { transition-duration: .01ms !important; transition-delay: 0s !important; }
}
