/*=============== FONTS (self-hosted under /vendor/fonts) ===============*/
@import url("../../vendor/fonts/poppins.css");

/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  /*
      Accent: soft purple (primary links, borders, badges)
  */

  --hue: 262;
  --sat: 48%;
  --lig: 58%;
  --first-color: hsl(var(--hue), var(--sat), var(--lig));
  --first-color-alt: hsl(var(--hue), var(--sat), 52%);
  --title-color: hsl(var(--hue), 14%, 16%);
  --text-color: hsl(var(--hue), 12%, 42%);
  --text-color-light: hsl(var(--hue), 10%, 72%);
  --text-color-lighten: hsl(var(--hue), 18%, 93%);
  --body-color: hsl(var(--hue), 28%, 99%);
  --container-color: #fff;

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;
  --smaller-font-size: 0.75rem;
}

@media screen and (min-width: 968px) {
  :root {
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}

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

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background-color 0.25s ease, color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

h1,
h2,
h3 {
  color: var(--title-color);
  font-weight: 600;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/*=============== THEME ===============*/
.change-theme {
  position: absolute;
  top: 1.5rem;
  right: 0;
  margin: 0;
  padding: 0.25rem;
  border: none;
  background: none;
  font: inherit;
  line-height: 1;
  color: var(--title-color);
  cursor: pointer;
  transition: color 0.25s ease;
}

.change-theme:hover,
.change-theme:focus-visible {
  color: var(--first-color);
}

.change-theme:focus-visible {
  outline: 2px solid var(--first-color);
  outline-offset: 3px;
}

.change-theme__icon {
  font-size: 1.25rem;
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*========== Variables Dark theme ==========*/
body.dark-theme {
  --title-color: hsl(var(--hue), 12%, 95%);
  --text-color: hsl(var(--hue), 12%, 75%);
  --body-color: hsl(var(--hue), 40%, 8%);
  --container-color: hsl(var(--hue), 24%, 12%);
}

/*========== 
    Color changes in some parts of 
    the website, in light theme
==========*/
.dark-theme .button__gray {
  background-color: var(--container-color);
}

.dark-theme .button__gray:hover {
  background-color: hsl(var(--hue), 24%, 16%);
}

.dark-theme .filters__content {
  background-color: var(--container-color);
}

.dark-theme::-webkit-scrollbar {
  background-color: hsl(var(--hue), 8%, 16%);
}

.dark-theme::-webkit-scrollbar-thumb {
  background-color: hsl(var(--hue), 8%, 24%);
}

.dark-theme::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--hue), 8%, 32%);
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 968px;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

/*=============== PROFILE ===============*/
.profile {
  position: relative;
  padding-top: 3.5rem;
}

.profile__container {
  row-gap: 2rem;
}

.profile__data {
  display: grid;
  text-align: center;
}

.profile__perfil {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
}

.profile__perfil img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.profile__border {
  border: 3.5px solid var(--first-color);
  justify-self: center;
  width: 115px;
  height: 115px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
}

.profile__name {
  font-size: var(--h2-font-size);
}

.profile__profession {
  font-size: var(--smaller-font-size);
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.profile__tel {
  color: inherit;
  text-decoration: none;
}

.profile__tel:hover {
  color: var(--first-color);
}

.profile__summary {
  font-size: var(--smaller-font-size);
  font-weight: 400;
  color: var(--text-color);
  line-height: 1.65;
  max-width: 36rem;
  margin: -0.25rem auto 1rem;
  justify-self: center;
}

.profile__social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.75rem;
  row-gap: 0.5rem;
}

.profile__social > li {
  display: contents;
}

.profile__social-link {
  font-size: 1.5rem;
  color: var(--title-color);
  transition: 0.3s;
}

.profile__social-link:hover {
  color: var(--first-color);
}

.profile__info {
  grid-template-columns: repeat(3, max-content);
  justify-content: center;
  column-gap: 2.5rem;
}

.profile__info-group {
  text-align: center;
}

.profile__info-number {
  font-size: var(--normal-font-size);
  margin-bottom: 0.25rem;
}

.profile__info-description {
  font-size: var(--smaller-font-size);
  font-weight: 500;
}

.profile__buttons,
.profile__buttons-small {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile__buttons {
  column-gap: 1rem;
}

.profile__buttons-small {
  column-gap: 0.25rem;
}

/*=============== BUTTONS ===============*/
.button {
  display: inline-flex;
  align-items: center;
  column-gap: 0.5rem;
  background-color: var(--first-color);
  color: #fff;
  padding: 1.15rem 1.5rem;
  border-radius: 0.5rem;
  transition: 0.3s;
  box-shadow: 0 8px 24px hsla(var(--hue), var(--sat), var(--lig), 0.25);
}

.button i {
  font-size: 1.25rem;
}

.button:hover {
  background-color: var(--first-color-alt);
}

.button__small {
  padding: 0.75rem;
  box-shadow: none;
}

.button__gray {
  background-color: var(--text-color-lighten);
  color: var(--title-color);
}

.button__gray:hover {
  background-color: var(--text-color-light);
}

/*=============== FILTERS TABS===============*/
.filters__content {
  margin: 2rem 0 2.5rem;
  background-color: var(--text-color-lighten);
  padding: 0.375rem;
  border-radius: 0.75rem;
  display: flex;
  justify-content: space-between;
  column-gap: 0.5rem;
}

.filters__button {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  padding: 1rem;
  color: var(--title-color);
  font-size: var(--small-font-size);
  font-family: var(--body-font);
  font-weight: 500;
  border-radius: 0.75rem;
  cursor: pointer;
  background-color: transparent;
  transition: 0.3s;
}

.filters__button:hover {
  background-color: var(--body-color);
}

.filters__button:focus-visible {
  outline: 2px solid var(--first-color);
  outline-offset: 2px;
}

/*=============== PROJECTS ===============*/
.projects__card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
}

.projects__card img {
  width: 100%;
  height: 100%;
}

.projects__modal {
  position: absolute;
  width: 100%;
  height: 100%;
  bottom: -100%;
  left: 0;
  background: linear-gradient(
    180deg,
    hsla(var(--hue), 24%, 40%, 0.3) 0%,
    hsla(var(--hue), 24%, 4%, 1) 95%
  );
  display: grid;
  align-items: flex-end;
  padding: 1.5rem 1.25rem;
  transition: 0.3s;
}

.projects__subtitle,
.projects__title {
  color: #fff;
}

.projects__subtitle {
  font-size: var(--smaller-font-size);
}

.projects__title {
  font-size: var(--h3-font-size);
  margin-bottom: 0.75rem;
}

.projects__button {
  padding: 0.5rem;
}

.projects__card:hover .projects__modal {
  bottom: 0;
}

/*=============== SKILLS ===============*/

.skills__content {
  row-gap: 1.25rem;
  column-gap: 1.25rem;
  justify-items: stretch;
  max-width: 100%;
  width: 100%;
  margin-inline: auto;
}

@media screen and (min-width: 640px) {
  .skills__content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (min-width: 992px) {
  .skills__content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.skills__card {
  padding: 1.15rem 1.35rem 1.25rem;
  background-color: var(--container-color);
  border-radius: 0.75rem;
  border: 1px solid hsla(var(--hue), 12%, 88%, 0.85);
  border-left: 3px solid var(--first-color);
  box-shadow: 0 4px 20px hsla(var(--hue), 30%, 50%, 0.06);
}

.dark-theme .skills__card {
  border-color: hsl(var(--hue), 24%, 20%);
  box-shadow: 0 4px 24px hsla(0, 0%, 0%, 0.2);
}

.skills__card-title {
  margin: 0 0 0.85rem;
  padding-bottom: 0.65rem;
  font-size: var(--h3-font-size);
  font-weight: 600;
  text-align: left;
  color: var(--title-color);
  border-bottom: 1px solid var(--text-color-lighten);
}

.skills__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skills__item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.75rem;
  padding: 0.4rem 0.35rem 0.4rem 1rem;
  border-radius: 0.35rem;
}

.skills__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background-color: var(--first-color);
  opacity: 0.85;
}

.skills__name {
  min-width: 0;
  font-size: var(--small-font-size);
  font-weight: 600;
  color: var(--title-color);
  line-height: 1.35;
  text-align: start;
}

.skills__level {
  justify-self: end;
  flex-shrink: 0;
  font-size: var(--smaller-font-size);
  font-weight: 500;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  line-height: 1.2;
  background-color: var(--text-color-lighten);
  color: var(--text-color);
}

.dark-theme .skills__level {
  background-color: hsl(var(--hue), 24%, 16%);
  color: var(--text-color);
}

.skills__level--advanced {
  color: var(--first-color);
  font-weight: 600;
  background-color: hsla(var(--hue), var(--sat), var(--lig), 0.12);
}

.dark-theme .skills__level--advanced {
  background-color: hsla(var(--hue), var(--sat), var(--lig), 0.18);
  color: hsl(var(--hue), var(--sat), 72%);
}

.skills__level--intermediate {
  color: var(--text-color);
}

.skills__level--beginner {
  color: var(--text-color-light);
  font-weight: 500;
}

/* Hide and show projects & skills */
.filters [data-content] {
  display: none;
}

.filters__active[data-content] {
  display: grid;
}

/* Activate button filter */
.filter-tab-active {
  background-color: var(--body-color);
}

@media screen and (max-width: 420px) {
  .filters__button {
    padding: 0.65rem 0.35rem;
    font-size: var(--smaller-font-size);
  }
}

/*=============== EXPERIENCE ===============*/

.experience__content {
  row-gap: 1.25rem;
  justify-items: stretch;
  max-width: 42rem;
  width: 100%;
  margin-inline: auto;
}

.experience__card {
  padding: 1.25rem 1.35rem;
  background-color: var(--container-color);
  border-radius: 0.75rem;
  border: 1px solid hsla(var(--hue), 12%, 88%, 0.85);
  border-left: 3px solid var(--first-color);
  box-shadow: 0 4px 20px hsla(var(--hue), 30%, 50%, 0.06);
}

.dark-theme .experience__card {
  border-color: hsl(var(--hue), 24%, 20%);
  box-shadow: 0 4px 24px hsla(0, 0%, 0%, 0.2);
}

.experience__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--text-color-lighten);
}

