body {
    margin: 0;
    background-color: #f8f9fa;
    color: #1a1a1a;
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}


/* =========================================
   HERO PRINCIPAL
========================================= */

.hero-section {
    min-height: calc(100svh - 80px);
    display: flex;
    align-items: center;
    padding: 30px 5%;
    overflow: hidden;
    background-color: #f8f9fa;
}

.hero-layout {
    width: 100%;
    max-width: 1500px;
    min-height: calc(100svh - 140px);
    margin: 0 auto;

    display: grid;
    grid-template-columns:
        minmax(500px, 0.9fr)
        minmax(540px, 1.1fr);

    align-items: center;
    gap: clamp(30px, 4vw, 70px);
}


/* =========================================
   COLUMNA DE TEXTO
========================================= */

.hero-copy {
    position: relative;
    z-index: 5;
    max-width: 660px;
}

.hero-eyebrow {
    margin: 0 0 24px;
    color: #6c757d;

    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-name {
    margin: 0 0 18px;

    color: #171717;
    font-size: clamp(4rem, 5vw, 5.4rem);
    font-weight: 700;
    letter-spacing: -0.065em;
    line-height: 0.96;
    white-space: nowrap;
}

.hero-role {
    display: flex;
    flex-direction: column;
    margin: 0 0 26px;

    color: #717981;
    font-size: clamp(2rem, 2.75vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.045em;
    line-height: 1.07;
}

.hero-description {
    max-width: 650px;
    margin: 0 0 30px;

    color: #69727b;
    font-size: clamp(1rem, 1.15vw, 1.12rem);
    line-height: 1.65;
}


/* =========================================
   BOTONES
========================================= */

.hero-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hero-button {
    min-height: 52px;
    padding: 14px 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border: 1px solid transparent;
    border-radius: 999px;

    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;

    transition:
        transform 0.3s ease,
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.hero-button svg {
    width: 17px;
    height: 17px;
    transition: transform 0.3s ease;
}

.hero-button:hover {
    transform: translateY(-3px);
}

.hero-button:hover svg {
    transform: translateX(4px);
}

.primary-button {
    color: #ffffff;
    background-color: #171717;
    box-shadow: 0 12px 28px rgba(23, 23, 23, 0.15);
}

.primary-button:hover {
    background-color: #343a40;
    box-shadow: 0 16px 32px rgba(23, 23, 23, 0.2);
}

.secondary-button {
    color: #171717;
    border-color: #ced4da;
    background-color: rgba(255, 255, 255, 0.75);
}

.secondary-button:hover {
    border-color: #6c757d;
    background-color: #ffffff;
}


/* =========================================
   COLUMNA DE LA FOTOGRAFÍA
========================================= */

.hero-portrait {
    position: relative;
    width: 100%;
    height: clamp(540px, 69vh, 690px);
    isolation: isolate;
}

.portrait-circle {
    position: absolute;
    z-index: -3;

    width: min(78%, 560px);
    aspect-ratio: 1;

    top: 51%;
    left: 50%;

    border-radius: 50%;
    background-color: #e2e4e6;

    transform: translate(-50%, -50%);
}

.portrait-grid {
    position: absolute;
    z-index: -2;

    inset: 8% 3% 5% 3%;
    opacity: 0.38;

    background-image:
        linear-gradient(#cfd2d5 1px, transparent 1px),
        linear-gradient(90deg, #cfd2d5 1px, transparent 1px);

    background-size: 42px 42px;

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            #000 15%,
            #000 82%,
            transparent 100%
        );

    mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            #000 15%,
            #000 82%,
            transparent 100%
        );
}

.portrait-block {
    position: absolute;
    z-index: -1;

    width: 18%;
    height: 43%;

    top: 7%;
    right: 9%;

    background-color: rgba(177, 178, 181, 0.25);
}

.portrait-image {
    position: absolute;
    z-index: 1;

    width: 133%;
    max-width: none;
    height: auto;

    left: 48%;
    bottom: -16%;

    transform: translateX(-50%);

    filter: grayscale(1) contrast(0.96);
    mix-blend-mode: multiply;

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            #000 0%,
            #000 75%,
            transparent 96%
        );

    mask-image:
        linear-gradient(
            to bottom,
            #000 0%,
            #000 75%,
            transparent 96%
        );
}


/* =========================================
   TARJETA DE IDEAS, DESARROLLO E IMPACTO
========================================= */

.code-note {
    position: absolute;
    z-index: 4;

    top: 15%;
    right: 2%;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 13px;

    color: #343a40;
    border: 1px solid rgba(206, 212, 218, 0.9);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.92);

    box-shadow: 0 12px 30px rgba(26, 26, 26, 0.08);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    font-family: "JetBrains Mono", monospace;
    font-size: 0.58rem;
    line-height: 1;
    white-space: nowrap;
}

.code-note svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.portrait-keywords {
    position: absolute;
    z-index: 4;

    left: 2%;
    bottom: 9%;

    margin: 0;

    color: #90959a;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.62rem;
    letter-spacing: 0.13em;
    line-height: 1.75;
    text-transform: uppercase;
}


/* =========================================
   CRUCES DECORATIVAS
========================================= */

.tech-cross {
    position: absolute;
    z-index: 3;

    width: 26px;
    height: 26px;
    opacity: 0.7;
}

.tech-cross::before,
.tech-cross::after {
    content: "";
    position: absolute;
    background-color: #9da2a7;
}

.tech-cross::before {
    width: 1px;
    height: 100%;
    left: 50%;
}

.tech-cross::after {
    width: 100%;
    height: 1px;
    top: 50%;
}

.cross-one {
    top: 20%;
    left: 3%;
}

.cross-two {
    right: 2%;
    bottom: 20%;
}


/* =========================================
   MONITORES MEDIANOS
   1400px A 1599px
========================================= */

@media (min-width: 1400px) and (max-width: 1599px) {
    .hero-layout {
        max-width: 1380px;
    }

    .code-note {
        top: 11%;
        right: 2%;
        padding: 10px 13px;
        font-size: 0.57rem;
    }
}


/* =========================================
   LAPTOPS GRANDES
   1200px A 1399px
========================================= */

@media (min-width: 1200px) and (max-width: 1399px) {
    .hero-section {
        padding: 24px 5.5%;
    }

    .hero-layout {
        max-width: 1240px;
        min-height: calc(100svh - 128px);

        grid-template-columns:
            minmax(480px, 0.94fr)
            minmax(440px, 1.06fr);

        gap: 25px;
    }

    .hero-copy {
        max-width: 580px;
    }

    .hero-eyebrow {
        margin-bottom: 20px;
        font-size: 0.66rem;
    }

    .hero-name {
        margin-bottom: 14px;
        font-size: clamp(3.7rem, 5.2vw, 4.6rem);
    }

    .hero-role {
        margin-bottom: 22px;
        font-size: clamp(1.85rem, 3.15vw, 2.65rem);
    }

    .hero-description {
        max-width: 570px;
        margin-bottom: 25px;
        font-size: 1rem;
        line-height: 1.55;
    }

    .hero-portrait {
        height: min(620px, calc(100svh - 130px));
        min-height: 520px;
    }

    .portrait-circle {
        width: min(82%, 500px);
    }

    .portrait-image {
        width: 142%;
        bottom: -20%;
    }

    .code-note {
        top: 5%;
        right: 1%;

        padding: 8px 11px;
        gap: 6px;

        border-radius: 8px;
        font-size: 0.52rem;
        transform: none;
    }

    .code-note svg {
        width: 13px;
        height: 13px;
    }
}


/* =========================================
   LAPTOPS PEQUEÑAS
   1024px A 1199px
========================================= */

@media (min-width: 1024px) and (max-width: 1199px) {
    .hero-section {
        padding: 24px 4%;
    }

    .hero-layout {
        max-width: 1080px;
        min-height: calc(100svh - 128px);

        grid-template-columns:
            minmax(440px, 0.95fr)
            minmax(390px, 1.05fr);

        gap: 18px;
    }

    .hero-copy {
        max-width: 520px;
    }

    .hero-eyebrow {
        margin-bottom: 18px;
        font-size: 0.63rem;
    }

    .hero-name {
        margin-bottom: 14px;
        font-size: clamp(3.3rem, 5.5vw, 4.1rem);
    }

    .hero-role {
        margin-bottom: 20px;
        font-size: clamp(1.7rem, 3.2vw, 2.3rem);
    }

    .hero-description {
        max-width: 510px;
        margin-bottom: 24px;
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .hero-portrait {
        height: min(580px, calc(100svh - 130px));
        min-height: 500px;
    }

    .portrait-circle {
        width: min(84%, 450px);
    }

    .portrait-image {
        width: 145%;
        bottom: -19%;
    }

    .code-note {
        top: 4%;
        right: 1%;

        padding: 7px 9px;
        gap: 5px;

        border-radius: 7px;
        font-size: 0.48rem;
        transform: none;
    }

    .code-note svg {
        width: 12px;
        height: 12px;
    }
}


/* =========================================
   TABLETS
========================================= */

@media (max-width: 1023px) {
    .hero-section {
        min-height: auto;
        padding: 80px 24px 40px;
    }

    .hero-layout {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hero-copy {
        max-width: 720px;
        margin: 0 auto;
        text-align: center;
    }

    .hero-name {
        font-size: clamp(3.2rem, 9vw, 5rem);
        white-space: normal;
    }

    .hero-role {
        font-size: clamp(1.75rem, 5vw, 2.7rem);
    }

    .hero-description {
        margin-right: auto;
        margin-left: auto;
    }

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

    .hero-portrait {
        width: min(100%, 650px);
        height: 570px;
        margin: 0 auto;
    }

    .portrait-image {
        width: 125%;
        bottom: -15%;
    }

    .code-note {
        top: 8%;
        right: 2%;

        padding: 9px 11px;
        gap: 6px;

        font-size: 0.53rem;
        transform: none;
    }

    .code-note svg {
        width: 14px;
        height: 14px;
    }
}


/* =========================================
   MÓVILES
========================================= */

@media (max-width: 600px) {
    .hero-section {
        padding: 65px 20px 25px;
    }

    .hero-eyebrow {
        margin-bottom: 18px;
        font-size: 0.62rem;
    }

    .hero-name {
        font-size: clamp(3rem, 15vw, 4rem);
    }

    .hero-role {
        font-size: clamp(1.55rem, 8vw, 2.15rem);
    }

    .hero-description {
        font-size: 0.98rem;
        line-height: 1.6;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-button {
        width: 100%;
    }

    .hero-portrait {
        height: 420px;
    }

    .portrait-image {
        width: 135%;
        bottom: -11%;
    }

    .portrait-circle {
        width: 90%;
    }

    .code-note {
        display: none;
    }

    .portrait-keywords {
        left: 1%;
        bottom: 3%;
    }
}


/* =========================================
   ANIMACIONES AL HACER SCROLL & INTERACTIVIDAD
========================================= */

/* Non-JS Fallback: Ocultar únicamente si JS está activo (.js-ready) */
body.js-ready .reveal-element {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

body.js-ready .reveal-element.active {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Variaciones laterales y de escala para la revelación progresiva */
body.js-ready .reveal-slide-left {
    transform: translateX(-24px) translateY(12px);
}

body.js-ready .reveal-slide-right {
    transform: translateX(24px) translateY(12px);
}

body.js-ready .reveal-scale {
    transform: scale(0.96) translateY(16px);
}

body.js-ready .reveal-hero {
    transform: translateY(28px) scale(0.98);
}


/* =========================================
   LÍNEA DE TIEMPO Y RETARDOS
========================================= */

.timeline-line {
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.timeline-line.active {
    transform: scaleY(1);
}

.delay-1 { transition-delay: 0.09s; }
.delay-2 { transition-delay: 0.18s; }
.delay-3 { transition-delay: 0.27s; }
.delay-4 { transition-delay: 0.36s; }
.delay-5 { transition-delay: 0.45s; }


/* =========================================
   EFECTOS TECNOLÓGICOS FLOTANTES Y PARALLAX
========================================= */

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-7px) rotate(0.4deg); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(7px) rotate(-0.4deg); }
}

.cross-one {
    animation: floatSlow 6s ease-in-out infinite;
}

.cross-two {
    animation: floatReverse 7.5s ease-in-out infinite;
}

.code-note {
    animation: floatSlow 8s ease-in-out infinite;
}


/* =========================================
   EFECTOS INTERACTIVOS Y NAVEGACIÓN
========================================= */

/* Indicador animado para los enlaces del menú principal */
.nav-link:not(.rounded-full) {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:not(.rounded-full)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #1a1a1a;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
}

.nav-link:not(.rounded-full):hover::after,
.nav-link:not(.rounded-full).active-nav::after {
    width: 100%;
    left: 0;
}

.nav-link.active-nav {
    color: #1a1a1a !important;
    font-weight: 600;
}

.mobile-link.active-nav {
    color: #1a1a1a !important;
    font-weight: 700;
}

/* Tarjetas e Imágenes */
.card-hover {
    transition:
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.35s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    border-color: #adb5bd;
    box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.08);
}

/* Zoom máximo de 1.02 en imágenes de tarjetas */
.group:hover img {
    transform: scale(1.02);
}


/* =========================================
   RESPONSIVE Y ACCESIBILIDAD (REDUCED MOTION)
========================================= */

@media (max-width: 768px) {
    body.js-ready .reveal-element {
        transform: translateY(14px);
        transition-duration: 0.5s;
    }

    body.js-ready .reveal-slide-left,
    body.js-ready .reveal-slide-right {
        transform: translateY(14px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    body.js-ready .reveal-element,
    .timeline-line,
    .cross-one,
    .cross-two,
    .code-note {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}


/* =========================================
   BARRA DE DESPLAZAMIENTO
========================================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: #ced4da;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #6c757d;
}