:root {
  --bg: #0d1117;
  --fg: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --line: #21262d;

  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;           /* dvh — чтобы не прыгало под адресной строкой */
  padding: 2rem 1.25rem;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  text-align: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;   /* светлый текст на тёмном фоне иначе жирнит */
  -moz-osx-font-smoothing: grayscale;
}

/* фон с графом: под контентом, на всю площадь */
#graph {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  touch-action: manipulation;   /* без задержки 300 мс и зума по двойному тапу */
}

/* контент выше фона, но не перехватывает клики — чтобы точки тыкались
   в любом месте; интерактивным оставляем только сами ссылки */
main, footer {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

main a, footer a { pointer-events: auto; }

/* main забирает всё свободное место и центрирует содержимое по вертикали,
   footer остаётся прижатым книзу */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
}

/* порядок на странице: сначала @ник, под ним крупное название */
.handle {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}

.handle a { color: inherit; text-decoration: none; }
.handle a:hover { color: var(--accent); }

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.bio {
  max-width: 30rem;             /* строка ~65 знаков — комфортно читается */
  margin: 0 0 2rem;
  color: #c9d1d9;
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.links a {
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(22, 27, 34, 0.7);
  color: var(--fg);
  font-size: 0.9375rem;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}

.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.hint {
  margin: 2.25rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  opacity: 0.6;
}

footer {
  padding-top: 2rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.credit { opacity: 0.75; }

.credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.credit a:hover { color: var(--accent); }

/* тем, кто просил не анимировать — статичный фон */
@media (prefers-reduced-motion: reduce) {
  #graph { opacity: 0.5; }
}
