.sidebar {
    position: fixed;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(15, 15, 15, 0.28);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 20;
}

.nav-btn {
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all .28s ease;
}

.nav-btn i {
    font-size: 20px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.08);
}

.nav-btn span {
    position: absolute;
    left: 72px;
    background: rgba(10, 10, 10, 0.85);
    color: white;
    padding: 8px 14px;
    border-radius: 12px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: .25s;
    pointer-events: none;
}

.nav-btn:hover span {
    opacity: 1;
    transform: translateX(0);
}

.brand {
    position: absolute;
    right: 70px;
    bottom: 50px;
    z-index: 10;
    transition: opacity .25s ease, transform .25s ease;
}

.brand.hidden {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.brand img {
    width: 260px;
    height: auto;
    opacity: 0.95;
    transition: transform .35s ease, opacity .35s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35));
}

.brand img:hover {
    transform: scale(1.03);
    opacity: 1;
}

@media (max-width: 768px) {
    .brand {
        right: 24px;
        bottom: 24px;
    }
    .brand img {
        width: 170px;
    }
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: .25s ease;
    z-index: 40;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: min(720px, calc(100vw - 120px));
    max-height: 80vh;
    background: rgba(18, 18, 18, .82);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 28px;
    padding: 28px;
    position: relative;
    overflow: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

@media (max-width: 768px) {
    .modal-content {
        width: calc(100vw - 32px);
        max-height: 85vh;
        padding: 22px;
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: white;
    cursor: pointer;
}

@media (max-width:768px) {
    .sidebar {
        left: 16px;
    }
    .title {
        left: 24px;
        bottom: 32px;
    }
    .title h1 {
        font-size: 2.2rem;
    }
    .nav-btn span {
        display: none;
    }
}

.background {
    position: fixed;
    inset: 0;
    z-index: -3;
    overflow: hidden;
}

.background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: brightness(0.78) saturate(1.05);
}

.overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient( 90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.30) 40%, rgba(0, 0, 0, 0.45) 100%);
    backdrop-filter: blur(1px);
    z-index: -2;
}

.gallery-section h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 8px;
}

.gallery-section p {
    color: #cbd5e1;
    margin-bottom: 28px;
}

.carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 22px;
    width: max-content;
    animation: scrollGallery 30s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.gallery-img {
    width: 240px;
    height: 320px;
    object-fit: cover;
    border-radius: 20px;
    cursor: pointer;
    transition: transform .35s ease, box-shadow .35s ease;
    flex-shrink: 0;
}

.gallery-img:hover {
    transform: scale(1.05);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

@keyframes scrollGallery {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 100;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}

.lightbox button {
    position: absolute;
    background: rgba(255, 255, 255, .08);
    border: none;
    color: white;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
}

.lightbox-close {
    top: 28px;
    right: 28px;
}

.lightbox-prev {
    left: 28px;
}

.lightbox-next {
    right: 28px;
}

.reverse-carousel {
    animation: scrollGalleryReverse 30s linear infinite;
}

.reverse-carousel:hover {
    animation-play-state: paused;
}

@keyframes scrollGalleryReverse {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 24px;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .06);
    cursor: pointer;
    transition: all .28s ease;
}

.video-item:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .12);
    transform: translateX(4px);
}

.video-item i {
    font-size: 28px;
    color: #f5f5f5;
    width: 32px;
    text-align: center;
}

.video-item .fa-youtube {
    color: #ff4b4b;
}

.video-info h3 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
}

.video-info span {
    color: #94a3b8;
    font-size: .9rem;
}

.video-thumb {
    position: relative;
    width: 320px;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform .3s ease, box-shadow .3s ease;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-thumb:hover {
    transform: scale(1.04);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .25);
    transition: background .25s ease;
}

.play-overlay i {
    font-size: 42px;
    color: white;
}

.video-thumb:hover .play-overlay {
    background: rgba(0, 0, 0, .12);
}

.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: .25s;
    z-index: 120;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-container {
    width: min(960px, 90vw);
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
}

.video-container video,
.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-close,
.video-prev,
.video-next {
    position: absolute;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: white;
    cursor: pointer;
    font-size: 18px;
}

.video-close {
    top: 24px;
    right: 24px;
}

.video-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.video-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}


/* =========================
    LOADER
========================= */

