/* Fonts */

@font-face {
  font-display: swap;
  font-family: WorkSans;
  font-weight: 200;
  src: local("WorkSans ExtraLight"), local("WorkSans-ExtraLight"), url(fonts/WorkSans-ExtraLight.woff2);
}

@font-face {
  font-display: swap;
  font-family: WorkSans;
  font-weight: 300;
  src: local("WorkSans Light"), local("WorkSans-Light"), url(fonts/WorkSans-Light.woff2);
}

@font-face {
  font-display: swap;
  font-family: WorkSans;
  font-weight: 400;
  src: local("WorkSans Regular"), local("WorkSans-Regular"), url(fonts/WorkSans-Regular.woff2);
}

@font-face {
  font-display: swap;
  font-family: WorkSans;
  font-weight: 800;
  src: local("WorkSans ExtraBold"), local("WorkSans-ExtraBold"), url(fonts/WorkSans-ExtraBold.woff2);
}

@font-face {
  font-display: swap;
  font-family: WorkSans;
  font-weight: 900;
  src: local("WorkSans Black"), local("WorkSans-Black"), url(fonts/WorkSans-Black.woff2);
}

@font-face {
  font-display: swap;
  font-family: NerdFont;
  src: local("NerdFont Regular"), url(fonts/SymbolsNerdFont-Regular.ttf);
}


:root {
  --azure: #eafdf8;
  --purple: #1f0322;
  --purple-light: #7d6b91;
  --azul: #2e88f0;
  --white: #f5f8fa; 
  --yellow: #e2c044;
}


/* Common */

html {
  background: var(--white);
  color: var(--purple);
  font-family: WorkSans, sans-serif;
  font-size: 14pt;
}

body {
  margin: 0;

  > article {
    margin: auto;
    padding-top: 5rem;
    width: 70vw;

    @media (min-width: 1001px) {
      width: 80vw;
    }

    @media (min-width: 1301px) {
      width: 70vw;
    }

    @media (min-width: 1551px) {
      width: 60vw;
    }
  }
}


::before {
  font-family: NerdFont;
  padding-right: 0.5em;
}

a {
  color: var(--azul);
  text-decoration: none;
}

#about, #Experiences, #contact {
  a {
    text-decoration: underline var(--yellow);
    transition: all 0.7s;

    &:hover {
      text-decoration-color: var(--azul);
    }
  }
}

p {
  line-height: 1.4;
}

li {
  list-style: none;
}

ul {
  padding: 0;
}


/* Nav */

nav {
  background: var(--white);
  border-bottom: 1px solid var(--purple-light);
  display: flex;
  align-items: center;
  height: 4.1rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 2;

  h1 {
    flex-grow: 1;
    font-weight: 300;
    font-size: 1.5rem; 
    margin-left: 1rem;

    a {
      color: var(--purple);
    }
  }

  ul {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0 1.5rem 0;
    margin: 0;

    li {
      font-size: 0.9rem; 
      padding: 0;
      margin: 0;
    }

    a {
      display: inline-block;
      padding-bottom: 0.2em;

      &:hover {
        border-bottom: 1px solid var(--azul);
      }
    }
  }

  @media (max-width: 1000px) {
    ul {
      display: none;
    }
  }
}


/* About */

#about {
  img {
    border-radius: 0.8rem;
    height: 330px;
    width: 330px;
    object-fit: cover;
  }

  @media (min-width: 1001px) {
    article {
      display: flex;
      gap: 2em;
      align-items: center;
    }

    #pictures {
      flex-shrink: 0;
    }

    #links {
      position: static;
      margin-top: 1em;

      li {
        display: inline-block;
      }
    }
  }

  @media (max-width: 1000px) {
    article {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    #bio {
      text-align: center;
    }

        #pictures {
      flex-shrink: 0;
    }

    #links {
      text-align: center;

      li {
        display: inline-block;
      }
    }
  }
}


/* Projects, Experiences, Education */
#experiences, #projects, #education {
  clear: both;

  h3 {
    margin-bottom: 0.75rem;
  }

  section {
    border: 1px solid var(--purple-light);
    box-shadow: 3px 3px var(--purple-light);
    padding: 0.7em 2em 1.25em 2em;
    position: relative;
    transition: all 0.7s;

    &:has(a:hover) {
      border-color: var(--azul);
      box-shadow: 3px 3px var(--azul);
    }

    &::before {
      color: var(--purple-light);
      font-family: inherit;
      font-size: 0.7em;
      position: absolute;
      right: 1em;
    }
  }

  .info, .tags {
    color: var(--purple-light);
    font-size: 0.7em;
    margin: 0;

    li {
      display: inline-block;
    }
  }

  .tags {
    li {
      border: 1px solid var(--purple-light);
      border-radius: 0.7em;
      padding: 0.2em 0.35em;
      margin-right: 0.5em;
      margin-bottom: 0.8em; 
    }
  }

  .info {
    bottom: 0.5em;
    position: absolute;
    right: 1em;
  }
}


/* Experiences, education */

#experiences, #education {
  section {
    margin: 1em 0;
  }
}


/* Projects */

#projects {
  a {
    color: var(--purple);
  }

  article {
    @media (min-width: 1201px) {
      display: grid;
      gap: 1em;
      grid-template-columns: repeat(3, 1fr);
    }
    @media (max-width: 1201px) {
      section {
        margin: 1em 0;
      }
    }
  }

  .description {
    margin-top: 0.75rem;
  }
}


/* Competences */

#competences {
  margin-top: 3rem;
}

#competences p {
  color: var(--purple-light);
  max-width: 900px;
}

#competences div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em 1em;
}

#competences .badge {
      color: var(--purple-light);
    font-size: 0.7em;
  border: 1px solid var(--purple-light);
  border-radius: 0.7em;
  padding: 0.2em 0.6em;
  font-size: 0.9em;
}

/* Contact */

#contact {
  li {
    display: inline-block;

    &:not(:first-of-type) {
      margin-left: 2em;
    }

  }
}


/* Footer */

footer {
  border-top: 1px solid var(--purple-light);
  font-size: 0.7em;
  margin-top: 2rem;
  text-align: center;
}


/* Icons */

.bluesky::before {
  content: "\e28e";
}

.github::before {
  content: "\f09b";
}

.instagram::before {
  content: "\f16d";
}

.linkedin::before {
  content: "\f0e1";
}

.twitter::before {
  content: "\f099";
}

.mail::before {
  content: "\f003";
}