/* ============================================================
   PORTAFOLIO — style.css  (versión mejorada para ventas)
   ============================================================ */

:root {
    --bg-color:   #0f172a;
    --text-main:  #f8fafc;
    --text-muted: #94a3b8;
    --accent:     #38bdf8;
    --accent-dark:#0284c7;
    --menu-bg:    rgba(15, 23, 42, 0.92);
    --card-bg:    #1e293b;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, Helvetica, sans-serif; }

html { scroll-behavior: smooth; }

body { background-color: var(--bg-color); color: var(--text-main); overflow-x: hidden; }

/* ── Layout ── */
.app-container { display: flex; min-height: 100vh; }

#main-content {
    width: 85%;
    padding: 0 8rem;
    display: flex;
    flex-direction: column;
}

/* ── Secciones con fade-in ── */
.section {
    min-height: 100vh;
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.section.visible { opacity: 1; transform: translateY(0); }
#inicio { opacity: 1; transform: none; }

/* ── Menú lateral ── */
#right-menu {
    width: 15%;
    min-width: 280px;
    position: fixed;
    right: 0; top: 0;
    height: 100vh;
    background-color: var(--menu-bg);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-left: 1px solid rgba(255,255,255,0.1);
    padding: 2rem 0;
    overflow-y: auto;
    z-index: 1000;
}

#menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    padding: 0 2rem;
    margin-top: 1rem;
}

.menu-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.menu-item:hover, .menu-item.active { color: var(--accent); }

/* ── Perfil en menú ── */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
    text-align: center;
}

.profile-img-container {
    width: 110px; height: 110px;
    border-radius: 50%;
    border: 3px solid rgba(56,189,248,0.2);
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: rgba(255,255,255,0.05);
}

.profile-img { width: 100%; height: 100%; object-fit: cover; }

.profile-name { font-size: 1.3rem; font-weight: 700; color: var(--text-main); margin-bottom: 1rem; }

.social-links { display: flex; gap: 0.8rem; }

.social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    background-color: rgba(255,255,255,0.08);
    color: var(--text-muted);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.social-icon:hover { background-color: var(--accent); color: #fff; transform: translateY(-3px); }

/* ── INICIO ── */
.badge-disponible {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--badge-color, #4ade80);
    color: var(--badge-color, #4ade80);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    width: fit-content;
}

.badge-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--badge-color, #4ade80);
    animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero-saludo { color: var(--accent); font-size: 1.4rem; font-weight: 500; margin-bottom: 0.4rem; }
.hero-nombre { font-size: 4.2rem; font-weight: 700; letter-spacing: -1px; margin: 0; line-height: 1.1; }
.hero-typed  { font-size: 1.9rem; margin-top: 1rem; color: var(--text-muted); font-weight: 400; }
.hero-desc   { margin-top: 1.5rem; max-width: 580px; color: var(--text-muted); line-height: 1.8; font-size: 1.05rem; }

.hero-ctas {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.scroll-hint {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 3.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    animation: bounce 2.2s infinite;
}

.scroll-hint i { color: var(--accent); }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(7px); }
}

/* ── Botones ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--accent);
    color: #0f172a;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    color: var(--accent);
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid var(--accent);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover { background: var(--accent); color: #0f172a; transform: translateY(-2px); }

.btn-cotizar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(56,189,248,0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cotizar:hover { background: var(--accent); color: #0f172a; border-color: var(--accent); }

/* ── Títulos ── */
.section-title {
    margin-bottom: 3rem;
    font-size: 2.4rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50%; height: 3px;
    bottom: -10px; left: 0;
    background: var(--accent);
    border-radius: 2px;
}

.sub-section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-main);
}

/* ── SOBRE MÍ ── */
.sobre-mi-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 5rem;
    align-items: flex-start;
}

.sobre-mi-foto-wrap {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(56,189,248,0.2);
}

.sobre-mi-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.stats-row {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 70px;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1rem 0.8rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
}

.stat-valor { display: block; font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; line-height: 1.3; }

.sobre-mi-tagline {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--accent);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.sobre-mi-bio {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1rem;
}

