/*############### HERO / CARATULA ###############*/

#caratula-block {
    text-align: justify;
    color: rgb(253, 251, 248);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
    min-height: 100svh;
}

#caratula-container {
    width: 100%;
    display: grid;
    grid-template-areas:
        'nombre nombre nombre mainimg mainimg'
        'details details details mainimg mainimg'
        'details details details mainimg mainimg'
        'cv cv cv cv cv';
    gap: 10px;
}

#caratula-personal-info-seccion {
    margin-bottom: 40px;
    grid-area: nombre;
}

#caratula-info-name {
    font-size: clamp(2rem, 8vw, 6rem);
}

#caratula-info-grado {
    color: rgb(86, 240, 192) !important;
    font-size: 1.4em;
}

#caratula-cita-seccion {
    grid-area: details;
}

#caratula-logo-seccion {
    grid-area: mainimg;
    display: flex;
    justify-content: center;
    min-height: 400px;
}

#caratula-logo-box {
    margin: auto;
}

#caratula-logo-img {
    width: 100%;
}

#caratula-cv-seccion {
    margin-top: 50px;
    grid-area: cv;
    display: flex;
}

.caratula-cv-seccion-box {
    padding: 1rem;
    border-radius: 20px;
    border: #a6f88faa solid 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-decoration: none;
}

.caratula-cv-btn {
    text-decoration: none;
}

.caratula-cv-seccion-box:hover {
    background-color: #f6e720;
}

.caratula-cv-seccion-box:hover .caratula-cv-header {
    color: rgb(244, 65, 238);
}

.caratula-cv-seccion-box:hover .caratula-cv-img {
    filter: brightness(100%);
}

.caratula-cv-header {
    font-size: 1em;
    text-align: center;
    font-weight: 560;
    color: rgb(185, 140, 239);
    margin: 0;
    line-height: 1;
}

.caratula-cv-img {
    width: 2rem;
    filter: brightness(10000%);
}

/*############### ABOUT ME ###############*/

#sobre-mi-block {
    border-top: 1px solid rgba(247, 248, 242, 0.367);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
    min-height: 80svh;
}

#sobre-mi-box {
    display: flex;
    justify-content: center;
}

#sobre-mi-header-box {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: clamp(1rem, 5vw, 4rem);
    margin-bottom: clamp(1rem, 5vw, 4rem);
}

#sobre-mi-header {
    width: fit-content;
    text-align: center;
    font-size: clamp(1.5rem, 2vw, 4rem);
    color: white;
}

#sobre-mi-text {
    text-align: justify;
    width: 80%;
    color: white;
    font-size: clamp(1rem, 1.4vw, 1.5rem);
}

/* ############### PROYECTOS CARRUSEL ###############*/

#proyectos-block {
    display: flex;
    justify-content: center;
    align-content: center;
    align-items: center;
    border-top: 1px solid rgba(247, 248, 242, 0.367);
    margin-bottom: 50px;
    min-height: 80svh;
}

#proyectos-header-box {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: clamp(1rem, 5vw, 4rem);
    margin-bottom: clamp(1rem, 5vw, 4rem);
}

#proyectos-header {
    width: fit-content;
    text-align: center;
    font-size: clamp(1.5rem, 2vw, 4rem);
    color: white;
}


.carousel-collap {
    width: 40px;
}

.carousel-caption {
    background-color: rgba(15, 10, 25, 0.63);
}

.carousel-caption-header {
    color: rgb(244, 232, 232) !important;
}

.carousel-caption-header:hover {
    color: rgba(93, 244, 151, 0.901) !important;
}

.carousel-links {
    color: #ffee08;
    text-decoration: none;
}

.carousel-links:hover {
    color: rgb(78, 247, 143) !important;
}

.carousel-caption-title:hover {
    animation: none;
    color: rgb(62, 249, 190);
}

.carousel-caption-title:focus {
    animation: none;
    color: rgb(62, 249, 190);
}

.carousel-caption-title {
    color: white;
}

.titulo-pulsante {
    cursor: pointer;
    animation: pulse 2s infinite;
}

p.carousel-header-content {
    text-align: justify;
    padding: 10px;
}

.carousel-links-box {
    display: flex;
    justify-content: center;
    gap: 2vw;
}

.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.527) !important;
}

.carousel-control-prev-icon {
    background-color: rgba(0, 0, 0, 0.527) !important;
}

/* ############### SCROLL SNAP CAROUSEL ###############*/n#proyectos-container {
    width: 100%;
    max-width: none;
    padding: 0;
    position: relative;
}

#proyectos-header-box {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

