/* Responsive, hover y movimiento reducido */
/* 6. Media queries ----------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-4px); border-color: #484F58; }
  .card:hover .card__shot { transform: scale(1.03); }
  .chip:hover { border-color: #6E7681; color: var(--text); }
  .btn--ghost:hover { border-color: #6E7681; }
}

@media (min-width: 900px) {
  .card--feat { grid-column: span 2; }
}

/* Móvil y tablet pequeña */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .container, .nav { padding-left: 20px; padding-right: 20px; }

  /* Menú hamburguesa */
  .nav { flex-wrap: nowrap; position: relative; }
  .nav__toggle { display: flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    padding: 8px 20px 20px;
    background: rgba(12, 15, 20, 0.97);
    border-bottom: 1px solid var(--border-faint);
    font-size: 17px;
  }
  .nav__links.is-open { display: flex; }
  .nav__links .navlink {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 4px;
    border-bottom: 1px solid var(--border-faint);
  }
  .nav__links .btn--sm {
    justify-content: center;
    min-height: 48px;
    margin: 16px 0 0;
  }

  /* Hero */
  .hero { gap: 40px; padding-top: 48px; padding-bottom: 64px; }
  .hero__glow { width: 420px; height: 420px; left: -160px; }
  .hero__lead { font-size: 19px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { justify-content: center; }
  .hero__photo { flex-basis: 100%; max-width: 100%; }
  .hero__photo-caption { left: 12px; bottom: 12px; }

  /* Secciones */
  .stats { padding-bottom: 64px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stats__value { font-size: 32px; }
  .about { padding-top: 72px; padding-bottom: 72px; }
  .stack, .projects { padding-top: 72px; padding-bottom: 72px; gap: 32px; }
  .stack__group-title { flex-basis: 100%; }
  .grid { grid-template-columns: 1fr; }
  .education { gap: 32px; padding-top: 72px; padding-bottom: 72px; }
  .contact { padding: 80px 20px 88px; }
  .contact .btn { width: 100%; justify-content: center; box-sizing: border-box; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .photo, .card-in { animation: fade 200ms ease forwards; transform: none; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .reveal { animation: none !important; }
  .cursor { animation: none; }
  .card:hover, .card:hover .card__shot, .btn:active, .filter:active { transform: none !important; }
}
