:root {
  color-scheme: dark;
  --bg: #04070c;
  --bg-deep: #010307;
  --surface: rgba(8, 13, 22, 0.78);
  --surface-strong: rgba(12, 19, 30, 0.95);
  --line: rgba(84, 106, 130, 0.34);
  --line-strong: rgba(68, 207, 255, 0.52);
  --text: #f8fbff;
  --muted: #9ba8b8;
  --subtle: #647184;
  --cyan: #18c8ff;
  --green: #42f56d;
  --violet: #9a4dff;
  --blue: #0b7dff;
  --red: #ff4d5c;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(6, 11, 18, 0.96) 0%, var(--bg) 48%, var(--bg-deep) 100%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  pointer-events: none;
}

body::before {
  background-image:
    linear-gradient(rgba(70, 209, 255, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 209, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 82%);
}

body::after {
  background:
    linear-gradient(90deg, rgba(24, 200, 255, 0.06), transparent 25%, transparent 72%, rgba(154, 77, 255, 0.055)),
    repeating-linear-gradient(0deg, transparent 0 11px, rgba(255, 255, 255, 0.018) 12px);
  opacity: 0.78;
}

a {
  color: inherit;
  text-decoration: none;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(1, 3, 7, 0.1), rgba(1, 3, 7, 0.24) 58%, rgba(1, 3, 7, 0.54)),
    url("assets/bg-ae-codex-v2.png") center / cover no-repeat;
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.ambient::before {
  background:
    radial-gradient(circle at 50% 23%, transparent 0 14%, rgba(1, 3, 7, 0.2) 30%, rgba(1, 3, 7, 0.54) 78%),
    linear-gradient(90deg, rgba(1, 3, 7, 0.18), transparent 24%, transparent 72%, rgba(1, 3, 7, 0.16));
  opacity: 0.68;
}

.ambient::after {
  background:
    linear-gradient(180deg, transparent 0 44%, rgba(1, 3, 7, 0.05) 52%, rgba(1, 3, 7, 0.22) 100%);
  opacity: 0.72;
}

.codex-chat {
  position: absolute;
  top: 30px;
  left: 24px;
  z-index: 2;
  width: min(26vw, 390px);
  min-width: 320px;
  overflow: hidden;
  border: 1px solid rgba(95, 122, 148, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(5, 11, 19, 0.9), rgba(4, 8, 14, 0.5)),
    rgba(2, 5, 10, 0.62);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.48),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  opacity: 0.76;
}

.codex-chat-bar {
  display: flex;
  align-items: center;
  height: 44px;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(95, 122, 148, 0.24);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
}

.codex-status {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(66, 245, 109, 0.68);
}

.codex-mini-mark {
  position: relative;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(24, 200, 255, 0.56);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(24, 200, 255, 0.14), rgba(154, 77, 255, 0.1)),
    rgba(3, 8, 14, 0.76);
  box-shadow:
    inset 0 0 18px rgba(24, 200, 255, 0.12),
    0 0 20px rgba(24, 200, 255, 0.18);
}

.codex-mini-mark::before,
.codex-mini-mark::after {
  position: absolute;
  inset: 7px;
  border: 1.5px solid var(--cyan);
  border-radius: 3px;
  content: "";
  transform: rotate(45deg);
}

.codex-mini-mark::after {
  inset: 9px;
  border-color: rgba(66, 245, 109, 0.72);
  transform: rotate(-45deg);
}

.codex-chat-bar strong {
  color: var(--cyan);
  font-weight: 650;
}

.codex-chat-bar em {
  font-style: normal;
}

.codex-thread {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.codex-msg {
  max-width: 84%;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.35;
}

.codex-user {
  justify-self: end;
  border: 1px solid rgba(24, 200, 255, 0.48);
  background: rgba(24, 200, 255, 0.12);
  color: #f8fbff;
  box-shadow: 0 0 22px rgba(24, 200, 255, 0.08);
}

.codex-agent {
  justify-self: start;
  border: 1px solid rgba(95, 122, 148, 0.28);
  background: rgba(8, 13, 22, 0.62);
  color: rgba(198, 221, 244, 0.78);
}

.codex-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin: 0 16px 16px;
  padding: 0 12px;
  border: 1px solid rgba(24, 200, 255, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11, 19, 31, 0.9), rgba(4, 8, 14, 0.64)),
    rgba(2, 5, 10, 0.5);
  color: rgba(248, 251, 255, 0.92);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
}

