/* --- CONFIGURACIÓN DE COLORES Y VARIABLES --- */
:root {
    --primary: #ff3333;      
    --bg-dark: #0f172a;      
    --bg-card: #1e293b;      
    --text-light: #f8fafc;   
    --text-gray: #94a3b8;    
}

/* --- GENERALES --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-light); overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; overflow: hidden; }

.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; }
.section-subtitle { color: var(--primary); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 0.9rem; }
.highlight { color: var(--primary); }

/* --- NAVBAR --- */
header { position: fixed; top: 0; left: 0; width: 100%; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px); 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: 70px; }
.logo { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.nav-menu { display: flex; gap: 30px; }
.nav-link { font-size: 0.95rem; color: var(--text-gray); font-weight: 500; }
.nav-link:hover, .nav-link.active { color: var(--primary); }

/* --- HERO --- */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding-top: 80px; text-align: center; }
.hero-content { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 800px; }
.hero-greeting { font-size: 1.2rem; color: var(--primary); font-weight: 600; margin-bottom: 15px; display: inline-block; background: rgba(255, 51, 51, 0.1); padding: 5px 15px; border-radius: 20px; }
.hero-title { font-size: 4rem; line-height: 1.2; font-weight: 800; margin-bottom: 25px; }
.hero-desc { color: var(--text-gray); font-size: 1.1rem; margin-bottom: 40px; line-height: 1.8; }
.btn { display: inline-block; padding: 12px 30px; border-radius: 8px; font-weight: 600; border: 2px solid var(--primary); margin: 0 10px; cursor: pointer; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 0 20px rgba(255, 51, 51, 0.4); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(255, 51, 51, 0.6); }
.btn-outline { color: var(--text-light); }
.btn-outline:hover { background: var(--primary); color: white; }
.hero-security-icons { margin-top: 50px; display: flex; justify-content: center; gap: 30px; font-size: 2.5rem; color: var(--text-gray); }
.hero-security-icons i { transition: 0.3s; cursor: pointer; }
.hero-security-icons i:hover { color: var(--primary); transform: scale(1.2); text-shadow: 0 0 15px var(--primary); }

/* --- ABOUT --- */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: center; }
.about-img-container { display: flex; justify-content: center; }
.about-img { width: 100%; max-width: 320px; height: 380px; object-fit: cover; border-radius: 20px; border: 3px solid var(--primary); box-shadow: 0 0 30px rgba(255, 51, 51, 0.2); }
.about-role { font-size: 1.8rem; margin-bottom: 20px; }
.about-desc { color: var(--text-gray); margin-bottom: 30px; line-height: 1.8; }
.stats { display: flex; gap: 20px; margin-top: 30px; }
.stat-box { background: var(--bg-card); padding: 20px; border-radius: 10px; text-align: center; flex: 1; border: 1px solid rgba(255,255,255,0.05); }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--primary); display: block; }

/* --- EXPERIENCE --- */
.experience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.experience-card { background: var(--bg-card); border-radius: 15px; overflow: hidden; position: relative; height: 350px; border: 1px solid rgba(255,255,255,0.05); transition: all 0.4s ease; cursor: pointer; }
.experience-card:hover { border-color: var(--primary); box-shadow: 0 0 20px rgba(255, 51, 51, 0.3); transform: translateY(-5px); }
.exp-visible { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; transition: 0.4s; }
.experience-card:hover .exp-visible { opacity: 0.2; transform: translateY(-20px); }
.exp-icon-box { width: 80px; height: 80px; background: rgba(255, 51, 51, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--primary); margin-bottom: 20px; border: 1px solid var(--primary); }
.exp-role { font-size: 1.5rem; font-weight: 700; margin-bottom: 5px; }
.exp-company { color: var(--primary); font-size: 1rem; font-weight: 500; }
.exp-hidden-details { position: absolute; bottom: -100%; left: 0; width: 100%; height: 100%; background: linear-gradient(0deg, rgba(15,23,42,1) 10%, rgba(255,51,51,0.9) 100%); padding: 30px; display: flex; flex-direction: column; justify-content: center; transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); color: white; }
.experience-card:hover .exp-hidden-details { bottom: 0; }
.exp-date { font-size: 0.9rem; background: rgba(0,0,0,0.3); padding: 5px 10px; border-radius: 10px; display: inline-block; margin-bottom: 15px; width: fit-content; }
.exp-desc-list { list-style: none; text-align: left; }
.exp-desc-list li { font-size: 0.9rem; margin-bottom: 10px; display: flex; gap: 10px; }

