* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #000;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  opacity: 0.6;
}

.wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 50;
}

.card {
  background: rgba(88, 166, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(88, 166, 255, 0.15);
  border-radius: 32px;
  padding: 56px 64px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(88, 166, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.6s ease-out, cardGlow 4s ease-in-out infinite;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 33px;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(88, 166, 255, 0.3) 0%,
    rgba(63, 185, 80, 0.2) 50%,
    rgba(88, 166, 255, 0.3) 100%);
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderGlow 4s ease infinite;
  pointer-events: none;
  opacity: 0.6;
}

@keyframes borderGlow {
  0%, 100% {
    background-position: 0% 50%;
    opacity: 0.4;
  }
  50% {
    background-position: 100% 50%;
    opacity: 0.8;
  }
}

@keyframes cardGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.05),
      0 20px 50px rgba(0, 0, 0, 0.4),
      0 0 60px rgba(88, 166, 255, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 25px 60px rgba(0, 0, 0, 0.5),
      0 0 100px rgba(88, 166, 255, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.logo {
  width: 256px;
  height: 256px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  animation: avatarGlow 6s ease-in-out infinite;
}

.logo:hover {
  animation: logoHoverGlow 4s ease-in-out infinite;
}

@keyframes avatarGlow {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(88, 166, 255, 0.25),
      0 0 40px rgba(88, 166, 255, 0.15),
      0 0 60px rgba(163, 113, 247, 0.1),
      0 10px 30px rgba(0, 0, 0, 0.5);
  }
  33% {
    box-shadow:
      0 0 20px rgba(163, 113, 247, 0.25),
      0 0 40px rgba(163, 113, 247, 0.15),
      0 0 60px rgba(63, 185, 80, 0.1),
      0 10px 30px rgba(0, 0, 0, 0.5);
  }
  66% {
    box-shadow:
      0 0 20px rgba(63, 185, 80, 0.25),
      0 0 40px rgba(63, 185, 80, 0.15),
      0 0 60px rgba(88, 166, 255, 0.1),
      0 10px 30px rgba(0, 0, 0, 0.5);
  }
}

@keyframes logoHoverGlow {
  0%, 100% {
    box-shadow:
      0 0 40px rgba(30, 90, 180, 0.6),
      0 0 80px rgba(30, 90, 180, 0.4),
      0 0 120px rgba(100, 60, 180, 0.3),
      0 0 160px rgba(100, 60, 180, 0.15),
      0 15px 40px rgba(0, 0, 0, 0.6);
  }
  33% {
    box-shadow:
      0 0 45px rgba(100, 60, 180, 0.6),
      0 0 90px rgba(100, 60, 180, 0.4),
      0 0 130px rgba(30, 120, 50, 0.3),
      0 0 170px rgba(30, 120, 50, 0.15),
      0 18px 45px rgba(0, 0, 0, 0.6);
  }
  66% {
    box-shadow:
      0 0 45px rgba(30, 120, 50, 0.6),
      0 0 90px rgba(30, 120, 50, 0.4),
      0 0 130px rgba(30, 90, 180, 0.3),
      0 0 170px rgba(30, 90, 180, 0.15),
      0 18px 45px rgba(0, 0, 0, 0.6);
  }
}

.status {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: #3fb950;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 10px rgba(63, 185, 80, 0.4), inset 0 0 0 1px rgba(63, 185, 80, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(63, 185, 80, 0.4), inset 0 0 0 1px rgba(63, 185, 80, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px rgba(63, 185, 80, 0.8), 0 0 30px rgba(63, 185, 80, 0.4), inset 0 0 0 1px rgba(63, 185, 80, 0.5);
    transform: scale(1.1);
  }
}

h1 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #58a6ff 50%, #3fb950 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.subtitle {
  color: rgba(255, 255, 255, 0.45);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 36px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 1.5em;
}

.subtitle .cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: rgba(88, 166, 255, 0.8);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Staggered animations */
.logo-wrap {
  animation: fadeSlideIn 0.6s ease-out both;
  animation-delay: 0.1s;
}

.card h1 {
  animation: fadeSlideIn 0.6s ease-out both;
  animation-delay: 0.2s;
}

.card .subtitle {
  animation: fadeSlideIn 0.6s ease-out both;
  animation-delay: 0.3s;
}

.card .skills {
  animation: fadeSlideIn 0.6s ease-out both;
  animation-delay: 0.4s;
}

.card .social-links {
  animation: fadeSlideIn 0.6s ease-out both;
  animation-delay: 0.5s;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skills section */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}