.loader {
    position: fixed;
    inset: 0;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity .8s ease, visibility .8s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.loader-logo {
    width: 180px;
    height: auto;
    opacity: 0;
    animation: logoFade 1s ease forwards;
}

.loader-bar {
    width: 220px;
    height: 2px;
    background: rgba(255, 255, 255, .12);
    overflow: hidden;
    border-radius: 999px;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: white;
    animation: loadingBar 2.2s ease forwards;
}

@keyframes loadingBar {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

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


/*==========================================
            PIXSAI ENGINE
==========================================*/

#pixsai {
    position: fixed;
    left: 0;
    top: 0;
    width: 95px;
    height: 95px;
    pointer-events: none;
    z-index: 999999;
}

#pixsai img {
    width: 100%;
    position: relative;
    z-index: 5;
    animation: flotar 3s ease-in-out infinite;
}

#pixsai-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 90px;
    height: 90px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(0, 232, 232, .25);
    filter: blur(18px);
    animation: respirar 2s infinite alternate;
}

@keyframes respirar {
    0% {
        transform: translate(-50%, -50%) scale(.9);
        opacity: .5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.25);
        opacity: 1;
    }
}


/*==========================================
            BURBUJA
==========================================*/

#pixsai-bubble {
    position: absolute;
    left: 95px;
    top: -15px;
    background: rgba(15, 15, 15, .92);
    border: 2px solid var(--cian);
    border-radius: 18px;
    padding: 12px 16px;
    min-width: 230px;
    color: white;
    -webkit-text-stroke: 0.6px #000;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(10px);
    transition: .4s;
    box-shadow: 0 0 18px rgba(0, 232, 232, .5);
}

#pixsai-bubble.mostrar {
    opacity: 1;
    transform: translateY(0);
}


/*==========================================================
                PARTÍCULAS PIXSAI
==========================================================*/

.pixel {
    position: fixed;
    width: 7px;
    height: 7px;
    background: #00E8E8;
    pointer-events: none;
    z-index: 1000000;
    border-radius: 2px;
    opacity: 1;
    box-shadow: 0 0 6px #00E8E8, 0 0 12px #00E8E8, 0 0 20px rgba(0, 232, 232, .7);
    animation: desaparecerPixel .8s linear forwards;
}

@keyframes desaparecerPixel {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate( var(--movimiento-x), var(--movimiento-y)) scale(.15) rotate(180deg);
    }
}

@keyframes flotar {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.info-section {
    padding: 8px 2px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 32px;
    align-items: start;
}

.info-text h2 {
    font-size: 2rem;
    margin-bottom: 14px;
}

.info-text p {
    color: #d6d6d6;
    line-height: 1.8;
    margin-bottom: 18px;
}

.bio-card,
.quote-card {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    padding: 22px;
}

.bio-card h3 {
    margin-bottom: 16px;
    color: #fff;
}

.bio-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bio-card li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: #d6d6d6;
}

.bio-card li:last-child {
    border-bottom: none;
}

.quote-card p {
    color: #f3f4f6;
    font-style: italic;
    line-height: 1.8;
}

.contact-list {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.contact-item i {
    width: 22px;
    text-align: center;
    color: #fff;
}

.contact-item a {
    color: #d6d6d6;
    text-decoration: none;
    transition: color .2s ease;
}

.contact-item a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.bio-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: center;
}

.bio-image img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .08);
}

.bio-label {
    color: #94a3b8;
    letter-spacing: .18em;
    font-size: .75rem;
    text-transform: uppercase;
}

.bio-content h2 {
    margin: 6px 0 2px;
    font-size: 2rem;
    color: #fff;
}

.bio-content h3 {
    margin: 0 0 18px;
    color: #cbd5e1;
    font-weight: 500;
}

.bio-content p {
    color: #d6d6d6;
    line-height: 1.8;
    margin-bottom: 20px;
}

.bio-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.bio-skills span {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #e5e7eb;
    font-size: .9rem;
}

.bio-content blockquote {
    margin: 0;
    padding-left: 18px;
    border-left: 2px solid rgba(255, 255, 255, .2);
    color: #f3f4f6;
    font-style: italic;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .bio-layout {
        grid-template-columns: 1fr;
    }
    .bio-image {
        max-width: 280px;
        margin: 0 auto;
    }
}


/* =========================
   CONTACTO
========================= */

.info-text h2 {
    color: #ffffff !important;
}

.info-text p {
    color: #d6d6d6;
}

.contact-item a {
    color: #d6d6d6;
    text-decoration: none;
}

.contact-item a:hover {
    color: #ffffff;
}