   /* FUENTES */
@font-face {
    font-family: 'Pixellari';
    src: url('fonts/Pixellari.ttf') format('truetype');
}
@font-face {
    font-family: 'Upheaval';
    src: url('fonts/upheavtt.ttf') format('truetype');
}
@font-face {
    font-family: 'Coolvetica';
    src: url('fonts/CoolveticaHvComp.otf') format('truetype');
}
@font-face {
    font-family: 'Brunson';
    src: url('fonts/Brunson.ttf') format('truetype');
}
@font-face {
    font-family: 'Nexa';
    src: url('fonts/Nexa-Heavy.ttf') format('truetype');
}

/* AJUSTES GENERALES */
body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.justificado {
    text-align: justify !important;
    text-justify: inter-word;
    hyphens: auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

/* NAVBAR */
.nav-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    font-family: 'Brunson', sans-serif;
    align-items: center;
}

.w3-bar .w3-bar-item {
    font-size: 1.5rem;
    padding: 20px 15px;
}

.btn-cv {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #aaaaaa;
    color: black;
    font-family: 'Brunson', sans-serif;
    font-size: 1.2rem;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    border: 2px solid white;
    transition: 0.3s;
    z-index: 100;
}

.btn-cv:hover {
    background-color: white;
    color: #000000;
    border-color: #000000;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.hero-image {
    background: url('img/Banner.jpg') center/cover no-repeat;
    height: 100vh;
    position: relative;
    width: 100%;
}

/* PRESENTACION */
.presentation-section {
    padding: 40px 20px;
    background: url('img/PresentationBg.jpg') center/cover no-repeat;
    color: white;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffcc00;
    font-family: 'Brunson';
}

.presentation-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 80px;
}

.presentation-image img {
    max-width: 400px; 
    width: 100%; 
    height: auto;
}

.presentation-text {
    flex: 1;
}

.presentation-text h3 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ffcc00;
    font-family: 'Brunson';
    line-height: 1.1;
}

.presentation-text p {
    line-height: 1.3;
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ccc;
    font-family: 'Nexa', sans-serif;
}

