:root { color-scheme: dark; background: #09080a; }
* { box-sizing: border-box; }
html, body, main { margin: 0; width: 100%; height: 100%; overflow: hidden; }
#art {
  display: block; position: relative; width: 100%; height: 100%; padding: 0; border: 0;
  background: none; cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
#art:focus-visible { outline: 1px dotted #a77387; outline-offset: -4px; }
canvas { display: block; width: 100%; height: 100%; }
#cue { position: absolute; left: 50%; bottom: max(6%, env(safe-area-inset-bottom)); transform: translateX(-50%); white-space: pre; pointer-events: none; color: #bd849a; font: 500 13px/1.5 monospace; letter-spacing: .12em; text-shadow: 0 1px 4px #09080a, 0 0 8px #09080a; }
#cue span { color: #f0d9df; display: inline-block; clip-path: inset(0 var(--cut,0%) 0 0); }

#profile {
  --reveal: 0;
  position: fixed; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
           max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  pointer-events: none;
  font-family: Consolas, "Liberation Mono", monospace;
}
#profile[hidden] { display: none; }
.profile-card {
  width: min(100%, 26rem); max-height: 100%; overflow: auto; overscroll-behavior: contain;
  padding: clamp(24px, 5vh, 40px) clamp(12px, 4vw, 30px) 22px;
  pointer-events: auto; text-align: center; color: #eedee4;
  border: 1px solid #4c3b43; border-radius: 5px;
  background: radial-gradient(ellipse at 50% 0%, #241d23 0%, transparent 68%), #100e11;
  box-shadow: inset 0 0 0 4px #120f13, inset 0 0 0 5px #332a30, 0 12px 52px #0009;
  scrollbar-width: thin; scrollbar-color: #67505d #171216;
  opacity: var(--reveal);
}
.portrait-ring {
  width: clamp(88px, 13vh, 114px); aspect-ratio: 1; border-radius: 50%; margin: 0 auto;
  padding: 4px; border: 1px solid #63515b; background: #141015;
  box-shadow: 0 4px 18px #0006;
}
.portrait-ring img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
#profile-name {
  width: fit-content; margin: 11px auto 7px; color: #f0e3e8;
  font: normal 3.05rem/.98 Georgia, "Times New Roman", serif; letter-spacing: -.065em;
}
#profile-name:focus-visible { outline: 1px dotted #b58e9e; outline-offset: 4px; }
.profile-motto {
  position: relative; width: fit-content; margin: 0 auto;
  font-size: .82rem; line-height: 1.6; letter-spacing: .09em; color: #c9abb9;
}
.ascii-noise {
  position: absolute; inset: 0; background: #1a161b; color: #f2d7e4;
  clip-path: inset(0 100% 0 0); pointer-events: none;
  animation: motto-scan 6.4s steps(1, end) infinite;
}
@keyframes motto-scan {
  0%, 74%, 100% { clip-path: inset(0 100% 0 0); }
  76% { clip-path: inset(0 75% 0 0); } 79% { clip-path: inset(0 51% 0 25%); }
  82% { clip-path: inset(0 26% 0 49%); } 85% { clip-path: inset(0 0 0 74%); }
  88% { clip-path: inset(0 0 0 100%); }
}
.cross-rule { display: flex; align-items: center; justify-content: center; gap: 13px; margin: 17px auto 10px; }
.cross-rule::before, .cross-rule::after {
  content: ""; width: 25%; max-width: 75px; height: 1px;
  background: linear-gradient(90deg, transparent, #4b3943);
}
.cross-rule::after { transform: scaleX(-1); }
.profile-cross {
  display: block; width: 32px; height: 48px; flex: none;
  filter: drop-shadow(0 0 3px #c18a9f55);
}
.cross-glint { animation: cross-sweep 4.6s linear infinite; }
@keyframes cross-sweep {
  0%, 48% { transform: translateY(-12px); }
  86%, 100% { transform: translateY(64px); }
}
.profile-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(2px, 2vw, 12px); }
.profile-links a {
  position: relative; flex: 0 0 50px; height: 50px; overflow: hidden; border-radius: 3px;
  text-decoration: none; color: #cdbac4;
}
.profile-links a > span {
  position: absolute; left: 50%; top: calc(50% - 1.5px); width: max-content;
  /* Lay out the glyphs at a readable font size before shrinking the whole drawing. */
  white-space: pre; text-align: left; font: 700 8px/8px "Courier New", monospace;
  transform: translate(-50%, -50%) scale(.25); pointer-events: none;
}
.profile-links .github-mark { left: calc(50% - 1.5px); }
.profile-links a:hover, .profile-links a:focus-visible { background: #2a2027; color: #fff0f7; }
.profile-links a:focus-visible { outline: 1px solid #c49cad; outline-offset: 1px; }
#discord-tag {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; max-width: 100%; margin-top: 6px; padding: 0 10px;
  font: inherit; background: none; border: 0; color: #e3cdd7; cursor: pointer;
}
#discord-tag::before, #discord-tag::after { content: '['; color: #9c7081; font-size: 15px; }
#discord-tag::after { content: ']'; }
.contact-label, .contact-action { font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.contact-label { color: #bd9daa; }
#discord-name { font: 13px/1.4 Consolas, monospace; letter-spacing: .04em; user-select: all; }
.contact-action { color: #c09baa; border-left: 1px solid #503941; padding-left: 9px; }
#discord-tag:hover, #discord-tag:focus-visible { color: #fff1f6; background: #241c23; }
#discord-tag:focus-visible { outline: 1px dotted #bd8da0; }
#copy-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
body.paused :is(.ascii-noise, .cross-glint) { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .ascii-noise, .cross-glint { animation: none; }
}
