/* ============ Базовое ============ */
:root {
  --accent: #00ff9c;
  --bg: #0a0e14;
  --bg2: #0e131c;
  --text: #c8d3e0;
  --dim: #6b7a90;
  --term-width: 760px;
  --term-height: 620px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", "SF Mono", monospace;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  overflow-x: hidden;
  position: relative;
}

/* ============ Анимированный фон ============ */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
}

body::after {
  /* лёгкая виньетка */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, transparent 40%, rgba(0,0,0,.55) 100%);
}

/* ============ Окно терминала ============ */
.terminal {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--term-width);
  /* высота зарезервирована заранее, поэтому окно не растёт при появлении кнопок */
  min-height: var(--term-height);
  display: flex;
  flex-direction: column;
  background: rgba(14, 19, 28, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.3),
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 80px -20px var(--accent);
  overflow: hidden;
  animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(30px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Шапка с кнопками */
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f56; }
.dot.y { background: #ffbd2e; }
.dot.g { background: #27c93f; }
.term-title {
  margin-left: 10px;
  font-size: 13px;
  color: var(--dim);
}

/* Тело терминала */
.term-body {
  padding: 26px 26px 30px;
  font-size: 15px;
  line-height: 1.7;
  flex: 1 1 auto;
}

.line { white-space: pre-wrap; word-break: break-word; }
.prompt { color: var(--accent); }
.path { color: #6aa9ff; }
.cmd { color: #fff; }
.out { color: var(--text); }
.muted { color: var(--dim); }

.accent { color: var(--accent); }

/* Заголовок-имя */
.headline {
  font-size: clamp(28px, 7vw, 48px);
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  margin: 6px 0 2px;
  text-shadow: 0 0 24px var(--accent);
}
.role-line { font-size: clamp(15px, 3.5vw, 20px); color: var(--accent); min-height: 1.6em; }

/* Аватар */
.avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 24px -4px var(--accent);
  margin-bottom: 14px;
}

/* Курсор */
.cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============ Соцсети ============ */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.social {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  /* стартовое состояние для плавного появления */
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease,
              border-color .2s ease, color .2s ease, box-shadow .2s ease, background .2s ease;
}
.social.in { opacity: 1; transform: translateY(0); }
.social:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -8px var(--accent);
  background: rgba(255,255,255,.06);
}
.social svg { width: 20px; height: 20px; flex: 0 0 20px; }
.social .s-name { color: var(--dim); }
.social:hover .s-name { color: var(--accent); }

/* Подсказка внизу */
.hint {
  margin-top: 24px;
  font-size: 12px;
  color: var(--dim);
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .8s ease, transform .8s ease;
}
.hint.show { opacity: 1; transform: translateY(0); }
.hint kbd {
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.12);
}

@media (max-width: 520px) {
  .term-body { padding: 20px 18px 24px; }
  .social { flex: 1 1 100%; }
}
