/* HECHO POR JEREMY QUESADA GARRO */

/* Variables */
:root {
    --color-background: #050816;
    --color-secondary: #8F28FF;
    --color-text-primary: #e0e0e0;
    --color-text-secondary: #e0e0e0c4;
    --color-green-extra: #8AC500;
}

/* Tipos de letra */
/*? Pixely Sans */
@font-face {
    font-family: Pixely-Sans;
    src: url(../../../public/fonts/Pixelify_Sans/PixelifySans-VariableFont_wght.ttf);
}

/*? Archivo Black */
@font-face {
    font-family: archivo-black;
    src: url(../../../public/fonts/Archivo_Black/ArchivoBlack-Regular.ttf);
}

/*? Archivo */
@font-face {
    font-family: archivo;
    src: url(../../../public/fonts/Archivo/Archivo-VariableFont_wdth\,wght.ttf);
}


* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: archivo;
}

body {
    z-index: 1;
}

html,
body {
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

/* Header */

#header-responsive {
    background-color: var(--color-background);
    height: 80px;
    max-height: 80px;
    width: 100%;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    border-bottom: 1px solid var(--color-text-primary);
}

.header-right {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.links {
    display: flex;
    gap: 20px;
}

.links>a {
    font-size: 30px;
}

.title-header {
    font-family: Pixely-Sans;
    color: var(--color-secondary);
}

.redirection-nav {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

nav>div>ul>li>a {
    color: var(--color-text-primary);
    text-decoration: none;
}

/* Header Responsive */

#nav-responsive {
    display: none;
}

.header-open {
    position: fixed;
    z-index: 100000;
    top: 80px;
    left: 0;
    width: 100%;
    animation-name: nav-responsive;
    animation-duration: 0.2s;
    animation-fill-mode: forwards;
    overflow: hidden;
}


@keyframes nav-responsive {
    0% {
        height: 0;
    }

    100% {
        height: 150px;
    }
}


.header-open>ul {
    display: flex;
    flex-direction: column;
}

.header-open>ul>li {
    list-style: none;
    width: 100%;
    background-color: white;
    text-align: center;
}

.header-open>ul>li>a {
    color: var(--color-background);
    text-decoration: none;
    display: block;
    padding: 15px 0;
    border: 1px solid #e0e0e0;
}

.header-close {
    display: none;
}

@media (max-width: 767px) {
    .links {
        display: none;
    }

    .redirection-nav {
        display: none;
    }

    #nav-responsive {
        display: block;
        cursor: pointer;
        font-size: 25px;
    }
}

.closer-open {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    z-index: 3;
}

/* Inicio */

.index {
    position: relative;
    width: 100%;
    height: 25pc;
    background-image: url(../../../public/img/Aurora\ Boreal.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: inset 0 -200px 200px var(--color-background);
    overflow: hidden;
    padding-top: 20px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 55px;
}

.index::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #05081696;
    pointer-events: none;
    z-index: 1;
}

.index>* {
    position: relative;
    z-index: 2;
}

.index>img {
    border-radius: 30px;
    box-shadow: 2px 2px 6px #ffffffb2;
    height: 210px;
}

