/* ==========================================================================
   CSS SYSTEM DESIGN & PREMIUM STYLING - JUAN PABLO SÁNCHEZ PORTFOLIO (2026)
   ========================================================================== */

/* Google Fonts & Variables */
:root {
    --bg-dark: #080c14;
    --bg-card: rgba(15, 23, 42, 0.65);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(139, 92, 246, 0.35);
    
    /* Premium Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    --gradient-text: linear-gradient(90deg, #60a5fa 0%, #c084fc 100%);
    --gradient-bg-card: linear-gradient(180deg, rgba(30, 41, 59, 0.3) 0%, rgba(15, 23, 42, 0.6) 100%);
    
    /* Text Colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-glow: #c084fc;
    
    /* Font Families */
    --font-title: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadow & Glow */
    --shadow-premium: 0 10px 35px -10px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.25);
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles & Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 600;
}

p {
    color: var(--text-muted);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    border: none;
    font-family: var(--font-title);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-family: var(--font-title);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition-smooth);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid #3b82f6;
    color: #3b82f6;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-family: var(--font-title);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.btn-outline:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 2.2rem;
    font-size: 1.1rem;
}

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ==================== CONTAINER ==================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 30px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 20px;
}
.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== PANTALLA DE ACCESO (GATING) ==================== */
.gating-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(4, 6, 10, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease;
    overflow-y: auto;
    padding: 30px 10px;
}
@media (max-height: 600px) or (max-width: 576px) {
    .gating-overlay {
        align-items: flex-start;
    }
}

.gating-card {
    background: var(--gradient-bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    max-width: 460px;
    width: 90%;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.9);
    position: relative;
    overflow: hidden;
}

.logo-monogram-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.logo-monogram-svg {
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
}

.gating-header {
    text-align: center;
    margin-bottom: 2rem;
}
.gating-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}
.gating-header p {
    font-size: 0.95rem;
}

.gating-form .form-group {
    margin-bottom: 1.25rem;
}
.gating-form label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}
.gating-form input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}
.gating-form input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

/* ==================== PORTFOLIO WRAPPER & HEADER ==================== */
.portfolio-wrapper {
    transition: filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-wrapper.is-blurred {
    filter: blur(15px);
    pointer-events: none;
}

/* Transparent Header with Glassmorphism */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(8, 12, 20, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-text {
    font-family: var(--font-title);
    font-weight: 850;
    font-size: 1.8rem;
    letter-spacing: -1px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4));
    transition: var(--transition-smooth);
}
.logo:hover .logo-text {
    filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.75));
    transform: scale(1.03);
}
.logo-text-large {
    font-family: var(--font-title);
    font-weight: 850;
    font-size: 3.2rem;
    letter-spacing: -1.5px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.5));
    display: inline-block;
    margin-bottom: 0.5rem;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-menu a {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}
.nav-menu a:hover, .nav-menu a.active {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-badge {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--text-glow);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: none;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==================== HERO SECTION & PHOTO ==================== */
.hero-section {
    padding-top: 100px;
    padding-bottom: 50px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 50px;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.05;
    margin-bottom: 1rem;
    letter-spacing: -2.5px;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-glow);
    min-height: 40px;
}
.cursor {
    animation: blink 0.8s infinite;
}

.hero-description {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Profile Photo Frame */
.profile-photo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}
.profile-photo-frame {
    position: relative;
    width: 280px;
    height: 360px;
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.02);
    padding: 12px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}
.profile-photo-glow {
    position: absolute;
    top: -50px;
    left: -50px;
    width: calc(100% + 100px);
    height: calc(100% + 100px);
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 60%);
    filter: blur(20px);
    z-index: 1;
    pointer-events: none;
}
.profile-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    position: relative;
    z-index: 2;
    filter: brightness(0.95) contrast(1.05);
}

