

/* Navbar */

.navbar {
  position: fixed;
  width: 100%;
  background: var(--nav-background);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.nav-container {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 1rem 0;
}
.box{
  margin-left: 4em; 
}

.nav-container .menu-toggle .nav-links {
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.menu-toggle {
  display: none !important; /* Oculto en escritorio */
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--primary); /* Azul en el menú móvil */
}
.lang-switcher{
  margin-left: auto;
}
.filler{
    flex-grow: 1;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted-foreground);
  transition: color 0.3s, background 0.3s;
}
.nav-links a.active,
.nav-links a:hover {
  color: var(--primary-foreground);
  background: var(--primary);
}
.btn-outline {
  border: 1px solid var(--primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--primary);
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

/*cabecera de la pagina */
header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  min-height: 100vh;

  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 1rem;
  
  background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url("./resources/backgrounds/hero-background-porfolio.png");
}
#learning {
  /* Aclaramos el gradiente para que encaje con el tema claro */
  background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url("./resources/backgrounds/books.jpg");
}
#bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -1; 
  transform: translate(-50%, -50%); 
  object-fit: cover; 
}

/* Hero */

.hero-content {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

.hero-content div p {
  font-size: 2rem;
}
.hero-title {
  font-size: 4rem;
  font-weight: bold;
  color: var(--primary);
}
.title {
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
}
.logo { 
  max-height: 4em;
  max-width: 6em;
  vertical-align: middle;
}

/* About */
.about-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5rem 1.5rem;
}
.about-section h2 {
  font-size: 2.5rem;
  color: var(--primary); /* Títulos en azul */
}
.highlight {
  font-style: italic;
}
.sub {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}
.about-section p {
  color: var(--foreground);
  gap: 2rem;
  align-items: center;
}

.link-text {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

section {
  min-height: 100vh;
}

/* Estado inicial oculto */
.oculto {
  opacity: 0;
  filter: blur(5px);
  transform: translateX(-40%);
}

/* Estado visible con transición */
.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Grid interno */
.skills-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  padding: 0 15%; 
}

.skill-card {
  display: grid;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: var(--radius);
  color: var(--foreground);
  text-align: center;
  opacity: 0;
  background: var(--card); /* Fondo ligero para las cards */
  border: 1px solid var(--border);
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}

.skill-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.inicial {
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: var(--delay);
}

.skill-card img {
  max-width: 5rem;
  max-height: 5rem;
}

.skill-card:hover {
  background: var(--accent); /* Azul clarito en hover */
  transform: scale(1.1);
  box-shadow: 0 10px 15px -3px rgba(43, 132, 212, 0.1);
  color: var(--primary);
}

/* Skills */
.skills-section {
  
  
  padding: 5rem 1.5rem;
  text-align: center;
}
.subtitle {
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  font-weight: bold;
}
.skills-section h2 {
  color: var(--foreground);
}
.more-link {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
}

/* Projects */
.projects-section {
  background: var(--background);
  padding: 5rem 1.5rem;
  text-align: center;
}
.section-header{
  font-size: 1rem;
}
.section-header h2 {
  color: var(--primary);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.project-card h3 {
  color: var(--primary);
}
.project-card .desc {
  color: var(--muted-foreground);
  margin: 0.5rem 0 1rem;
}
.tags span {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 0.3rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  margin: 0.2rem;
  font-weight: 500;
}
.buttons {
  margin-top: 1rem;
}
.ytlogo {
  font-size: 2rem;
  margin-left: 0.5rem;
  color: var(--ytlogo);
  vertical-align: middle;
}
.btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  cursor: pointer;
}
.btn-white {
  background: #ffffff;
  border: 1px solid var(--primary);
  color: var(--primary);
  transition: all 0.3s ease;
}
.btn-white:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}
.btn-gray {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  transition: all 0.3s ease;
}
.btn-gray:hover {
  background: var(--muted);
  color: var(--foreground);
  border-color: #ccc;
}
.btn-lg {
  background-color: var(--primary); /* Botón gigante en azul */
  color: var(--primary-foreground);
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
  font-weight: bold;
}
.btn-lg:hover {
  background: #1a5c9e; /* Azul más oscuro al hacer hover */
  transform: scale(1.05);
  color: #ffffff;
}

.chart{
  max-width: 100%;
  margin-top: 2rem;
  background: #ffffff; /* Fondo blanco para que el chart de github se lea bien */
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
}

/* Learning */
.cta-section{
  background-size: cover;
  padding: 5rem 2rem;
  text-align: center;
}
.learning-card{
  display: grid;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: var(--radius);
  background-color: var(--card);
  border: 1px solid var(--border);
  text-align: center;
  margin-bottom: 2rem;
}
.cta-title{
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
.cta-subtitle{
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.cta-section p{
  padding: 0.25rem;
  color: var(--muted-foreground);
}

/* Contact */
.contact-section {
  background: var(--background);
  padding: 5rem 1.5rem;
  text-align: center;
}
.contact-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
.contact-text {
  font-size: 1.2rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}
.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.contact-footer {
  margin-top: 2rem;
  color: var(--muted-foreground);
}

/* Footer */
.site-footer {
  min-height: var(--footer-height);
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 2rem 1.5rem;
}
.footer-flex {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.footer-logo {
  font-weight: bold;
  font-size: 1.25rem;
  color: var(--primary);
}
.footer-text {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}
section:last-of-type {
  min-height: calc(100vh - var(--footer-height));
}

/* --- Tablet y móviles --- */
@media (max-width: 768px) {
  body{
    color: var(--foreground);
  }
  .menu-toggle {
    display: block !important; 
  }
  .box{
    margin-left: 2em;
  }
  .nav-links {
    position: absolute;
    top: 60px;
    background-color: var(--background); /* Fondo blanco en móvil */
    color: var(--foreground);
    flex-direction: column;
    padding: 10px;
    gap: 5px;
    display: none; 
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  .nav-links.show {
    display: flex; 
  }

  .hero-content {
    flex-direction: column; 
    text-align: center; 
  }

  .hero-title {
    font-size: 2.5rem; 
  }

  .hero-content img {
    margin-top: 1rem; 
  }
}

/* --- Móviles pequeños --- */
@media (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }
  body{
    color: var(--foreground);
  }
  .nav-links {
    width: 100%;
    left: 0;
  }
}