/* ============================================
   VARIABLES CSS Y CONFIGURACIÓN GENERAL
============================================ */
:root {
    --primary-red: #dc2626;
    --red-hover: #b91c1c;
    --red-light: #ef4444;
    --dark-bg: #0f0f0f;
    --dark-light: #1a1a1a;
    --dark-card: #252525;
    --text-light: #f8f9fa;
    --text-gray: #6b7280;
    --text-muted: #9ca3af;
    --border-dark: #374151;
    --gradient-red: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    --shadow-dark: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-red: 0 4px 15px rgba(220, 38, 38, 0.3);
}

/* ============================================
   RESET Y CONFIGURACIÓN BASE
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light) !important;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Asegurar que todo el texto sea visible */
p, span, div, h1, h2, h3, h4, h5, h6 {
    color: inherit;
}

.text-light {
    color: var(--text-light) !important;
}

.text-white {
    color: white !important;
}

/* ============================================
   CLASES UTILITARIAS
============================================ */
.text-red {
    color: var(--primary-red) !important;
}

.text-light-gray {
    color: var(--text-gray) !important;
}

.bg-dark-light {
    background-color: var(--dark-light) !important;
}

/* ============================================
   NAVBAR
============================================ */
.navbar {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-dark);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light) !important;
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-red) !important;
    background-color: rgba(220, 38, 38, 0.1);
}

.navbar-nav .nav-link.active {
    color: var(--primary-red) !important;
}

/* ============================================
   BOTONES PERSONALIZADOS
============================================ */
.btn-red {
    background: var(--gradient-red);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-red);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-red:hover {
    background: var(--red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    color: white;
}

.btn-outline-red {
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    background: transparent;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-red:hover {
    background: var(--primary-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-red);
}

.btn-outline-light {
    border: 2px solid var(--text-light);
    color: var(--text-light);
    background: transparent;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-light:hover {
    background: var(--text-light);
    color: var(--dark-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 249, 250, 0.3);
}

/* ============================================
   SECCIÓN HERO
============================================ */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-light) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.hero-buttons {
    margin-top: 2rem;
}

/* ============================================
   IMAGEN DE PERFIL
============================================ */
.hero-image {
    position: relative;
    z-index: 2;
}

.image-container {
    position: relative;
    display: inline-block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
}

.profile-image {
    width: 450px;
    height: 450px;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, transparent 50%);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

/* ============================================
   INDICADOR DE SCROLL
============================================ */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-link {
    color: var(--text-light);
    font-size: 1.5rem;
    text-decoration: none;
    animation: bounce 2s infinite;
    transition: color 0.3s ease;
}

.scroll-link:hover {
    color: var(--primary-red);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ============================================
   TÍTULOS DE SECCIÓN
============================================ */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light) !important;
    margin-bottom: 1rem;
    position: relative;
}

.title-underline {
    width: 60px;
    height: 4px;
    background: var(--gradient-red);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

/* ============================================
   SECCIONES GENERALES
============================================ */
section {
    padding: 100px 0;
}

section:nth-child(even) {
    background-color: var(--dark-light);
}

/* ============================================
   FOOTER
============================================ */
footer {
    background-color: var(--dark-bg) !important;
    border-top: 1px solid var(--border-dark);
}

/* ============================================
   RESPONSIVIDAD
============================================ */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .profile-image {
        width: 320px;
        height: 320px;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .tech-item {
        padding: 1.5rem 0.5rem;
    }
    
    .tech-icon {
        font-size: 2.5rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-item {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .profile-image {
        width: 280px;
        height: 280px;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .tech-item span {
        font-size: 0.9rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .project-header {
        flex-direction: column;
        text-align: center;
    }
    
    .project-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .coming-soon-card {
        padding: 2rem 1rem;
    }
}

/* ============================================
   ANIMACIONES ADICIONALES
============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes techItemAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animación para las tarjetas de certificación */
@keyframes certificationGlow {
    0%, 100% {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    }
}

/* Eliminar la animación infinita que causaba el parpadeo */

/* ============================================
   SCROLLBAR PERSONALIZADA
============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red-hover);
}

/* ============================================
   SECCIÓN SOBRE MÍ
============================================ */
.about-content {
    padding: 2rem 0;
}

.about-content p {
    color: var(--text-light) !important;
}

.about-content .lead {
    color: var(--text-light) !important;
}

.about-content .text-muted {
    color: var(--text-muted) !important;
}

.about-image img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.05);
}

.certification-card {
    background: var(--dark-card);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-dark);
    height: 100%;
}

.certification-card h6 {
    color: var(--text-light) !important;
}

.certification-card small {
    color: var(--text-muted) !important;
}

.certification-card:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-red);
    border-color: var(--primary-red);
}

/* ============================================
   SECCIÓN TECNOLOGÍAS
============================================ */
.tech-carousel-container {
    padding: 2rem 0;
}

.tech-category {
    margin-bottom: 3rem;
}

.tech-category-title {
    color: var(--text-light) !important;
    font-weight: 600;
    margin-bottom: 2rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tech-item {
    background: var(--dark-card);
    padding: 2rem 1rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-dark);
    position: relative;
    overflow: hidden;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
    transition: left 0.5s ease;
}

.tech-item:hover::before {
    left: 100%;
}

.tech-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-red);
    border-color: var(--primary-red);
}