/* ==================== SOBRE MÍ SECTION ==================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: start;
    margin-bottom: 60px;
}
.about-lead {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-main);
}

/* Career Dashboard Layout (Eras + KPIs) */
.career-timeline-container {
    margin: 80px 0;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 45px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.section-header-compact {
    margin-bottom: 40px;
}

.timeline-badge {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

.career-dashboard {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
}

/* Left Side: Era Navigation Cards */
.career-nav-track {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.era-nav-card {
    background: rgba(30, 41, 59, 0.3);
    border: 1.5px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.era-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: var(--transition-smooth);
}

.era-nav-card:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(30, 41, 59, 0.45);
}

.era-nav-card:hover .era-card-glow {
    opacity: 1;
}

.era-nav-card.active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.06);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.15);
}

.era-nav-card.active .era-card-glow {
    background: radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
    opacity: 1;
}

.era-card-period {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-glow);
    display: block;
    margin-bottom: 8px;
}

.era-nav-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.era-icon-inline {
    font-size: 1.05rem;
    color: #60a5fa;
}

.era-nav-card.active h4 i {
    color: #c084fc;
}

.era-nav-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Right Side: Detail Panel */
.career-detail-panel {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 35px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.era-detail-content {
    display: flex;
    flex-direction: column;
}

.era-detail-header {
    border-bottom: 1.5px solid var(--border-glass);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.era-detail-badge {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--text-glow);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

.era-detail-header h3 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.era-detail-summary {
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.5;
}

/* Metrics Dashboard Grid */
.era-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.era-metric-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.7) 100%);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.era-metric-box:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.1);
}

.metric-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.metric-val {
    font-size: 2.4rem;
    font-weight: 800;
    font-family: var(--font-title);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.35));
    display: block;
    line-height: 1.1;
    margin-bottom: 6px;
}

.metric-lbl {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    display: block;
    margin-bottom: 6px;
}

.metric-det {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Chronological Milestones */
.era-milestones-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    border-left: 3px solid #8b5cf6;
    padding-left: 10px;
}

.era-milestones-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.era-milestone-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 24px;
    transition: var(--transition-smooth);
}

.era-milestone-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.milestone-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.milestone-title-area h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.milestone-company {
    font-size: 0.9rem;
    font-weight: 600;
    color: #60a5fa;
}

.milestone-period {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-glass);
    white-space: nowrap;
}

.milestone-achievements {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.milestone-achievements li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
    line-height: 1.45;
}

.milestone-achievements li:last-child {
    margin-bottom: 0;
}

.milestone-achievements li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-glow);
    font-weight: bold;
}

.milestone-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.milestone-tool-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.era-milestone-item:hover .milestone-tool-badge {
    border-color: rgba(139, 92, 246, 0.2);
    color: var(--text-main);
}

/* Responsive adjustments for Career Dashboard */
@media (max-width: 992px) {
    .career-dashboard {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .career-nav-track {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .era-nav-card {
        flex: 0 0 280px;
        scroll-snap-align: start;
    }

    .career-timeline-container {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .milestone-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .career-timeline-container {
        padding: 20px;
    }
    .career-detail-panel {
        padding: 20px;
    }
    .era-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .era-metrics-grid .era-metric-box {
        padding: 12px 10px;
    }
    .era-metrics-grid .metric-val {
        font-size: 1.6rem;
    }
}

/* mi formación, cursos y certificaciones */
.education-section-container {
    margin: 80px 0 0 0;
}
.education-section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.education-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.education-group-card {
    background: var(--gradient-bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}
.education-group-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
}
.education-group-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    border-bottom: 1.5px solid var(--border-glass);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.education-group-card h4 i {
    color: #60a5fa;
}
.education-items-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.education-item-row h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}
.education-item-row p {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.education-item-row strong {
    color: var(--text-glow);
    font-weight: 500;
}

/* ==================== EXPERTISE SECTION ==================== */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.expertise-card {
    background: var(--gradient-bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    cursor: pointer;
}
.expertise-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-smooth);
}
.expertise-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), var(--shadow-glow);
}
.expertise-card:hover::after {
    opacity: 1;
}

