/* Variables CSS */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --dark-gray: #334155;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    background-color: #0f172a;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Partículas */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Barra de navegación */
.glass-nav {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    margin-left: 2rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--light);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

.lang-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 0.25rem;
}

.hamburger .line {
    width: 1.5rem;
    height: 2px;
    background: var(--light);
    transition: var(--transition);
}

/* Sección Hero */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.hero-content {
    flex: 1;
    padding-right: 1rem;
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-title {
    font-size: 0.5rem;
    font-weight: 1000;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--light);
    white-space: normal; /* Asegura que no se corte el texto */
    word-wrap: break-word; /* Permite que el texto se divida si es necesario */
    overflow-wrap: break-word;
}

.gradient-text {
    display: inline-block;
    background: linear-gradient(to right, #00c6ff, #0072ff); 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space:var(--shadow);
    word-break: break-word;
}

.typing-animation {
    display: inline-block;
    position: relative;
    color: var(--primary);
}

.typing-animation::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    gap: 0.5rem;
}

.primary-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.4);
}

.secondary-btn {
    background: transparent;
    color: var(--light);
    border: 1px solid var(--glass-border);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.code-window {
    background: var(--dark);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    margin-left: auto;
}

.window-header {
    padding: 0.75rem 1rem;
    background: var(--dark-gray);
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ef4444;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.green {
    background: #10b981;
}

.window-content {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    color: #e2e8f0;
    font-size: 0.875rem;
    line-height: 1.75;
    overflow-x: auto;
}

.window-content pre {
    margin: 0;
}

/* Secciones */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--light);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--gray);
    font-size: 1.125rem;
}

section {
    padding: 6rem 2rem;
    position: relative;
}

/* Habilidades */
.skills-section {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 1) 100%);
    padding: 1rem 2rem 4rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 2rem;
    transition: var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: var(--primary);
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.skill-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

/* Sección de Formación */
.education-section {
    padding: 1rem 2rem 4rem;
    background-color: var(--dark);
    scroll-margin-top: 80px;
}

.education-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.education-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    transition: var(--transition);
}

.education-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.education-icon {
    font-size: 1.5rem;
    color: var(--primary);
    min-width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.education-content {
    flex: 1;
}

.education-content h3 {
    color: var(--light);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.institution {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.date {
    color: var(--gray);
    font-size: 0.9rem;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.in-progress {
    background-color: rgba(234, 179, 8, 0.2);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.status.completed {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.description {
    color: var(--light);
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.certificate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background-color: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    font-weight: 500;
}

.certificate-btn:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.certificate-btn i {
    font-size: 0.7rem;
}

/* Estilos para el botón Ver Más Cursos */
.more-courses-container {
    margin-top: 2rem;
    text-align: center;
}

.more-courses-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1rem;
}

.more-courses-btn:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.more-courses-btn i {
    font-size: 0.8rem;
    transition: var(--transition);
}

.more-courses-btn:hover i {
    transform: translateX(3px);
}

/* Proyectos */
.projects-section {
    background: linear-gradient(180deg, rgba(15, 23, 42, 1) 0%, rgba(21, 30, 51, 1) 100%);
    padding: 1rem 2rem 4rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-tags {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.tag {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--light);
}

.project-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.project-actions {
    display: flex;
    gap: 1rem;
}

.outline-btn {
    background: transparent;
    color: var(--light);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.outline-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

/* Contacto */
.contact-section {
    background: linear-gradient(180deg, rgba(21, 30, 51, 1) 0%, rgba(15, 23, 42, 1) 100%);
    padding: 6rem 2rem;
    text-align: center;
}

.contact-container {
    max-width: 800px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.availability-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.location, .availability {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--light);
    font-size: 1.1rem;
}

.location i, .availability i {
    color: var(--primary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 1.25rem;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.social-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    border-color: transparent;
}

/* Footer */
.main-footer {
    background: #0f172a;
    padding: 4rem 2rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--primary);
}

.footer-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: var(--gray);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.footer-bottom p {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Botones flotantes de redes sociales */
.social-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.social-floating a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-btn {
    background-color: #25D366;
}

.instagram-btn {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
}

.github-btn {
    background-color: #333;
}

.linkedin-btn {
    background-color: #0077B5;
}

.social-floating a:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }
    
    .hero-section {
        padding: 6rem 1rem 2rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .skills-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .education-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .social-floating {
        bottom: 15px;
        right: 15px;
    }
    
    .social-floating a {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Teléfonos grandes (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

/* Tablets (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-section {
        flex-direction: column;
        padding-top: 7rem;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .code-window {
        margin: 0 auto;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
}

/* Laptops (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .hero-section {
        padding: 8rem 1.5rem 4rem;
    }
}

/* Desktop grande (1281px - 1920px) */
@media (min-width: 1281px) and (max-width: 1920px) {
    .nav-container {
        max-width: 1400px;
    }
    
    .hero-section {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
}

/* TVs y pantallas grandes (1921px+) */
@media (min-width: 1921px) {
    .nav-container {
        max-width: 1600px;
        padding: 1.5rem 3rem;
    }
    
    .hero-section {
        max-width: 1600px;
        padding: 10rem 3rem 6rem;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 3.5rem;
    }
    
    .section-header p {
        font-size: 1.25rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .skill-card {
        padding: 2.5rem;
    }
    
    .social-floating a {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* Menú hamburguesa para móviles */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .language-selector {
        margin-left: 0;
        justify-content: center;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}
