/* -------------------- Variables -------------------- */
:root {
  --primary-color: #7600bc;
  --secondary-color: lightgray;
  --text-color: #333;
  --shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* -------------------- Reset -------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Trebuchet MS", Arial, sans-serif;
}

html, body {
  overflow-x: hidden;
  background: #fdfdfd;
  color: var(--text-color);
  line-height: 1.6;
}

/* -------------------- Navigation Bar -------------------- */
#home {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.profile_name {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
}

.profile_name .contact_info {
  font-size: 14px;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.contact_info img {
  width: 20px;
}

.topdiv {
  display: flex;
  gap: 15px;
}

.topmenu {
  color: var(--secondary-color);
  font-size: 18px;
  text-decoration: none;
  transition: 0.3s;
}

.topmenu:hover {
  color: #fff;
  font-weight: bold;
  text-decoration: underline;
}

/* -------------------- About Me -------------------- */
.container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 50px 10%;
  gap: 40px;
  flex-wrap: wrap;
}

#about-me h1 {
  font-size: 48px;
  color: var(--primary-color);
}

#about-me p {
  font-size: 18px;
  color: #666;
  text-align: justify;
  max-width: 600px;
}

.profile_image {
  width: 260px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* -------------------- Skills -------------------- */
#skills {
  padding: 50px 10%;
}

h2 {
  text-align: center;
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 30px;
}

.all_skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.skill {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.skill img {
  height: 40px;
  margin-bottom: 10px;
}

.skill:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* -------------------- Projects -------------------- */
.projects {
  padding: 50px 10%;
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center; /* los centra en el contenedor */
}

.project-card {
  flex: 1 1 300px; /* ancho mínimo 300px, luego se ajustan */
  max-width: 350px; /* límite para que no se estiren demasiado */
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}


.project-card:hover {
  transform: scale(1.02);
}

.project-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 22px;
}

/* -------------------- Recommendations -------------------- */
#recommendations {
  background: #fafafa;
  padding: 50px 10%;
}

.all_recommendations {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.recommendation {
  background: #fff;
  padding: 20px;
  border-left: 6px solid var(--primary-color);
  border-radius: 8px;
  font-style: italic;
  width: 320px;
  min-height: 150px;
  box-shadow: var(--shadow);
}

/* -------------------- Contact Form -------------------- */
#contact {
  padding: 50px 10%;
}

fieldset {
  border: none;
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: auto;
}

legend {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

input, textarea {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
}

button {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #5a0091;
}

/* -------------------- Scroll to Top -------------------- */
.iconbutton {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  padding: 1px;
  border-radius: 50%;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.iconbutton svg {
  stroke: #fff;
}

/* -------------------- Popup -------------------- */
.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: center;
  z-index: 2000;
}

.popup.active {
  display: block;
}

.popup img {
  width: 60px;
  margin-bottom: 10px;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 900px) {
  #about-me h1 {
    font-size: 32px;
    text-align: center;
  }

  #about-me p {
    font-size: 16px;
    text-align: center;
  }

  .profile_image {
    width: 180px;
  }

  h2 {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .topdiv {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .profile_name {
    text-align: center;
    margin-bottom: 10px;
  }

  .recommendation {
    width: 100%;
  }
}

.btn-upwork {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background-color: #6fda44; /* Color oficial Upwork */
  color: white;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  font-size: 18px;
  transition: 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-upwork:hover {
  background-color: #57b331;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Botón Upwork */
.btn-upwork {
  background-color: #14a800; /* Verde Upwork */
  color: white;
  font-weight: bold;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

/* Ícono/emoji dentro del botón */
.btn-upwork::before {
  content: "💼";
  margin-right: 8px;
  font-size: 20px;
}

/* Hover effect */
.btn-upwork:hover {
  background-color: #0e7c00; /* Verde más oscuro */
  transform: translateY(-3px); /* efecto de "levantar" */
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
  text-decoration: none;
}

/* Botón flotante Upwork */
.floating-upwork {
  position: fixed;
  bottom: 90px;   /* un poco más arriba que el botón scroll */
  right: 20px;
  z-index: 1000;
}

.floating-upwork a {
  background-color: #14a800; /* Verde oficial Upwork */
  color: white;
  font-weight: bold;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  font-size: 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hover */
.floating-upwork a:hover {
  background-color: #0e7c00;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.linkedin-badge {
  margin-top: 1rem;
}

.btn-github {
  background-color: #181717; /* Color oficial de GitHub */
  color: white;
  font-weight: bold;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
  margin-top: 10px;
}

/* Hover effect */
.btn-github:hover {
  background-color: #333;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
  text-decoration: none;
}



@media (max-width: 600px) {
  .badge-base {
    width: 100% !important;
  }
}

.btn-whatsapp {
  background: #25D366;
  color: white;
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}
.btn-whatsapp:hover {
  background: #1ebe57;
  transform: translateY(-2px);
}

.floating-whatsapp {
  position: fixed;
  bottom: 160px; /* queda encima de Upwork */
  right: 20px;
  z-index: 1000;
}