.tech-icon {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.tech-item:hover .tech-icon {
    transform: scale(1.2);
    color: var(--red-light);
}

.tech-item span {
    display: block;
    color: var(--text-light) !important;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ============================================
   SECCIÓN CONTACTO
============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.contact-item-link:hover {
    text-decoration: none;
    color: inherit;
}

.contact-item {
    background: var(--dark-card);
    padding: 2rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-dark);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-red);
    border-color: var(--primary-red);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
    color: white;
}

.contact-content {
    flex-grow: 1;
}

.contact-title {
    color: var(--text-light) !important;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-link {
    color: var(--text-light) !important;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.1rem;
}

.contact-link:hover {
    color: var(--primary-red) !important;
}

.contact-buttons {
    padding-top: 2rem;
    border-top: 1px solid var(--border-dark);
}

/* ============================================
   SECCIÓN PROYECTOS
============================================ */
.project-card {
    background: var(--dark-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-dark);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.05), transparent);
    transition: left 0.8s ease;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-red);
    border-color: var(--primary-red);
}

.github-card {
    background: linear-gradient(135deg, var(--dark-card) 0%, #1a1a1a 100%);
}

.project-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.project-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-red);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.project-icon i {
    font-size: 2.5rem;
    color: white;
}

.project-info {
    flex-grow: 1;
}

.project-title {
    color: var(--text-light) !important;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.project-description {
    color: var(--text-muted) !important;
    margin-bottom: 0;
    font-size: 1.1rem;
}

.project-footer {
    text-align: center;
}

.coming-soon-card {
    background: linear-gradient(135deg, var(--dark-card) 0%, #2a2a2a 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    border: 1px solid var(--border-dark);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.3s ease;
}

.coming-soon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.coming-soon-content {
    position: relative;
    z-index: 2;
}

.coming-soon-features {
    margin-top: 2rem;
}

.feature-item {
    text-align: center;
    padding: 1rem 0.5rem;
}

.feature-item i {
    font-size: 1.5rem;
    display: block;
}

.feature-item small {
    font-weight: 500;
}

/* Forzar colores correctos para todos los elementos */
section * {
    color: inherit;
}

section p {
    color: var(--text-light) !important;
}

section .lead {
    color: var(--text-light) !important;
}

section h4, section h5, section h6 {
    color: var(--text-light) !important;
}

/* Excepciones para texto con color específico */
.text-red {
    color: var(--primary-red) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-light-gray {
    color: var(--text-gray) !important;
}
