*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  min-height: 100svh;
  overflow: hidden;
  color: #eaf1ff;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Запасной фон, если WebGL недоступен */
  background:
    linear-gradient(to bottom, transparent 79.3%, rgba(110, 180, 255, .85) 79.5%, transparent 79.8%),
    radial-gradient(60% 45% at 80% 80%, rgba(30, 110, 230, .55), transparent 70%),
    linear-gradient(160deg, #020a2a 0%, #041750 55%, #0a3a98 100%);
  background-color: #020a2a;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#bg.ready { opacity: 1; }

.card {
  position: fixed;
  left: clamp(24px, 9.5vw, 180px);
  bottom: calc(20.5% + clamp(40px, 5.5vh, 64px));
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 1.6vw, 26px);
  z-index: 1;
}

.logo {
  width: clamp(30px, 2.4vw, 40px);
  height: auto;
  margin-top: 2px;
  fill: none;
  stroke: #e8f0ff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.logo path {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: draw 1.6s cubic-bezier(.6, 0, .2, 1) .5s forwards;
}
.logo path + path { animation-delay: .85s; opacity: .7; }

.info > * {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 1s cubic-bezier(.2, .7, .2, 1) forwards;
}

.name {
  margin: 0;
  font-size: clamp(18px, 1.35vw, 22px);
  font-weight: 400;
  letter-spacing: .005em;
  animation-delay: 1s;
}
.role {
  margin: .45em 0 0;
  font-size: clamp(13px, .9vw, 14.5px);
  font-weight: 400;
  color: rgba(200, 216, 245, .62);
  letter-spacing: .02em;
  animation-delay: 1.15s;
}
.mail {
  display: inline-block;
  margin-top: clamp(22px, 2.2vw, 32px);
  font-size: clamp(13px, .85vw, 14px);
  letter-spacing: .09em;
  color: rgba(225, 235, 255, .85);
  text-decoration: none;
  position: relative;
  animation-delay: 1.3s;
}
.mail::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: linear-gradient(90deg, rgba(120, 190, 255, 0), #7cc0ff, rgba(120, 190, 255, 0));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.mail:hover,
.mail:focus-visible { color: #fff; outline: none; }
.mail:hover::after,
.mail:focus-visible::after { transform: scaleX(1); }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .logo path, .info > * { animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
  .logo path + path { opacity: .7; }
  #bg { transition: none; }
}
