* {
  padding: 0;
  margin: 0;
  font-family: "Roboto", sans-serif;
  box-sizing: border-box;
}

:root {
  --main-color: #2020d8;
  --secondrary-color: tomato;
  --main-text-color: #fff;
  --border-color: #999;
  --bio-bg-color: #1c2734;
  --bio-border-color: #293544;
  --about-bg-color: #131c27;
}

p {
  line-height: 1.5;
  font-size: 18px;
  font-weight: 300;
}

/* General */
.highlight {
  font-weight: 400;
  color: var(--secondrary-color);
}

#container {
  display: grid;
  grid-template-areas:
    "aside main"
    ". footer";
  grid-template-rows: 1fr 40px;
  grid-template-columns: 300px 1fr;
  position: relative;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  color: var(--main-text-color);
}

main {
  overflow-x: hidden;
  grid-area: main;
  padding-bottom: 2rem;
  background-color: var(--about-bg-color);
}

#bio-container {
  grid-area: aside;
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  z-index: 9999;
  height: 100vh;
  background-color: var(--bio-bg-color);
  text-align: center;
  padding: 30px 12px;
  border-right: 5px solid var(--bio-border-color);
}

section {
  background-color: var(--about-bg-color);
  padding: 20px 0;
  margin: 0 40px;
  border-top: 1px solid var(--border-color);

  animation-timeline: view(block 95% 5%);

  animation-name: ani;
  animation-duration: 0.5s;
  /* animation-fill-mode: both; */
  animation-timing-function: linear;
  animation-direction: alternate;
}

@keyframes ani {
  0% {
    opacity: 0.25;
  }

  100% {
    transform: translateX(0px);
    opacity: 1;
  }
}

/* Bio container */
#bio-container h2 {
  margin-bottom: 25px;
}

#bio-container p {
  margin-bottom: 20px;
}

#bio-container #welcome-text {
  font-weight: bold;
}

#bio-image {
  object-fit: cover;
  width: 175px;
  margin-bottom: 25px;
}

#social-container {
  display: flex;
  justify-content: center;
  list-style: none;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 25px;
  padding-bottom: 25px;
}

#social-container li {
  flex: 1 1 0;
  max-width: 50px;
}

#social-container li a {
  color: white;
  font-size: 30px;
}

#email-container {
  display: flex;
  justify-content: center;
}

#email-container ion-icon,
#email-container a {
  flex: 1 1 0;
}

#email-container a {
  color: var(--main-text-color);
  text-decoration: none;
  max-width: 225px;
}

#email-container ion-icon {
  color: var(--main-color);
  font-size: 20px;
  margin-right: 5px;
  max-width: 20px;
}

/* about container */
.name {
  font-size: 42px;
  margin-bottom: 8px;
}

#title {
  font-size: 24px;
  margin-bottom: 15px;
  font-weight: bold;
}

.description {
  max-width: 75%;
  margin-bottom: 10px;
}

.btn {
  font-weight: bold;
  font-size: 16px;
  color: var(--main-text-color);
  background-color: var(--main-color);
  border: 2px solid var(--main-color);
  border-radius: 5px;
  text-decoration: none;
  transition: 0.5s;
  margin: 10px 0;
  padding: 12px 10px;
  width: 100%;
  text-align: center;
  display: flex;
}

.btn ion-icon,
.btn span {
  flex: 1 1 0;
}

.btn ion-icon {
  font-size: 20px;
  max-width: 20px;
}

.btn:hover {
  background-color: transparent;
}

#btn-validate {
  width: 240px;
  margin: 1rem auto;
}
.title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.title-main {
  padding-top: 20px;
  margin-bottom: 20px;
  font-size: 32px;
}

#skills-container {
  display: flex;
  flex-wrap: wrap;
  margin-top: 25px;
  overflow: auto;
  gap: 1rem;
}

.skills-box {
  flex: 1 1 33%;
  max-width: 33%;
  margin-bottom: 40px;
}

.skills-box > div {
  display: flex;
  flex-wrap: nowrap;
}

.skills-title {
  font-size: 24px;
  margin-bottom: 25px;
  font-weight: bold;
  padding-left: 10px;
  border-left: 5px solid var(--main-color);
}

.skills-box i {
  font-size: 45px;
  margin-right: 10px;
}

/* portifolio */
.container-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1rem 0;
}

.card-project {
  width: 100%;
  max-width: 360px;
  padding: 10px;
  border: 1px solid #ffffff54;
  border-radius: 5px;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 4rem;
  transition: 0.3s all ease-in-out;
  cursor: pointer;
}

