
/* 1. Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  background-color: #E4E0E1;
  color: #493628;
}

a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
}

li {
  list-style: none;
}

/* 2. Navigation */
.nav {
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: center;
  /* padding: 20px; */
  background-color: #493628;
  margin: auto;
}

.nav ul {
  display: flex;
  text-align: center;
  align-items: center;
  gap: 20px;
}

.nav a {
  color: #E4E0E1;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: #D6C0B3;
  bottom: 0;
  left: 0;
  transition: width 0.3s ease-in-out;
}

.nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: #E4E0E1;
  margin-left: auto;
  padding-right: 15px;
}

.lang-selector {
    display: flex;
    gap: 0.5rem;
    margin-left: 5rem;
    margin-right: 1rem;
    align-items: center;
  }

  .lang-selector img {
    width: 28px;
    height: 28px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border 0.2s;
  }

  .lang-selector img:hover {
    border: 2px solid #836850;
  }

/* 3. Hero Section */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem;
  max-width: 60vw;
  margin: 0 auto;
}

.hero-left {
  flex: 1;
}

.hero-right {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #4b2e20;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-title span {
  color: #836850;
}

.hero-button {
  background-color: #3e2f24;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  display: inline-block;
  margin: 1rem 0;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.hero-button:hover {
  background-color: #5b4634;
}

.hero-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}

.hero-logos img {
  width: 32px;
  height: 32px;
  transition: transform 0.2s;
}

.hero-logos img:hover {
  transform: scale(1.1);
}

.hero-right img {
  width: 20vw;
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* 4. About Section */
.about_card {
  width: 100%;
  max-width: 60vw;
  margin: 20px auto;
  padding: 20px;
  background-color: #D6C0B3;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 5. Stack Section */
.stack-section {
  padding: 2rem;
  text-align: center;
}

.stack-section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #3e2f24;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.tech-item {
  position: relative;
  text-align: center;
}

.tech-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  transition: transform 0.2s ease-in-out;
}

.tech-item img:hover {
  transform: scale(1.1);
}

.tooltip {
  visibility: hidden;
  background-color: #3e2f24;
  color: #fff;
  text-align: center;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  position: absolute;
  z-index: 1;
  bottom: -1.8rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  pointer-events: none;
}

.tech-item:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* 6. Projects Grid */
.title {
  text-align: center;
  margin-bottom: 2rem;
  color: #493628;
  font-size: 2rem;
}

.filters {
  text-align: center;
  margin-bottom: 2rem;
}

.filters button {
  margin: 0.3rem;
  padding: 0.5rem 1.2rem;
  border: none;
  background: #493628;
  color: #E4E0E1;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

.filters button:hover {
  background: #836850;
}

.proyectos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}

.proyecto {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  width: 280px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

.proyecto:hover {
  transform: translateY(-5px);
}

.proyecto img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

.proyecto h3 {
  margin-top: 0.8rem;
  font-size: 1.2rem;
  color: #3e2f24;
}

.proyecto p {
  font-size: 0.9rem;
  color: #5c4430;
}

/* 7. Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  position: relative;
}

.close {

  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: #493628;
  z-index: 10;
}

.hidden {
  display: none;
}

.modal-content img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.modal-content h3 {
  font-size: 1.5rem;
  color: #3e2f24;
  margin-bottom: 0.5rem;
}

.modal-content p {
  font-size: 0.95rem;
  color: #493628;
  margin-bottom: 0.6rem;
}

.modal-content a {
  display: inline-block;
  background: #493628;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: bold;
  margin-top: 1rem;
  text-decoration: none;
}

.modal-content a:hover {
  background-color: #836850;
}

.slider-wrapper {
  position: relative;
  text-align: center;
}

#modal-img {
  max-width: 100%;
  max-height: 40vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  margin-bottom: 1rem;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(73, 54, 40, 0.8);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 4px;
  z-index: 10;
}

.slider-btn.left { left: 0.5rem; }
.slider-btn.right { right: 0.5rem; }

.slider-btn:hover {
  background-color: #836850;
}

/* 8. Carousel */
.carousel-section {
  padding: 3rem 1rem;
  background-color: #D6C0B3;
  text-align: center;
}

.carousel-section h2 {
  font-size: 2rem;
  color: #3e2f24;
  margin-bottom: 1.5rem;
}

.carousel-wrapper {
  position: relative;
  max-width: 95%;
  margin: 0 auto;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  gap: 1.5rem;
  scroll-snap-type: x mandatory;
  overflow-x: hidden;
  padding: 1rem 0;
}

.carousel-card {
  flex: 0 0 280px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  text-align: center;
  scroll-snap-align: start;
  transition: transform 0.2s;
}

.carousel-card:hover {
  transform: translateY(-4px);
}

.carousel-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.carousel-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #3e2f24;
}

.carousel-card p {
  font-size: 0.9rem;
  color: #5c4430;
  margin-top: 0.4rem;
}

