:root {
  --text: #EAD4FF;
  --background: #1d0f25;
  --text-accent: #9257c9;
  --text-light-accent: #d6aefc;
}

/* RESETS */
* {
  padding: 0;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Anton", sans-serif;
  color: var(--text);
  background-color: var(--background);
  overflow-x: hidden;
}

/* HEADER */
.hero-container {
  /* Aca pones el efecto del fondo de la seccion */
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  /* max-width: 1320px; */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* margin-top: 30px; */
  padding: 30px 40px;
}

.home-icon {
  height: 100px;
}

header nav ul {
  list-style: none;
  display: flex;
}

.nav-link {
  font-size: 32px;
  text-transform: uppercase;
  padding: 6px 16px;
  color: var(--text);
  text-decoration: none;
}

.menu-icon {
  display: none;
}


@media (max-width: 840px) {
  header {
    margin-top: 0;
  }

  .menu-icon {
    height: 40px;
    display: block;
  }

  .home-icon {
    height: 70px;
  }

  header nav {
    display: none;
  }

}

/* HERO */
.hero {
  position: relative;
  max-width: 1300px;
  width: 100%;
  font-size: 215px;
  letter-spacing: 2px;
  font-weight: 400;
  padding: 70px;
  line-height: 240px;
  text-shadow: -4px 4px 4px rgba(0, 0, 0, 0.349);
}

.hero-img-container {
  display: flex;
  justify-content: flex-end;
}

.hero-img {
  transform: translate(23%, -37%);
  height: 430px;
  z-index: 1;
}

.hero-img-container p {
  z-index: 2;
}

@media (max-width: 880px) {
  .hero {
    font-size: 190px;
  }
}

@media (max-width: 767px) {
  .hero-img {
    height: 300px;
  }

  .hero {
    font-size: 120px;
    line-height: 2;
    padding: 40px 20px;
    height: auto;
  }
}

@media (max-width: 575px) {
  .hero-img {
    height: 160px;
  }

  .hero {
    font-size: 78px;
    line-height: 2;
    padding: 40px 20px;
    height: 100%;
    display: inline;
  }
}

@media (max-width: 305px) {
  .hero {
    font-size: 57px;
  }
}

/* SOBRE MI */
.subtitulo {
  font-size: 100px;
}

@media (max-width: 1024px) {
  .subtitulo {
    font-size: 130px;
  }
}

@media (max-width: 880px) {
  .subtitulo {
    font-size: 120px;
  }
}

@media (max-width: 767px) {
  .subtitulo {
    font-size: 87px;
  }
}

@media (max-width: 590px) {
  .subtitulo {
    font-size: 57px;
  }
}

@media (max-width: 335px) {
  .subtitulo {
    font-size: 42px;
  }
}

.about-section {
  /* padding-top: 300px;
  padding-bottom: 200px; */
  padding-top: 20vw;
}

.about-container {
  position: relative;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: 1300px;
  width: 100%;
}

.about-container h2 {
  width: 50%;
  padding: 0 40px;
}

.about-container .texto {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 28px;
  width: 40%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-light-accent);
}

.about-section img {
  position: absolute;
  opacity: 0.05;
}

.pata-1 {
  left: 35%;
  top: -30%;
  rotate: 60deg;
  width: 15%;
}

.pata-2 {
  left: 10%;
  top: 80%;
  rotate: 90deg;
  width: 150px;
}

.pata-3 {
  left: 70%;
  top: 100%;
  width: 10%;
  rotate: -60deg;
}

@media (max-width: 850px) {
  .about-section {
    padding-top: 30vw;
  }

  .about-container {
    flex-direction: column;
  }

  .about-container h2 {
    width: auto;
  }

  .about-container .texto {
    /* font-size: 15px; */
    width: 80%;
    text-align: center;
    line-height: 1.4;
  }

  .pata-1 {
    top: -30%;
    margin-top: 15%;
    transform: scale(0.9);
  }

  .pata-2 {
    transform: scale(-80%);
    top: 40%;
  }
}

@media (max-width: 767px) {
  .about-container .texto {
    font-size: 22px;
  }
}

