/* ==================================================
   RESET
================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ==================================================
   VARIABLES
================================================== */

:root {

    /* Fondos */
    --background: #0F1735;
    --background-secondary: #141D42;

    /* Texto */
    --text: #F1F5FF;
    --text-secondary: #A8B3CC;
    --text-muted: #6F7C9D;

    /* Acentos */
    --accent-blue: #7188FF;
    --accent-purple: #9B7CFF;

    /* Bordes */
    --border: #263154;
    --line: rgba(174, 185, 212, 0.2);

    /* Estados */
    --hover: #1B2550;
}


/* ==================================================
    BASE
================================================== */

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    background-color: var(--background);
    color: var(--text);
    font-family: Arial, sans-serif;
}


body::before {
    content: "";
    position: fixed;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            28rem circle at var(--cursor-x, 50%) var(--cursor-y, 50%),
            rgba(113, 136, 255, 0.1),
            rgba(155, 124, 255, 0.035) 42%,
            transparent 78%
        );

    opacity: 0;
    transition: opacity 0.35s ease;
}


body.background-light::before {

    opacity: 1;
}


body > * {

    position: relative;
    z-index: 1;
}


/* ==================================================
   COLUMNA IZQUIERDA
================================================== */

.left-home {

    position: fixed;

    top: 0;
    left: 0;

    width: 40%;
    height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 4rem 8%;

    border-right: 1px solid var(--border);
}


/* ==================================================
   DECORACIÓN
================================================== */

.decoration-ruta {

    color: var(--text-muted);

    font-family: "Courier New", monospace;

    font-size: 1rem;

    letter-spacing: 0.5px;
}


/* ==================================================
   PRESENTACIÓN
================================================== */

.presentation {

    margin-top: 5rem;
}


/* Profesión */

.profession {

    width: fit-content;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent-purple);
    border-radius: 2px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 2px;
}


/* Nombre */

.presentation h1 {

    color: var(--text);

    font-size: clamp(3rem, 5vw, 4.5rem);

    font-weight: 700;

    line-height: 1;

    letter-spacing: -2px;
}


/* Parte morada del nombre */

.presentation h1 span {

    background: linear-gradient(
        90deg,
        var(--accent-blue),
        var(--accent-purple)
    );

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    background-clip: text;
}


/* Descripción */

.description {

    max-width: 22rem;

    margin-top: 1.5rem;

    color: var(--text-secondary);

    font-size: 1.05rem;

    line-height: 1.6;
}


/* ==================================================
   NAVEGACIÓN
================================================== */

.main-nav {

    margin-top: 4rem;
}


.list-main-nav {

    list-style: none;
}


.item-main-nav {

    position: relative;
}


.item-main-nav:not(:last-child)::after {

    content: "";

    position: absolute;

    right: 0.85rem;
    bottom: 0;
    left: 0.85rem;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(174, 185, 212, 0.18) 14%,
            rgba(174, 185, 212, 0.3) 50%,
            rgba(174, 185, 212, 0.18) 86%,
            transparent
        );

    filter: blur(0.15px);
}


.link-item-main-nav {

    position: relative;

    display: flex;

    align-items: center;

    gap: 1.2rem;

    min-height: 3.45rem;

    padding: 0.85rem 1rem;

    border: 1px solid transparent;

    border-radius: 0.65rem;

    color: var(--text-muted);

    text-decoration: none;

    font-size: 1rem;

    font-weight: 600;

    letter-spacing: 0.5px;

    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease;
}


.link-item-main-nav i {

    width: 1.5rem;

    color: #91adf5;

    transition: color 0.25s ease;
}


.link-item-main-nav::after {

    content: "";

    width: 0.4rem;
    height: 0.4rem;

    margin-left: auto;

    border-radius: 50%;

    background-color: #43558b;

    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease;
}


/* Hover */

.link-item-main-nav:not(.active):hover {

    background-color: rgba(27, 37, 80, 0.7);

    color: var(--text);
}


.link-item-main-nav:not(.active):hover i {

    color: var(--accent-blue);
}


/* Elemento activo */