.index>article {
    color: white;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.index>article h1 {
    color: var(--color-secondary);
    font-family: archivo-black;
    font-size: 35px;
}

.index>article h4 {
    color: var(--color-text-primary);
}

.index>article p {
    color: var(--color-text-secondary);
}

.index>article p span {
    color: var(--color-green-extra);
}

.buttons-index {
    display: flex;
    gap: 15px;
}

.button-cv {
    background-color: var(--color-secondary);
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border: none;
    border-radius: 13px;
    cursor: pointer;
}

.button-contact {
    background-color: transparent;
    color: var(--color-secondary);
    text-decoration: none;
    padding: 12px;
    border: 1px solid var(--color-secondary);
    border-radius: 13px;
    cursor: pointer;
}

.figura-index {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bola-index {
    background-color: var(--color-secondary);
    height: 20px;
    width: 20px;
    border-radius: 50%;
}

.line-index {
    background-color: var(--color-secondary);
    height: 250px;
    width: 3px;
    border-radius: 0 0 25% 25%;
}

@media (max-width: 780px) {
    .figura-index {
        display: none;
    }

    .index img {
        position: absolute;
        height: 110px;
        top: 90px;
        right: 150px;
    }

    .index {
        padding-top: 3pc;
        padding-bottom: 0;
    }

    .index article {
        gap: 20px;
    }

    .index article {
        width: 90%;
    }

    .index article h1 {
        width: 20px;
    }
}


@media (max-width: 500px) {
    .figura-index {
        display: none;
    }

    .index img {
        position: absolute;
        height: 110px;
        top: 90px;
        left: 250px;
    }

    .index article {
        width: 90%;
    }
}

/* Titles */

.section-title {
    width: 70%;
    color: white;
    text-align: center;
    font-weight: bolder;
    font-family: archivo-black;
    font-size: 30px;
}

.section-title .line {
    margin-top: 10px;
    background-color: #8AC500;
    max-width: 100%;
    height: 5px;
}

@media (max-width: 840px) {
    .section-title {
        width: 90%;
        font-size: 25px;
    }
}

/* My Projects */

.projects {
    background-color: var(--color-background);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 150px;
    padding-bottom: 170px;
}

@media (max-width: 840px) {
    .projects {
        padding-top: 0px;
    }
}

.project-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    color: white;
    width: 70%;
    max-width: 1100px;
    align-items: center;
    gap: 70px;
}

.project-card {
    opacity: 0;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.project-card.from-left {
    transform: translateX(-100px);
}

.project-card.from-right {
    transform: translateX(100px);
}

.project-card.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Two images, one above the other */
.double-img {
    position: relative;
}

.double-img img {
    max-height: 250px;
    border-radius: 5px;
    max-width: 500px;
}

.double-img img:first-child {
    top: 0;
    left: 0;
}

.double-img img:nth-child(2) {
    position: absolute;
    bottom: -35px;
    right: -35px;
    max-height: 220px;
    max-width: 220px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.project-info {
    display: flex;
    flex-direction: column;
}

.type {
    color: #8898FF;
}

.project-header>h3 {
    margin: 5px 0 0 0;
}

.project-header>p {
    color: var(--color-text-secondary);
    margin: 20px 0;
}

.github-project {
    background-color: #24262F;
    padding: 10px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: 10px;
    width: auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

}

.github-project i:first-child {
    font-size: 20px;
}

.link-project {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(143, 40, 255, 0.55);
    color: #ffffff;
    background: radial-gradient(circle at 30% 20%, rgba(143, 40, 255, 0.45), rgba(36, 38, 47, 0.9));
    box-shadow: 0 10px 30px rgba(143, 40, 255, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.link-project i {
    font-size: 18px;
    color: inherit;
}

.link-project:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 174, 0.55);
    box-shadow: 0 12px 36px rgba(0, 255, 174, 0.12), 0 10px 30px rgba(143, 40, 255, 0.18);
}

.link-project:active {
    transform: translateY(0);
    border-color: rgba(0, 255, 174, 0.85);
    box-shadow: 0 8px 20px rgba(0, 255, 174, 0.10), 0 6px 18px rgba(143, 40, 255, 0.14);
}

.link-project:focus {
    outline: none;
}

.link-project:focus-visible {
    outline: 2px solid rgba(0, 255, 174, 0.75);
    outline-offset: 3px;
    border-color: rgba(0, 255, 174, 0.75);
}

.link-project.selected,
.link-project.active {
    border-color: rgba(0, 255, 174, 0.75);
    box-shadow: 0 12px 36px rgba(0, 255, 174, 0.12), 0 10px 30px rgba(143, 40, 255, 0.18);
}

.links-tech {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    padding: auto;
    margin-bottom: 20px;
}

.icons-project {
    background-color: #24262F;
    padding: 18px 12px;
    min-width: 300px;
    width: 300px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    height: 20px;
    border-radius: 10px;
}

.icons-project img {
    height: 25px;
}

@media (max-width: 1000px) {
    .project-card {
        flex-direction: column;
        width: 90%;
        gap: 35px;
        align-items: stretch;
    }

    .project-info {
        width: 100%;
    }

    .double-img {
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        justify-content: center;
    }

    .double-img img {
        max-width: 100%;
        height: 200px;
        object-fit: contain;
    }

    .icons-project {
        width: 100%;
        min-width: 0;
        flex-wrap: wrap;
        height: auto;
    }

    .double-img img:nth-child(2) {
        bottom: -18px;
        right: -18px;
        max-height: 160px;
        max-width: 160px;
    }
}

body.modal-open {
    overflow: hidden;
}

.project-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.65);
    z-index: 200000;
}

.project-modal.project-modal-open {
    display: flex;
}

.project-modal-dialog {
    width: min(1100px, 100%);
    max-height: min(80vh, 900px);
    background: linear-gradient(to right, #0D1121, #171D35);
    border: 1px solid rgba(224, 224, 224, 0.18);
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
}

.project-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 18px 0 18px;
}

.project-modal-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.project-modal-title h2 {
    color: white;
    font-family: archivo-black;
}

.project-modal-title .type {
    font-size: 14px;
}

.project-modal-close {
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.25);
    color: var(--color-text-primary);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.project-modal-body {
    padding: 18px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
    overflow: auto;
}

.project-modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-modal-main {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.25);
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-modal-main img {
    width: 100%;
    height: 100%;
    max-height: 520px;
    object-fit: contain;
}

.project-modal-nav {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    pointer-events: none;
}

.project-modal-nav button {
    pointer-events: all;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(224, 224, 224, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: white;
    cursor: pointer;
}

.project-modal-thumbs {
    display: flex;
    gap: 10px;
    overflow: auto;
    padding-bottom: 6px;
}

.project-modal-thumb {
    width: 88px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(224, 224, 224, 0.18);
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.project-modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-modal-thumb.project-modal-thumb-active {
    border-color: rgba(143, 40, 255, 0.9);
}

.project-modal-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: white;
}

.project-modal-content p {
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.project-modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.project-more {
    background-color: transparent;
    border: 1px solid rgba(224, 224, 224, 0.25);
    color: var(--color-text-primary);
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
}

@media (max-width: 840px) {
    .project-modal {
        padding: 14px;
    }

    .project-modal-dialog {
        max-height: 88vh;
    }

    .project-modal-body {
        grid-template-columns: 1fr;
    }

    .project-modal-thumb {
        width: 78px;
        height: 52px;
    }
}


/* Technologies */

.technologies {
    background-color: var(--color-background);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 90px;
    padding-bottom: 100px;
}

.technologies>p {
    color: white;
}

@media (max-width: 840px) {
    .technologies>p {
        margin: 0 50px;
    }
}

.stacks-full {
    display: flex;
    gap: 70px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 70%;
}

.stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 320px;
    height: 320px;
    background: linear-gradient(to right, #0D1121, #171D35);
    color: white;
    border-radius: 16px;
    padding: 20px;
}

.stack>h1 {
    font-size: 1.6pc;
    font-family: archivo;
}

.icons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px;
}

.icons>img {
    height: 56px;
}


/* Contact */

.contact {
    background-color: var(--color-background);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 150px;
    color: white;

    position: relative;
}

.contact-items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

.contact-items>img {
    width: 400px;
    z-index: 2;
}

.contact-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    font-size: 20px;
    color: #fff;
}

#button-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 6px;
    border-radius: 12px;
    border: 1px solid rgba(143, 40, 255, 0.55);
    background: rgba(36, 38, 47, 0.9);
    color: #8f28ff !important;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

#button-copy:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 174, 0.55);
    box-shadow: 0 12px 36px rgba(0, 255, 174, 0.12), 0 10px 30px rgba(143, 40, 255, 0.18);
}

