/* ==============================================================================
   MARCELO MERCADO — PORTFOLIO & DEVHUB STYLESHEET
   Aesthetic: Cyberpunk Dark / Clean Professional Software Engineer Portfolio
   ============================================================================== */

:root {
    --bg-main: #0a0c16;
    --bg-card: #111425;
    --bg-card-hover: #171b33;
    --bg-card-border: rgba(0, 255, 255, 0.16);
    --bg-card-border-hover: rgba(0, 255, 255, 0.5);
    
    --cyan: #00ffff;
    --cyan-dim: rgba(0, 255, 255, 0.12);
    --cyan-glow: 0 0 25px rgba(0, 255, 255, 0.3);
    
    --purple: #a855f7;
    --purple-dim: rgba(168, 85, 247, 0.15);
    --purple-glow: 0 0 25px rgba(168, 85, 247, 0.35);

    --emerald: #10b981;
    --emerald-dim: rgba(16, 185, 129, 0.15);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Luces de ambiente y malla de fondo */
.background-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.25) 0%, transparent 70%);
    top: -150px;
    left: -100px;
}

.glow-2 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
    top: 40%;
    right: -200px;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

/* ==============================================================================
   BARRA DE NAVEGACIÓN
   ============================================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(10, 12, 22, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.logo-symbol {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-weight: 700;
    background: var(--cyan-dim);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.nav-logo strong {
    color: var(--cyan);
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--cyan);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-github-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-github-nav:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-linkedin-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 102, 194, 0.15);
    border: 1px solid rgba(10, 102, 194, 0.4);
    color: #38bdf8;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-linkedin-nav:hover {
    background: rgba(10, 102, 194, 0.28);
    border-color: #38bdf8;
    color: #fff;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.btn-linkedin {
    background: rgba(10, 102, 194, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(10, 102, 194, 0.4);
}

.btn-linkedin:hover {
    background: rgba(10, 102, 194, 0.3);
    border-color: #38bdf8;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.server-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.82rem;
    color: #34d399;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* ==============================================================================
   HERO / PRESENTACIÓN PARA CV
   ============================================================================== */
.hero-section {
    position: relative;
    z-index: 10;
    padding: 80px 24px 50px;
    text-align: center;
}

.hero-container {
    max-width: 960px;
    margin: 0 auto;
}

.profile-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.25);
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 0.88rem;
    color: var(--cyan);
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.4px;
}

.hero-title {
    font-size: 3.3rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.2px;
    margin-bottom: 22px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--cyan) 0%, #38bdf8 45%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 740px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--cyan);
    color: #0a0c16;
    border: 1px solid var(--cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.35);
}

.btn-primary:hover {
    background: #22d3ee;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.55);
}

.btn-secondary {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.btn-secondary:hover {
    background: rgba(168, 85, 247, 0.25);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 24px;
    background: rgba(17, 20, 37, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.metric-number {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cyan);
}

.metric-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==============================================================================
   CATÁLOGO DE PROYECTOS
   ============================================================================== */
.projects-section {
    position: relative;
    z-index: 10;
    padding: 70px 24px;
}

.section-container {
    max-width: 1240px;
    margin: 0 auto;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.section-title {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.text-center {
    text-align: center;
}

.block {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 36px;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-bar {
    display: flex;
    gap: 8px;
    background: rgba(17, 20, 37, 0.85);
    padding: 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--cyan-dim);
    color: var(--cyan);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(540px, 1fr));
    gap: 32px;
}

/* Tarjeta de Proyecto Expandida */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--bg-card-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), var(--cyan-glow);
}

.project-card.featured {
    border-color: rgba(0, 255, 255, 0.4);
}

.card-preview-wrap {
    height: 180px;
    background: linear-gradient(180deg, #0e1122 0%, #0a0c16 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-preview-img {
    max-height: 85%;
    object-fit: contain;
    transition: var(--transition);
}

.project-card:hover .card-preview-img {
    transform: scale(1.06);
}

.status-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-prod {
    background: var(--emerald-dim);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-dev {
    background: var(--purple-dim);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.card-body {
    padding: 26px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category {
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--cyan);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-resumen {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* Acordeones Expandibles */
.card-accordions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
}

.accordion-item {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.accordion-item[open] {
    border-color: rgba(0, 255, 255, 0.4);
    background: rgba(14, 18, 32, 0.65);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 15px;
    cursor: pointer;
    user-select: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    list-style: none;
}

.accordion-header::-webkit-details-marker {
    display: none;
}

.accordion-header:hover {
    color: var(--cyan);
    background: rgba(0, 255, 255, 0.05);
}

.accordion-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.accordion-icon {
    font-size: 0.95rem;
}

.accordion-chevron {
    width: 17px;
    height: 17px;
    color: var(--cyan);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item[open] .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 8px 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-features-list li {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.card-features-list li strong {
    color: var(--cyan);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.tag-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-radius: 4px;
}

.card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: center;
}

.btn-card {
    padding: 9px 16px;
    font-size: 0.88rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-card-primary {
    background: var(--cyan);
    color: #000;
}

.btn-card-primary:hover {
    background: #67e8f9;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.btn-card-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-card-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-card-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-card-outline:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==============================================================================
   COMPETENCIAS & HERRAMIENTAS
   ============================================================================== */
.tech-section {
    position: relative;
    z-index: 10;
    padding: 80px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.tech-cat-box {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
}

.tech-cat-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.tech-items-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tech-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tech-pill strong {
    color: var(--cyan);
}

/* ==============================================================================
   SECCIÓN DE CONTACTO PARA RECLUTADORES
   ============================================================================== */
.contact-section {
    position: relative;
    z-index: 10;
    padding: 70px 24px 90px;
}

.contact-card {
    background: linear-gradient(135deg, #13172c 0%, #0d1020 100%);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 16px;
    padding: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), var(--cyan-glow);
}

.contact-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 8px 0 12px;
    line-height: 1.25;
}

.contact-subtitle {
    color: var(--text-secondary);
    font-size: 1.02rem;
    max-width: 620px;
    margin-bottom: 24px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.detail-icon {
    font-size: 1.3rem;
}

.detail-label {
    display: block;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
}

.detail-link {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.detail-link:hover {
    text-decoration: underline;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.05rem;
    white-space: nowrap;
}

/* ==============================================================================
   FOOTER
   ============================================================================== */
.footer {
    position: relative;
    z-index: 10;
    background: #080911;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 30px 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ==============================================================================
   RESPONSIVE DESIGN
   ============================================================================== */
@media (max-width: 1080px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .tech-categories {
        grid-template-columns: 1fr;
    }
    .contact-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-bar {
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .hero-actions {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
}