.card-project img {
  width: 100%;
  height: 300px;
  margin-bottom: 1rem;
  object-fit: cover;
}

.desc-project h3 {
  font-size: 1.5rem;
}

.desc-project p {
  font-size: 1.125rem;
  margin: 1rem 0 1.5rem;
  text-align: justify;
}

.card-project a.btn {
  font-size: 1.25rem;
  font-weight: 500;
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  width: calc(100% - 20px);
  display: flex;
  justify-content: center;
  text-transform: uppercase;
}

/* certifcados */
.container-certificates {
  position: relative;
  max-width: 680px;
  height: 100%;
}

.container-certificates span {
  position: absolute;
  top: calc(50% - 1.5rem);
  background: var(--about-bg-color);
  color: #ffffff;
  font-size: 2rem;
  padding: 0.5rem;
  border-radius: 50%;
  height: 2.5rem;
  width: 2.5rem;
  display: flex;
  right: -1rem;
  justify-content: center;
  align-items: center;
  border: 1px solid wheat;
  z-index: 99;
}

.container-certificates span svg {
  width: 20px;
  height: 20px;
  font-weight: 600;
}
.container-certificates span#prev {
  left: -1rem;
}

.container-certificates img {
  width: 100%;
  max-width: 640px;
}

.alternate-prev {
  animation-name: next;
  animation-duration: 0.5s;
  animation-direction: reverse;
}

.alternate-next {
  animation-name: next;
  animation-duration: 0.5s;
}

.control-certificates {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

.control-certificates p {
  font-size: 18px;
  font-weight: 600;
}

@keyframes next {
  0% {
    opacity: 1;
    transform: translateX(0%);
  }
  40% {
    opacity: 0.6;
  }
  49.9% {
    opacity: 0;
    transform: translate(-100%);
  }
  50.1% {
    opacity: 0;
    transform: translate(100%);
  }
  90% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
    transform: translateX(0%);
  }
}

.btn-projects {
  margin-top: 2rem;
  width: 150px;
}

footer {
  background: var(--bio-bg-color);
  text-align: center;
  padding: 0.5rem;
  height: 40px;
  grid-area: footer;
  position: sticky;
  bottom: 0;
  z-index: 999;
  border-top: 5px solid var(--bio-border-color);
}

footer a {
  color: inherit;
}

@media (max-width: 960px) {
  section {
    padding-top: 15px;
    padding-bottom: 10px;
    margin: 0 20px;
  }

  .skills-box {
    flex: 1 1 50%;
    max-width: calc(50% - 0.5rem);
  }
}

@media (max-width: 800px) {
  #container {
    grid-template-columns: 240px 1fr;
  }

  .description {
    max-width: 100%;
  }

  #skills-container {
    display: block;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .card-project img {
    height: 300px;
  }

  .skills-box {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  #container {
    display: block;
  }
  .card-project img {
    height: 300px;
  }
  #bio-container {
    position: relative;
    width: 100vw;
    height: auto;
    border-right: none;
    border-bottom: 5px solid var(--bio-border-color);
  }
}

/* Mobile */
@media (max-width: 600px) {
  p {
    font-size: 16px;
  }
  .title {
    font-size: 18px;
  }

  #bio-container h2 {
    display: none;
  }

  #bio-container p {
    max-width: 75%;
    margin: 10px auto;
  }

  section {
    text-align: center;
  }

  section .description {
    margin: 10px auto;
    max-width: 100%;
  }

  .btn-projects {
    margin: 0;
    margin-top: 20px;
    width: 150px;
  }

  .skills-box {
    flex: 1 1 100%;
    max-width: 100%;
    margin-bottom: 40px;
    text-align: left;
  }

  .skills-box i {
    font-size: 60px;
  }
  .control-certificates {
    gap: 0;
  }
}

i[data-title] {
  position: relative;
}

i[data-title]:hover::after,
i[data-title]:focus::after {
  content: attr(data-title);
  position: absolute;
  left: 0;
  bottom: -30px;
  width: auto;
  white-space: nowrap;

  background-color: #f1f1f1;
  color: #242424;
  border-radius: 3px;
  box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.4);
  font-size: 14px;
  padding: 3px 5px;
  font-family: "Roboto", sans-serif;
}

aside,
footer {
  background-image: url(../img/test3.webp);
  background-position-x: left;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

.back-aside {
  background: rgb(16 23 31 / 70%);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}
