/* --- VARIABLES CSS & RESET --- */
:root {
    --bg-main: #0a0a12;
    --bg-secondary: #11111a;
    --text-primary: #ffffff;
    --text-secondary: #a9adb8;
    
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --gradient-main: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    --gradient-glow: linear-gradient(45deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));

    --card-blue-header: #1e293b;
    --card-purple-header: #312e81;
    --card-red-header: #7f1d1d;
    
    --nav-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-main);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.text-gradient {
    background: var(--gradient-main);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- NAVBAR --- */
.navbar {
    height: var(--nav-height);
    background: rgba(10, 10, 18, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%; 
    max-width: 100%; 
    padding: 0 3rem; 
}

.logo {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.btn-contact {
    background: var(--gradient-main);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.menu-toggle {
    display: none;
    cursor: pointer;
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-primary);
}

/* --- HERO SECTION --- */
.hero-section {
    padding-top: calc(var(--nav-height) + 0.1rem);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

/* --- COLUMNA DE TEXTO --- */
.hero-text {
    flex: 1.5;
    min-width: 500px;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-text h2 {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-text p {
    color: #e2e8f0; 
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* --- NUEVOS BOTONES HERO --- */
.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-hero.primary {
    background: var(--gradient-main);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-hero.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-hero.outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-blue);
}

.btn-hero.outline:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* --- BADGES DE TECNOLOGÍA --- */
.hero-tech-stack {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-tech-stack span {
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.2); 
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.hero-tech-stack span i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    display: inline-block;
}


.social-links {
    margin-top: 2.5rem; 
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin-right: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-blue);
}

/* --- IMAGEN HERO --- */
.hero-image-container {
    position: relative;
    width: 400px;
    height: auto;
    flex-shrink: 0;
}

.profile-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    filter: blur(40px);
    opacity: 0.5;
    border-radius: 20px;
    z-index: 1;
}

/* --- MEDIA QUERY (Móvil) --- */
@media (max-width: 968px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        padding-top: 2rem;
    }

    .hero-text {
        min-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-text h1 {
        order: 1; 
    }

    .hero-text h2 {
        order: 2; 
        margin-bottom: 1rem; 
    }

    .hero-text .badge {
        order: 3; 
        margin-bottom: 1.5rem; 
    }

    .hero-text p {
        order: 4;
    }

    .hero-buttons {
        justify-content: center;
        order: 5;
    }

    .hero-tech-stack {
        justify-content: center;
        order: 6;
    }

    .social-links {
        margin-bottom: 1rem;
        margin-top: 2rem;
        order: 7;
    }

    .hero-image-container {
        width: 280px;
        margin-bottom: 1rem;
    }
}

/* --- PROYECTOS SECTION --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
}

/* --- CABECERA CON IMAGEN --- */
.card-header {
    height: 200px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    position: relative;
    background-color: #1a1a2e;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

/* --- CUERPO DE LA TARJETA --- */
.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.card-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.tech-icons {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
    display: flex;
    gap: 10px;
}

/* --- BOTONES DE LA TARJETA --- */
.card-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.btn-card {
    flex: 1;
    padding: 0.6rem;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-card.primary {
    background: var(--gradient-main);
    color: white;
    border: none;
}

.btn-card.primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-card.secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-secondary);
}

.btn-card.secondary:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

/* --- NUEVOS ESTILOS PARA BADGES DE ESTADO --- */
.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- CAMBIOS PARA ESCRITORIO (Diseño Horizontal) --- */
@media (min-width: 992px) {
    
    
    .projects-grid {
        grid-template-columns: 1fr; 
        max-width: 1000px; 
        margin: 0 auto;   
        gap: 3rem;        
    }

    
    .project-card {
        flex-direction: row;
        min-height: 350px; 
        align-items: stretch; 
    }

    
    .card-header {
        width: 55%;
        height: auto; 
        border-bottom: none; 
        border-right: 1px solid rgba(255,255,255,0.05); 
    }

    
    .card-body {
        width: 45%;
        justify-content: center; 
        padding: 2.5rem; 
    }

    .project-card:nth-child(even) {
        flex-direction: row-reverse; 
    }

    .project-card:nth-child(even) .card-header {
        border-right: none;
        border-left: 1px solid rgba(255,255,255,0.05);
    }
    
   
    .project-img {
        height: 100%; 
        object-fit: cover;
    }
}

.badge-wip {
    background: rgba(245, 158, 11, 0.9);
}

.badge-beta {
    background: rgba(59, 130, 246, 0.9);
}

.badge-soon {
    background: rgba(107, 114, 128, 0.9);
}

/* --- SKILLS SECTION (RENOVADO) --- */
.section-darker {
    background-color: #08080c;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}


.skill-card {
    background: var(--bg-secondary); 
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    opacity: 0;
    transform: translateY(30px);
}


.skill-card.visible {
    opacity: 1;
    transform: translateY(0);
}


.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
    box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.2); 
}


.card-header {
    height: auto !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.icon-header {
    font-size: 1.8rem;
    color: var(--accent-purple);
    
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Contenedor de etiquetas */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* Las etiquetas (Pills) */
.tech-tag {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-tag i {
    color: var(--accent-blue);
    font-size: 1.1rem;
}

.tech-tag:hover {
    background: rgba(59, 130, 246, 0.1); 
    border-color: var(--accent-blue);
    color: #fff;
    transform: translateX(3px);
}

/* --- CONTACT SECTION --- */
.contact-container {
    max-width: 600px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group input, 
.input-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
}

.input-group input:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.btn-submit {
    padding: 1rem;
    background: var(--gradient-main);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-submit:hover {
    opacity: 0.9;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* --- CERTIFICACIONES SECTION --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.cert-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
    align-items: flex-start;
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    background: linear-gradient(145deg, var(--bg-secondary), rgba(59, 130, 246, 0.05));
}

.cert-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    min-width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.cert-content h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.institution {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.cert-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.cert-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}


@media (max-width: 600px) {
    .cert-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* --- RESPONSIVE DESIGN (Móvil) --- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        background: var(--bg-secondary);
        height: calc(100vh - var(--nav-height));
        width: 70%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.3s ease;
        border-left: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-tech-stack {
        justify-content: center;
    }

    .social-links {
        margin-bottom: 2rem;
    }

    .hero-image-container {
        width: 160px;  
        height: auto;  
        margin-bottom: 2rem;
        aspect-ratio: 1 / 1; 
    }
}