.skill-tag {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 20px;
  transition: all 0.3s ease;
  cursor: default;
}

/* Blue - Web Development */
.skill-tag.blue {
  color: rgba(88, 166, 255, 0.9);
  background: rgba(88, 166, 255, 0.08);
  border: 1px solid rgba(88, 166, 255, 0.2);
}

.skill-tag.blue:hover {
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.15);
  border-color: rgba(88, 166, 255, 0.4);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 5px 20px rgba(88, 166, 255, 0.25), 0 0 15px rgba(88, 166, 255, 0.15);
}

/* Green - Design */
.skill-tag.green {
  color: rgba(63, 185, 80, 0.9);
  background: rgba(63, 185, 80, 0.08);
  border: 1px solid rgba(63, 185, 80, 0.2);
}

.skill-tag.green:hover {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.15);
  border-color: rgba(63, 185, 80, 0.4);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 5px 20px rgba(63, 185, 80, 0.25), 0 0 15px rgba(63, 185, 80, 0.15);
}

/* Purple - Content */
.skill-tag.purple {
  color: rgba(163, 113, 247, 0.9);
  background: rgba(163, 113, 247, 0.08);
  border: 1px solid rgba(163, 113, 247, 0.2);
}

.skill-tag.purple:hover {
  color: #a371f7;
  background: rgba(163, 113, 247, 0.15);
  border-color: rgba(163, 113, 247, 0.4);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 5px 20px rgba(163, 113, 247, 0.25), 0 0 15px rgba(163, 113, 247, 0.15);
}

.social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  background: rgba(88, 166, 255, 0.1);
  border-color: rgba(88, 166, 255, 0.3);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.social-link svg {
  width: 36px;
  height: 36px;
  transition: all 0.3s ease;
}

/* Telegram */
.social-link.tg {
  background: rgba(38, 165, 227, 0.1);
  border-color: rgba(38, 165, 227, 0.25);
}

.social-link.tg svg {
  color: #26a5e4;
}

.social-link.tg:hover {
  background: rgba(38, 165, 227, 0.2);
  border-color: rgba(38, 165, 227, 0.5);
  box-shadow: 0 10px 25px rgba(38, 165, 227, 0.25), 0 0 20px rgba(38, 165, 227, 0.2);
}

.social-link.tg:hover svg {
  filter: drop-shadow(0 0 8px rgba(38, 165, 227, 0.6));
}

/* VK */
.social-link.vk {
  background: rgba(0, 119, 255, 0.1);
  border-color: rgba(0, 119, 255, 0.25);
}

.social-link.vk svg {
  color: #0077ff;
}

.social-link.vk:hover {
  background: rgba(0, 119, 255, 0.2);
  border-color: rgba(0, 119, 255, 0.5);
  box-shadow: 0 10px 25px rgba(0, 119, 255, 0.25), 0 0 20px rgba(0, 119, 255, 0.2);
}

.social-link.vk:hover svg {
  filter: drop-shadow(0 0 8px rgba(0, 119, 255, 0.6));
}

.footer {
  margin-top: auto;
  padding: 28px 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  z-index: 50;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.btn-na {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(63, 185, 80, 0.85);
  text-decoration: none;
  background: rgba(63, 185, 80, 0.08);
  border: 1px solid rgba(63, 185, 80, 0.2);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.btn-na:hover {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.12);
  border-color: rgba(63, 185, 80, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(63, 185, 80, 0.15), 0 0 15px rgba(63, 185, 80, 0.1);
}

.admin-link {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.72rem;
  color: rgba(63, 185, 80, 0.4);
  text-decoration: none;
  transition: all 0.3s ease;
}

.admin-link:hover {
  color: rgba(63, 185, 80, 0.7);
}

@media (max-width: 480px) {
  .card {
    padding: 40px 32px;
    border-radius: 20px;
  }

  .logo {
    width: 130px;
    height: 130px;
  }

  h1 {
    font-size: 1.4rem;
  }

  .subtitle {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }

  .skills {
    gap: 8px;
    margin-bottom: 24px;
  }

  .skill-tag {
    padding: 6px 12px;
    font-size: 0.7rem;
  }

  .social-link {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .social-link svg {
    width: 24px;
    height: 24px;
  }

  .footer {
    padding: 20px 16px;
    gap: 6px;
  }

  .btn-na {
    padding: 10px 16px;
    font-size: 0.72rem;
    border-radius: 8px;
    max-width: 100%;
    word-wrap: break-word;
    line-height: 1.4;
  }

  .admin-link {
    font-size: 0.68rem;
  }
}
