/* ══════════════════════════════════
   RESPONSIVE STYLES
   ══════════════════════════════════ */

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  nav {
    padding: 1rem 1.5rem;
    overflow: visible;
  }

  .hamburger {
    display: flex;
    position: relative;
    z-index: 10;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0d0d0d;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 10;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    padding: 0.5rem 0 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    font-size: 1.15rem;
    color: var(--text);
    padding: 1.1rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.12em;
    transition:
      background 0.15s,
      color 0.15s;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a:hover,
  .nav-links a.active-link {
    background: var(--surface);
    color: var(--accent);
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 7rem 2rem 4rem;
    text-align: center;
  }

  .hero-photo-wrap {
    order: -1;
  }

  .hero-photo-frame {
    width: 200px;
    height: 240px;
  }

  .hero-tag {
    justify-content: center;
  }

  .hero-btns {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-desc {
    margin: 0 auto 2.5rem;
    max-width: 520px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  section,
  #portfolio-asignaturas {
    padding: 4rem 2rem;
  }
}

@media (max-width: 640px) {
  nav {
    padding: 1rem 1.25rem;
  }

  .hero-photo-frame {
    width: 160px;
    height: 190px;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 3.5rem) !important;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-btns .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
    justify-content: center;
  }

  section,
  #portfolio-asignaturas {
    padding: 3.5rem 1.25rem;
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
  }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .contact-wrap {
    padding: 2rem 1.25rem;
  }

  .contact-wrap h2 {
    font-size: clamp(1.4rem, 6.5vw, 2rem);
    overflow-wrap: break-word;
  }

  footer {
    padding: 1.5rem 1.25rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .portfolio-intro {
    flex-direction: column;
    text-align: center;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .projects-grid,
  .asignaturas-grid {
    grid-template-columns: 1fr !important;
  }
}