
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-text {
    order: 1;
  }

  .hero-photo {
    order: 2;
    margin: 0 auto;
  }

  .contacts {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero {
    gap: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .contacts a {
    font-size: 0.9rem;
  }
}


@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .project-media {
    height: 140px;
  }

  .project {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .project-card {
    padding: 1.2rem;
  }

  .project-desc {
    font-size: 0.9rem;
  }

  .project-stack {
    font-size: 0.8rem;
  }
}

/* =========================
   CERTIFICATES – RESPONSIVE
   ========================= */

@media (max-width: 768px) {
  .certificate {
    min-width: 260px;
    height: 180px;
  }

  .certificates {
    gap: 1rem;
    padding: 0.8rem 0.4rem;
  }

  .certificates-fade {
    mask-image: linear-gradient(
      to right,
      transparent,
      black 12%,
      black 88%,
      transparent
    );

    -webkit-mask-image: linear-gradient(
      to right,
      transparent,
      black 12%,
      black 88%,
      transparent
    );
  }
}

@media (max-width: 480px) {
  .certificate {
    min-width: 220px;
    height: 150px;
  }

  .certificates::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 768px) {
  .languages {
    gap: 1rem;
    justify-content: center;
  }

  .language-box {
    min-width: 100%;
    height: auto;
    padding: 1.2rem;
  }

  .language-box h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .level {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .language-box {
    padding: 1rem;
  }

  .level strong {
    min-width: 60px;
  }
}


@media (max-width: 768px) {
  #skills {
    margin-top: 3rem;
  }

  .skills-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .skills-filters {
    gap: 0.5rem;
    margin-bottom: 1.8rem;
  }

  .skills-filters button {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .skills-cards {
    gap: 1.2rem;
  }

  .skill-card {
    padding: 1.2rem;
  }

  .skill-card h4 {
    font-size: 1rem;
  }

  .skill-card p {
    font-size: 0.88rem;
  }
}

@media (max-width: 480px) {
  .skills-cards {
    grid-template-columns: 1fr;
  }

  .skills-filters {
    justify-content: center;
  }

  .soft-skills {
    gap: 0.45rem;
  }

  .soft-skills span {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }
}


@media (max-width: 768px) {
  .topnav-links {
    display: none;
  }

  .topnav {
    padding: 0.6rem 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 2rem 1rem;
  }

  section {
    margin-bottom: 2.5rem;
  }
}
@media (max-width: 480px) {
  .skills-cards {
    grid-template-columns: 1fr;
  }
}
/* Animación inicial */
@keyframes draw-text {
  to {
    stroke-dashoffset: 0;
    fill: var(--primary-dark);
  }
}

/* Rebobinado */
@keyframes rewind-text {
  to {
    stroke-dashoffset: 80;
    fill: var(--blue-white)
  }
}

@media (max-width: 768px) {
  .name-svg {
    width: 100%;
  }

  .name-svg text {
    font-size: 56px;
  }
}

@keyframes modalIn {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}