.sobre-mi-datos {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.dato-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.dato-item i { color: var(--accent); width: 18px; text-align: center; }

/* ── RESPONSIVE MOBILE (Máx 768px) ── */
@media (max-width: 768px) {
    /* 1. Apilar la grid principal (foto arriba, texto abajo) */
    .sobre-mi-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* 2. Poner la imagen y los stats uno al lado del otro */
    .sobre-mi-foto-col {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: stretch; /* Clave: hace que la fila de stats tome el mismo alto que la imagen */
    }

    /* 3. Ajustar la imagen para que sea fluida pero mantenga su proporción */
    .sobre-mi-foto-wrap {
        flex: 1.3; /* Le damos un poco más de peso a la imagen vs los stats */
        width: 100%;
        height: auto;
        aspect-ratio: 260 / 300; /* Mantiene tu proporción original sin usar px fijos */
    }

    /* 4. Apilar los stats verticalmente y quitar el margen superior */
    .stats-row {
        flex: 0.7; /* Toma el espacio restante */
        flex-direction: column;
        margin-top: 0;
        gap: 0.5rem; /* Reducimos un poco el gap para móvil */
    }

    /* 5. Hacer que cada caja de stat tome 1/3 del alto disponible */
    .stat-item {
        flex: 1; /* Estira cada caja equitativamente */
        display: flex;
        flex-direction: column;
        justify-content: center; /* Centra el texto verticalmente en la caja */
        padding: 0.5rem;
        min-width: 0; /* Previene desbordamientos en pantallas muy pequeñas */
    }

    /* Opcional: Reducir un toque la fuente en móvil para que no se vea apretado */
    .stat-valor {
        font-size: 1.4rem; 
    }
}

/* ── Timeline ── */
.resumen-perfil { line-height: 1.8; color: var(--text-muted); font-size: 1.05rem; }

.timeline {
    position: relative;
    max-width: 800px;
    margin-left: 1rem;
    border-left: 2px solid rgba(255,255,255,0.1);
    padding-left: 2rem;
}

.timeline-item { position: relative; margin-bottom: 2.5rem; }

.timeline-dot {
    position: absolute;
    left: -35px; top: 5px;
    width: 16px; height: 16px;
    background: var(--bg-color);
    border: 2px solid var(--accent);
    border-radius: 50%;
    transition: background 0.3s;
}

.timeline-item:hover .timeline-dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.timeline-content h3 { color: var(--text-main); font-size: 1.1rem; margin-bottom: 0.2rem; }

.timeline-date {
    display: inline-block;
    background: rgba(56,189,248,0.1);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 0.4rem;
}

.timeline-inst, .timeline-detail { color: var(--text-muted); font-size: 0.9rem; }

/* ── Habilidades ── */
.habilidades-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: flex-start;
}

.skill-bar-container {
    background: var(--card-bg);
    border-radius: 8px;
    height: 18px;
    overflow: hidden;
}

.skill-bar {
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    height: 100%;
    width: 0;
    transition: width 1.3s ease-in-out;
    border-radius: 8px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.tech-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 1rem 0.5rem;
    transition: all 0.3s ease;
    text-align: center;
}