.proyects-wrapper {
    position: relative;
    width: 100%;
}

/* Carrusel con scroll snap */
#proyects-carrusel {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 20px 0 30px 0;
    /* Ocultar scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#proyects-carrusel::-webkit-scrollbar {
    display: none;
}

/* Container de items */
#proyects-carrusel .carousel-inner {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    padding: 0 calc((100vw - 80vw) / 2);
}

/* Cada item */
#proyects-carrusel .carousel-item {
    flex: 0 0 80vw;
    max-width: 900px;
    margin: 0 10px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: block !important;
    flex-shrink: 0;
    scroll-snap-align: center;
}

/* Imágenes */
#proyects-carrusel .carousel-item picture,
#proyects-carrusel .carousel-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* Estados visuales */
#proyects-carrusel .carousel-item {
    opacity: 0.5;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#proyects-carrusel .carousel-item.active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

#proyectos-header-box {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

.proyects-wrapper {
    position: relative;
    width: 100%;
}

#proyects-carrusel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0 30px 0;
    margin-bottom: 100px;
}


/* Container de items */
#proyects-carrusel .carousel-inner {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    transition: transform 0.5s ease;
}

/* Cada item - 30% más grande */
#proyects-carrusel .carousel-item {
    flex: 0 0 91vw;
    max-width: 1040px;
    margin: 0 20px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: block !important;
    flex-shrink: 0;
}

/* Los clones deben verse iguales */
#proyects-carrusel .carousel-item.clone {
    display: block !important;
}

/* Imágenes */
#proyects-carrusel .carousel-item picture,
#proyects-carrusel .carousel-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* Estados visuales - sin oscurecer */
#proyects-carrusel .carousel-item {
    opacity: 1;
}

#proyects-carrusel .carousel-item.active {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

/* Indicador */
.scroll-hint {
    text-align: center;
    margin-bottom: 15px;
    opacity: 0.7;
}

.scroll-hint-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.scroll-hint-line {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    margin: 8px auto 0;
    animation: pulse-line 2s infinite;
}

@keyframes pulse-line {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}


/* Botones de navegación - clases personalizadas */
.proj-nav-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0.9;
    z-index: 100;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
}

.proj-nav-prev {
    left: 15px;
}

.proj-nav-next {
    right: 15px;
}

.proj-nav-btn:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.proj-nav-btn svg {
    width: 20px;
    height: 20px;
}

/* Dots Navigation */
.dots-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding: 10px 0;
}

.dots-nav .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
}

.dots-nav .dot:hover {
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.dots-nav .dot.active {
    background-color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 991px) {
    #proyects-carrusel .carousel-inner {
        padding: 0 calc((100vw - 85vw) / 2);
    }

    #proyects-carrusel .carousel-item {
        flex: 0 0 85vw;
        margin: 0 8px;
    }

    .proj-nav-btn {
        width: 45px;
        height: 45px;
    }

    .proj-nav-prev {
        left: 10px;
    }

    .proj-nav-next {
        right: 10px;
    }
}

@media (max-width: 576px) {
    #proyects-carrusel .carousel-inner {
        padding: 0 calc((100vw - 90vw) / 2);
    }

    #proyects-carrusel .carousel-item {
        flex: 0 0 90vw;
        margin: 0 5px;
    }

    .proj-nav-btn {
        width: 40px;
        height: 40px;
    }

    .proj-nav-prev {
        left: 5px;
    }

    .proj-nav-next {
        right: 5px;
    }

    .scroll-hint-text {
        font-size: 0.8rem;
    }
}

/* ############### SKILLS / STACK ###############*/

#stack-block {
    color: white;
    border-top: 1px solid rgba(247, 248, 242, 0.367);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
    min-height: 50svh;
}

#stack-header-box {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: clamp(1rem, 5vw, 4rem);
    margin-bottom: clamp(1rem, 5vw, 4rem);
}

#stack-header {
    width: fit-content;
    text-align: center;
    font-size: clamp(1.5rem, 2vw, 4rem);
}

#stack-content-seccion {
    display: flex;
    align-items: center;
    justify-content: center;
}

#stack-content-box {
    display: flex;
    flex-wrap: wrap;
}

.stack-item-img {
    width: 30%;
    max-width: 120px;
    filter: opacity(80%);
    margin: 25px auto 25px auto;
}

.stack-item-img:hover {
    filter: brightness(150%)
}

/* ############### FORMULARIO ###############*/

#contact-block {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(248, 241, 241);
    font-weight: 600;
    border-top: 1px solid rgba(247, 248, 242, 0.367);
    min-height: 100svh;
}