.expertise-card.static-card {
    cursor: default;
}
.expertise-card.static-card:hover {
    transform: none;
    border-color: var(--border-glass);
    box-shadow: var(--shadow-premium);
}
.expertise-card.static-card:hover::after {
    opacity: 0;
}


.card-icon {
    font-size: 2rem;
    background: var(--gradient-glow);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #60a5fa;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.expertise-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}
.expertise-card p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.card-tags span {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

/* ==================== PROJECTS SECTION (9 CATEGORÍAS) ==================== */
.project-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project-category-card {
    background: var(--gradient-bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}
.project-category-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glow);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.cat-card-bg {
    position: absolute;
    width: 150px;
    height: 150px;
    top: -50px;
    right: -50px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.12;
    pointer-events: none;
}
.p-blue { background-color: #3b82f6; }
.p-purple { background-color: #8b5cf6; }
.p-pink { background-color: #ec4899; }
.p-green { background-color: #10b981; }
.p-indigo { background-color: #6366f1; }
.p-yellow { background-color: #eab308; }
.p-orange { background-color: #f97316; }
.p-teal { background-color: #14b8a6; }
.p-red { background-color: #ef4444; }

.cat-card-icon {
    font-size: 2.2rem;
    color: #60a5fa;
    margin-bottom: 1.5rem;
}
.project-category-card:hover .cat-card-icon {
    transform: scale(1.1);
    color: var(--text-glow);
}

.project-category-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}
.project-category-card p {
    font-size: 0.95rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.cat-card-action {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 600;
    color: #60a5fa;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.project-category-card:hover .cat-card-action {
    color: var(--text-glow);
}
.project-category-card:hover .cat-card-action i {
    transform: translateX(4px);
}

/* ==================== PROJECTS OVERLAY PANEL ==================== */
.projects-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(4, 6, 10, 0.92);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    display: none; /* controlled by JS */
    justify-content: center;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.projects-overlay.active {
    display: flex;
    opacity: 1;
}

.overlay-container {
    width: 90%;
    max-width: 900px;
    margin: 80px 0;
    padding: 0 10px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid var(--border-glass);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}
.overlay-badge {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-glow);
    border: 1px solid rgba(139, 92, 246, 0.2);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.overlay-header h2 {
    font-size: 2.2rem;
    color: var(--text-main);
}

.overlay-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.overlay-close-btn:hover {
    color: #ef4444;
    transform: rotate(90deg);
}

.overlay-desc-text {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
}

.overlay-projects-list {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.overlay-project-card {
    background: var(--gradient-bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2.2rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}
.overlay-project-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}
.overlay-project-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    border-left: 4px solid #3b82f6;
    padding-left: 12px;
}
.overlay-project-card p {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}
.overlay-project-card strong {
    color: var(--text-main);
}
.overlay-project-card .project-impact-highlight {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.25rem;
}
.project-impact-highlight p {
    margin-bottom: 0;
}
.project-impact-highlight strong {
    color: #34d399;
}

/* ==================== CONTACT SECTION ==================== */
.contact-container {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 40px;
}

.contact-info-card {
    background: var(--gradient-bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-premium);
}
.contact-info-card h3, .contact-form-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-links {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.contact-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}
.contact-link-item i {
    font-size: 1.8rem;
    color: #60a5fa;
}
.contact-link-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
}
.contact-link-item strong {
    font-size: 0.95rem;
}

/* CONTACT FORM */
.contact-form-card {
    background: var(--gradient-bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-premium);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 1.25rem;
}

.contact-form-card .form-group {
    margin-bottom: 1.25rem;
}
.contact-form-card label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}
.contact-form-card input, .contact-form-card textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}
.contact-form-card input:focus, .contact-form-card textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.08);
}

/* ==================== FOOTER ==================== */
.main-footer {
    border-top: 1px solid var(--border-glass);
    padding: 30px 0;
    margin-top: 60px;
    background: rgba(4, 6, 10, 0.5);
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-container p {
    font-size: 0.9rem;
}
.footer-socials {
    display: flex;
    gap: 1rem;
}
.footer-socials a {
    font-size: 1.2rem;
    color: var(--text-muted);
}
.footer-socials a:hover {
    color: var(--text-main);
}

/* ==================== VIDEO PLAYER MODAL ==================== */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 6, 10, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: none; /* revealed by JS */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-modal-content {
    width: 90%;
    max-width: 900px;
    position: relative;
}

.video-close-btn {
    position: absolute;
    top: -45px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.video-close-btn:hover {
    color: #ef4444;
    transform: rotate(90deg);
}

/* Mockup Media Player */
.mockup-video-player {
    background: #0f172a;
    border: 1.5px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), var(--shadow-glow);
}

.player-header {
    background: #1e293b;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1.5px solid var(--border-glass);
}
.player-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.player-dot.red { background: #ef4444; }
.player-dot.yellow { background: #f59e0b; }
.player-dot.green { background: #10b981; }
.player-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 10px;
    font-family: var(--font-title);
}

.player-body {
    aspect-ratio: 16/9;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #020617;
}

.presentation-slide {
    text-align: center;
    z-index: 2;
    padding: 20px;
}
.avatar-placeholder {
    font-size: 4rem;
    color: var(--text-glow);
    margin-bottom: 1rem;
}
.role-desc {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 10px;
}
.slide-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hidden-player {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-controls-bar {
    background: #1e293b;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.player-controls-bar button {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.player-controls-bar button:hover {
    color: #60a5fa;
}

.progress-bar-container {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}
.progress-bar-fill {
    width: 30%; /* Mockup loaded width */
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 0;
}

.time-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-title);
}

/* ==================== ANIMATIONS ==================== */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
.animate-pulse {
    animation: pulse 4s infinite ease-in-out;
}

/* Intersection observer fade in animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== RESPONSIVE MEDIA QUERIES ==================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    .hero-container {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 20px 0;
    }
    .hero-container {
        grid-template-columns: 1fr;
        padding-top: 40px;
    }
    .hero-video {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(8, 12, 20, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 40px;
        transition: var(--transition-smooth);
        border-top: 1px solid var(--border-glass);
    }
    .nav-menu.mobile-active {
        left: 0;
    }
    .nav-menu ul {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    .nav-menu a {
        font-size: 1.2rem;
    }
    .header-right {
        gap: 1rem;
    }
    .user-badge {
        display: none !important;
    }
    .hero-content {
        text-align: center;
    }
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
        gap: 0.75rem;
    }
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        padding: 0.65rem 1.3rem;
        font-size: 0.9rem;
    }
    .about-grid, .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .gating-card {
        padding: 1.5rem;
    }
    .dashboard-charts-grid {
        grid-template-columns: 1fr;
    }
    .footer-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .overlay-container {
        margin: 40px auto;
    }
    .overlay-project-card {
        padding: 1.5rem;
    }
    .overlay-header h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .header-right a.btn-outline {
        display: none;
    }
    .hero-title {
        font-size: 2.2rem;
        letter-spacing: -1.5px;
    }
    .hero-subtitle {
        font-size: 1.25rem;
        min-height: auto;
    }
    .hero-description {
        font-size: 1rem;
    }
    .career-timeline-container {
        padding: 20px 15px;
    }
    .career-detail-panel {
        padding: 20px 15px;
    }
    .era-nav-card {
        padding: 16px;
        flex: 0 0 250px;
    }
    .overlay-project-card {
        padding: 1.2rem;
    }
}

/* ==================== MARQUEE ==================== */

/* Company Marquee */
.marquee-container {
    overflow: hidden;
    width: 100%;
    margin-bottom: 50px;
    position: relative;
    padding: 15px 0;
    background: rgba(15, 23, 42, 0.2);
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}
.marquee-container::before,
.marquee-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}
.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}
.marquee-content {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: scroll-marquee 35s linear infinite;
}
.marquee-item {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.marquee-item::after {
    content: "·";
    margin-left: 3rem;
    color: var(--text-glow);
    font-size: 1.5rem;
}
@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.33%);
    }
}