@media (max-width: 375px) {
  .about-container .texto {
    font-size: 16px;
  }
}

/* EDUCACION - Estilos Base */
.educacion-section {
  background-color: var(--background);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* padding: 90px 0; */
  gap: 50px;
  padding-top: 20vw;
}

.edu-container {
  color: var(--text-accent);
  max-width: 990px;
  width: 80%;
  display: flex;
}

.edu-fechas-container,
.edu-desc-container {
  flex: 1;
  display: flex;
}

.edu-fechas {
  margin-left: 30px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: space-between;
  padding: 25px 0;
  gap: 10px;
}

.edu-fechas p {
  font-size: 34px;
}

.linea-vert {
  width: 3px;
  flex: 1;
  background-color: var(--text-accent);
  opacity: 0.3;
  border-radius: 10px;
}

.edu-desc-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 35px;
}

.edu-desc-container h3 {
  font-size: 52px;
}

.edu-desc-container p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  color: var(--text-light-accent);
}

/* --- ANIMACIONES TIMELINE --- */
.edu-desc-container article, 
.edu-fechas p {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.edu-desc-container article.show, 
.edu-fechas p.show {
  opacity: 1;
  transform: translateX(0);
}

.edu-fechas p:nth-of-type(1),
.edu-desc-container article:nth-of-type(1) {
  transition-delay: 0.2s;
}

.edu-fechas p:nth-of-type(2),
.edu-desc-container article:nth-of-type(2) {
  transition-delay: 0.5s;
}

.edu-fechas p:nth-of-type(3),
.edu-desc-container article:nth-of-type(3) {
  transition-delay: 0.8s;
}

@media (max-width: 850px) {
  .educacion-section {
    padding-top: 30vw;
  }
}

@media (max-width: 767px) {
  .educacion-section {
    gap: 50px;
    /* padding-bottom: 0; */
  }

  .edu-fechas {
    margin-left: 0;
  }

  .edu-desc-container h3 {
    font-size: 26px;
    line-height: 1.2;
  }

  .edu-fechas p {
    font-size: 22px;
  }

  .edu-desc-container p {
    font-size: 16px;
  }
}

@media (max-width: 345px) {
  .educacion-section {
    gap: 50px;
    /* padding-bottom: 0; */
  }

  .edu-fechas {
    margin-left: 0;
  }

  .edu-desc-container h3 {
    font-size: 18px;
    line-height: 1.2;
  }

  .edu-fechas p {
    font-size: 16px;
  }

  .edu-desc-container p {
    font-size: 10px;
  }
}

/* CONOCIMIENTOS */
.conocimientos-section,
.conocimientos-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.conocimientos-section {
  gap: 50px;
  padding-top: 20vw;
}

.conocimientos-container {
  gap: 40px;
  max-width: 1200px;
  width: 90%;
}

.bar-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
}

.bar-container .desc {
  width: 100%;
  padding-top: 10px;
}

.bar-container h3 {
  margin-bottom: 15px;
  font-size: 26px;
  font-weight: bold;
}

.icono-img {
  height: 90px;
}

.progress-bar {
  background: lightgray;
  width: 100%;
  height: 22px;
  border-radius: 20px;
}

.progress-bar div {
  height: 22px;
  border-radius: 20px;
  width: 0%;
}