.codex-input i {
  width: 15px;
  height: 15px;
  border-top: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  filter: drop-shadow(0 0 8px rgba(24, 200, 255, 0.72));
  transform: rotate(45deg);
}

.signal-panel {
  position: absolute;
  top: 34px;
  right: 26px;
  z-index: 2;
  width: min(22vw, 332px);
  min-width: 286px;
  padding: 14px;
  border: 1px solid rgba(95, 122, 148, 0.3);
  border-radius: 10px;
  background:
    linear-gradient(150deg, rgba(5, 11, 19, 0.74), rgba(4, 8, 14, 0.28)),
    rgba(2, 5, 10, 0.38);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.022);
  opacity: 0.7;
}

.signal-panel::before,
.signal-panel::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.signal-panel::before {
  inset: 48px 18px 56px;
  background:
    linear-gradient(90deg, rgba(24, 200, 255, 0.18) 1px, transparent 1px),
    linear-gradient(rgba(24, 200, 255, 0.14) 1px, transparent 1px);
  background-size: 26px 22px;
  opacity: 0.28;
}

.signal-panel::after {
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(24, 200, 255, 0.7), transparent);
  box-shadow:
    0 -38px 0 rgba(154, 77, 255, 0.2),
    0 -76px 0 rgba(24, 200, 255, 0.13);
}

.signal-head {
  position: relative;
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
}

.signal-head span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow:
    0 0 14px rgba(24, 200, 255, 0.78),
    0 0 34px rgba(24, 200, 255, 0.32);
}

.signal-head strong {
  color: rgba(233, 246, 255, 0.88);
  font-weight: 650;
}

.signal-head em {
  border: 1px solid rgba(66, 245, 109, 0.34);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--green);
  font-style: normal;
  line-height: 1;
}

.signal-orbit {
  position: relative;
  height: 126px;
  margin: 14px 0 12px;
  overflow: hidden;
  border: 1px solid rgba(95, 122, 148, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 58% 48%, rgba(24, 200, 255, 0.14), transparent 28%),
    radial-gradient(circle at 78% 34%, rgba(154, 77, 255, 0.18), transparent 24%),
    rgba(2, 5, 10, 0.34);
}

.signal-orbit::before {
  position: absolute;
  inset: 18px 36px 18px 42px;
  border: 1px solid rgba(24, 200, 255, 0.32);
  border-radius: 50%;
  content: "";
  transform: rotate(-18deg);
}

.signal-orbit::after {
  position: absolute;
  inset: 31px 60px 26px 70px;
  border: 1px solid rgba(154, 77, 255, 0.3);
  border-radius: 50%;
  content: "";
  transform: rotate(18deg);
}

.signal-orbit i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(24, 200, 255, 0.56);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 200, 255, 0.2), rgba(154, 77, 255, 0.12)),
    rgba(2, 5, 10, 0.72);
  box-shadow:
    0 0 26px rgba(24, 200, 255, 0.22),
    inset 0 0 18px rgba(24, 200, 255, 0.12);
  transform: translate(-50%, -50%) rotate(45deg);
}

.orbit-node {
  position: absolute;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(24, 200, 255, 0.74);
}

.orbit-a {
  top: 24px;
  left: 28%;
}

.orbit-b {
  right: 22%;
  bottom: 28px;
  background: var(--violet);
  box-shadow: 0 0 16px rgba(154, 77, 255, 0.76);
}

.orbit-c {
  top: 42%;
  right: 16%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(66, 245, 109, 0.58);
}

.signal-bars {
  position: relative;
  display: grid;
  gap: 8px;
}

.signal-bars span {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(95, 122, 148, 0.18);
  overflow: hidden;
}

.signal-bars span::before {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(24, 200, 255, 0.92), rgba(154, 77, 255, 0.72));
  box-shadow: 0 0 16px rgba(24, 200, 255, 0.28);
  content: "";
}

.bar-a::before { width: 76%; }
.bar-b::before { width: 54%; }
.bar-c::before { width: 88%; }
.bar-d::before { width: 42%; }

