header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  max-width: 320px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  z-index: 999;
  overflow: hidden;
  border: 0;
  margin: 0;
  padding: 0;
  transition: top 0.3s ease, opacity 0.3s ease;
}

header .tabs-container {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
}

header.hide {
  top: -100px !important;
  opacity: 0;
}

header .tabs-container input[type="radio"] {
  display: none;
  box-sizing: border-box;
}

header .tab {
  width: 80px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 15px;
  color: #555555;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 5px;
  box-sizing: border-box;
  white-space: nowrap;
}

header .tab:hover {
  color: #00b4aa;
  background-color: #f0fcfb;
}

header #header-home:checked~.tab[for="header-home"],
header #header-blog:checked~.tab[for="header-blog"],
header #header-friends:checked~.tab[for="header-friends"],
header #header-projects:checked~.tab[for="header-projects"] {
  color: #00b4aa;
  font-weight: 600;
}

header .glider {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: #00b4aa;
  border-radius: 3px 3px 0 0;
  transition: left 0.3s ease, width 0.3s ease;
  z-index: 0;
  width: 80px;
  box-sizing: border-box;
}

header #header-home:checked~.glider {
  left: 0px;
  width: 80px;
}

header #header-blog:checked~.glider {
  left: 80px;
  width: 80px;
}

header #header-friends:checked~.glider {
  left: 160px;
  width: 80px;
}

header #header-projects:checked~.glider {
  left: 240px;
  width: 80px;
}

@media (max-width: 768px) {
  header {
    width: calc(70px * 4);
    max-width: 280px;
    top: 10px;
    border-radius: 8px;
  }

  header .tabs-container {
    height: 36px;
  }

  header .tab {
    width: 70px;
    font-size: 14px;
    padding: 0 3px;
  }

  header .glider {
    width: 70px;
  }

  header #header-home:checked~.glider {
    left: 0px;
    width: 70px;
  }

  header #header-blog:checked~.glider {
    left: 70px;
    width: 70px;
  }

  header #header-friends:checked~.glider {
    left: 140px;
    width: 70px;
  }

  header #header-projects:checked~.glider {
    left: 210px;
    width: 70px;
  }
}

body {
  padding-top: 60px;
  background-color: #f9fafb;
  margin: 0;
  box-sizing: border-box;
}

section {
  display: none;
}

.active {
  display: inline-block;
}