:root {
  color-scheme: dark;
  --bg: #03040a;
  --panel: rgba(13, 14, 23, .92);
  --panel-soft: rgba(18, 18, 30, .72);
  --panel-row: rgba(21, 20, 32, .78);
  --line: rgba(255, 255, 255, .075);
  --line-bright: rgba(255, 255, 255, .13);
  --text: #f0eff8;
  --muted: #9693ad;
  --faint: #6d6a82;
  --purple: #9c7cff;
  --purple-soft: rgba(156, 124, 255, .13);
  --green: #36d79d;
  --green-soft: rgba(54, 215, 157, .12);
  --amber: #e2a520;
  --amber-soft: rgba(226, 165, 32, .12);
  --radius: 20px;
  --shadow: 0 28px 90px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 18%, rgba(42, 55, 82, .16), transparent 32rem),
    radial-gradient(circle at 16% 66%, rgba(21, 46, 70, .15), transparent 30rem),
    linear-gradient(180deg, #04050a 0%, #02030a 100%);
  font-family: Inter, "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
body::before {
  position: fixed;
  z-index: -2;
  inset: 84px 0 0;
  opacity: .43;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(29deg, transparent 48%, rgba(77, 92, 132, .13) 49%, transparent 50%),
    linear-gradient(151deg, transparent 48%, rgba(77, 92, 132, .10) 49%, transparent 50%),
    radial-gradient(circle at 14% 43%, rgba(75, 94, 143, .2) 0 1px, transparent 2px),
    radial-gradient(circle at 83% 64%, rgba(75, 94, 143, .2) 0 1px, transparent 2px);
  background-size: 420px 260px, 530px 310px, 260px 220px, 310px 240px;
  mask-image: linear-gradient(180deg, transparent, #000 17%, #000 82%, transparent);
}
body::after {
  position: fixed;
  z-index: -1;
  top: 6rem;
  left: 50%;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  opacity: .12;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at 37% 32%, rgba(109, 141, 193, .6), transparent 2%), radial-gradient(circle at 50% 50%, #152236, transparent 68%);
  filter: blur(2px);
  transform: translateX(-50%);
}
button, textarea, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.site-header {
  display: flex;
  width: min(100% - 128px, 1660px);
  min-height: 88px;
  margin: 0 auto;
  padding: 0 4px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.035);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #e5e3ef;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -.045em;
}
.brand-mark { color: #c5c1d9; font-size: 1.35rem; text-shadow: 0 0 16px rgba(191,184,255,.45); }
.brand-dot { color: var(--purple); }
.menu-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 7px;
  gap: 5px;
  align-content: center;
  border: 0;
  background: transparent;
}
.menu-button span { display: block; height: 2px; border-radius: 2px; background: #9d9ab0; transition: transform .2s ease; }
.menu-button:hover span { background: #f1efff; }

.page {
  width: min(100% - 32px, 874px);
  margin: 86px auto 90px;
}
.profile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17, 18, 29, .95), rgba(9, 10, 17, .95));
  box-shadow: var(--shadow);
}
.hero-card { position: relative; }
.profile-main { padding: 44px 40px 31px; text-align: center; }
.avatar {
  display: grid;
  width: 158px;
  height: 158px;
  margin: 0 auto 18px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 50%;
  background: #1478e8;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 12px 36px rgba(0,0,0,.35);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: white;
  font-family: Inter, sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(148deg, #1b7ff1 0 52%, #fff 53% 61%, #1b7ff1 62%);
}
.profile-name-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
h1, h2 { margin: 0; letter-spacing: -.05em; }
h1 { color: #f5f2ff; font-size: clamp(2.15rem, 5vw, 3.15rem); font-weight: 700; line-height: 1; }
h2 { color: var(--text); font-size: 1.1rem; }
.verified {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #f7f3ff;
  background: var(--purple);
  box-shadow: 0 0 18px rgba(156,124,255,.65);
  font-size: .82rem;
  font-weight: 800;
}
.profile-actions { display: inline-flex; margin-left: 2px; gap: 8px; }
.round-button, .close-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #aaa5bc;
  background: rgba(28, 27, 43, .75);
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.round-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.round-button:hover, .close-button:hover { border-color: rgba(156,124,255,.58); color: #fff; background: var(--purple-soft); transform: translateY(-1px); }
.wallet-address { margin: 12px 0 11px; color: #8d899f; font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; font-size: .75rem; }
.badge-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.profile-badge {
  display: inline-flex;
  min-height: 31px;
  padding: 0 13px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: .67rem;
  letter-spacing: .025em;
}
.profile-badge i { font-style: normal; }
.profile-badge i:first-child { color: currentColor; }
.badge-onchain { border-color: rgba(54,215,157,.23); color: var(--green); background: var(--green-soft); }
.badge-deployer { border-color: rgba(226,165,32,.24); color: var(--amber); background: var(--amber-soft); }
.badge-active { border-color: rgba(156,124,255,.24); color: #b9a9ff; background: var(--purple-soft); }
.profile-bio { max-width: 620px; margin: 19px auto 0; color: #a9a5ba; font-size: 1.03rem; line-height: 1.55; }
.profile-location { margin: 9px 0 0; color: var(--muted); font-size: .75rem; }
.profile-location::before { content: "⌖"; margin-right: 6px; color: var(--purple); }

.activity-section { padding: 1px 40px 38px; }
.section-kicker {
  margin-bottom: 14px;
  color: #68657d;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .25em;
  text-align: center;
  text-transform: uppercase;
}
.activity-list { display: grid; gap: 10px; }
.activity-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  min-height: 76px;
  padding: 13px 18px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-row);
}
.activity-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: var(--purple);
  background: rgba(97, 68, 169, .18);
  font-size: 1.15rem;
}
.activity-copy { min-width: 0; text-align: left; }
.activity-copy strong { display: block; overflow: hidden; color: #e5e2f0; font-size: .95rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy small { display: block; overflow: hidden; margin-top: 5px; color: #858097; font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.activity-meta { color: #625f75; font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; font-size: .68rem; text-align: right; white-space: nowrap; }
.activity-meta a { color: var(--purple); }
.activity-loading, .empty-network {
  display: flex;
  min-height: 72px;
  padding: 16px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #706c83;
  font-size: .75rem;
}
.activity-loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 12px var(--purple); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.72); } }
.profile-footer {
  display: flex;
  padding: 20px 34px;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.05);
  color: #5e5a70;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: .72rem;
}
.profile-footer a { color: #79738f; }
.profile-footer a:hover { color: var(--purple); }

.records-card, .social-card, .network-card, .feature-card { margin-top: 24px; padding: 28px 30px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-heading .section-kicker { margin-bottom: 8px; text-align: left; }
.section-muted { color: #69657c; font-family: "JetBrains Mono", monospace; font-size: .68rem; }
.record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.record-row {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(24, 23, 36, .54);
}
.record-row strong, .record-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-row strong { color: #d7d3e4; font-size: .78rem; font-weight: 600; }
.record-row small { margin-top: 5px; color: #77738a; font-family: "JetBrains Mono", monospace; font-size: .66rem; }
.record-row a { color: #c4b9ff; }
.contenthash-row { display: flex; margin-top: 11px; padding: 14px; align-items: center; gap: 11px; border: 1px solid rgba(156,124,255,.2); border-radius: 13px; background: rgba(86, 61, 151, .1); }
.contenthash-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 9px; color: var(--purple); background: var(--purple-soft); }
.contenthash-row span:nth-child(2) { min-width: 0; flex: 1; }
.contenthash-row strong, .contenthash-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contenthash-row strong { color: #ded7ff; font-family: "JetBrains Mono", monospace; font-size: .7rem; }
.contenthash-row small { margin-top: 4px; color: #77738a; font-size: .65rem; }
.contenthash-row a { color: #b6a7ff; font-family: "JetBrains Mono", monospace; font-size: .68rem; }

.small-button, .primary-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #b2aec1;
  background: rgba(35, 33, 51, .78);
  font-size: .73rem;
  font-weight: 600;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.small-button:hover, .primary-button:hover { border-color: rgba(156,124,255,.55); color: #fff; background: var(--purple-soft); transform: translateY(-1px); }
.primary-button { border-color: rgba(156,124,255,.44); color: #f5f1ff; background: #7056cf; }
.primary-button:hover { background: #846ce4; }
.post-composer { margin-bottom: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 8, 15, .38); }
textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--text); background: rgba(4, 5, 10, .55); font-size: .8rem; line-height: 1.45; }
textarea:focus { border-color: rgba(156,124,255,.55); box-shadow: 0 0 0 3px rgba(156,124,255,.09); }
.post-composer textarea { min-height: 76px; padding: 11px; }
.composer-footer { display: flex; margin-top: 10px; align-items: center; justify-content: space-between; gap: 12px; color: #716d83; font-family: "JetBrains Mono", monospace; font-size: .63rem; }
.post-list { display: grid; gap: 10px; }
.post-row { padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-row); }
.post-meta { display: flex; justify-content: space-between; gap: 10px; color: #716d83; font-family: "JetBrains Mono", monospace; font-size: .63rem; }
.post-meta strong { color: #b2abca; font-family: Inter, sans-serif; font-size: .75rem; }
.post-title { margin: 12px 0 6px; color: #e5e1ef; font-family: Inter, sans-serif; font-size: .92rem; font-weight: 600; }
.post-body { margin: 0; color: #aaa6b8; font-size: .79rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-actions { display: flex; margin-top: 13px; gap: 8px; }
.post-action { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: #817c96; background: transparent; font-size: .67rem; }
.post-action:hover { border-color: rgba(156,124,255,.45); color: var(--purple); }

.network-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.network-column { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 8, 15, .32); }
.network-column-heading { display: flex; margin-bottom: 8px; align-items: center; justify-content: space-between; color: #d2cee0; font-size: .77rem; }
.network-column-heading span { display: grid; min-width: 23px; height: 23px; padding: 0 6px; place-items: center; border-radius: 999px; color: var(--purple); background: var(--purple-soft); font-family: "JetBrains Mono", monospace; font-size: .63rem; }
.network-list { display: grid; gap: 6px; }
.network-row { display: flex; min-width: 0; padding: 9px; align-items: center; gap: 9px; border-radius: 10px; background: rgba(255,255,255,.025); }
.network-avatar { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 50%; color: #ded7ff; background: rgba(107, 77, 187, .38); font-family: "JetBrains Mono", monospace; font-size: .58rem; }
.network-copy { min-width: 0; }
.network-copy strong, .network-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.network-copy strong { color: #d0cbde; font-size: .7rem; }
.network-copy small { margin-top: 3px; color: #6e6a81; font-family: "JetBrains Mono", monospace; font-size: .6rem; }
.follow-button { display: block; width: 100%; margin-top: 16px; }
.inline-status { min-height: 18px; margin: 10px 0 0; color: #a59dbf; font-size: .7rem; text-align: center; }
.feature-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.feature-card h2 { max-width: 380px; color: #cbc5df; font-size: .95rem; line-height: 1.35; }
.feature-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.feature-pills span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; color: #8f89a6; font-family: "JetBrains Mono", monospace; font-size: .61rem; }

.toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100% - 40px));
  padding: 11px 14px;
  border: 1px solid rgba(156,124,255,.4);
  border-radius: 10px;
  color: #ede9fa;
  background: #17142a;
  box-shadow: var(--shadow);
  font-size: .75rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

.chat-modal { position: fixed; z-index: 30; inset: 0; display: grid; padding: 20px; place-items: center; }
.chat-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.chat-panel { position: relative; width: min(100%, 520px); max-height: min(720px, calc(100vh - 40px)); overflow: auto; padding: 22px; border: 1px solid var(--line-bright); border-radius: 18px; background: #10101b; box-shadow: var(--shadow); }
.chat-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.chat-header .section-kicker { margin-bottom: 7px; text-align: left; }
.close-button { width: 32px; height: 32px; border-radius: 10px; font-size: 1.25rem; }
.chat-status, .messaging-health { margin-top: 14px; padding: 10px; border: 1px solid rgba(156,124,255,.2); border-radius: 10px; color: #aaa2c7; background: var(--purple-soft); font-size: .7rem; }
.messaging-health { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.message-thread { display: grid; min-height: 170px; max-height: 340px; margin: 14px 0; padding: 11px; overflow: auto; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(4, 5, 10, .5); }
.message { max-width: 82%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px 11px 11px 3px; color: #c4bed3; background: rgba(255,255,255,.05); font-size: .75rem; }
.message.mine { margin-left: auto; border-radius: 11px 11px 3px 11px; background: var(--purple-soft); }
.message small { display: block; margin-bottom: 4px; color: #77718d; font-family: "JetBrains Mono", monospace; font-size: .58rem; }
.message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-form { display: grid; gap: 9px; }
.message-form textarea { min-height: 65px; padding: 10px; }
.chat-connect-button { width: 100%; margin-top: 10px; }

@media (max-width: 720px) {
  .site-header { width: calc(100% - 32px); min-height: 72px; }
  .brand { font-size: .95rem; }
  .page { width: calc(100% - 20px); margin-top: 34px; }
  .profile-main { padding: 32px 18px 25px; }
  .activity-section { padding: 1px 13px 25px; }
  .profile-footer { padding: 17px 18px; }
  .activity-row { grid-template-columns: 35px minmax(0, 1fr); padding: 12px; gap: 10px; }
  .activity-icon { width: 35px; height: 35px; }
  .activity-meta { grid-column: 2; text-align: left; }
  .records-card, .social-card, .network-card, .feature-card { padding: 22px 14px; }
  .record-grid, .network-columns { grid-template-columns: 1fr; }
  .feature-card { display: block; }
  .feature-pills { justify-content: flex-start; margin-top: 17px; }
  .section-heading { align-items: flex-start; }
  .profile-name-row { flex-wrap: wrap; }
  .profile-actions { width: 100%; margin: 4px 0 0; justify-content: center; }
}