.signal-tags {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.signal-tags span {
  display: grid;
  min-height: 30px;
  place-items: center;
  border: 1px solid rgba(95, 122, 148, 0.24);
  border-radius: 8px;
  background: rgba(5, 11, 19, 0.52);
  color: rgba(198, 221, 244, 0.76);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.66rem;
  font-weight: 650;
  white-space: nowrap;
}

.code-panel,
.chain-map,
.ae-strip {
  position: absolute;
}

.code-panel {
  top: 24px;
  left: 18px;
  width: min(28vw, 380px);
  min-width: 280px;
  border: 1px solid rgba(95, 122, 148, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(5, 11, 19, 0.92), rgba(4, 8, 14, 0.42)),
    rgba(2, 5, 10, 0.72);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
  opacity: 0.88;
}

.panel-bar {
  display: flex;
  align-items: center;
  height: 44px;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(95, 122, 148, 0.28);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.codex-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(66, 245, 109, 0.62);
}

.codex-mark {
  position: relative;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(24, 200, 255, 0.54);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(24, 200, 255, 0.14), rgba(154, 77, 255, 0.1)),
    rgba(3, 8, 14, 0.76);
  box-shadow:
    inset 0 0 18px rgba(24, 200, 255, 0.12),
    0 0 20px rgba(24, 200, 255, 0.18);
}

.codex-mark::before,
.codex-mark::after {
  position: absolute;
  inset: 7px;
  border: 1.6px solid currentColor;
  border-radius: 3px;
  color: var(--cyan);
  content: "";
  transform: rotate(45deg);
}

.codex-mark::after {
  inset: 9px;
  border-color: rgba(66, 245, 109, 0.78);
  transform: rotate(-45deg);
}

.panel-bar strong {
  color: var(--cyan);
  font-weight: 650;
}

.panel-bar em {
  font-style: normal;
}

.codex-menu {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.menu-item {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid rgba(95, 122, 148, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11, 19, 31, 0.84), rgba(4, 8, 14, 0.58)),
    rgba(2, 5, 10, 0.46);
  color: rgba(198, 221, 244, 0.78);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  white-space: nowrap;
}

.menu-item.active {
  border-color: rgba(24, 200, 255, 0.58);
  color: #f8fbff;
  box-shadow:
    inset 0 0 0 1px rgba(24, 200, 255, 0.08),
    0 0 24px rgba(24, 200, 255, 0.1);
}

.menu-item.active::before {
  margin-right: 8px;
  color: var(--green);
  content: ">";
}

.code-lines {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 18px 0 20px 52px;
  color: rgba(131, 149, 171, 0.42);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
}

.code-lines li {
  padding-left: 10px;
}

.code-lines span {
  color: rgba(198, 221, 244, 0.78);
}

.code-lines li:nth-child(2) span,
.code-lines li:nth-child(7) span {
  color: #4dc9ff;
}

.code-lines li:nth-child(4) span {
  color: #ff6aae;
}

.vibe-mode {
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(95, 122, 148, 0.22);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
}

.vibe-mode strong {
  color: var(--green);
}

.chain-map {
  top: 30px;
  right: 8vw;
  width: min(30vw, 440px);
  height: 340px;
  opacity: 0.86;
}

.chain-map > svg {
  width: 100%;
  height: 100%;
}

.chain-map > svg path {
  fill: none;
  stroke: rgba(24, 200, 255, 0.36);
  stroke-width: 1.2;
}

.chain-map p {
  position: absolute;
  right: 8px;
  bottom: 84px;
  margin: 0;
  color: rgba(49, 201, 255, 0.72);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: right;
}

.chain-coins {
  position: absolute;
  right: -4px;
  bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.chain-coin {
  display: grid;
  width: 58px;
  height: 52px;
  border: 1px solid rgba(95, 122, 148, 0.38);
  background:
    radial-gradient(circle at 50% 48%, rgba(24, 200, 255, 0.14), transparent 62%),
    rgba(3, 8, 14, 0.56);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 28px rgba(24, 200, 255, 0.12);
  place-items: center;
}

.chain-sol {
  border-radius: 12px;
}

.chain-ton {
  border-radius: 50%;
}

.chain-sol svg {
  width: 46px;
  height: 36px;
  filter: drop-shadow(0 0 10px rgba(20, 241, 149, 0.24));
}

.chain-ton svg {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 12px rgba(37, 200, 255, 0.28));
}

.node {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(201, 242, 255, 0.65);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 18px rgba(24, 200, 255, 0.56);
}

