/* ===============================
   VARIABLES CSS Y CONFIGURACIÓN BASE
   =============================== */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --tercer-color: #2b9cf2;
    --accent-color: #fd79a8;
    --dark-color: #2d3436;
    --light-color: #ddd6fe;
    --bg-gradient: linear-gradient(60deg, #7840c8 0%,   #9f5efb 100%);
    --bg-gradient-alt: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    --shadow-light: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 15px 50px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.2);
    --border-radius: 15px;
    --border-radius-small: 10px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: #f8fafc;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ===============================
   NAVEGACIÓN
   =============================== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    height: 45px;
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-small);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(108, 92, 231, 0.1);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 80%;
    left: 10%;
}

/* ===============================
   SECCIONES HERO
   =============================== */
.hero-section {
    background: var(--bg-gradient);
    color: white;
    padding: 50px 0 0px;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero-section-proyectos {
    background: var(--bg-gradient);
    color: white;
    padding: 120px 0 80px;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero-section::before,
.hero-section-proyectos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
    opacity: 0.1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    transition: var(--transition);
}

.hero-image img:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Contenedor para el botón y el ícono de GitHub en el header */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}



/* Variante con borde transparente para que combine mejor */
.github-icon-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: transparent;
    color: white; /* Mismo color que el botón */
    border: 2px solid white;
    border-radius: 50%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.github-icon-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.github-icon-outline:hover::before {
    left: 100%;
}

.github-icon-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}


/* ===============================
   BOTONES
   =============================== */
.btn-primary-custom {
    background: var(--tercer-color);
    border: none;
    padding: 15px 35px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
    color: white;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary-custom:hover::before {
    left: 100%;
}

.btn-primary-custom:hover {
    background: #4da0e0;
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-light-custom {
    border: 2px solid white;
    color: white;
    background: transparent;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    margin: 0 0.5rem 0.5rem 0;
    transition: var(--transition);
}

.btn-outline-light-custom:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* ===============================
   SECCIONES GENERALES
   =============================== */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--bg-gradient);
    border-radius: 2px;
}

.text-center .section-title::after {
    left: 50%;
}

.section-title:not(.text-center)::after {
    left: 0;
    transform: none;
}

/* ===============================
   SECCIÓN SOBRE MÍ / ME SECTION
   =============================== */
.me-section {
    background: white;
}

.about-section {
    background: #f8fafc;
}

.about-section:nth-child(even) {
    background: white;
}

.about-section img {
    max-width: 100%;
    height: auto;
    /*border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);*/
    transition: var(--transition);
}

.about-section img:hover {
    transform: scale(1.02);
    /*box-shadow: var(--shadow-medium);*/
}

/* ===============================
   SECCIÓN DE HABILIDADES
   =============================== */
.skills-section {
    background: var(--bg-gradient);
    color: white;
}

.skills-section .section-title {
    color: white;
}

.skills-section .section-title::after {
    background: white;
}

.skill-accordion-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.skill-accordion-button {
    background: transparent;
    color: white;
    border: none;
    padding: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.skill-accordion-button:not(.collapsed) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: none;
}

.skill-accordion-button:focus {
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.skill-accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.skill-icon-small {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.accordion-body {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.accordion-body ul {
    padding-left: 1.5rem;
}

.accordion-body li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ===============================
   SECCIÓN DE PROYECTOS
   =============================== */
   /*
.projects-section {
    background: var(--dark-color);
    color: white;
}

.projects-section .section-title {
    color: white;
}

.projects-section .section-title::after {
    background: var(--primary-color);
}
*/
.projects-section {
    background: white;
    color: var(--dark-color);
}

.projects-section .section-title {
    color: var(--dark-color);
}

.projects-section .section-title::after {
    background: var(--primary-color);
}
.projects-section img {
    max-width: 40%;
    height: auto;
    /*border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);*/
    transition: var(--transition);
}

.projects-section img:hover {
    transform: translateY(-10px) scale(1.02);
    /*box-shadow: var(--shadow-heavy);*/
}

/* ===============================
   TARJETAS DE PROYECTOS (Página de Proyectos)
   =============================== */
.project-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(108, 92, 231, 0.1);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--bg-gradient);
    transition: left 0.3s ease;
}

.project-card:hover::before {
    left: 0;
}

.project-image {
    height: 200px;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}


.project-image i,
.project-image img {
    font-size: 3rem;
    color: white;
    transition: var(--transition);
}

.project-image:hover i,
.project-image:hover img {
    transform: scale(1.1) rotate(5deg);
}



.project-image iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px);
}