#contact-box {
    max-width: 700px;
    background-color: #000000ab;
    border: 1px solid white;
    margin: auto;
    box-shadow: 14px 15px rgba(15, 14, 15, 0.171);
}

#terminal-header {
    height: 40px;
    text-align: center;
    background-color: rgba(245, 245, 220, 0.979);
    color: black;
    font-size: larger;
    font-weight: bold;
    display: grid;
    grid-template-areas: 'dots touch touch btnSend btnSend';
    margin-bottom: 10px;
}

#term-dots-box {
    grid-area: dots;
}

#term-dots-div {
    width: fit-content;
}

.term-dot {
    width: 25px;
}

#term-title {
    grid-area: touch;
    font-size: clamp(0.7rem, 0.9vw, 1rem);
}

#form-filling-status-block {
    display: flex;
    align-items: center;
    justify-content: center;
    align-content: center;
}

#form-filling-status {
    color: rgb(145, 255, 0);
    text-align: center;
    font-size: clamp(0.7rem, 0.8vw, 1rem);
    width: fit-content;
}

#contact-form-box {
    display: flex;
    align-items: center;
    justify-content: center;
    align-content: center;
}

form {
    width: 80%;
}

.form-input-row {
    margin-bottom: 10px;
}

.form-input-label {
    font-size: clamp(0.7rem, 0.8vw, 1rem);
    font-weight: 100;
    font-family: "terminal", monospace;
}

.form-placeholder {
    margin-right: 50px !important;
    margin-left: 20px;
}

input[type=text],
textarea {
    background-color: #0f0f0f79 !important;
    color: white;
    border: none;
    width: 60%;
}

input[type=text]:focus {
    outline: none !important;
    border: none !important;
    color: white;
    background-color: #000000ab;
}

textarea {
    width: 100%;
    cursor: default !important;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.emptyInput {
    color: rgb(243, 247, 245);
    animation: blinking 1s linear infinite !important;
}

.incorrectInput {
    color: rgb(255, 38, 0);
    animation: blinking 1s linear infinite !important;
}

.correctInput {
    color: rgb(33, 238, 50);
}

#sendBtnContainer {
    position: relative;
    max-width: 700px;
    margin: auto;
}

#btnSend {
    background-color: rgba(0, 0, 0, 0);
    border: none;
    position: absolute;
    top: 18px;
    left: 94%;
}

#btnSend:hover {
    color: rgb(112, 168, 252);
}

#msgExito {
    margin-left: 20px !important;
    color: rgb(47, 248, 255);
    font-size: 2em;
    width: 100% !important;
}

.advertencia {
    color: orange !important;
}


/* ############### MEDIA QUERIES ###############*/

@media (max-width: 991px) {


    #caratula-container {
        width: 100%;
    }

    #caratula-container {
        display: grid !important;
        grid-template-areas:
            'nombre'
            'details'
            'mainimg'
            'cv' !important;
        gap: 10px;
    }

    #caratula-logo-box {
        display: flex;
        width: fit-content !important;
    }

    #caratula-logo-img {
        width: 200px;
        height: 200px;
    }

    #caratula-info-name {
        font-size: 2em !important;
    }

    .carousel-caption {
        background-color: rgb(15, 10, 25);
    }

    .carousel-caption-header {
        color: rgb(244, 232, 232) !important;
    }

    .carousel-caption-header:hover {
        color: rgb(93, 244, 151) !important;
    }

}


@media (max-width: 765px) {

    #btnSend {
        background-color: rgba(0, 0, 0, 0);
        border: none;
        position: absolute;
        top: 18px;
        left: 90%;
    }

    textarea {
        margin-left: auto !important;
        cursor: default !important;
        user-select: none;
        -moz-user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
    }

    #term-dots-div {
        visibility: hidden;
    }

    #term-dots-box {
        display: none;
    }

    #terminal-header {
        display: flex;
        align-items: center;
        justify-content: center;
        grid-template-areas: none;
    }

    #term-title {
        text-align: center;
        width: 100%;
    }

    #form-filling-status {
        text-align: center;
    }

}


@media (max-width: 340px) {

    input {
        width: 100% !important;
    }
}


/* ############### KEYFRAMES ###############*/


@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes blinking {

    20% {
        opacity: .2;
    }

    40% {
        opacity: .4;
    }

    60% {
        opacity: .6;
    }

    80% {
        opacity: .8;
    }

    100% {
        opacity: 1;
    }

    80% {
        opacity: .8;
    }

    60% {
        opacity: .6;
    }

    40% {
        opacity: .4;
    }

}