/* --- WHY ME --- */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.why-points { display: flex; flex-direction: column; gap: 30px; }
.point-item { display: flex; align-items: flex-start; gap: 20px; }
.point-icon { flex-shrink: 0; width: 40px; height: 40px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.2rem; box-shadow: 0 0 15px rgba(255, 51, 51, 0.4); }
.point-content h3 { font-size: 1.2rem; margin-bottom: 5px; font-weight: 600; }
.point-content p { color: var(--text-gray); font-size: 0.95rem; line-height: 1.6; }

/* --- SKILLS --- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.skill-card { background: var(--bg-card); padding: 25px; border-radius: 15px; text-align: center; border: 1px solid rgba(255,255,255,0.05); transition: 0.3s; }
.skill-card:hover { border-color: var(--primary); transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.skill-icon { font-size: 2.5rem; margin-bottom: 15px; color: var(--primary); }

/* --- CARRUSEL PROYECTOS --- */
.projects-carousel-wrapper { display: flex; align-items: center; justify-content: center; gap: 20px; position: relative; max-width: 1000px; margin: 0 auto; }
.project-slide-container { width: 100%; overflow: hidden; border-radius: 20px; box-shadow: 0 0 30px rgba(255, 51, 51, 0.1); background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05); min-height: 450px; display: flex; align-items: center; justify-content: center;}
.project-card-dynamic { display: flex; flex-direction: column; animation: fadeIn 0.5s ease; width: 100%; cursor: pointer;}
.project-card-dynamic img { width: 100%; height: 350px; object-fit: cover; border-bottom: 2px solid var(--primary); transition: opacity 0.3s;}
.project-card-dynamic:hover img { opacity: 0.8; }
.project-info-dynamic { padding: 30px; text-align: left; }
.nav-btn { background: var(--bg-card); color: var(--primary); border: 1px solid var(--primary); width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; z-index: 10; flex-shrink: 0;}
.nav-btn:hover { background: var(--primary); color: white; transform: scale(1.1); box-shadow: 0 0 15px var(--primary); }
.project-counter { text-align: center; margin-top: 20px; font-size: 1.1rem; font-weight: 600; color: var(--text-gray); letter-spacing: 2px; }
.tag { font-size: 0.8rem; background: rgba(255,51,51,0.1); color: var(--primary); padding: 5px 10px; border-radius: 20px; }