.tech-badge:hover {
    border-color: rgba(56,189,248,0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.tech-badge span { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

/* ── Portafolio ── */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.portfolio-card {
    background: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.06);
}

.portfolio-card:hover { transform: translateY(-6px); box-shadow: 0 16px 30px rgba(0,0,0,0.3); }

.portfolio-card-img { position: relative; overflow: hidden; height: 200px; }
.portfolio-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.portfolio-card:hover .portfolio-card-img img { transform: scale(1.05); }

.portfolio-overlay {
    position: absolute; inset: 0;
    background: rgba(15,23,42,0.75);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-overlay span { color: var(--accent); font-weight: 600; font-size: 1rem; }
.portfolio-card:hover .portfolio-overlay { opacity: 1; }

.portfolio-card-body { padding: 1.4rem; }

.portfolio-cat {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-card-body h3 {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 0.7rem;
    line-height: 1.4;
}

.portfolio-resultado {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
    line-height: 1.4;
}

.portfolio-techs { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.tech-tag {
    background: rgba(56,189,248,0.08);
    color: var(--accent);
    border: 1px solid rgba(56,189,248,0.2);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ── Servicios ── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.service-icon { font-size: 2.2rem; color: var(--accent); margin-bottom: 1.2rem; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 1rem; }

.service-card ul { list-style: none; color: var(--text-muted); flex: 1; }
.service-card ul li {
    margin-bottom: 0.7rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.92rem;
    line-height: 1.5;
}
.service-card ul li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

.service-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-wrap: wrap;
    gap: 0.8rem;
}

.service-desde {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

/* ── Glass effect ── */
.glass-effect {
    background: rgba(30,41,59,0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    transition: all 0.4s ease;
}

.glass-effect:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 24px rgba(56,189,248,0.12);
    border-color: rgba(56,189,248,0.25);
}

/* ── Testimonios ── */
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.testimonio-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.testimonio-placeholder {
    border-style: dashed !important;
    border-color: rgba(255,255,255,0.12) !important;
    background: rgba(255,255,255,0.02) !important;
}

.testimonio-quote i { font-size: 1.8rem; color: var(--accent); opacity: 0.5; }

.testimonio-texto {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.97rem;
    flex: 1;
}

.testimonio-autor {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonio-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(56,189,248,0.15);
    border: 2px solid rgba(56,189,248,0.3);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    color: var(--accent);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.testimonio-autor strong { display: block; font-size: 0.95rem; color: var(--text-main); }
.testimonio-autor span  { display: block; font-size: 0.82rem; color: var(--text-muted); }

/* ── Contacto ── */
.contact-intro { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 3rem; line-height: 1.7; }

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 4rem;
    align-items: flex-start;
    max-width: 900px;
}

.contact-form { display: flex; flex-direction: column; gap: 1.4rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }

.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-group label { font-size: 0.88rem; font-weight: 600; color: var(--text-main); }

.form-group input,
.form-group textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: var(--text-main);
    font-size: 0.97rem;
    font-family: inherit;
    transition: border-color 0.3s, background 0.3s;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(56,189,248,0.04);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); opacity: 0.6; }

.btn-send { align-self: flex-start; }
.btn-send:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-status { font-size: 0.92rem; font-weight: 500; margin-top: 0.4rem; min-height: 1.4em; }
.status-success { color: #4ade80; }
.status-error   { color: #f87171; }

.contact-info { display: flex; flex-direction: column; gap: 1.8rem; padding-top: 0.3rem; }

.contact-info-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-info-item i { color: var(--accent); font-size: 1.2rem; margin-top: 0.15rem; width: 22px; text-align: center; }
.contact-info-item div { display: flex; flex-direction: column; gap: 0.15rem; }
.contact-info-item strong { font-size: 0.82rem; color: var(--text-main); font-weight: 600; }
.contact-info-item span  { color: var(--text-muted); font-size: 0.9rem; }

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #25d366;
    color: #fff;
    padding: 0.8rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.3s, transform 0.2s;
    margin-top: 0.5rem;
}

.btn-whatsapp:hover { background: #1da851; transform: translateY(-2px); }

/* ── Modal ── */
#project-modal {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transition: all 0.4s ease;
}

#project-modal.modal-show { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--bg-color);
    width: 90%; max-width: 800px; max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    transform: translateY(30px);
    transition: all 0.4s ease;
}

#project-modal.modal-show .modal-content { transform: translateY(0); }

.close-btn {
    position: absolute; top: 15px; right: 25px;
    color: var(--text-muted); font-size: 2.4rem;
    font-weight: bold; cursor: pointer;
    transition: color 0.3s; z-index: 10;
}

.close-btn:hover { color: var(--accent); }

#modal-body { padding: 2.5rem; }

.tag {
    display: inline-block;
    background: rgba(56,189,248,0.1);
    color: var(--accent);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ── Responsive móvil ── */
.mobile-nav-toggle {
    position: fixed; right: 15px; top: 15px;
    z-index: 2500; border: none;
    width: 50px; height: 50px;
    background: var(--accent); color: #0f172a;
    font-size: 24px; display: none;
    align-items: center; justify-content: center;
    border-radius: 50%; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    
}

@media screen and (max-width: 992px) {
    .mobile-nav-toggle { display: flex; }

    #main-content { width: 100%; padding: 0 1.5rem; }

    #right-menu {
        width: 280px; position: fixed;
        top: 0; right: -280px; height: 100vh;
        background-color: var(--bg-color);
        border-left: 1px solid rgba(255,255,255,0.1);
        display: flex; flex-direction: column;
        justify-content: flex-start;
        transition: right 0.4s cubic-bezier(0.05,0.74,0.2,0.99);
        z-index: 2400;
    }

    #right-menu.active { right: 0; }
    #menu-list { flex-direction: column !important; padding: 0 2rem; gap: 1.5rem; }
    .menu-item  { border-bottom: none !important; width: 100%; }

    .hero-nombre { font-size: 2.8rem !important; }
    .hero-typed  { font-size: 1.3rem !important; }

    .sobre-mi-grid      { grid-template-columns: 1fr; gap: 2.5rem; }
    .sobre-mi-foto-wrap { width: 200px; height: 100%; }

    .habilidades-grid   { grid-template-columns: 1fr; gap: 3rem; }

    .contact-wrapper    { grid-template-columns: 1fr; gap: 2.5rem; }
    .form-row           { grid-template-columns: 1fr; }
}

@media screen and (max-height: 600px) {
    .profile-section        { margin-bottom: 1rem; }
    .profile-img-container  { width: 80px; height: 80px; }
    #menu-list              { gap: 0.8rem; }
}