.experience__company {
  margin: 0;
  font-size: var(--h3-font-size);
  font-weight: 600;
  line-height: 1.25;
  color: var(--title-color);
}

@media screen and (min-width: 576px) {
  .experience__company {
    font-size: var(--h2-font-size);
  }
}

.experience__company-link:focus-visible {
  outline: 2px solid var(--first-color);
  outline-offset: 3px;
  border-radius: 0.2rem;
}

.experience__period {
  margin: 0;
  font-size: var(--smaller-font-size);
  font-weight: 500;
  color: var(--text-color-light);
}

@media screen and (min-width: 400px) {
  .experience__period {
    white-space: nowrap;
  }
}

.experience__role {
  margin: 0 0 0.75rem;
  font-size: var(--normal-font-size);
  font-weight: 600;
  color: var(--first-color);
}

.experience__role-meta {
  margin: -0.35rem 0 0.65rem;
  font-size: var(--smaller-font-size);
  font-weight: 500;
  color: var(--text-color-light);
  line-height: 1.45;
}

.experience__cert-block + .experience__cert-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--text-color-lighten);
}

.dark-theme .experience__cert-block + .experience__cert-block {
  border-top-color: hsl(var(--hue), 24%, 20%);
}

.experience__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.experience__list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: var(--small-font-size);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-color);
}

