:root {
  --header-bg-color: #27496d;
  --header-text-color: #ffffff;
  --header-hover-color: #8b8c89;
  --header-avatar-size: 50px;
  --main-bg-skill-color: #6096ba;
  --main-text-color: #000000;
}

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

html,
body {
  width: 100%;
  overflow-x: hidden;
  /* 👈 Para que el scroll sea suave (opcional pero elegante) */
  scroll-behavior: smooth;
  /* 👈 Soluciona el problema de anclaje */
  scroll-padding-top: 100px;
}

/* ===== Header principal ===== */
.header {
  background-color: var(--header-bg-color);
  /*background-image: url('ajpcf_portafolio\assets\img\background\solid_2.png');
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: cover;*/
  color: var(--header-text-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  flex-wrap: wrap;
}

/* Perfil (imagen + nombre) */
.header__profile {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.header__avatar {
  width: var(--header-avatar-size);
  height: var(--header-avatar-size);
  object-fit: cover;
  border-radius: 50%;
}

.header__name {
  font-size: 1.1rem;
  font-weight: bold;
}

/* Navegación */
.header__nav {
  display: flex;
  align-items: center;
}

.header__nav-list {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.header__nav-item,
.header__nav-button {
  display: inline-block;
  color: var(--header-text-color);
  font-size: 1rem;
  text-decoration: none;
  background: none;
  border: none;
  transition: color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.header__nav-item:hover,
.header__nav-button:hover {
  color: var(--header-hover-color);
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    /* 👈 Alinea todo en el centro */
    padding: 15px 20px;
  }

  .header__profile {
    margin-bottom: 10px;
  }

  .header__nav {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .header__nav-list {
    flex-direction: row;
    /* 👈 Se mantiene en fila horizontal */
    flex-wrap: wrap;
    /* 👈 Si es necesario, los links bajarán de manera ordenada */
    justify-content: center;
    gap: 15px;
    /* 👈 Espacio entre los enlaces */
  }

  .header__nav-item,
  .header__nav-button {
    font-size: 1rem;
    padding: 5px 10px;
    width: auto;
    text-align: center;
  }
}

/* ===== Main ===== */

/* ===== About Me ===== */

.hero {
  padding: 80px 20px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* ====== Hero Section ====== */

.hero__container {
  display: flex;
  flex-wrap: wrap;
  /* Permite responsividad */
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

/* Imagen */
.hero__image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__img {
  width: 100%;
  max-width: 1000px;
  height: auto;
}

/* Contenido */
.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero__name {
  font-size: 3rem;
  font-weight: 700;
  color: var(--header-bg-color);
  margin-bottom: 20px;
}

.hero__description {
  font-size: 1.3rem;
  color: var(--main-text-color);
  line-height: 1.6;
  max-width: 500px;
}

@media (max-width: 768px) {
  .hero__container {
    flex-direction: column;
    text-align: center;
  }

  .hero__content {
    align-items: center;
    text-align: center;
  }

  .hero__name {
    font-size: 2.2rem;
  }

  .hero__description {
    font-size: 1.1rem;
  }
}

/* ======= SECCIÓN ABOUT ======= */

.about__container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  padding: 80px 20px;
}

/* Título principal */
.about__header {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

.about__title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--main-text-color);
}

/* Columna izquierda: descripción */
.about__description {
  flex: 1 1 50%;
}

.about__subtitle {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--main-text-color);
}

.about__text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--main-text-color);
  text-align: left;
}

/* Columna derecha: habilidades */
.about__skills-section {
  flex: 1 1 40%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.about__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.about__skill {
  background-color: #6096ba;
  color: var(--main-text-color);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Ilustración */
.about__illustration {
  margin-top: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
}

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

/* ======================= */
/* 📱 Responsive */
/* ======================= */

@media (max-width: 768px) {
  .about__container {
    flex-direction: column;
    align-items: center;
  }

  .about__description,
  .about__skills-section {
    flex: 1 1 100%;
    text-align: center;
  }

  .about__text {
    text-align: left;
  }

  .about__skills {
    justify-content: center;
  }

  .about__skills-section {
    align-items: center;
  }

  .about__subtitle {
    text-align: center;
  }
}

/* ======= SECCIÓN MY WORK ======= */

/* Contenedor principal */
.projects__container {
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* Introducción */
.projects__intro {
  text-align: center;
  margin-bottom: 40px;
}

.projects__title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--main-text-color);
}

.projects__description {
  font-size: 1.1rem;
  color: var(--main-text-color);
  margin-top: 10px;
}

.projects__link {
  color: #0000ff;
  text-decoration: underline;
  margin-left: 5px;
}

/* Lista de proyectos */
.projects__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

/* Tarjeta de proyecto */
.projects__item {
  border: 1px solid #d1d5db;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* 👈 clave */
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  min-height: 450px;
  /* 👈 control mínimo de altura */
}

.projects__item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Imagen */
.projects__image {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Al pasar el mouse: que suba la imagen */
.projects__item:hover .projects__image {
  transform: translateY(-15px);
}

/* Título del proyecto */
.projects__item-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--main-text-color);
  margin-top: 15px;
  text-align: center;
}

/* Descripción */
.projects__item-description {
  font-size: 0.95rem;
  color: var(--main-text-color);
  margin: 10px 0 20px 0;
  text-align: center;
}

/* Botón */
.projects__button {
  background-color: #6096ba;
  color: var(--main-text-color);
  border: none;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.projects__button:hover {
  background-color: #274c77;
  transform: translateY(-3px);
}

.projects__button a {
  color: inherit;
  text-decoration: none;
}

/* ===== Footer principal ===== */

.footer {
  background-color: var(--header-bg-color);
  color: var(--header-text-color);
  padding: 10px 10px 4px;
}

/* Contenedor interno */
.footer__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* Información de marca */
.footer__info {
  flex: 1 1 50%;
  text-align: left;
}

.footer__brand {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.footer__description {
  font-size: 1rem;
  color: var(--header-text-color);
  max-width: 350px;
}

/* Redes sociales */
.footer__social {
  flex: 1 1 50%;
  display: flex;
  justify-content: flex-end;
  /* 👈 ahora a la derecha */
  gap: 15px;
}

.footer__social-link {
  color: var(--header-text-color);
  font-size: 1.8rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer__social-link:hover {
  color: var(--header-hover-color);
  transform: scale(1.2);
}

/* Derechos reservados */
.footer__copy {
  margin-top: 30px;
  text-align: center;
  /* 👈 centrado */
  font-size: 0.9rem;
  color: var(--header-text-color);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .footer__container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__info,
  .footer__social {
    flex: 1 1 100%;
    justify-content: center;
    margin-bottom: 20px;
  }

  .footer__description {
    max-width: 100%;
  }
}

/* ====== Fin de estilos ====== */