.node-a { left: 14%; top: 65%; }
.node-b { left: 36%; top: 22%; }
.node-c { left: 55%; top: 40%; background: var(--cyan); }
.node-d { left: 80%; top: 15%; }
.node-e { left: 74%; top: 73%; background: var(--violet); }
.node-f { left: 42%; top: 82%; }

.ae-strip {
  right: 0;
  left: 0;
  top: 46vh;
  height: 430px;
  opacity: 0.96;
}

.ae-mark {
  position: absolute;
  top: 62px;
  left: 18px;
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(154, 77, 255, 0.78);
  border-radius: 8px;
  color: #b66cff;
  background: rgba(17, 8, 28, 0.72);
  font-size: 1.24rem;
  font-weight: 800;
  place-items: center;
  box-shadow: 0 0 26px rgba(154, 77, 255, 0.22);
}

.timeline {
  position: absolute;
  right: 0;
  top: 32px;
  left: 0;
  height: 360px;
  overflow: hidden;
  border-top: 1px solid rgba(95, 122, 148, 0.22);
  border-bottom: 1px solid rgba(95, 122, 148, 0.2);
  background:
    linear-gradient(180deg, rgba(6, 10, 18, 0.86), rgba(2, 5, 10, 0.94)),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(95, 122, 148, 0.18) 39px 40px),
    repeating-linear-gradient(90deg, rgba(62, 84, 111, 0.24) 0 1px, transparent 1px 86px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 36px 80px rgba(0, 0, 0, 0.2),
    0 -20px 86px rgba(154, 77, 255, 0.08);
}

.timeline::before {
  position: absolute;
  top: 96px;
  right: 0;
  left: 230px;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
  content: "";
}

.timeline::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 230px;
  height: 90px;
  background:
    linear-gradient(90deg, transparent, rgba(24, 200, 255, 0.08), transparent 54%),
    repeating-linear-gradient(90deg, rgba(24, 200, 255, 0.05) 0 2px, transparent 2px 16px);
  opacity: 0.48;
  content: "";
}

.ae-topbar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 42px;
  gap: 16px;
  padding-left: 78px;
  border-bottom: 1px solid rgba(95, 122, 148, 0.26);
  background:
    linear-gradient(90deg, rgba(6, 12, 20, 0.92), rgba(3, 7, 13, 0.5)),
    rgba(3, 7, 13, 0.62);
  color: rgba(170, 187, 208, 0.74);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.74rem;
}

.ae-timecode {
  min-width: 108px;
  color: var(--cyan);
  font-size: 1.02rem;
  font-weight: 700;
}

.ae-panel-title {
  min-width: 220px;
  color: rgba(176, 194, 218, 0.56);
  font-size: 0.72rem;
}

.ae-tool {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(184, 205, 226, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(24, 200, 255, 0.12);
}

.ae-workbar {
  position: absolute;
  top: 42px;
  right: 0;
  left: 230px;
  height: 22px;
  border-left: 1px solid rgba(95, 122, 148, 0.34);
  border-bottom: 1px solid rgba(95, 122, 148, 0.18);
  background:
    linear-gradient(90deg, rgba(3, 7, 13, 0.72), rgba(6, 12, 20, 0.48)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 43px);
}

.ae-workbar span {
  position: absolute;
  top: 9px;
  left: 0;
  right: 24%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 57, 57, 0.85), rgba(255, 57, 57, 0.44));
  box-shadow: 0 0 10px rgba(255, 57, 57, 0.22);
}

.ae-ruler {
  position: absolute;
  top: 64px;
  right: 0;
  left: 230px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  height: 32px;
  border-left: 1px solid rgba(95, 122, 148, 0.34);
  border-bottom: 1px solid rgba(95, 122, 148, 0.22);
  background:
    repeating-linear-gradient(90deg, rgba(24, 200, 255, 0.3) 0 1px, transparent 1px 42px),
    rgba(5, 10, 17, 0.58);
}

.ae-ruler span {
  padding: 0 0 5px 10px;
  color: rgba(165, 183, 205, 0.64);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
}

.ae-layer-list {
  position: absolute;
  top: 96px;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-rows: repeat(6, 40px);
  width: 230px;
  border-right: 1px solid rgba(95, 122, 148, 0.32);
  background:
    linear-gradient(90deg, rgba(4, 8, 14, 0.94), rgba(6, 12, 20, 0.62)),
    rgba(2, 5, 10, 0.78);
}

