canvas {
  position: fixed;
  width: 100%;
  height: 110%;
}

a {
text-decoration: none;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  -webkit-tap-highlight-color: transparent;
}

@import url("https://fonts.googleapis.com/css?family=Krub:400,700");

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

body {
  background: #202020;
  font-family: "Krub", sans-serif;
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  z-index: 2;
  display: flex;
  position: fixed;
  align-items: center;
  flex-direction: column;
}

.card {
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 250px;
  height: 350px;
  border-radius: 10px;
  box-shadow: 0 10px 25px 5px rgba(0, 0, 0, 0.2);
  background: rgba(21, 21, 21, 0.5);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.card .ds-top {
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  left: 0;
  width: 300px;
  height: 100px;
  background: crimson;
  animation: dsTop 1.5s;
}

.card .avatar-holder {
  position: absolute;
  margin: auto;
  top: 40px;
  right: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  box-shadow: 0 0 0 5px #151515, inset 0 0 0 5px #000000, inset 0 0 0 5px #000000, inset 0 0 0 5px #000000, inset 0 0 0 5px #000000;
  background: white;
  overflow: hidden;
  animation: mvTop 1.5s;
}

.card .avatar-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card .name {
  position: absolute;
  margin: auto;
  top: -30px;
  right: 0;
  bottom: 0;
  left: 0;
  width: inherit;
  height: 50px;
  text-align: center;
  animation: fadeIn 2s ease-in;
}

.card .name .a {
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.card .name a:hover {
  text-decoration: underline;
  color: crimson;
}

.card .name h6 {
  position: absolute;
  margin: auto;
  left: 0;
  right: 0;
  bottom: 0;
  color: white;
  width: 100px;
}

.card .button {
  position: absolute;
  margin: auto;
  padding: 8px;
  top: 20px;
  right: 0;
  bottom: 0;
  left: 0;
  width: inherit;
  height: 40px;
  text-align: center;
  animation: fadeIn 2s ease-in;
  outline: none;
  color: white;
  background: crimson;
}

.card .button a {
  padding: 5px 20px;
  border-radius: 10px;
  color: white;
  letter-spacing: 0.05em;
  text-decoration: none;
  font-size: 10px;
  transition: all 1s;
}

.card .ds-info {
  position: absolute;
  margin: auto;
  top: 120px;
  bottom: 20px;
  right: 0;
  left: 0;
  width: inherit;
  height: 40px;
  display: flex;
}

.card .ds-info .pens, 
.card .ds-info .projects, 
.card .ds-info .posts {
  position: relative;
  left: -300px;
  width: calc(250px / 3);
  text-align: center;
  color: white;
  animation: fadeInMove 2s;
  animation-fill-mode: forwards;
}

.card .ds-info .pens h6, 
.card .ds-info .projects h6, 
.card .ds-info .posts h6 {
  text-transform: uppercase;
  color: crimson;
}

.card .ds-info .pens p, 
.card .ds-info .projects p, 
.card .ds-info .posts p {
  font-size: 12px;
}

.card .ds-info .ds:nth-of-type(2) {
  animation-delay: 0.5s;
}

.card .ds-info .ds:nth-of-type(1) {
  animation-delay: 1s;
}

.card .ds-skill {
  position: absolute;
  margin: auto;
  bottom: 10px;
  right: 0;
  left: 0;
  width: 200px;
  height: 100px;
  animation: mvBottom 1.5s;
}

.card .ds-skill h6 {
  margin-bottom: 5px;
  font-weight: 700;
  text-transform: uppercase;
  color: crimson;
}

.card .ds-skill .skill h6 {
  font-weight: 400;
  font-size: 8px;
  letter-spacing: 0.05em;
  margin: 4px 0;
  color: white;
}

.card .ds-skill .skill .fab {
  color: crimson;
  font-size: 14px;
}

.card .ds-skill .skill .bar {
  height: 5px;
  background: crimson;
  text-align: right;
}

.card .ds-skill .skill .bar p {
  color: white;
  font-size: 8px;
  padding-top: 10px;
  animation: fadeIn 5s;
}

.card .ds-skill .skill .bar:hover {
  background: white;
}

.card .ds-skill .skill .bar-html {
  width: 70%;
  animation: htmlSkill 1s;
  animation-delay: 0.4s;
}

.card .ds-skill .skill .bar-css {
  width: 30%;
  animation: cssSkill 2s;
  animation-delay: 0.4s;
}

@keyframes fadeInMove {
  0% {
    opacity: 0;
    left: -300px;
  }
  100% {
    opacity: 1;
    left: 0;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes htmlSkill {
  0% {
    width: 0;
  }
  100% {
    width: 70%;
  }
}

@keyframes cssSkill {
  0% {
    width: 0;
  }
  100% {
    width: 30%;
  }
}

@keyframes mvBottom {
  0% {
    bottom: -150px;
  }
  100% {
    bottom: 10px;
  }
}

@keyframes mvTop {
  0% {
    top: -150px;
  }
  100% {
    top: 40px;
  }
}

@keyframes dsTop {
  0% {
    top: -150px;
  }
  100% {
    top: 0;
  }
}

.following {
  color: white;
  background: crimson;
}


.boton-elegante {
  padding: 15px 30px;
  border: 2px solid #2c2c2c;
  background-color: #1a1a1a;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.4s ease;
  outline: none;
  position: relative;
  overflow: hidden;
  font-weight: bold;
}

.boton-elegante::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: scale(0);
  transition: transform 0.5s ease;
}

.boton-elegante:hover::after {
  transform: scale(4);
}

.boton-elegante:hover {
  border-color: #666666;
  background: #292929;
}






.event-wrapper > .event-wrapper-inp {
  display: none;
}

.event-wrapper {
  margin: 10px;
  position: fixed;
  top: 0;
  right: 0;   

  background-color: rgba(40,42,44,0.17);
  border-radius: 16px;
  border: 1.5px solid rgba(170,170,180,0.10);
  box-shadow: 0 4px 20px rgba(30,34,38, .13);
  backdrop-filter: blur(7px);
  
  display: none;
  align-items: center;
  justify-content: center;
  height: 54px;
  width: 54px;
  transition: all 0.3s;
  z-index: 2;
}

.bar {
  display: flex;
  height: auto;
  width: 40%;
  flex-direction: column;
  gap: 3px;
}

.bar-list {
  --transform: -25%;
  display: block;
  width: 100%;
  height: 3px;
  
  border-radius: 50px;
  background-color: white;
  transition: all 0.4s;
  position: relative;
  justify-content: center;
}

.event-wrapper-inp:checked ~ .bar > .top {
  transform-origin: top right;
  transform: translateX(-20%) translateY(var(--transform)) rotate(-45deg);
}

.event-wrapper-inp:checked ~ .bar > .middle {
  transform: translateX(-50%);
  opacity: 0;
}

.event-wrapper-inp:checked ~ .bar > .bottom {
  transform-origin: bottom right;
  transform: translateX(-20%) translateY(calc(var(--transform) * -1)) rotate(45deg);
}


.menu-container {
  position: fixed;
  left: 50%;
  top: 0;
  transform: translate(-50%, -100%);
  width: 300px;
  height: auto;
  background: rgba(40, 42, 44, 0.1);
  border-radius: 16px;
  border: 1.5px solid rgba(170, 170, 180, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(30, 34, 38, 0.13);
  color: white;
  padding: 15px;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Активное состояние — меню сдвигается вниз и становится видимым */
.menu-container.active {
  transform: translate(-50%, 10px); /* чуть ниже верхнего края */
  opacity: 1;
}

/* Пункты меню */

.menu-list {
  position: relative;
  padding: 10px 16px;
  margin-bottom: 8px;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease;
  user-select: none;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  -webkit-tap-highlight-color: transparent;
}

.menu-list:hover {
  transform: scale(1.03); /* слабое увеличение */
  background-color: rgba(255, 255, 255, 0.07);
  box-shadow:
    0 6px 12px rgba(255, 255, 255, 0.12),
    0 0 6px rgba(255, 255, 255, 0.15);
  z-index: 10;
}

/* Полноэкранный блюр-оверлей */
.screen-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(30, 30, 30, 0.25);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 1150;
}

/* Активный overlay - видимый */
.screen-blur.active {
  opacity: 1;
  pointer-events: auto;
}

.particles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 1; /* на заднем плане относительно меню */
}

/* Стили частиц */

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background-color: rgba(255, 255, 255, 0.3);
  opacity: 1;
  will-change: transform, opacity;
  animation: particleFly 2s forwards;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
  mix-blend-mode: screen; /* для красивого смешивания */
}

@keyframes particleFly {
  from {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(var(--dx), var(--dy)) scale(0);
    opacity: 0;
  }
}

.menu-list.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ddd;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); 
  cursor: default;
  pointer-events: none;
  transition: none;
}