#button-copy:active {
    transform: translateY(0);
}

#button-copy:focus {
    outline: none;
}

/* Mostrar siempre links en contacto */
.links-contact {
    display: block;
}

.links-contact>a {
    font-size: 50px;
}

@media (max-width: 840px) {
    .contact-items {
        flex-direction: column-reverse;
        gap: 90px;
    }

}

@media (max-width: 500px) {
    .contact-items {
        flex-direction: column-reverse;
        gap: 90px;
    }

    .contact-items>img {
        width: 350px;
        height: auto;
    }

    #button-copy {
        width: 36px;
        height: 36px;
    }

}


/* Footer */

.footer {
    background-color: var(--color-background);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: white;
    border-top: 1px solid var(--color-text-primary);
}


/* Alerts */

.alert-email {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #2ecc71;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: sans-serif;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

.alert-email-hidden {
    opacity: 0;
    transition-duration: .5s;
    display: none;
}

.alert-email-show {
    opacity: 1;
    transition-duration: .5s;
    display: block;
}

@media (max-width: 480px) {
    .alert-email {
        top: 10px;
        right: 50%;
        transform: translateX(50%);
        font-size: 14px;
        padding: 10px 16px;
    }
}

/* Selector de idioma */
.language-selector {
    position: relative;
    display: inline-block;
    margin-right: 20px; /* espacio respecto a otros elementos */
}

#lang-button {
    background-color: var(--color-background);
    color: var(--color-secondary);
    border: 1px solid var(--color-secondary);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-family: archivo;
    font-size: 16px;
}

#lang-list {
    position: absolute;
    top: 40px;
    right: 0;
    background-color: var(--color-background);
    border: 1px solid var(--color-secondary);
    border-radius: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 130px;
    z-index: 1000;
    transition: all 0.3s ease;
}

#lang-list li {
    padding: 12px 10px;
    cursor: pointer;
    color: var(--color-text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#lang-list li:last-child {
    border-bottom: none;
}

#lang-list li:hover {
    background-color: var(--color-secondary);
    color: white;
    transition: 0.2s;
}

.lang-list-close {
    display: none;
}

.lang-list-open {
    display: block;
}

/* Responsive ajuste para móvil */
@media (max-width: 767px) {
    .language-selector {
        display: none;
    }
}
