/* portfolio-styles.css - GitHub Dark 2026 + Futurista sutil • Austero y compacto */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary:      #0d1117;
    --bg-secondary:    #161b22;
    --bg-hover:        #1c2128;
    --text-primary:    #c9d1d9;
    --text-secondary:  #8b949e;
    --text-muted:      #6e7681;
    --border:          #30363d;
    --accent-blue:     #58a6ff;
    --accent-purple:   #bb86fc;
    --accent-cyan:     #39c5cf;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 15px;
}

/* Enlaces sin subrayado por defecto (muy GitHub) */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* Contenedor principal */
.container {
    width: min(92%, 1280px);
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.brand {
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: -0.4px;
}

.brand .accent {
    color: var(--accent-purple);
}

.main-nav {
    display: flex;
    gap: 2.2rem;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.94rem;
    transition: color 0.12s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
}

/* Hero */
.hero {
    padding: 90px 0 130px;
    border-bottom: 1px solid var(--border);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3.5rem;
    align-items: center;
}

.hero h1 {
    font-size: 2.55rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.35rem;
}

.hero-role {
    font-size: 1.22rem;
    color: var(--accent-blue);
    margin-bottom: 1.1rem;
    font-weight: 500;
}

.hero-bio {
    color: var(--text-secondary);
    margin-bottom: 1.6rem;
    font-size: 1.02rem;
}

.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.92rem;
    transition: filter 0.14s ease;
    border: 1px solid transparent;
}

.btn.primary {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.btn:hover {
    filter: brightness(1.09);
}

.profile-pic {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Secciones */
.section {
    padding: 90px 0;
}

.section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2.2rem;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    width: 55px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    bottom: -10px;
    left: 0;
    border-radius: 2px;
}

/* Cards base */
.card,
.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.card:hover,
.project-card:hover {
    border-color: var(--accent-cyan);
    background: var(--bg-hover);
}

/* Cards horizontales compactas */
.card.horizontal,
.project-card.horizontal {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    min-height: 68px;
}

.card-icon,
.project-icon {
    font-size: 1.6rem;
    color: var(--accent-cyan);
    opacity: 0.8;
    min-width: 36px;
    text-align: center;
}

.card-content h3,
.project-content h3 {
    font-size: 1.03rem;
    margin: 0 0 0.18rem 0;
    font-weight: 500;
}

.card-content p,
.project-content p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.32;
    margin: 0;
}

/* Certificados */
.cert-link {
    color: var(--accent-blue);
    font-size: 0.83rem;
    font-weight: 500;
    transition: color 0.14s ease;
}

.cert-link:hover {
    color: #79c0ff;
}

/* Grillas */
.cards-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem 1.1rem;
}

/* Educación */
.education-cards .card-logo img {
    height: 36px;
    width: auto;
}

/* Experiencia + Habilidades */
.dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.8rem;
    margin-top: 2rem;
}

/* Acordeón */
.accordion.compact .accordion-item {
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    cursor: pointer;
    font-size: 0.96rem;
    transition: color 0.14s ease;
}

.accordion-header:hover {
    color: var(--accent-blue);
}

/* Habilidades */
.skills-group {
    margin-bottom: 1.7rem;
}

.skills-group h4 {
    font-size: 1.03rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
}

.tag {
    padding: 4px 10px;
    font-size: 0.78rem;
    border-radius: 6px;
    background: rgba(88, 166, 255, 0.07);
    color: var(--accent-blue);
    border: 1px solid rgba(88, 166, 255, 0.14);
    transition: all 0.13s ease;
    white-space: nowrap;
}

.tag:hover {
    background: rgba(88, 166, 255, 0.14);
    border-color: var(--accent-blue);
}

/* Variantes */
.tag.secondary {
    background: rgba(187, 134, 252, 0.07);
    color: var(--accent-purple);
    border-color: rgba(187, 134, 252, 0.16);
}
.tag.secondary:hover {
    background: rgba(187, 134, 252, 0.15);
    border-color: var(--accent-purple);
}