.link-item-main-nav.active {

    border-color: transparent;

    background:
        linear-gradient(
            90deg,
            rgba(76, 97, 204, 0.42),
            rgba(76, 84, 182, 0.32)
        );

    box-shadow:
        inset 3px 0 0 var(--accent-purple),
        0 0.75rem 1.5rem rgba(5, 10, 42, 0.18);

    color: var(--text);
}


.link-item-main-nav.active::after {

    background-color: var(--accent-purple);

    box-shadow: 0 0 0.65rem rgba(155, 124, 255, 0.8);
}


.link-item-main-nav.active i {

    color: var(--accent-blue);
}


/* ==================================================
   REDES SOCIALES
================================================== */

.contact {

    display: flex;

    gap: 1.7rem;

    margin-top: auto;
}


.contact a {

    color: var(--text-muted);

    font-size: 1.7rem;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}


.contact a:hover {

    color: var(--accent-blue);

    transform: translateY(-3px);
}


/* ==================================================
   COLUMNA DERECHA
================================================== */

.right-home {

    width: 60%;

    min-height: 100vh;

    margin-left: 40%;

    padding: 7rem 8%;
}


/* ==================================================
   SECCIÓN SOBRE MÍ
================================================== */

.information-profile {

    max-width: 52rem;
}


/* Etiqueta de sección */

.section-label {

    display: inline-flex;

    align-items: center;

    gap: 0.8rem;

    margin-bottom: 2rem;

    color: var(--accent-blue);

    font-size: 0.8rem;

    font-weight: 700;

    letter-spacing: 2px;
}


.section-label::before {

    content: "";

    width: 2.5rem;
    height: 2px;

    background: var(--accent-purple);
}


/* Título */

.information-profile h2,
.portfolio-section h2 {

    margin-bottom: 2rem;

    color: var(--text);

    font-size: clamp(2.5rem, 4vw, 4rem);

    line-height: 1.1;

    letter-spacing: -1.5px;
}


/* Párrafos */

.information-profile p {

    margin-bottom: 1.8rem;

    color: var(--text-secondary);

    font-size: 1.05rem;

    line-height: 1.8;
}


/* ==================================================
   OTRAS SECCIONES
================================================== */

.experience-card {

    position: relative;

    padding-top: 2.5rem;
}


.experience-card::before {

    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 7rem;
    height: 1px;

    background: linear-gradient(90deg, var(--accent-purple), transparent);
}


.experience-heading {

    display: flex;

    align-items: baseline;

    justify-content: space-between;

    gap: 2rem;
}


.experience-heading h3 {

    color: var(--text);

    font-size: clamp(1.25rem, 2vw, 1.55rem);

    line-height: 1.35;
}


.experience-company {

    margin-top: 0.5rem;

    color: var(--accent-blue) !important;

    font-family: "Courier New", monospace;

    font-size: 0.78rem !important;

    font-weight: 600;

    letter-spacing: 1px;

    text-transform: uppercase;
}


.experience-heading time {

    color: var(--accent-purple);

    font-family: "Courier New", monospace;

    font-size: 0.75rem;

    font-weight: 700;

    letter-spacing: 1px;
}


.experience-summary {

    max-width: 44rem;

    margin: 3.2rem 0;

    padding-left: 1.25rem;

    border-left: 1px solid rgba(113, 136, 255, 0.35);
}


.experience-list {

    position: relative;

    display: grid;

    gap: 1.45rem;

    margin: 0;

    padding: 0;

    color: var(--text-secondary);

    font-size: 0.95rem;

    line-height: 1.65;

    list-style: none;

    counter-reset: responsibility;
}


.experience-list::before {

    content: "";

    position: absolute;

    top: 0.75rem;
    bottom: 0.75rem;
    left: 1rem;

    width: 1px;

    background:
        linear-gradient(
            var(--accent-purple),
            rgba(113, 136, 255, 0.08)
        );
}


.experience-list li {

    position: relative;

    display: grid;

    grid-template-columns: 3rem minmax(0, 1fr);

    gap: 1rem;

    counter-increment: responsibility;
}


.experience-list li::before {

    content: counter(responsibility, decimal-leading-zero);

    z-index: 1;

    width: 2rem;

    color: var(--accent-purple);

    background-color: var(--background);

    font-family: "Courier New", monospace;

    font-size: 0.72rem;

    font-weight: 700;

    line-height: 1.9;
}


