/* ============================================================
   RESPONSIVE - Media queries para todos los tamaños
   ============================================================ */

/* Tabletas y pantallas medianas: hasta 1024px */
@media (max-width: 1024px) {
    .hero__rejilla {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__foto-marco {
        order: -1;
    }

    .hero__acciones {
        justify-content: center;
    }

    .habilidades__rejilla {
        grid-template-columns: repeat(2, 1fr);
    }

    .sectores__rejilla {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacto-rejilla {
        grid-template-columns: 1fr;
    }
}

/* Tabletas pequeñas y móviles grandes: hasta 768px */
@media (max-width: 768px) {
    /* Navbar */
    .cabecera__nombre {
        display: none;
    }

    .cabecera__menu {
        display: none;
    }

    .cabecera__hamburguesa {
        display: flex;
    }

    /* Hero */
    .hero__contenedor {
        padding: 3rem 1rem;
    }

    .hero__foto {
        width: 240px;
        height: 240px;
    }

    .hero__foto-emoji {
        font-size: 5rem;
    }

    .hero__decoracion--arriba {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .hero__decoracion--abajo {
        width: 48px;
        height: 48px;
    }

    .hero__estadisticas {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__estadisticas > :last-child {
        grid-column: span 2;
    }

    /* Secciones */
    .seccion {
        padding: 4rem 0 3rem;
    }

    .seccion__cabecera {
        margin-bottom: 2.5rem;
    }

    /* Sobre mí */
    .acerca__rejilla {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .acerca__bloque-marca-interior {
        padding: 2rem;
    }

    .filosofia {
        padding: 2rem;
    }

    .filosofia__columnas {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Habilidades */
    .habilidades__rejilla {
        grid-template-columns: 1fr;
    }

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

    /* Portafolio */
    .proyecto__visual {
        height: 360px;
    }

    .proyecto__dispositivos {
        padding: 1.5rem;
        gap: 1rem;
    }

    .dispositivo--escritorio {
        width: 78%;
    }

    .dispositivo--movil {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 90px;
        border-width: 4px;
    }

    .dispositivo--tableta {
        width: 60%;
    }

    .proyecto__cta-flotante {
        top: 1rem;
        right: 1rem;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .proyecto__titulo {
        font-size: 1.5rem;
    }

    .proyecto__info {
        padding: 1.5rem;
    }

    /* Detalle de proyecto */
    .detalle__hero {
        padding: 4rem 1.25rem 3rem;
        min-height: 45vh;
    }

    .detalle__top {
        padding: 0.75rem 1rem;
    }

    .lightbox__top {
        left: 1rem;
        right: 1rem;
    }

    .detalle__tabs-lista {
        padding: 0.25rem 1rem;
    }

    .detalle__tab {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
    }

    .detalle__paneles {
        padding: 2rem 1.25rem 4rem;
    }

    .contenido-seccion {
        padding: 2rem;
    }

    .contenido-seccion__titulo {
        font-size: 1.5rem;
    }

    .galeria-proyecto {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .detalle-stats {
        grid-template-columns: 1fr;
    }

    /* Lightbox */
    .lightbox__area {
        padding: 4rem 1.5rem;
    }

    .lightbox__flecha--prev { left: 0.5rem; }
    .lightbox__flecha--siguiente { right: 0.5rem; }

    /* Sectores */
    .sectores__rejilla {
        grid-template-columns: 1fr;
    }

    /* CV */
    .cv {
        padding: 5rem 1rem 3rem;
    }

    .cv__bloque {
        padding: 1.5rem;
    }

    .cv__habilidades-rejilla {
        grid-template-columns: 1fr;
    }

    .cv__sectores-rejilla {
        grid-template-columns: 1fr;
    }

    .cv__fortalezas-rejilla {
        grid-template-columns: 1fr;
    }

    .cv__experiencia-cabecera {
        flex-direction: column;
    }

    /* Pie */
    .pie__rejilla {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .pie__marca {
        justify-content: center;
    }

    .pie__enlace {
        justify-content: center;
    }

    /* Modal */
    .modal__caja {
        padding: 1.5rem;
    }
    .etiqueta {
        align-self: center;
    }

    /* Contacto */
    .contacto-card {
        padding: 1.5rem;
    }
    .contacto-card__titulo {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    .contacto-item {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    .contacto-item__icono {
        width: 40px;
        height: 40px;
    }
    .disponibilidad {
        padding: 1.5rem;
    }
    .cualidad {
        padding: 1.5rem;
    }
}

/* Móviles pequeños: hasta 480px */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .contenedor,
    .contenedor-amplio {
        padding: 0 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.625rem; }
    h3 { font-size: 1.25rem; }

    .boton {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
        width: 100%;
    }

    .hero__acciones {
        flex-direction: column;
    }

    .hero__foto {
        width: 200px;
        height: 200px;
    }

    .hero__foto-emoji {
        font-size: 4rem;
    }

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

    .hero__estadisticas > :last-child {
        grid-column: span 1;
    }

    .tarjeta {
        padding: 1.25rem;
    }

    .cv__encabezado-interior {
        flex-direction: column;
        text-align: center;
    }

    .proyecto__estadisticas {
        gap: 0.75rem;
    }

    .proyecto__estadistica {
        padding: 0.5rem 0.75rem;
    }

    .proyecto__estadistica-emoji {
        font-size: 1.25rem;
    }

    .proyecto__estadistica-valor {
        font-size: 1rem;
    }

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

    /* Portafolio móvil pequeño */
    .proyecto__visual {
        height: 300px;
    }

    .dispositivo--movil {
        width: 72px;
        border-width: 3px;
        bottom: 1rem;
        right: 1rem;
    }

    .galeria-proyecto {
        grid-template-columns: 1fr;
    }

    .detalle__chips {
        gap: 0.5rem;
    }

    .detalle__chip {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }

    /* Contacto: aún más compacto en móvil pequeño */
    .contacto-card {
        padding: 1.25rem;
    }
    .contacto-card__titulo {
        font-size: 1.125rem;
    }
    .formulario {
        gap: 1rem;
    }
    .campo__entrada,
    .campo__area {
        padding: 0.75rem 0.875rem;
        font-size: 0.9375rem;
    }
    .disponibilidad,
    .cualidad {
        padding: 1.25rem;
    }
    .acerca__bloque-marca-interior {
        padding: 1.5rem;
    }
    .filosofia {
        padding: 1.5rem;
    }
}

/* Override universal: secciones con padding-top 7rem inline son demasiado en móvil */
@media (max-width: 768px) {
    section.seccion[style*="padding-top"] {
        padding-top: 5.5rem !important;
    }
}

@media (max-width: 480px) {
    section.seccion[style*="padding-top"] {
        padding-top: 4.75rem !important;
    }
}

/* Pantallas grandes: 1280px en adelante */
@media (min-width: 1280px) {
    .hero__foto {
        width: 360px;
        height: 360px;
    }
}

/* Móviles: aliviar efectos parallax/3D para mejor rendimiento */
@media (max-width: 768px) {
    .sticky-titulo {
        position: static;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .blob { opacity: 0.2; filter: blur(60px); }
    .blob--1 { width: 320px; height: 320px; }
    .blob--2 { width: 280px; height: 280px; }
    .blob--3 { width: 240px; height: 240px; }

    [data-tilt].tilt-activo { transform: none !important; }
    .par-flotar, .par-trasladar, .par-escalar, .par-rotar {
        transform: none !important;
    }
    .par-halo::before { display: none; }
}