/* HISTERIA */
.carousel-section {
    position: relative;
    height: 90vh;
    background: url('img/HisteriaBg.jpg') center/cover no-repeat;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.mySlides {
    display: none;
    height: 100%;
    width: 100%;
}

.slide-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.slide-content {
    position: absolute;
    bottom: 100px;
    left: 100px;
    max-width: 600px;
    color: white;
    z-index: 5;
    text-align: left;
}

.game-title {
    font-family: 'Brunson', sans-serif;
    font-size: 4rem;
    color: #9b00d3;
    margin: 0;
    text-shadow: 2px 2px 0px #000;
    line-height: 1;
}

.game-desc {
    font-family: 'Nexa', sans-serif;
    font-size: 1.5rem;
    margin-top: 20px;
    margin-bottom: 30px;
}

.slide1-image {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    max-width: 45%;
}

.slide1-image img {
    max-width: 450px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(196, 107, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.slide-video-right {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 600px;
    max-width: 90%;
    aspect-ratio: 16 / 9; 
    box-shadow: 0 10px 30px rgba(196, 107, 255, 0.5);
    background: #000;
}

.slide-video-right iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.tech-stack { margin: 10px 0; }

.tech-badge {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 5px 15px;
    font-family: 'Nexa', sans-serif;
    margin-right: 10px;
    font-size: 1rem;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 5px;
}

.btn-play-slider {
    background-color: #9b00d3;
    color: rgb(255, 255, 255);
    padding: 15px 30px;
    font-family: 'Brunson', sans-serif;
    font-size: 1.5rem;
    text-decoration: none;
    border: none;
    transition: 0.3s;
    display: inline-block;
}

.btn-play-slider:hover {
    background-color: #46015f;
    transform: scale(1.05);
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 3rem;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 10;
}
.next { right: 0; border-radius: 3px 0 0 3px; }
.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
    color: #827697;
}

   /* OTROS PROYECTOS */
.other-projects-section {
    padding: 80px 20px;
    background: url('img/OtrosBg.jpg') center/cover no-repeat;
    color: white;
}

.other-projects-section .section-title { color: #009a03; }

.projects-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.project-card {
    background: #0a340e;
    width: 45%;
    min-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    text-align: center;
    padding-bottom: 30px;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: #68ff89;
}

.project-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.img-full-view {
    width: auto !important;
    max-width: 90% !important;
    height: auto !important;
    max-height: 90% !important;
    object-fit: contain !important; 
    background-color: transparent !important; 
    border: none !important;
    display: block !important;
}

.project-info { padding: 20px; }

.project-info h3 {
    font-family: 'Brunson', sans-serif;
    color: #009a03;
    font-size: 2.5rem;
    margin-top: 10px;
    margin-bottom: 15px;
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: white;
}

.project-info p {
    font-family: 'Nexa', sans-serif;
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 30px;
    padding: 0 10px;
}

.btn-project {
    display: inline-block;
    padding: 12px 30px;
    background-color: #009a03;
    color: white;
    text-decoration: none;
    font-family: 'Brunson', sans-serif;
    font-size: 1.2rem;
    border-radius: 5px;
    transition: 0.3s;
    border: 2px solid #ffffff;
}

.btn-project:hover {
    background-color: transparent;
    color: #68ff89;
}

/* APTITUDES */
#aptitudes .section-title {
    font-family: 'Brunson', sans-serif;
    color: #0017b0;
    font-size: 3rem;
    margin-bottom: 35px;
}

.skills-tabs-section {
    padding: 80px 20px;
    background-color: #0b0b0b;
    color: white;
    min-height: 80vh;
}

.tabs-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
}

.tab-link {
    background-color: transparent;
    color: #ccc;
    font-family: 'Brunson', sans-serif;
    font-size: 1.5rem;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-link:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.tab-link.active {
    color: #0017b0;
    border-bottom: 3px solid #0017b0;
}

.tab-content {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 50px;
    animation: fadeIn 0.5s;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-subtitle {
    font-family: 'Nexa', sans-serif;
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 10px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-left: 3px solid #0017b0;
    padding-left: 10px;
}

.split-content { flex: 1; }

.split-content h3, .full-width-text h3 {
    font-family: 'Brunson', sans-serif;
    font-size: 2.5rem;
    color: #0017b0;
    margin-bottom: 20px;
}

.split-content p, #Modeling p {
    font-family: 'Nexa', sans-serif;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 15px;
}

.badges-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.skill-badge {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    font-family: 'Brunson', sans-serif;
    font-size: 1.2rem;
    border-radius: 5px;
    transition: 0.3s;
}

.skill-badge:hover {
    background: #0017b0;
    color: black;
    border-color: #0017b0;
    transform: scale(1.1);
}

.software-section-block {
    max-width: 100%;
    padding: 0 20px;
    margin-bottom: 10px;
}

.software-section-block h3 {
    font-family: 'Brunson', sans-serif;
    font-size: 2.5rem;
    color: #0017b0;
    margin-bottom: 5px;
}

.software-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.software-icon {
    height: 80px;
    width: auto;
    object-fit: contain;
    transition: all 0.2s ease;
    cursor: help;
}

.software-icon:hover {
    transform: scale(1.1);
}

.category-overlay {
    font-family: 'Nexa', sans-serif;
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 10px;
}

.sub-gallery-container {
    display: none;
    flex-direction: column;
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    align-items: flex-start;
    animation: fadeIn 0.5s;
}

.gallery-heading {
    font-family: 'Nexa', sans-serif;
    color: #ccc;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.full-gallery-grid {
    column-count: 3; 
    column-gap: 20px;
    width: 100%;
    display: block;
    margin-top: 20px;
}

.full-gallery-grid img {
    width: 100%;
    height: auto;
    break-inside: avoid;
    margin-bottom: 40px;
    border-radius: 8px;
    border: 1px solid #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: block;
}
.full-gallery-grid img:hover {
    border-color: #0017b0;
    transform: translateY(-5px);
    cursor: pointer;
}

.btn-back {
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid #0017b0;
    border-radius: 5px;
    width: auto;
    font-family: 'Brunson', sans-serif;
    color: #0017b0;
    cursor: pointer;
}
.btn-back:hover {
    background-color: #000000;
    border-color: #0017b0;
    transform: translateX(-5px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #333;
    transition: 0.3s;
}
.gallery-grid img:hover {
    transform: scale(1.05);
    border-color: #0017b0;
}

#Social .gallery-grid img {
    height: auto !important;
    max-height: 300px;
    object-fit: contain !important;
    background-color: rgba(0,0,0,0.5);
    width: 100%;
}

/* CONTACTO */
.contact-section {
    padding: 80px 20px 40px 20px;
    background-color: #050505;
    color: white;
    border-top: 2px solid #333;
}
#contact .section-title { color: #ffffff; }

.contact-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 60px auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    transition: 0.3s ease;
    text-decoration: none;
    background: rgba(204, 204, 204, 0.5);
    border: 1px solid transparent;
}

.contact-link:hover {
    background: rgba(178, 178, 178, 0.55);
    border-color: #ffffff;
    transform: translateY(-5px);
}

.icon-box img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: invert(1);
}

