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

html, body {
  width: 100%;
  height: 100%;
}

body {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  background: url(../img/background.jpg) no-repeat center center;
  background-size: cover;
}

a, a:visited, a:hover {
  color: #2d3748;
  text-decoration: none;
}

h1 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.15em;
}

h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: #333;
  margin-top: 0;
  margin-bottom: 0.1em;
}

h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2c678d;
  margin-top: 0;
}

.wnd {
  display: flex;
  flex-flow: column;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease;
}

.wnd-wrapper {
  position: relative;
  z-index: 1;
  animation: cardAppear 0.8s ease forwards;
}

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

.wnd__header {
  flex: 1 1 auto;
}

.wnd__contacts {
  flex: 1 1 auto;
  display: flex;
  flex-flow: column;
}

@media (hover: hover) {
  .wnd__contacts {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
  }

  .wnd.revealed .wnd__contacts.projects {
    max-height: 6rem;
    opacity: 1;
    transition-delay: 0.05s;
  }

  .wnd.revealed .wnd__contacts.contacts {
    max-height: 6rem;
    opacity: 1;
    transition-delay: 0.15s;
  }
}

.header {
  display: flex;
  flex-flow: row-reverse;
  align-items: center;
}

.header__column {
  padding: 1.5rem 1.5rem 1.2rem;
}

.header__photo {
  padding: 1.5rem 1.5rem 1.2rem 0.8rem;
}

.header__title {
  text-align: end;
}

.photo__btn {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background-image: url("../img/ava.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-width: 0;
  cursor: pointer;
}

@keyframes nudge {
  0%, 92%, 100% { transform: rotate(0deg); }
  94% { transform: rotate(-6deg); }
  96% { transform: rotate(6deg); }
  98% { transform: rotate(-4deg); }
}

.photo__btn {
  animation: nudge 8s ease infinite;
}

.photo__btn:hover {
  background-image: url("../img/mem.png");
  transition: background-image 0.3s ease;
}

.photo__btn:focus {
  outline: 0;
}

.contacts {
  padding: 0 1.5rem 1.2rem;
}

.projects {
  padding: 0 1.5rem;
}

.contacts__links {
  text-align: center;
  margin: 0.2rem 0 0;
}

.contacts__links a + a {
  margin-left: 1rem;
}

.projects__links {
  text-align: center;
  margin: 0.3rem 0 0;
}

.projects__links a + a {
  margin-left: 1rem;
}

.link {
  display: inline-block;
  margin-top: 5px;
  position: relative;
  transition: color 0.3s ease;
}

.link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background-color: #2c678d;
  transition: width 0.3s ease;
}

.link:hover {
  text-decoration: none;
}

.link:hover::after {
  width: 100%;
}

.link[href*="github"]:hover { color: #6e40c9; }
.link[href*="github"]:hover::after { background-color: #6e40c9; }

.link[href*="career.habr"]:hover { color: #629b2e; }
.link[href*="career.habr"]:hover::after { background-color: #629b2e; }

.link[href*="t.me"]:hover { color: #2aabee; }
.link[href*="t.me"]:hover::after { background-color: #2aabee; }

.link[href*="/cv/"]:hover { color: #2c678d; }
.link[href*="/cv/"]:hover::after { background-color: #2c678d; }

.link[href*="about"]:hover { color: #2c678d; }
.link[href*="about"]:hover::after { background-color: #2c678d; }

.link[href*="blog"]:hover { color: #e05d44; }
.link[href*="blog"]:hover::after { background-color: #e05d44; }

.link[href*="garden"]:hover { color: #4a9e4a; }
.link[href*="garden"]:hover::after { background-color: #4a9e4a; }

@media (max-width: 430px)  {
  .wnd {
    border-radius: 0;
  }
}

@media (max-width: 320px)  {
  .wnd {
    border-radius: 0;
    width: 100%;
  }

  .header {
    flex-flow: column;
  }

  .header__title {
    text-align: center;
  }

  .hidden-element {
    display: none;
  }

  .header__column {
    padding: 1rem 0 0 0;
  }

  .header__title {
    padding: 0;
  }
}