.project-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.project-description {
    color: #64748b;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--light-color);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.tag:hover {
    transform: translateY(-2px);
}

/* Colores específicos para tags */
.tag.java { background: #fef3c7; color: #f59e0b; }
.tag.kotlin { background: #ddd6fe; color: #7c3aed; }
.tag.android { background: #dcfce7; color: #16a34a; }
.tag.wordpress { background: #e0f2fe; color: #0369a1; }
.tag.spring { background: #dcfce7; color: #15803d; }
.tag.angular { background: #fee2e2; color: #dc2626; }
.tag.scratch { background: #fef3c7; color: #d97706; }
/* Colores específicos para tags - NUEVOS */
.tag.jmeter { background: #fee2e2; color: #dc2626; }
.tag.performance { background: #f3e8ff; color: #9333ea; }
.tag.testing { background: #ecfdf5; color: #059669; }
.tag.postman { background: #fff7ed; color: #ea580c; }
.tag.newman { background: #f0f9ff; color: #0284c7; }
.tag.apitesting { background: #fef2f2; color: #b91c1c; }
.tag.postgresql { background: #eff6ff; color: #2563eb; }
.tag.woocommerce { background: #f0fdf4; color: #16a34a; }
.tag.divi { background: #fdf4ff; color: #c026d3; }

.btn-repo {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-align: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-repo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-repo:hover::before {
    left: 100%;
}

.btn-repo:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ===============================
   SECCIÓN DE BLOG
   =============================== */
.blog-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
    border: 1px solid #e2e8f0;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.blog-image {
    height: 200px;
    background: var(--bg-gradient-alt);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-image i {
    font-size: 3rem;
    color: white;
    transition: var(--transition);
}

.blog-card:hover .blog-image i {
    transform: scale(1.1);
}

/* ===============================
   CERTIFICACIONES
   =============================== */
.img-certificaction {
    width: 150px;
    max-width: 150px;
    height: auto;
   /* border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);*/
    transition: var(--transition);
}

.img-certificaction:hover {
    transform: scale(1.05);
    /*box-shadow: var(--shadow-medium);*/
}

/* ===============================
   FOOTER / CONTACTO
   =============================== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 30px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bg-gradient);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-control {
    border: none;
    border-radius: var(--border-radius-small);
    padding: 15px 20px;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
    transform: translateY(-2px);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icons a:hover::before {
    opacity: 1;
}

.social-icons a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-light);
}

/* ===============================
   ANIMACIONES Y EFECTOS ESPECIALES
   =============================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-image img {
    animation: float 6s ease-in-out infinite;
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===============================
   RESPONSIVE DESIGN
   =============================== */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    .hero-section,
    .hero-section-proyectos {
        padding: 100px 0 80px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .nav-link {
        margin: 0.2rem 0;
        text-align: center;
    }
    
    .btn-primary-custom {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .btn-outline-light-custom {
        padding: 10px 20px;
        margin: 0.2rem;
        display: block;
        text-align: center;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-content {
        padding: 1.2rem;
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    .hero-section,
    .hero-section-proyectos {
        padding: 80px 0 60px;
        margin-top: 60px;
    }
    
    .section-padding {
        padding: 40px 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .project-tags {
        gap: 0.3rem;
    }
    
    .tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .social-icons {
        gap: 0.8rem;
    }
    
    .social-icons a {
        width: 45px;
        height: 45px;
    }
}

/* ===============================
   UTILIDADES Y HELPERS
   =============================== */
.text-gradient {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ===============================
   SCROLLBAR PERSONALIZADO
   =============================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===============================
   ESTADOS DE FOCUS PARA ACCESIBILIDAD
   =============================== */
button:focus,
.btn:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===============================
   PRINT STYLES
   =============================== */
@media print {
    .navbar,
    .footer,
    .btn,
    .social-icons {
        display: none !important;
    }
    
    .hero-section,
    .hero-section-proyectos {
        background: white !important;
        color: black !important;
        padding: 20px 0 !important;
        margin-top: 0 !important;
    }
    
    .section-padding {
        padding: 20px 0 !important;
    }
}