:root {
  color-scheme: dark;
  --bg: #1b1625;
  --panel: #201929;
  --text: #f5edf8;
  --muted: #c7b9ca;
  --accent: #f39ad4;
  --accent2: #9cbcff;
  --green: #74d67d;
  --red: #ff8080;
  --border: #3a2f49;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 70% 10%, rgba(164, 99, 203, 0.08), transparent 34rem),
    linear-gradient(180deg, #1b1625 0%, #181321 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.25;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
  color: #ffd2ee;
}

.corner-agent {
  position: fixed;
  top: 78px;
  right: 92px;
  width: 180px;
  height: auto;
  z-index: 10;
  pointer-events: none;
  transform: rotate(-90deg);
  transform-origin: top right;
  filter: drop-shadow(-4px 4px 10px rgba(0, 0, 0, 0.45));
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.035;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    #fff 3px
  );
}

.page-shell {
  width: min(760px, calc(100% - 32px));
  margin: 72px auto 28px;
}

.profile {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 28px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font: 12px/1.2 "Courier New", monospace;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: 26px;
  line-height: 1;
  color: #f8d6ee;
  text-shadow: 1px 1px 0 #5d3f66;
}

.smile {
  color: #fff;
}

h2 {
  margin-bottom: 7px;
  color: var(--accent2);
  font-size: 16px;
}

.profile-copy p {
  margin-bottom: 9px;
}

.muted {
  color: var(--muted);
}

.powered {
  color: #f1bfdc;
}

.avatar-card {
  margin: 0;
}

.avatar-card img {
  display: block;
  width: 168px;
  height: 168px;
  object-fit: cover;
  border: 0;
  image-rendering: auto;
  filter: contrast(1.03) saturate(0.93);
}

.avatar-card figcaption {
  width: 168px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
  margin-top: 20px;
}

.kv {
  margin: 0;
}

.kv div {
  display: flex;
  gap: 5px;
}

.kv dt {
  font-weight: 700;
}

.kv dd {
  margin: 0;
}

.bad {
  color: var(--red);
  font-weight: 700;
}

.terminal-block {
  align-items: start;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  color: #f0e6f2;
  font: 13px/1.25 "Courier New", Courier, monospace;
}

.ring-zone {
  margin: 26px auto 10px;
  text-align: center;
  font-size: 12px;
}

.ring-zone p {
  margin-bottom: 7px;
  color: var(--muted);
}

.ring-zone nav {
  line-height: 1.65;
}

.badge-section {
  margin-top: 20px;
}

.badge-heading {
  text-align: center;
  margin-bottom: 10px;
}

.badge-heading h2 {
  margin-bottom: 3px;
  color: #e6d8ec;
  font-size: 13px;
}

.badge-heading p {
  margin: 0;
  color: #a99bac;
  font-size: 11px;
}

.badge-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  width: 100%;
  padding: 4px;
  border: 1px solid #6d6074;
  background: #100d14;
}

.badge-wall a {
  display: block;
  overflow: hidden;
  background: #000;
  line-height: 0;
  outline: 0;
}

.badge-wall a:hover,
.badge-wall a:focus-visible {
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ff4dc4;
}

.badge-wall img {
  display: block;
  width: 100%;
  aspect-ratio: 325 / 124;
  object-fit: fill;
}

.fake-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 9px 0 24px;
}

.fake-badges span {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  padding: 2px 6px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #313131;
  border-bottom: 2px solid #313131;
  background: #c0c0c0;
  color: #111;
  font: 700 9px/1 "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  box-shadow: inset -1px -1px 0 #777, inset 1px 1px 0 #ececec;
}

.fake-badges span:nth-child(3n + 1) {
  background: #ffef73;
}

.fake-badges span:nth-child(3n + 2) {
  background: #ffa5d8;
}

.fake-badges span:nth-child(3n) {
  background: #9edfff;
}

footer {
  margin-top: 24px;
  text-align: center;
  color: #d4c6d8;
  font-size: 10px;
}

footer p {
  margin-bottom: 3px;
}

.signal {
  margin-bottom: 5px;
  color: #f8efff;
  font: 700 17px/1 monospace;
  letter-spacing: 2px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 30;
  transform: translate(-50%, 20px);
  padding: 7px 10px;
  border: 1px solid #8f7a97;
  background: rgba(20, 15, 24, 0.95);
  color: #fff;
  font: 12px/1 "Courier New", monospace;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms linear, transform 120ms linear;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 700px) {
  .page-shell {
    margin-top: 40px;
  }

  .profile,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .avatar-card {
    order: -1;
  }

  .avatar-card img,
  .avatar-card figcaption {
    width: 140px;
  }

  .avatar-card img {
    height: 140px;
  }

  .badge-wall {
    grid-template-columns: repeat(2, 1fr);
  }

  .corner-agent {
    top: 62px;
    right: 68px;
    width: 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .toast {
    transition: none;
  }
}