.text-box h4 {
    font-family: 'Brunson', sans-serif;
    color: #ffffff;
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.text-box p {
    font-family: 'Nexa', sans-serif;
    color: #ccc;
    margin: 0;
    font-size: 1.1rem;
}

.footer-copy {
    text-align: center;
    border-top: 1px solid #222;
    padding-top: 20px;
    color: #666;
    font-family: 'Nexa', sans-serif;
    font-size: 0.9rem;
}

/* PANTALLA COMPLETA */
.modal-lightbox {
    display: none;
    position: fixed; 
    z-index: 1000;
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    cursor: zoom-out;
}

.modal-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 8, 255, 0.5);
    animation-name: zoom;
    animation-duration: 0.3s;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-btn:hover, .close-btn:focus {
    color: #0017b0;
    text-decoration: none;
    cursor: pointer;
}

/* MOVILES */
@media only screen and (max-width: 1000px) {
    .full-gallery-grid {
        column-count: 2;
    }
}

@media only screen and (max-width: 850px) {
    .nav-container {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 5px;
    }

    .w3-bar .w3-bar-item {
        font-size: 0.9rem;
        padding: 8px 10px;
        width: auto;
        border-bottom: none;
    }

    .btn-cv {
        position: static;
        transform: none;
        display: block;
        margin: 5px auto 10px auto;
        width: 60%;
        font-size: 0.9rem;
        padding: 5px 10px;
        text-align: center;
    }
}

@media only screen and (max-width: 768px) {
    .presentation-text h3 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .game-title {
        font-size: 2rem; line-height: 1.1;
    }

    .presentation-text p {
        font-size: 1.2rem;
    }
    
    .presentation-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .presentation-image img {
        width: 80%; max-width: 300px;
    }
    
    .tab-content {
        flex-direction: column !important;
        text-align: center;
    }
    
    .contact-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .contact-item {
        width: 100%; justify-content: center;
    }

    .slide-content {
        left: 5%;
        right: 5%;
        bottom: 50px;
        width: auto;
        max-width: none;
        text-align: center;
    }
    
    .slide-video-right, .slide1-image {
        display: none; 
    }
    
    .tech-stack {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .project-card {
        width: 100%;
    }
    
    .software-icon {
        height: 50px; gap: 10px;
    }
    
    .modal-content {
        width: 100%;
    }
}

@media only screen and (max-width: 600px) {
    .full-gallery-grid {
        column-count: 1;
    }
    
    .w3-bar .w3-bar-item {
        font-size: 1.5rem;
        padding: 10px;
    }
}