.technology-list {

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 0.45rem;

    margin-top: 3.5rem;

    padding-top: 1.25rem;

    border-top: 1px solid var(--line);

    color: var(--text-muted);

    font-family: "Courier New", monospace;

    font-size: 0.78rem;
}


.technology-list::before {

    content: "TECNOLOGÍAS /";

    margin-right: 0.35rem;

    color: var(--accent-blue);

    font-size: 0.7rem;

    font-weight: 700;

    letter-spacing: 1px;
}


.technology-list span {

    color: var(--text-secondary);
}


.technology-list span:not(:last-child)::after {

    content: "·";

    margin-left: 0.45rem;

    color: var(--accent-purple);
}


/* Experiencia */

.experience-card {

    max-width: 46rem;

    padding: 1.7rem;

    border: 1px solid var(--line);

    border-radius: 0.75rem;

    background-color: rgba(20, 29, 66, 0.26);

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}


.experience-card::before {

    display: none;
}


.experience-card:hover {

    transform: translateY(-0.2rem);

    border-color: rgba(113, 136, 255, 0.36);

    background-color: rgba(27, 37, 80, 0.58);
}


.experience-heading {

    align-items: flex-start;

    gap: 1.5rem;

    padding-bottom: 1.25rem;

    border-bottom: 1px solid var(--line);
}


.experience-heading h3 {

    font-size: 1.2rem;
}


.experience-company {

    margin-top: 0.35rem;

    font-family: Arial, sans-serif;

    font-size: 0.95rem !important;

    letter-spacing: normal;

    text-transform: none;
}


.experience-summary {

    margin: 1.5rem 0 1.2rem;

    padding-left: 0;

    border-left: 0;
}


.experience-description {

    margin-top: 1.2rem;

    color: var(--text-secondary) !important;

    font-size: 0.98rem !important;

    line-height: 1.75 !important;
}


.experience-technologies {

    margin-top: 1.6rem;

    padding-top: 1.2rem;

    border-top: 1px solid var(--line);

    color: var(--text-secondary) !important;

    font-size: 0.9rem !important;
}


.experience-technologies strong {

    color: var(--accent-blue);
}


.project-card-link {

    display: block;

    width: min(100%, 45rem);

    margin: 0 auto;

    color: inherit;

    text-decoration: none;
}

.project-card {

    width: min(100%, 45rem);

    margin: 0 auto;

    overflow: hidden;

    border: 1px solid var(--line);

    border-radius: 0.8rem;

    background-color: rgba(20, 29, 66, 0.26);

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}


.project-card-link:hover .project-card {

    transform: translateY(-0.25rem);

    border-color: rgba(113, 136, 255, 0.36);

    background-color: rgba(27, 37, 80, 0.58);
}


.project-image {

    aspect-ratio: 16 / 8;

    overflow: hidden;

    margin: 0;

    background-color: var(--background-secondary);
}


.project-image img {

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    object-position: top;

    transition: transform 0.35s ease;
}


.project-card:hover .project-image img {

    transform: scale(1.015);
}


.project-content {

    padding: 1.4rem 1.5rem 1.5rem;
}


.project-type {

    color: var(--accent-blue);

    font-size: 0.72rem;

    font-weight: 700;

    letter-spacing: 1.4px;
}


.project-content h3 {

    margin-top: 0.75rem;

    color: var(--text);

    font-size: 1.2rem;

    line-height: 1.35;
}


.project-content p {

    margin-top: 0.75rem;

    color: var(--text-secondary);

    font-size: 0.95rem;

    line-height: 1.7;
}


.project-technologies {

    margin-top: 1.25rem !important;

    padding-top: 1rem;

    border-top: 1px solid var(--line);

    font-size: 0.84rem !important;
}


.project-technologies strong {

    color: var(--accent-blue);
}


.portfolio-section {

    max-width: 52rem;

    min-height: 70vh;

    padding-top: 10rem;
}


.portfolio-section p {

    color: var(--text-secondary);

    font-size: 1.05rem;

    line-height: 1.8;
}


/* ==================================================
   SECCIÓN CONTACTO
================================================== */

