@font-face {
  font-family: "JetBrains Mono";
  src: url("/jbmono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0A0E1A;
  --surface: #0F1424;
  --raise: #141A2E;
  --line: #222B47;
  --text: #E6EAF2;
  --muted: #A3ADC2;
  --dim: #8993AB;
  --accent: #F7931A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg) radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 22px 22px;
  color: var(--text);
  font: 400 15px/1.55 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.accent { color: var(--accent); }

.card {
  max-width: 460px;
  margin: 0 auto;
  padding: 12px 16px calc(40px + env(safe-area-inset-bottom));
}

@media (min-width: 520px) {
  .card {
    margin: 40px auto;
    padding: 20px 28px 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
  }
}

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.bar-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: transparent;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* profile */
.id { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.avatar {
  width: 104px; height: 104px; flex: none;
  padding: 3px;
  border: 2px solid var(--accent);
  border-radius: 50%;
}
.prompt { margin: 0; color: var(--muted); font-size: 13px; }
.caret {
  display: inline-block; width: .6em; height: 1.1em; margin-left: 4px;
  background: var(--accent); vertical-align: -.2em;
  animation: blink 1.1s steps(1) infinite;
}
h1 { margin: 2px 0 4px; font-size: clamp(24px, 7vw, 30px); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.handle { margin: 0; color: var(--accent); font-size: 14px; }
.role { margin: 20px 0 2px; font-size: 16px; font-weight: 700; }
.tagline { margin: 0; color: var(--muted); font-size: 14px; }
.loc { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--dim); font-size: 13px; }
.loc svg { width: 16px; height: 16px; }

/* actions */
.save {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; margin-top: 24px;
  border-radius: 14px;
  background: var(--accent); color: var(--bg);
  font-size: 16px; font-weight: 800;
}
.save:hover { background: #FFA43A; }
.save:active { transform: translateY(1px); }
.hint { margin: 8px 0 0; color: var(--dim); font-size: 12px; text-align: center; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.quick a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 68px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--raise); color: var(--muted);
  font-size: 12px;
}
.quick svg { color: var(--text); }
.quick a:hover { border-color: var(--accent); color: var(--text); }
.quick a:hover svg { color: var(--accent); }

/* code block */
.code { margin: 28px 0 0; border: 1px solid var(--line); border-radius: 14px; background: #0B1020; overflow: hidden; }
.tab { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.tab::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.code pre { margin: 0; padding: 12px 14px; overflow-x: auto; font-size: 13px; line-height: 1.6; counter-reset: ln; }
.code code { font: inherit; }
.l::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 2ch; margin-right: 1.5ch; color: #6E7894; text-align: right; }
.tk { color: #C9A2F2; }
.ts { color: #FFC47A; }
.tn { color: #7DD3FC; }
.tp { color: #8E98AE; }

/* sections */
section h2 { margin: 28px 0 10px; color: var(--dim); font-size: 13px; font-weight: 500; }

.socials { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.socials li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.socials a, .socials button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--raise); text-align: left;
}
.socials a:hover, .socials button:hover { border-color: var(--accent); }
.socials a:hover svg, .socials button:hover svg { color: var(--accent); }
.meta { min-width: 0; }
.sn { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; }
.sh { display: block; overflow: hidden; color: var(--dim); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }

.ventures { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 14px; background: var(--raise); overflow: hidden; }
.ventures li + li { border-top: 1px solid var(--line); }
.ventures a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; min-height: 62px; padding: 12px 14px; }
.ventures a:hover { background: #19213A; }
.ventures a:hover svg { color: var(--accent); }
.d { color: var(--accent); font-size: 14px; font-weight: 700; }
.t { grid-column: 1; color: var(--muted); font-size: 12.5px; }
.ventures svg { grid-row: 1 / span 2; grid-column: 2; width: 18px; height: 18px; color: var(--dim); }

footer { margin-top: 28px; color: var(--dim); font-size: 12px; text-align: center; }
footer a { display: inline-block; padding: 12px 2px; color: var(--accent); }

/* QR dialog */
dialog {
  width: min(360px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--text);
}
dialog::backdrop { background: rgba(5, 8, 16, .82); }
.qr-in { padding: 14px 18px 20px; }
.qr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.qr-head h2 { margin: 0; font-size: 16px; }
.qr-box { padding: 12px; border-radius: 14px; background: #fff; }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-cap { margin: 12px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  margin: 0; padding: 10px 16px;
  border-radius: 10px;
  background: var(--text); color: var(--bg);
  font-size: 13px; font-weight: 700;
  opacity: 0; transform: translate(-50%, 16px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