.tag.cyan,
.skills-tags.cyan .tag {
    background: rgba(57, 197, 207, 0.07);
    color: var(--accent-cyan);
    border-color: rgba(57, 197, 207, 0.16);
}
.tag.cyan:hover,
.skills-tags.cyan .tag:hover {
    background: rgba(57, 197, 207, 0.15);
    border-color: var(--accent-cyan);
}

.tag.muted {
    background: rgba(110, 118, 129, 0.10);
    color: var(--text-muted);
    border-color: var(--border);
}

/* Proyectos footer */
.projects-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.github-link {
    color: var(--accent-purple);
    font-weight: 500;
}

.github-link:hover {
    color: var(--text-primary);
}

/* Contacto */
.contact-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.5rem;
}

.contact-grid p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.contact-grid i {
    margin-right: 0.6rem;
    color: var(--accent-cyan);
}

/* Footer */
footer {
    padding: 3rem 0 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.87rem;
    border-top: 1px solid var(--border);
}

/* ────────────────────────────────────────────────
   Responsive ─ Mobile first + corrección centrado de títulos y líneas
──────────────────────────────────────────────── */

@media (max-width: 960px) {
    .hero {
        padding: 70px 0 110px;
        text-align: center;
    }

    .hero-grid,
    .dual-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .hero h1 { font-size: 2.25rem; }
    .hero-role { font-size: 1.15rem; }

    .profile-pic {
        width: 220px;
        height: 220px;
        margin: 2.2rem auto 1rem;
    }

    /* Menú hamburguesa */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: center;
        padding: 1.4rem 0;
        gap: 1rem;
    }

    .main-nav.active { display: flex; }

    .main-nav a {
        font-size: 1.05rem;
        padding: 0.6rem 2rem;
        width: 100%;
        text-align: center;
    }

    /* Centrado fuerte de títulos + línea */
    .section h2 {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .section h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 780px) {
    .container { padding: 0 14px; }
    
    .section {
        padding: 70px 0;
        text-align: center;
    }

    .section h2 {
        font-size: 1.65rem;
    }

    .cards-grid,
    .projects-grid,
    .education-cards {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        justify-content: center;
        justify-items: center;
        gap: 1rem;
    }
}

@media (max-width: 620px) {
    .hero {
        padding: 60px 0 90px;
    }

    .hero h1 { font-size: 2.05rem; }
    .hero-role { font-size: 1.08rem; }
    .hero-bio { font-size: 0.96rem; }

    .btn {
        padding: 7px 16px;
        font-size: 0.88rem;
    }

    .profile-pic {
        width: 190px;
        height: 190px;
    }

    /* Cards ancho fijo */
    .cards-grid,
    .projects-grid,
    .education-cards {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .card.horizontal,
    .project-card.horizontal {
        width: 100%;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .dual-grid {
        gap: 2.8rem;
        max-width: 440px;
        margin-left: auto;
        margin-right: auto;
    }

    .accordion-header {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 0.8rem 1.2rem;
        font-size: 0.94rem;
        padding: 0.4rem 0;
    }

    .job-title {
        flex: 1 1 60%;
        text-align: left;
        font-weight: 500;
    }

    .job-date {
        flex: 0 0 auto;
        color: var(--text-muted);
        font-size: 0.82rem;
        white-space: nowrap;
        text-align: right;
    }

    .skills-tags {
        justify-content: center;
        gap: 0.4rem 0.5rem;
    }

    .tag {
        padding: 3.5px 10px;
        font-size: 0.76rem;
    }

    /* Refuerzo centrado título + línea */
    .section h2 {
        text-align: center;
    }
    
    .section h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .brand { font-size: 1.24rem; }

    .section { padding: 60px 0; }
    
    .section h2 {
        font-size: 1.52rem;
        margin-bottom: 1.8rem;
        text-align: center;
    }
    
    .section h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .hero { padding: 50px 0 80px; }

    .card.horizontal,
    .project-card.horizontal {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.1rem;
        max-width: 380px;
    }

    .card-icon,
    .project-icon {
        font-size: 2.1rem;
        margin-bottom: 0.4rem;
    }

    .contact-grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.8rem;
    }

    .accordion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .job-title {
        font-size: 0.96rem;
    }

    .job-date {
        font-size: 0.8rem;
        align-self: flex-start;
    }
}