.ae-layer-list span {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) repeat(3, 18px);
  column-gap: 8px;
  align-items: center;
  border-bottom: 1px solid rgba(95, 122, 148, 0.16);
  padding: 0 14px 0 24px;
  color: rgba(166, 184, 207, 0.68);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.7rem;
}

.ae-layer-list span.selected {
  color: rgba(218, 238, 255, 0.86);
  background:
    linear-gradient(90deg, rgba(11, 125, 255, 0.36), rgba(11, 125, 255, 0.06)),
    rgba(24, 200, 255, 0.06);
}

.ae-layer-list b {
  font-weight: 650;
}

.ae-layer-list em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ae-layer-list i {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(176, 194, 218, 0.48);
  border-radius: 50%;
}

.playhead {
  position: absolute;
  top: 64px;
  left: 68%;
  width: 2px;
  height: 278px;
  background: var(--blue);
  box-shadow: 0 0 18px rgba(11, 125, 255, 0.65);
}

.playhead::before {
  position: absolute;
  top: 0;
  left: -4px;
  width: 10px;
  height: 8px;
  border-radius: 0 0 2px 2px;
  background: var(--blue);
  content: "";
}

.clip {
  position: absolute;
  display: block;
  height: 23px;
  border-radius: 1px;
  opacity: 0.74;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 16px rgba(24, 200, 255, 0.08);
}

.clip::before {
  position: absolute;
  inset: 4px 8px;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.24) 0 18px, rgba(255, 255, 255, 0.06) 18px 20px);
  content: "";
}

.clip::after {
  position: absolute;
  right: 6px;
  bottom: 5px;
  left: 6px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  content: "";
}

.c1 { left: 248px; top: 112px; width: 72px; background: rgba(11, 125, 255, 0.34); }
.c2 { left: 402px; top: 112px; width: 88px; background: rgba(154, 77, 255, 0.35); }
.c3 { left: 706px; top: 112px; width: 142px; background: rgba(11, 125, 255, 0.26); }
.c4 { right: 230px; top: 112px; width: 92px; background: rgba(154, 77, 255, 0.32); }
.c5 { left: 306px; top: 152px; width: 170px; background: rgba(154, 77, 255, 0.54); }
.c6 { left: 546px; top: 152px; width: 122px; background: rgba(11, 125, 255, 0.46); }
.c7 { right: 292px; top: 152px; width: 190px; background: rgba(154, 77, 255, 0.48); }
.c8 { left: 248px; top: 192px; width: 134px; background: rgba(11, 125, 255, 0.7); }
.c9 { left: 426px; top: 192px; width: 210px; background: rgba(11, 125, 255, 0.46); }
.c10 { right: 212px; top: 192px; width: 236px; background: rgba(11, 125, 255, 0.55); }
.c11 { left: 250px; top: 232px; width: 380px; background: rgba(11, 125, 255, 0.62); }
.c12 { right: 294px; top: 232px; width: 340px; background: rgba(11, 125, 255, 0.48); }
.c13 { left: 252px; top: 272px; width: 430px; background: rgba(20, 207, 127, 0.62); }
.c14 { left: 720px; top: 272px; width: 292px; background: rgba(20, 207, 127, 0.5); }
.c15 { right: 272px; top: 272px; width: 360px; background: rgba(20, 207, 127, 0.54); }
.c16 { left: 334px; top: 312px; width: 160px; background: rgba(154, 77, 255, 0.42); }
.c17 { left: 596px; top: 312px; width: 220px; background: rgba(11, 125, 255, 0.38); }
.c18 { right: 320px; top: 312px; width: 190px; background: rgba(154, 77, 255, 0.38); }

.keyframe {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(24, 200, 255, 0.86);
  background: rgba(2, 5, 10, 0.9);
  box-shadow: 0 0 12px rgba(24, 200, 255, 0.3);
  transform: rotate(45deg);
}

.k1 { left: 30%; top: 182px; }
.k2 { left: 41%; top: 182px; }
.k3 { left: 52%; top: 222px; border-color: rgba(154, 77, 255, 0.85); }
.k4 { left: 62%; top: 222px; border-color: rgba(154, 77, 255, 0.85); }
.k5 { left: 74%; top: 262px; border-color: rgba(20, 207, 127, 0.85); }
.k6 { left: 82%; top: 262px; border-color: rgba(20, 207, 127, 0.85); }