.menu-list.active:hover {
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  color: #ddd;
}


#particles {
  position: absolute;
  z-index: 2000;
  left: 0; top: 0; width: 100%; height: 100%; pointer-events:none; z-index:10;
}

#bubbles-container {
  position: fixed;
  bottom: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
  pointer-events: all; 
}

@keyframes floatBubble {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.05) translateY(-20px);
  }
}

.bubble {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  animation: floatBubble 4s ease-in-out infinite;
  transition: transform 0.3s ease;
  transform-origin: center center;
  pointer-events: all;
} 

.bubble:hover {
  transition: transform 0.3s ease;
  box-shadow: 0 5px 20px rgba(255, 255, 255, 0.7);
  outline: none;
}

.bubble:nth-child(2) {
  animation-delay: 1.3s;
}
.bubble:nth-child(3) {
  animation-delay: 2.6s;
}



a.tg {
  position: absolute;

  padding: 0;
  margin: 0;
}

.user-card {
  padding-top: 16px;
  text-align: center;
  margin-top: 300px;
  display: flex;
  pointer-events: none;
  position: relative;
  z-index: 1200;
  box-sizing: border-box;
  width: 30%;
  margin-left: auto;
  margin-right: auto;
  background: rgba(40,42,44,0.17);
  border-radius: 16px;
  border: 1.5px solid rgba(170,170,180,0.10);
  padding: 16px 32px;
  max-width: 560px;
  box-shadow: 0 4px 20px rgba(30,34,38, .13);
  backdrop-filter: blur(7px);
 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #edeff2;
  font-size: clamp(15px, 2vw, 20px);

  flex-direction: column;
  gap: 16px;
  opacity: 0;
  animation: fadeInUp .6s ease forwards;
  transform: translateY(18px);
  transition: opacity 0.5s ease;
  outline: none;
}
.user-card img {
  max-width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.user-card.active {
  opacity: 1;
  display: flex;
   pointer-events: auto;
}

* {
  outline: none !important;
}

.name {
  margin-top: 10px;
}

.btn {
  background: rgba(41,218,135, 0.1);
  z-index: 1200;
  color: #61ffbe;
  border: 1.5px solid #3dc8854d;
  border-radius: 12px;
  padding: 10px 22px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  user-select: none;
  text-align: center;
  display: inline-block;
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(30, 218, 135, 0.3);
  backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  background: #29da87;
  color: #202224;
  border-color: #25b772;
  box-shadow: 0 5px 20px rgba(30, 218, 135, 0.7);
  outline: none;
}

.btn:focus {outline:none;}

.btn:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
  outline: none;
}
.btn-secondary {
  background: rgba(232,221,125,0.12);
  color: #e9e26a;
  border-color: #e9e26a33;
  box-shadow: 0 2px 8px rgba(232, 221, 125, 0.25);
}
.btn-secondary:hover {
  background: #e8dd7d;
  color: #3a3a0a;
  border-color: #d1ca2e;
  box-shadow: 0 5px 20px rgba(232, 221, 125, 0.7);
}

#nav {
  background: rgba(40, 42, 44, 0.1);
  border-radius: 16px;
  border: 1.5px solid rgba(170, 170, 180, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1200;
  height: 54px;
  width: 80vw;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center;
}

#nav > .menu-list {
  display: flex;
  width: auto;
  margin: auto;
  font-size: large;
  flex: 1;
  margin-left: 10px;
  margin-right: 10px;
  text-align: center;
  justify-content: center;
  align-items: center;  
}


@media (max-width: 900px) {
  .container {
    padding: 0 10vw;
  }
  .card {
    max-width: 90vw;
    padding: 20px 22px;
  }
  .btn {
    padding: 9px 18px;
    min-width: 100px;
  }
  #nav {
    display: none;
  }
  .event-wrapper {
    display: flex;
  }
}

@media (max-width: 1200px) {
  #nav {
    width: 98vw;
    font-size: medium;
  }
}