/* 1. Variables y Base */
:root {
    --bg-color: #121619;
    --bg-darker: #0d0f11;
    --accent-color: #ff6b4a;
    --text-secondary: #9ea4a9;
    --navbar-height: 80px;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important; 
    position: relative; 
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
}

body {
    background-color: var(--bg-color);
    font-family: 'Poppins', sans-serif;
    padding-top: var(--navbar-height);
}

img {
    -webkit-user-drag: none;
    user-select: none;
}

/* 2. Navbar */
.glass-navbar {
    background-color: rgba(18, 22, 25, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#mainNavbar .navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 107, 74, 0.5);
    transition: all 0.3s ease;
}

.nav-logo-img {
    height: 35px;
    width: auto;
    object-fit: contain;
}

/* 3. Sección Hero */
.fw-extra-bold {
    font-weight: 800;
}

.profile-img-blended {
    position: relative;
    z-index: 10;
    width: 100%;
    height: auto;
    -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
}

.horizontal-line {
    width: 60px;
    height: 3px;
    border-radius: 2px;
    background-color: var(--accent-color); 
}

.cursor {
    display: inline-block;
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 4. Skills Scroller */
.skills-scroller {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4rem;
    padding: 10px 0;
    scrollbar-width: none;
}

.skills-scroller::-webkit-scrollbar {
    display: none;
}

.skills-scroller i {
    font-size: 3rem;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.6;
}

.skills-scroller i:hover {
    transform: scale(1.2);
    filter: grayscale(0%);
    opacity: 1;
}

/* 5. Componentes UI */
.text-accent {
    color: var(--accent-color);
}

.text-secondary-custom {
    color: var(--text-secondary);
}

.bg-darker {
    background-color: var(--bg-darker);
}

.progress-bar {
    width: 0;
    transition: width 1.5s ease-out;
    background-color: var(--accent-color) !important;
}

.btn-accent {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    border: none;
}

.shadow-accent-btn {
    box-shadow: 0 4px 15px rgba(255, 107, 74, 0.4);
}

.btn-accent:hover {
    background-color: #e55a3d;
    color: white;
    transform: translateY(-2px);
}

/* 6. Tarjetas */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 107, 74, 0.3);
}

.card-deco-circle {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 107, 74, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.tech-badge {
    font-size: 0.75rem;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.tech-badge i {
    font-size: 1rem;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 7. Sobre Mí */
.about-img-wrapper {
    position: relative;
    padding: 5px;
    background: radial-gradient(circle, rgba(255, 107, 74, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    display: inline-block;
}

.about-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 8. Formulario */
.form-control-dark {
    background-color: #1a1d21;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control-dark:focus {
    background-color: #212529;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 107, 74, 0.2);
    outline: none;
    color: #fff;
}

.form-control-dark::placeholder {
    color: #6c757d;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.2);
    color: #75b798;
    border: 1px solid #198754;
}

/* 9. Footer */
.social-icon {
    font-size: 2.2rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: var(--accent-color);
}

.border-top-glass {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 8px;
}

.footer-platform-logo {
    height: 40px;
    width: auto;
    
    transition: all 0.3s ease;
}

.footer-platform-logo:hover {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.05);
}

/* Animación Destello Footer */
.footer-logo-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine-sweep 3.5s infinite;
    pointer-events: none;
}

@keyframes shine-sweep {
    0% {
        left: -150%;
    }

    40% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

/* 10. Botón Flotante */
.btn-like-floating {
    position: fixed; bottom: 30px; left: 30px; z-index: 999;
    background-color: rgba(13, 15, 17, 0.9); backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 107, 74, 0.3); color: white;
    padding: 12px 20px; border-radius: 30px;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    transition: all 0.3s ease; font-family: 'Poppins', sans-serif;
}

.btn-like-floating:hover {
    transform: scale(1.05) translateY(-3px); background-color: #0d0f11;
    border-color: var(--accent-color); box-shadow: 0 10px 20px rgba(255, 107, 74, 0.2) !important;
}

.heart-beat { animation: beat 0.5s ease-in-out; }

@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.5); } }

/* Responsive: Versión compacta para celular */
@media (max-width: 768px) {
    .btn-like-floating {
        bottom: 15px; left: 15px; padding: 6px 12px; font-size: 0.75rem; border-radius: 20px; gap: 4px;
    }
    .btn-like-floating i { font-size: 0.9rem; }
}

/*12. NUEVAS CORRECCIONES (ICONO, TYPEWRITER Y MÓVIL) */

/* A) FIX TYPEWRITER: Espacio reservado y cursor pegado */
.hero-section .display-2 {
    min-height: 3.6em;       
    display: block;         
    margin-bottom: 2rem !important; 
    text-align: left;       
}

/* B) ICONO DEL MENÚ LIMPIO*/
.navbar-toggler {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0.5rem;
}

.navbar-toggler-icon {
    width: 2em;
    height: 2em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* C) DISEÑO MÓVIL (Alineado izquierda, pegado arriba, img chica) */
@media (max-width: 991px) {
    /* 1. Barra Navbar sólida desde el inicio */
    .glass-navbar {
        background-color: var(--bg-darker) !important;
        backdrop-filter: none;
    }

    /* 2. Sección Hero: Pegada arriba y alineada a la izquierda */
    .hero-section {
        padding-top: 40px !important; 
        padding-bottom: 30px;
        text-align: left !important;
        display: flex;
        flex-direction: column;
    }

    /* 3. Contenedor del texto forzado a la izquierda */
    .hero-content {
        text-align: left !important;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
    }

    /* 4. Imagen: Banner Centrado con Zoom y Difuminado */
    .hero-visual-wrapper {
        width: 100% !important; 
        max-width: 65% !important; 
        height: 200px !important;  
        
        /* POSICIÓN: ESTO LO CENTRA */
        margin: 0 auto 25px auto !important; 
        align-self: center !important;     
        
        /* ESTRUCTURA */
        position: relative;
        overflow: hidden; 
        border-radius: 0 0 15px 15px;
    }

    /* ESTILO DE LA FOTO (Zoom y Fade) */
    .hero-visual-wrapper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;   
        object-position: center 20% !important;
        
        /* Difuminado inferior */
        -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%) !important;
        mask-image: linear-gradient(to bottom, black 50%, transparent 100%) !important;
    }

    /* 5. Ajuste del texto Typewriter para móvil */
    .hero-section .display-2 {
        font-size: 2.2rem;
        min-height: 3em;
        text-align: left !important;
    }

    /* 6. Botones alineados a la izquierda */
    .hero-buttons {
        display: flex;
        gap: 15px;
        justify-content: flex-start !important;
    }

    /* 7. Ajuste imagen "Sobre Mí" */
    .about-img {
        width: 180px;
        height: 180px;
    }
}

/* Asegura que nada se salga de las tarjetas y empuje la pantalla */
.card {
    overflow: hidden !important; 
}

 /* Asegura que ninguna sección sea más ancha que la pantalla */
section {
    overflow-x: hidden !important;
}