.experience__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background-color: var(--first-color);
  opacity: 0.85;
}

/*=============== FOOTER ===============*/
.footer__copy {
  display: block;
  margin: 2.5rem 0 2rem;
  text-align: center;
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
}

.links {
  text-decoration: none;
  color: inherit;
}

.links:hover {
  color: var(--first-color);
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: 0.6rem;
  border-radius: 0.5rem;
  background-color: hsl(var(--hue), 8%, 66%);
}

::-webkit-scrollbar-thumb {
  background-color: hsl(var(--hue), 8%, 54%);
  border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--hue), 8%, 44%);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
  .container {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .profile__info {
    column-gap: 1.5rem;
  }
  .profile__buttons {
    flex-direction: column;
    row-gap: 1rem;
  }
}

/* For medium devices */
@media screen and (min-width: 576px) {
  .projects__content {
    grid-template-columns: 332px;
    justify-content: center;
  }

  .filters__content {
    width: min(100%, 42rem);
    margin: 3rem auto;
  }
}

@media screen and (min-width: 776px) {
  .projects__content {
    grid-template-columns: repeat(4, 332px);
  }

  .experience__content {
    row-gap: 1.5rem;
  }
}

/* For large devices */
@media screen and (min-width: 992px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }

  .change-theme {
    top: 2.5rem;
    right: 2.5rem;
  }

  .profile {
    padding-top: 4rem;
  }
  .profile__border {
    width: 135px;
    height: 135px;
    margin-bottom: 1rem;
  }
  .profile__perfil {
    width: 120px;
    height: 120px;
  }

  .profile__profession {
    margin-bottom: 1.5rem;
  }
  .profile__info {
    column-gap: 3rem;
  }
  .profile__info-description {
    font-size: var(--small-font-size);
  }
  .profile__buttons {
    column-gap: 2rem;
  }

  .projects__content {
    gap: 3rem 3rem;
  }
  .projects__modal {
    padding: 1.5rem;
  }

  .skills__card-title {
    font-size: var(--normal-font-size);
    margin-bottom: 1rem;
  }

  .footer__copy {
    margin: 4.5rem 0 2.5rem;
  }
}