/* --- REVIEWS --- */
.reviews-container { display: flex; flex-direction: column; gap: 50px; }
.reviews-carousel { position: relative; background: var(--bg-card); border-radius: 20px; padding: 40px; text-align: center; border: 1px solid rgba(255,255,255,0.05); min-height: 300px; display: flex; align-items: center; justify-content: center; }
.review-card { display: none; animation: fadeIn 0.5s ease; }
.review-card.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.review-avatar { width: 70px; height: 70px; background: var(--primary); border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: white; font-weight: 700; }
.review-stars { color: #ffd700; font-size: 1.2rem; margin-bottom: 15px; }
.review-text { font-style: italic; color: var(--text-gray); font-size: 1.1rem; margin-bottom: 20px; }
.review-name { font-weight: 700; color: var(--text-light); font-size: 1.2rem; }
.review-date { font-size: 0.8rem; color: var(--primary); }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; transition: 0.3s; }
.carousel-btn:hover { background: var(--primary); }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }
.review-form-container { background: rgba(255,255,255,0.02); padding: 30px; border-radius: 20px; max-width: 600px; margin: 0 auto; }
.form-title { text-align: center; margin-bottom: 20px; }
.form-group { margin-bottom: 15px; }
.form-input, .form-textarea { width: 100%; padding: 12px; background: var(--bg-dark); border: 1px solid #333; border-radius: 8px; color: white; outline: none; }
.form-input:focus, .form-textarea:focus { border-color: var(--primary); }
.star-rating { display: flex; gap: 5px; cursor: pointer; justify-content: center; margin-bottom: 20px; }
.star-rating i { color: #444; font-size: 1.5rem; transition: 0.2s; }
.star-rating i.active { color: #ffd700; }

/* --- CONTACT --- */
.contact-container { max-width: 600px; margin: 0 auto; text-align: center; }
.social-links { display: flex; justify-content: center; gap: 20px; margin-top: 30px; }
.social-btn { width: 50px; height: 50px; border-radius: 50%; background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; transition: 0.3s; border: 1px solid rgba(255,255,255,0.1); }
.social-btn:hover { background: var(--primary); color: white; transform: rotate(360deg); }

/* --- MODAL DETALLES PROYECTO (NIVEL 1) --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px); z-index: 9990; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; padding: 20px; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: var(--bg-card); width: 100%; max-width: 700px; max-height: 90vh; border-radius: 20px; border: 1px solid var(--primary); box-shadow: 0 0 50px rgba(255, 51, 51, 0.15); overflow-y: auto; position: relative; transform: scale(0.9); transition: transform 0.3s ease; display: flex; flex-direction: column; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.6); color: white; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.2rem; transition: 0.3s; z-index: 20; border: 1px solid rgba(255,255,255,0.2); }
.modal-close:hover { background: var(--primary); transform: rotate(90deg); }
.modal-img-container { width: 100%; height: 350px; background: #000; display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #333; position: relative; overflow: hidden; cursor: zoom-in;}
.modal-img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.3s; }
.modal-img-container:hover .modal-img { transform: scale(1.02); }
.zoom-hint { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.7); color: white; padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; pointer-events: none; display: flex; gap: 5px; align-items: center; }
.modal-details { padding: 30px; text-align: left; }
.modal-title { font-size: 1.8rem; margin-bottom: 15px; color: var(--text-light); }
.modal-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.modal-desc { color: var(--text-gray); line-height: 1.6; margin-bottom: 25px; font-size: 0.95rem; }

/* --- ZOOM FULLSCREEN (NIVEL 2) --- */
.zoom-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.95); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; cursor: zoom-out; }
.zoom-overlay.active { opacity: 1; visibility: visible; }
.zoom-img-full { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 5px; box-shadow: 0 0 50px rgba(0,0,0,0.8); transform: scale(1); transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); cursor: grab; }
.zoom-img-full.zoomed-in { transform: scale(2); cursor: zoom-out; }
.zoom-close-btn { position: absolute; top: 30px; right: 30px; width: 50px; height: 50px; background: rgba(255, 255, 255, 0.1); border: 2px solid rgba(255, 255, 255, 0.3); border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer; z-index: 10001; transition: all 0.3s ease; backdrop-filter: blur(5px); }
.zoom-close-btn:hover { background: var(--primary); border-color: var(--primary); transform: rotate(90deg) scale(1.1); box-shadow: 0 0 15px var(--primary); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .about-grid, .why-grid { grid-template-columns: 1fr; text-align: center; }
    .nav-menu { display: none; }
    .about-img-container { max-width: 80%; margin: 0 auto 30px auto; }
    .projects-carousel-wrapper { flex-direction: column; }
    .nav-btn { display: none; }
    .zoom-close-btn { top: 20px; right: 20px; width: 40px; height: 40px; font-size: 1.2rem; }
}

/* --- CERTIFICACIONES --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cert-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: default;
}

.cert-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(255, 51, 51, 0.2);
    transform: translateY(-5px);
}

.cert-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.cert-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-light);
}

.cert-issuer {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Detalles ocultos que suben al hacer hover */
.cert-details {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(5px);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cert-card:hover .cert-details {
    bottom: 0;
}

.cert-desc {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.cert-year {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    width: fit-content;
}