.track,
.wave {
  position: absolute;
  height: 16px;
  border-radius: 2px;
}

.t1 {
  left: max(230px, 14%);
  top: 152px;
  width: 24%;
  background: linear-gradient(90deg, rgba(11, 125, 255, 0.86), rgba(154, 77, 255, 0.76));
}

.t2 {
  left: 35%;
  top: 232px;
  width: 38%;
  background: rgba(154, 77, 255, 0.66);
}

.t3 {
  left: max(238px, 16%);
  top: 272px;
  width: 58%;
  background: rgba(20, 207, 127, 0.58);
}

.t4 {
  left: 74%;
  top: 192px;
  width: 17%;
  background: rgba(11, 125, 255, 0.7);
}

.wave {
  left: max(248px, 26%);
  top: 326px;
  width: 49%;
  height: 7px;
  background:
    linear-gradient(180deg, transparent 0 2px, rgba(24, 200, 255, 0.95) 2px 4px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(24, 200, 255, 0.95) 0 3px, transparent 3px 8px);
}

.wave-alt {
  left: max(252px, 18%);
  top: 342px;
  width: 42%;
  opacity: 0.58;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-height: 100vh;
  padding: 44px 20px 34px;
  place-items: start center;
}

.profile {
  position: relative;
  width: min(100%, 690px);
  text-align: center;
}

.profile::before {
  position: absolute;
  inset: 280px -34px 112px;
  z-index: -1;
  border: 1px solid rgba(76, 103, 132, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 14, 23, 0.08), rgba(8, 14, 23, 0.24)),
    rgba(0, 0, 0, 0.04);
  content: "";
  filter: blur(0.2px);
}

.avatar-wrap {
  position: relative;
  width: clamp(126px, 16vw, 176px);
  aspect-ratio: 1;
  margin: 0 auto 26px;
  padding: 3px;
  border: 1px solid rgba(24, 200, 255, 0.86);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(24, 200, 255, 0.96), rgba(154, 77, 255, 0.26) 56%, rgba(255, 255, 255, 0.14));
  box-shadow:
    0 0 34px rgba(24, 200, 255, 0.3),
    0 0 86px rgba(11, 125, 255, 0.12);
}

.avatar-wrap::after {
  position: absolute;
  inset: -13px;
  border: 1px solid rgba(95, 122, 148, 0.32);
  border-radius: 50%;
  content: "";
}

.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(176, 211, 236, 0.45);
  z-index: 2;
}

.corner-one {
  top: 22%;
  left: -36px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.corner-two {
  right: -36px;
  bottom: 22%;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  filter: saturate(0.68) contrast(1.08) brightness(0.66);
}

h1 {
  max-width: 100%;
  margin: 0;
  color: var(--text);
  font-size: clamp(3rem, 6.5vw, 4.6rem);
  font-weight: 820;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow:
    0 0 28px rgba(24, 200, 255, 0.18),
    0 14px 48px rgba(0, 0, 0, 0.5);
}

.handle {
  margin: 14px 0 0;
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-weight: 600;
}

.bio {
  margin: 18px auto 18px;
  color: #e8eef6;
  font-size: clamp(1.08rem, 2.3vw, 1.32rem);
  font-weight: 560;
}

.links {
  display: grid;
  gap: 10px;
  width: min(100%, 620px);
  margin: 0 auto;
}

.link-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 34px;
  align-items: center;
  min-height: 58px;
  padding: 9px 18px 9px 16px;
  overflow: hidden;
  border: 1px solid rgba(95, 122, 148, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 17, 28, 0.94), rgba(5, 10, 18, 0.82)),
    var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.link-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(24, 200, 255, 0.1), transparent);
  content: "";
  opacity: 0;
  transform: translateX(-80%);
  transition:
    opacity 180ms ease,
    transform 480ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--line-strong);
  background:
    linear-gradient(135deg, rgba(12, 24, 38, 0.98), rgba(5, 11, 19, 0.92)),
    var(--surface-strong);
  box-shadow:
    0 24px 78px rgba(0, 0, 0, 0.52),
    0 0 0 4px rgba(24, 200, 255, 0.07);
  transform: translateY(-2px);
}

.link-card:hover::before,
.link-card:focus-visible::before {
  opacity: 1;
  transform: translateX(80%);
}

.link-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  z-index: 1;
}

