/* Variables */
:root {
  --color-bg: #f6f7f4;
  --color-text: #2f3e34;
  --color-muted: #6b7280;
  --color-primary: #7d94c5;
  --color-primary-dark: #315c82;
  --color-card: #ffffff;
  --color-border: #e5e7eb;

  --radius: 12px;
}

/*Base*/
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

section {
  padding: 4rem 10%;
  border-bottom: 1px solid var(--color-border);
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

/*Navbar horizontal*/
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(246, 247, 244, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
}

.menu {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}

.menu a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  position: relative;
  padding-bottom: 4px;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

.menu a:hover::after {
  width: 100%;
}

.menu a:hover {
  color: var(--color-primary);
}

.menu a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 6px;
}

/*header*/
header {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 140px; 
  overflow: hidden;
}

/* Fondo decorativo */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('img/fondo.jpg'); 
  background-size: cover;
  background-position: center;
  z-index: 0; 
  filter: brightness(0.7); 
  transition: background-image 0.3s ease;
}

.header-content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  gap: 3rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Texto del hero */
.header-text h1 {
  font-size: 3.2rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.header-text p {
  font-size: 1.4rem;
  color: #f0f0f0;
  max-width: 600px;
}

/* Foto de perfil */
.header-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 6px 25px rgba(0,0,0,0.5);
}

/*Tecnologías*/
.tech-icons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  list-style: none;
  padding: 0;
  margin-top: 2rem;
}

.tech-icons li {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 3rem;
  transition: transform 0.3s ease;
}

.tech-icons li .tech-icon {
  width: auto;
  height: 3rem;
  object-fit: contain;
}

.tech-icons li span {
  font-size: 0.8rem; 
  margin-top: 6px;
}

.tech-icons li:hover {
  transform: scale(1.1);
}

/*proyectos*/
#projects {
  background-color: #eef0eb;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.project-card {
  background-color: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.project-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-content h3 {
  color: var(--color-primary);
}

.project-content p {
  color: var(--color-muted);
}

.project-link {
  margin-top: auto;
  align-self: flex-start;
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
}

.project-link:hover {
  background-color: var(--color-primary-dark);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 0.5rem;
}

.project-tech span {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem; 
}

.project-tech .tech-icon {
  height: 1.5rem;  
  width: auto;     
  margin-bottom: 4px; 
}

.project-buttons {
  display: flex;       
  gap: 10px;           
  margin-top: 10px;    
}

.project-buttons .project-link {
  margin-top: 0;       
  align-self: auto;    
}


/*Contacto*/
.contact-container {
  text-align: center; 
  padding: 2rem 1rem;
}

#contact h2 {
  margin-bottom: 0.5rem; 
}

.contact-intro {
  font-size: 1.1rem;
  margin-top: 0;         
  margin-bottom: 1rem;   
  color: #333;
  text-align: center;
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.contact-btn {
  padding: 0.8rem 1.5rem;
  background-color: #6886a7;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
}

.contact-btn:hover {
  background-color: #1f4d7e;
  transform: translateY(-2px);
}

.footer {
  background-color: var(--color-primary);
  color: white;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

/*Responsive*/
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .header-content {
    text-align: center;
    flex-direction: column;
    gap: 2rem;
  }

  .header-avatar {
    width: 150px;
    height: 150px;
  }

  .header-text h1 {
    font-size: 2.5rem;
  }

  .header-text p {
    font-size: 1.2rem;
  }
}

/* Hamburguesa */
.hamburger {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Mobile navbar */
@media (max-width: 768px) {

  .nav-container {
    flex-direction: row;
  }

  .hamburger {
    display: block;
  }

  .menu {
    display: none;
    position: absolute;
    top: 70px;
    right: 10%;
    background: white;
    flex-direction: column;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }

  .menu.active {
    display: flex;
  }

  .project-buttons {
    flex-wrap: wrap;
    gap: 6px;
  }

  .project-buttons .project-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

