@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;600&display=swap");
:root {
  --color-background: #e4e4e7;
  --color-primary: #18181b;
  --color-secondary: #facc15;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  font-family: "Outfit", Georgia, sans-serif;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}
.disabled-link {
  pointer-events: none;
  color: gray;
  text-decoration: none;
  cursor: default;
}

body {
  margin: 0 auto;
  font-family: "Outfit", Georgia, sans-serif;
  background-color: var(--color-background);

  line-height: 1.5;
  color: var(--color-primary);

  transition: all 0.3s ease-in-out;
}
.button {
  padding: 0.4em 1.3em;
  font-size: 1em;
  font-weight: 600;

  background-color: var(--color-secondary);

  border: 1px solid #eab308;
  border-radius: 6px;
  cursor: pointer;

  box-shadow: 1px 1px 3px #00000080;
}

.button:hover {
  background-color: #fde047;
}

.button:active {
  transform: scale(0.99, 0.99);
  box-shadow: none;
}

nav {
  padding: 0.5rem 2rem;
  background-color: var(--color-primary);

  position: fixed;
  top: 1%;
  right: 2%;
  left: 2%;
  color: var(--color-secondary);
  opacity: 0.95;

  display: flex;
  justify-content: space-between;

  border-radius: 8px;
  z-index: 100;
}
.nav-head {
  display: flex;
  justify-content: space-between;
}
.nav__logo-link {
  display: grid;
  place-items: center;
}
.nav__logo {
  height: 30px;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 1.5rem;

  transition: all 0.5s ease;
}

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

.nav__link:hover {
  text-decoration: underline;
}

.nav-button {
  display: none;
}

.article {
  margin: 3em auto;
  font-size: 1.3em;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 2em;
  align-items: center;
  justify-content: center;

  max-width: 900px;
  padding: 2em 1em;
  margin: 0 auto;
}

.section-title {
  font-size: 1.6em;
  text-decoration: underline var(--color-secondary);
  text-align: center;
}

.section-subtitle {
  margin: 1em auto;
  text-align: center;
  font-size: 1.3em;
}

figure {
  margin-bottom: 1em;
}

.aside-title {
  font-size: 1.17em;
  text-decoration: none;
}

.aside-subtitle {
  font-size: 1em;
  text-align: justify;
}

.typewriter-effect {
  display: block;
  font-family: monospace;
  white-space: nowrap;
  border-right: 4px solid var(--color-secondary);
  width: 24ch;

  animation: typing 2.5s steps(24), blink 0.5s infinite step-end alternate;
  overflow: hidden;
  /* animation-iteration-count: infinite; */
  /* animation-direction: alternate; */
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 25ch;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.perfil {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}

.aside-perfil {
  text-align: center;
  flex-basis: 30%;
  flex-grow: 1;

  color: var(--color-background);
  background-color: var(--color-primary);
  border-radius: 15px;

  padding: 1.5rem;
}

.aside-perfil__content {
  text-align: justify;
}

.aside-perfil__content i {
  font-size: 1.8rem;
}

.aside-perfil__img {
  width: 200px;
  height: 200px;
  border: 2px solid var(--color-secondary);
  border-radius: 50%;
  object-fit: cover;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.perfil__content {
  flex-basis: 60%;
  flex-grow: 1;

  padding: 1em;
}

.container-cvbutton {
  display: flex;
  padding-block: 1.5em;
  justify-content: center;
  color: #18181b;
}

.experience {
  display: flex;
  align-items: center;
  gap: 40px;
  width: 100%;

  div:first-child{
    flex-basis: 200px;
    max-width: max-content;
    font-size: 18px;
    font-style: italic;
    opacity: 0.8;
  }
  div:nth-child(2){
    display: flex;
    gap: 0.5em;
    flex-direction: column;
  }
}

.projects {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.container-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: min-content;
  grid-template-areas:
    "principal principal principal principal"
    "project-a project-a project-b project-b"
    "project-c project-c project-d project-d";
  gap: 20px;
}

.project-principal {
  grid-area: principal;
}
.project-a {
  grid-area: project-a;
}
.project-b {
  grid-area: project-b;
}
.project-c {
  grid-area: project-c;
}
.project-d {
  grid-area: project-d;
}

.project {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;

  padding: 1.5em;

  border: 2px solid var(--color-primary);
  border-width: 5px 0;
  border-radius: 20px;

  color: var(--color-primary);
  font-size: 0.7em;
}

.project-vertical {
  flex-direction: column;
  flex-wrap: nowrap;
}

.project__content {
  flex: 1 1 50%;
}

.project__link {
  flex: 1 1 45%;
  align-self: center;
  display: flex;
  position: relative;
  justify-content: center;
}

.project__img {
  max-width: 100%;
  height: 220px;
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
}

.project__link-text {
  flex: 1;
  position: absolute;
  top: 0;
  background-color: var(--color-secondary);
  height: 100%;
  width: 100%;
  opacity: 0;
  z-index: -1;
  border-radius: 10px;

  font-size: 24px;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: all 0.3s ease-in-out;
}

.project__link:hover .project__link-text {
  transform: scale(1.1);
  opacity: 0.82;
  z-index: 10;
}
.project__link:hover .project__img {
  transform: scale(1.1);
}

.project i {
  font-size: 2em;
}

.contact a {
  color: var(--color-primary);
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline var(--color-secondary);
}

footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;

  gap: 2em;

  background-color: var(--color-primary);
  padding: 0.5rem 2rem;
  color: var(--color-secondary);
}
footer p {
  grid-column: 1/3;
  margin: auto 0;
}

footer ul {
  grid-column: 3/4;

  display: flex;
  gap: 1rem;

  margin: auto;
}

footer a {
  color: var(--color-background);
  text-decoration: none;
  font-size: 1.5em;
}

.center {
  text-align: center;
  margin-top: 2em;
}

.text-justify {
  text-align: justify;
}

@media (max-width: 500px) {
  /* .project__description{
  display: none;
  transition: display 0.3s ease;
}

.project__content:active >.project__description{
  display: block;
} */

  .container-grid {
    grid-template-areas:
      "principal principal principal principal"
      "project-a project-a project-a project-a"
      "project-b project-b project-b project-b"
      "project-c project-c project-c project-c"
      "project-d project-d project-d project-d";
  }

  nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;

    height: 0vh;
    overflow: hidden;
    opacity: 0;

    transition: all 0.5s ease;
  }

  .nav-links.show {
    height: 150px;
    opacity: 1;
    margin-top: 1rem;
  }

  .nav-button {
    display: grid;
    place-content: center;
    border-radius: 10px;
    padding: 0.4em 1em;
  }
  .experience {
    flex-direction: column;
    gap: 0.5rem;
    div:first-child {
      flex-basis: auto;
    }
  }
}

.dark-mode {
  --color-background: #18181b;
  --color-primary: #e4e4e7;
  --color-secondary: #facc15;
}

.dark-mode-nav {
  background-color: var(--color-background);
}

.dark-mode-aside-perfil {
  background-color: var(--color-background);
  color: var(--color-primary);
}

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

.button-mode {
  background-color: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
}

.hidden {
  display: none;
}
