/* Reset general y fuentes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00bcd4;
    --secondary-color: #2196f3;
    --dark-bg: #232526;
    --darker-bg: #0f2027;
    --text-light: #ffffff;
    --text-muted: #cccccc;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.18);
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(120deg, var(--dark-bg) 0%, var(--darker-bg) 40%, var(--primary-color) 100%);
    background-attachment: fixed;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Efecto de partículas en el fondo */
body::before, body::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0.18;
    filter: blur(32px);
}

body::before {
    width: 420px;
    height: 420px;
    left: -120px;
    top: -120px;
    background: radial-gradient(circle at 30% 30%, var(--primary-color) 0%, var(--secondary-color) 80%, transparent 100%);
    animation: move1 18s ease-in-out infinite alternate;
}

body::after {
    width: 340px;
    height: 340px;
    right: -100px;
    bottom: -100px;
    background: radial-gradient(circle at 70% 70%, var(--secondary-color) 0%, var(--primary-color) 80%, transparent 100%);
    animation: move2 22s ease-in-out infinite alternate;
}

@keyframes move1 {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(60px) scale(1.08); }
}

@keyframes move2 {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-40px) scale(1.05); }
}

/* Contenedor principal */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeIn 1s ease;
}

.avatar-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 0 25px rgba(0, 188, 212, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    object-fit: cover;
}

.avatar-img:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 35px var(--primary-color);
}

h1 {
    font-size: 2.8rem;
    margin: 20px 0 10px;
    background: linear-gradient(90deg, var(--primary-color) 40%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 8px rgba(0, 188, 212, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 400;
}

.intro {
    font-size: 1.05rem;
    color: #ddd;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Secciones */
.section {
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    padding-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Tarjetas de habilidades */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.skill-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 188, 212, 0.25);
    border-color: rgba(0, 188, 212, 0.3);
}

.skill-icon {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.skill-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 1.5s ease;
}

/* Sección de logros */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: rgba(0, 188, 212, 0.1);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 188, 212, 0.15);
}

.stat-card:hover {
    background: rgba(0, 188, 212, 0.15);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    color: inherit;
    text-decoration: none;
    display: block;
    backdrop-filter: blur(6px);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 188, 212, 0.2);
    border-color: rgba(0, 188, 212, 0.3);
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-card h3 i {
    color: var(--primary-color);
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-tech {
    display: inline-block;
    background: rgba(0, 188, 212, 0.15);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 10px;
}

/* Artículos */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.article-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(6px);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 188, 212, 0.15);
}

.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-card h3 i {
    color: var(--primary-color);
}

.article-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--secondary-color);
    gap: 8px;
}

/* Testimonios */
.testimonials {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding: 30px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.testimonials::-webkit-scrollbar {
    height: 6px;
}

.testimonials::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.testimonial {
    min-width: 320px;
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(0, 188, 212, 0.1);
    transition: all 0.3s ease;
}

.testimonial:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.testimonial p {
    font-style: italic;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 15px;
    position: relative;
}

.testimonial p::before,
.testimonial p::after {
    content: '"';
    color: var(--primary-color);
    font-size: 1.2rem;
}

.author {
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
}

/* Documentos PDF */
.pdf-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.pdf-item {
    display: flex;
    align-items: center;
    background: rgba(0, 188, 212, 0.05);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 188, 212, 0.1);
    backdrop-filter: blur(4px);
}

.pdf-item:hover {
    background: rgba(0, 188, 212, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 188, 212, 0.1);
}

.pdf-icon {
    font-size: 1.8rem;
    margin-right: 20px;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pdf-item h4 {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.pdf-link {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin-top: 5px;
    transition: all 0.3s ease;
}

.pdf-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Contacto */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.contact-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 188, 212, 0.1);
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
}

.contact-item:hover {
    background: rgba(0, 188, 212, 0.1);
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 188, 212, 0.15);
}

.contact-item > div:first-child {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.contact-item p, .contact-item a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact-item a {
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
    word-break: break-all;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

/* Botón flotante login */
.login-float-btn {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 100;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(0, 188, 212, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.login-float-btn:hover {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 188, 212, 0.35);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 30px 15px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .avatar-img {
        width: 120px;
        height: 120px;
    }
    
    .skills-grid, .projects-grid, .articles-grid, .contact-info {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section {
        margin-bottom: 60px;
    }
    
    .login-float-btn {
        right: 20px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pdf-item {
        flex-direction: column;
        text-align: center;
    }
    
    .pdf-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary-color), var(--secondary-color));
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}