.progress-bar div span {
  font-size: 14px;
  font-weight: bold;
  height: 50px;
  width: 50px;
  border-radius: 50%;
  background: black;
  float: right;
  margin-top: -15px;
  margin-right: -20px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.visible .photoshop {
  background: #39abff;
  animation: photoshop 1s linear forwards;
  animation-delay: 0.2s;
}

.visible .illustrator {
  background: coral;
  animation: illustrator 1s linear forwards;
  animation-delay: 0.4s;
}

.visible .after-effects {
  background: purple;
  animation: after-effects 1s linear forwards;
  animation-delay: 0.6s;
}

.visible .figma {
  background: linear-gradient(
    90deg,
    rgba(255, 21, 45, 1) 0%,
    rgba(255, 106, 36, 1) 33%,
    rgba(148, 82, 255, 1) 70%,
    rgba(27, 187, 255, 1) 100%
  );
  animation: figma 1s linear forwards;
  animation-delay: 0.8s;
}

.photoshop span {
  border: 1px solid #39abff;
}

.illustrator span {
  border: 1px solid coral;
}

.after-effects span {
  border: 1px solid purple;
}

.figma span {
  border: 1px solid #1bbbff;
}

@keyframes photoshop {
  100% {
    width: 90%;
  }
}

@keyframes illustrator {
  100% {
    width: 80%;
  }
}

@keyframes after-effects {
  100% {
    width: 86%;
  }
}

@keyframes figma {
  100% {
    width: 70%;
  }
}

@media (max-width: 850px) {
  .conocimientos-section {
    padding-top: 30vw;
  }
}

@media (max-width: 767px) {
  .conocimientos-container {
    gap: 20px;
  }

  .icono-img {
    display: none;
  }

  .bar-container h3 {
    font-size: 20px;
  }

  .progress-bar {
    height: 15px;
  }

  .progress-bar div {
    height: 15px;
  }
}

/* TRABAJOS */
.trabajos-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* padding-top: 200px;
  padding-bottom: 100px; */
  gap: 50px;
  padding-top: 20vw;
  padding-bottom: 20vw;
}

.trabajos-grid {
  max-width: 1300px;
  width: 90%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5vw;
}

.trabajo-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 40px;
  aspect-ratio: 16 / 9;
}

.trabajo-card:nth-child(3) {
  grid-column: span 2;
  aspect-ratio: 21 / 9;
}

.trabajo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.4s ease;
}

.trabajo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.329);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.trabajo-overlay h3 {
  font-size: 48px;
  color: var(--purple-light);
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 2px;
}

@media (max-width: 850px) {
  .trabajos-section {
    padding-top: 30vw;
  }
}

/* Efecto hover en desktop */
@media (min-width: 801px) {
  .trabajo-card:hover .trabajo-overlay {
    opacity: 1;
  }

  .trabajo-card:hover img {
    filter: brightness(0.5);
  }
}

/* En mobile, siempre oscuro y visible */
@media (max-width: 800px) {
  .trabajos-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0 20px;
  }

  .trabajo-overlay {
    opacity: 1;
  }

  .trabajo-card:nth-child(3) {
    aspect-ratio: 16 / 9;
  }

  .trabajo-card img {
    filter: brightness(0.5);
  }

  .trabajo-overlay h3 {
    font-size: 28px;
  }
}

/* FOOTER */
footer {
  max-width: 1300px;
  width: 90%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-light-accent);
  font-size: 56px;
  margin: 0 auto;
  margin-bottom: 40px;
}

.redes-container {
  display: flex;
  gap: 60px;
}

@media (max-width: 768px) {
  footer {
    font-size: 42px;
  }

  .redes-container {
    gap: 20px;
  }
  .red-icon {
    height: 30px;
  }
}

@media (max-width: 590px) {
  footer {
    font-size: 20px;
  }

  .redes-container {
    gap: 20px;
  }
  .red-icon {
    height: 30px;
  }
}

/* MENU LATERAL */
#menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

#menu-toggle img {
  height: 40px;
  width: 40px;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 998;
}

#overlay.show {
  display: block;
}

#side-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background-color: var(--background);
  border-right: 2px solid var(--text-accent);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 80px;
  z-index: 999;
  transition: left 0.3s ease;
}

#side-menu.open {
  left: 0;
}

#side-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#side-menu li {
  border-bottom: 1px solid var(--text-accent);
}

#side-menu a {
  display: block;
  padding: 20px 30px;
  color: var(--text);
  text-decoration: none;
  font-size: 24px;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#side-menu a:hover {
  background-color: var(--text-accent);
  color: var(--background);
}

@media (max-width: 840px) {
  #menu-toggle {
    display: flex;
  }
}

/* LOADER */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(29, 15, 37, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-icon {
  width: 80px;
  height: 80px;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