.contact-section {

    min-height: auto;

    padding-bottom: 7rem;
}

.contact-section .portfolio-section {

    min-height: auto;
}

.contact-section-content {

    max-width: 52rem;
}

.contact-intro {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 0.85rem;

    margin-bottom: 1.8rem;
}

.contact-kicker {

    display: inline-flex;

    align-items: center;

    gap: 0.8rem;

    color: var(--accent-blue);

    font-family: "Courier New", monospace;

    font-size: 0.76rem;

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;
}

.contact-kicker::before {

    content: "";

    width: 2rem;

    height: 1px;

    background: var(--accent-purple);
}

.contact-intro p {

    max-width: 45rem;

    margin: 0;

    color: var(--text-secondary);

    font-size: 1.04rem;

    line-height: 1.8;
}

.contact-cards {

    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 1rem;

    margin-bottom: 6rem;
}

.contact-card {

    position: relative;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 0.9rem;

    min-height: 12rem;

    padding: 1.6rem 1.1rem;

    border: 1px solid var(--line);

    border-radius: 1rem;

    background:
        linear-gradient(160deg, rgba(28, 36, 79, 0.82), rgba(15, 23, 53, 0.88));

    color: var(--text);

    text-decoration: none;

    overflow: hidden;

    isolation: isolate;

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

.contact-card::before {

    content: "";

    position: absolute;

    inset: -35%;

    transform: rotate(10deg);

    background: radial-gradient(circle, rgba(113, 136, 255, 0.12), transparent 65%);

    transform-origin: center;

    opacity: 0;

    transition: opacity 0.3s ease;

    z-index: -1;
}

.contact-card:hover {

    transform: translateY(-0.3rem);

    border-color: rgba(113, 136, 255, 0.65);

    background:
        linear-gradient(160deg, rgba(55, 67, 136, 0.86), rgba(31, 39, 84, 0.95));

    box-shadow: 0 1.2rem 2rem rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(155, 124, 255, 0.2) inset;
}

.contact-card:hover::before {

    opacity: 1;
}

.contact-icon {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 3.3rem;

    height: 3.3rem;

    border-radius: 50%;

    border: 1px solid rgba(113, 136, 255, 0.6);

    background: rgba(113, 136, 255, 0.14);

    color: var(--accent-blue);

    font-size: 1.4rem;

    box-shadow: 0 0 0 0.5rem rgba(113, 136, 255, 0.055);
}

.contact-card:hover .contact-icon {

    color: var(--text);

    border-color: var(--accent-purple);

    box-shadow: 0 0 0 0.5rem rgba(155, 124, 255, 0.055);
}

.contact-card-label {

    color: var(--text-secondary);

    font-size: 0.78rem;

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;
}


/* ==================================================
   TABLET
================================================== */

@media (max-width: 900px) {

    body {
        display: block;
    }


    .left-home {

        position: relative;

        width: 100%;
        height: auto;

        padding: 3rem 8%;
    }


    .right-home {

        width: 100%;

        margin-left: 0;

        padding: 4rem 8%;
    }


    .contact {

        margin-top: 3rem;
    }
}


/* ==================================================
   MÓVIL
================================================== */

@media (max-width: 600px) {

    .left-home {

        padding: 2.5rem 7%;
    }


    .presentation {

        margin-top: 3rem;
    }


    .presentation h1 {

        font-size: 3rem;

        letter-spacing: -1.5px;
    }


    .profession {

        font-size: 0.75rem;
    }


    .description {

        font-size: 1rem;
    }


    .right-home {

        padding: 4rem 7%;
    }


    .information-profile h2,
    .portfolio-section h2 {

        font-size: 2.3rem;
    }


    .information-profile p,
    .portfolio-section p {

        font-size: 1rem;

        line-height: 1.7;
    }


    .experience-card {

        padding: 1.3rem;
    }


    .experience-heading {

        flex-direction: column;

        gap: 0.75rem;
    }


    .experience-summary {

        margin: 2.4rem 0;
    }


    .experience-list li {

        grid-template-columns: 2.5rem minmax(0, 1fr);
    }

    .contact-cards {

        grid-template-columns: 1fr;
    }
}