.icon svg {
  display: block;
  width: 33px;
  height: 33px;
  overflow: visible;
}

.icon path,
.icon rect,
.icon circle {
  fill: currentColor;
  stroke: none;
}

.icon .cutout {
  fill: var(--bg);
}

.icon-soundcloud path:last-child,
.icon-x path,
.arrow path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-soundcloud path:last-child {
  stroke-width: 1.5;
}

.icon-x path {
  stroke-width: 2.15;
}

.icon-tiktok {
  color: #25f4ee;
  filter: drop-shadow(4px 0 0 rgba(254, 44, 85, 0.88));
}

.icon-youtube {
  color: #ff0033;
}

.icon-twitch {
  color: #9146ff;
}

.icon-soundcloud {
  color: #ff8a00;
}

.icon-x {
  color: #ffffff;
}

.icon-telegram {
  color: #32a8e6;
}

.icon-patreon {
  color: #ff5f5f;
}

.link-copy {
  min-width: 0;
  z-index: 1;
}

.link-title {
  display: block;
  color: var(--text);
  font-size: clamp(1.05rem, 2.2vw, 1.24rem);
  font-weight: 650;
  line-height: 1.15;
}

.link-url {
  display: none;
}

.arrow {
  display: grid;
  width: 34px;
  height: 34px;
  color: var(--cyan);
  place-items: center;
  transition: transform 180ms ease;
  z-index: 1;
}

.arrow svg {
  width: 27px;
  height: 27px;
}

.arrow path {
  stroke-width: 1.85;
}

.link-card:hover .arrow,
.link-card:focus-visible .arrow {
  transform: translate(4px, -3px);
}

.footer {
  position: relative;
  z-index: 2;
  margin: 34px 0 10px;
  padding: 0;
  color: #8795a8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  font-weight: 500;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.86);
}

.footer small {
  color: rgba(182, 194, 208, 0.82);
  font-size: 0.8rem;
}

@media (max-width: 1180px) {
  .codex-chat {
    left: -180px;
    opacity: 0.42;
  }

  .signal-panel {
    right: -148px;
    opacity: 0.38;
  }

  .code-panel {
    left: -170px;
    opacity: 0.46;
  }

  .chain-map {
    right: -80px;
    opacity: 0.48;
  }
}

@media (max-width: 760px) {
  .codex-chat,
  .signal-panel,
  .code-panel,
  .chain-map {
    display: none;
  }

  .ae-strip {
    top: auto;
    bottom: -44px;
    height: 132px;
    opacity: 0.48;
  }

  .ae-mark {
    display: none;
  }

  .timeline {
    top: 38px;
    height: 94px;
  }

  .ae-topbar,
  .ae-workbar,
  .ae-ruler,
  .ae-layer-list,
  .clip,
  .keyframe {
    display: none;
  }

  .playhead {
    top: 8px;
    height: 72px;
  }

  .t1 {
    top: 48px;
    left: 10%;
    width: 46%;
  }

  .t2 {
    top: 66px;
    left: 32%;
    width: 42%;
  }

  .t3 {
    top: 82px;
    left: 18%;
    width: 58%;
  }

  .t4 {
    display: none;
  }

  .wave,
  .wave-alt {
    top: 88px;
    left: 24%;
    width: 52%;
  }

  .page-shell {
    padding: 38px 14px 28px;
    place-items: start center;
  }

  .profile {
    width: min(100%, 460px);
  }

  .profile::before {
    inset: 318px -12px 88px;
  }

  .avatar-wrap {
    margin-bottom: 22px;
  }

  .bio {
    margin: 18px auto 16px;
  }

  .links {
    gap: 11px;
  }

  .link-card {
    grid-template-columns: 52px minmax(0, 1fr) 28px;
    min-height: 62px;
    padding: 11px 16px 11px 14px;
  }

  .icon {
    width: 36px;
    height: 36px;
  }

  .icon svg {
    width: 31px;
    height: 31px;
  }

  .arrow {
    width: 28px;
    height: 28px;
  }

  .arrow svg {
    width: 25px;
    height: 25px;
  }

  .footer {
    margin-top: 34px;
    font-size: 0.78rem;
  }
}

@media (max-width: 380px) {
  .link-card {
    grid-template-columns: 46px minmax(0, 1fr) 26px;
    padding-inline: 12px;
  }

  .link-title {
    font-size: 1.02rem;
  }
}

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