.carousel-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  background: #493628;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 6px;
  z-index: 10;
  opacity: 0.9;
}

.carousel-btn.left { left: 0; }
.carousel-btn.right { right: 0; }

.carousel-btn:hover {
  background-color: #836850;
}

/* 9. About me */
/* .skills-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.skill-tab {
  padding: 0.6rem 1.2rem;
  background-color: #493628;
  color: #E4E0E1;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.3s;
}

.skill-tab:hover {
  background-color: #836850;
}

.skill-group.hidden {
  display: none;
}

.skill-group {
  text-align: center;
}

.skill-group ul {
  list-style: none;
  padding: 0;
}

.skill-group li {
  margin: 0.3rem 0;
  font-weight: 500;
} */


/* 10. Skills */

/* 11. Footer */
.main-footer {
  text-align: center;
  background-color: #493628;
  color: #E4E0E1;
  padding: 1.5rem;
  font-size: 0.9rem;
}

/* 12. Media Queries */
@media (max-width: 1024px) {
  .hero, .about_card {
    max-width: 85vw;
  }

  .stack {
    gap: 1rem;
  }

  .filters button {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }

  .modal-content {
    max-width: 85%;
  }
}

/* Contact Page */
#contact {
  font-weight: bold;
text-align: center; 
margin: 2rem auto;
}

/* Xp Page */

#cv h2 {
  margin-top: 3rem;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.cv-section {
  margin: 2rem auto;
  max-width: 800px;
  padding: 0 1rem;
}

.cv-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #493628;
  border-left: 4px solid #836850;
  padding-left: 0.5rem;
}

.cv-card {
  background: #f8f8f8;
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.cv-card li {
  list-style: disc;
}

.cv-card:hover {
  transform: translateY(-5px);
}

.cv-card h4 {
  margin: 0 0 0.3rem;
  color: #222;
  font-size: 1.1rem;
}

.cv-card span {
  font-weight: normal;
  font-size: 0.9rem;
  color: #555;
}

.cv-card ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
}

/* About me Page */

#perfil {
  padding: 2rem 1rem;
  max-width: 900px;
  margin: auto;
}

#perfil h2,
#perfil h3 {
  text-align: center;
  color: #493628;
  margin-bottom: 1rem;
}

.profile-description {
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 2rem;
  text-align: justify;
  padding: 0 1rem;
}

.soft-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  padding: 0 1rem;
}

.soft-skills-grid span {
  background-color: #493628;
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.soft-skills-grid span:hover {
  transform: translateY(-5px);
}

.language-list {
  list-style: none;
  padding: 0 1rem;
  max-width: 600px;
  margin: auto;
  text-align: center;
}

.language-list li {
  background: #f7f7f7;
  padding: 0.6rem 1rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  color: #333;
  font-weight: 500;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}


@media (max-width: 768px) {
  
  .nav {
    justify-content: space-between;
    /* padding: 0 1rem; */
  }

  .nav-toggle {
    display: block;
  }

  .nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #493628;
    padding: 1rem 0;
    gap: 1rem;
    z-index: 99;
  }

  .nav ul.show {
    display: flex;
  }

  .nav ul li {
    text-align: center;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-left, .hero-right {
    justify-content: center;
  }

  .hero img {
    width: 100%;
    max-width: 300px;
    margin-top: 1rem;
  }

  .about_card {
    max-width: 85vw;
    padding: 1rem;
  }

  .tech-item img {
    width: 60px;
    height: 60px;
  }

  .tooltip {
    font-size: 0.75rem;
    bottom: -1.5rem;
  }

  .carousel-card,
  .proyecto {
    flex: 0 0 90%;
    width: 90%;
  }
  
  /* Proyectos */

  .filters {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
  }

  .filters button {
    width: 100%;
    max-width: 300px;
  }

  .proyectos {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .proyecto {
    width: 80%;
  }

  .modal-content {
    padding: 1rem;
  }

    .modal-content {
    width: 95%;
    padding: 1rem;
  }

  .close {
    top: 0.8rem;
    right: 0.8rem;
    font-size: 1.8rem;
  }

  .slider-btn {
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
  }

  #modal-img {
    max-height: 35vh;
  }

  .cv-section {
    padding: 0 1rem;
  }

   #cv h2 {
    font-size: 2rem;
    margin-top: 1rem;
  }

  .cv-card {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .cv-card h4 {
    font-size: 1rem;
  }

  .cv-card ul {
    padding-left: 1rem;
  }
}

@media (max-width: 480px) {
  .proyecto h3 {
    font-size: 1rem;
  }

  .proyecto p {
    font-size: 0.85rem;
  }

  .filters button {
    font-size: 0.85rem;
  }

  .modal-content a {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  #cv h2 {
    font-size: 2rem;
    margin-top: 1rem;
  }

  .cv-card {
    padding: 0.8rem;
  }

  .cv-card ul li {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .cv-card p,
  .cv-card span {
    font-size: 0.85rem;
  }
}