/* --- DESIGN SYSTEM & TEMAS (LIGHT / DARK MODE CON ALTO CONTRASTE) --- */
:root {
    --bg-body: #f4f6fa;
    --bg-card: rgba(255, 255, 255, 0.88);
    --bg-light: rgba(241, 245, 249, 0.85);
    --bg-gray: #e2e8f0;
    --bg-header: rgba(244, 246, 250, 0.9);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --primary-blue: #2563eb;
    --primary-purple: #7c3aed;
    --primary-green: #059669;
    --primary-orange: #d97706;
    --primary-red: #dc2626;

    --border-color: #cbd5e1;
    --border-hover: #94a3b8;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.12);

    /* Estilos específicos Tech Stack */
    --tech-card-bg: rgba(30, 29, 43, 0.92);
    --tech-card-border: rgba(45, 43, 64, 0.9);
    --tech-pill-bg: #2a283d;
    --tech-pill-text: #e2e8f0;
    --tech-pill-hover: #373452;

    /* PS5 Ambient Glow Colors (Modo Claro - Visibles y Contrastados) */
    --ps5-glow-1: rgba(37, 99, 235, 0.22);
    --ps5-glow-2: rgba(124, 58, 237, 0.20);
    --ps5-glow-3: rgba(14, 165, 233, 0.18);
}

[data-theme="dark"] {
    --bg-body: #080b14;
    --bg-card: rgba(20, 28, 46, 0.82);
    --bg-light: rgba(15, 23, 42, 0.65);
    --bg-gray: #1b2538;
    --bg-header: rgba(8, 11, 20, 0.88);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --border-color: rgba(30, 41, 59, 0.85);
    --border-hover: #334155;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);

    /* Tech Stack en Modo Oscuro */
    --tech-card-bg: rgba(21, 20, 34, 0.92);
    --tech-card-border: rgba(37, 36, 56, 0.9);
    --tech-pill-bg: #212033;
    --tech-pill-text: #e2e8f0;
    --tech-pill-hover: #2e2c47;

    /* PS5 Ambient Colors (Modo Oscuro Dashboard Glow) */
    --ps5-glow-1: rgba(124, 58, 237, 0.28);
    --ps5-glow-2: rgba(37, 99, 235, 0.25);
    --ps5-glow-3: rgba(236, 72, 153, 0.20);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
}

/* ==========================================================================
   --- FONDO DINÁMICO ANIMADO ESTILO PLAYSTATION 5 (CANVAS + AMBIENT GLOW) ---
   ========================================================================== */
#ps5-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

.ps5-ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(95px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.85;
    transition: background 0.5s ease;
}

.ambient-1 {
    top: -10%;
    left: 15%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, var(--ps5-glow-1) 0%, transparent 70%);
    animation: ps5Float1 28s ease-in-out infinite alternate;
}

.ambient-2 {
    bottom: -15%;
    right: -10%;
    width: 65vw;
    height: 65vw;
    background: radial-gradient(circle, var(--ps5-glow-2) 0%, transparent 70%);
    animation: ps5Float2 34s ease-in-out infinite alternate;
}

.ambient-3 {
    top: 40%;
    left: -15%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--ps5-glow-3) 0%, transparent 70%);
    animation: ps5Float3 30s ease-in-out infinite alternate;
}

@keyframes ps5Float1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
    100% { transform: translate(-30px, 70px) scale(0.95); }
}

@keyframes ps5Float2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-70px, -50px) scale(1.08); }
    100% { transform: translate(40px, -90px) scale(0.95); }
}

@keyframes ps5Float3 {
    0% { transform: translate(0, 0) scale(0.95); }
    50% { transform: translate(80px, -40px) scale(1.12); }
    100% { transform: translate(-40px, 30px) scale(1); }
}

/* --- TIPOGRAFÍA Y TEXTO GRADIENTE ANIMADO --- */
h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.animated-gradient-text {
    background-size: 200% auto;
    animation: textShine 6s linear infinite;
}

@keyframes textShine {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* --- NAVBAR CENTRADO Y GLASSMORPHIC --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.8rem 5%;
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background 0.3s, border-color 0.3s;
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.4rem;
    animation: pulse 3s infinite;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 1.1rem;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-blue);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-blue);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary-blue);
}

.btn-contacto {
    background: var(--text-primary) !important;
    color: var(--bg-body) !important;
    padding: 0.5rem 1.1rem !important;
    border-radius: 10px;
    font-weight: 600 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    margin-left: 1.2rem !important;
}

.btn-contacto:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn-contacto::after {
    display: none !important;
}

/* HEADER CONTROLS (BOTÓN TEMA SVG PROFESIONAL + IDIOMA + MOBILE) */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-shrink: 0;
}

.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    color: var(--primary-blue);
}

.theme-svg {
    position: absolute;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

[data-theme="light"] .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

[data-theme="light"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: #f59e0b;
}

[data-theme="dark"] .moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.lang-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    height: 40px;
}

.lang-toggle-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
    margin-left: 0.3rem;
}

.mobile-menu-btn .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mobile-menu-btn.active .bar:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ==========================================================================
   --- HERO SECTION ELEGANTE Y CENTRADA (LIMPIA & SIN ELEMENTOS RECARGADOS) ---
   ========================================================================== */
.hero {
    min-height: 100vh;
    padding: 8rem 10% 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-decoration {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 750px;
    height: 750px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.16) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    max-width: 920px;
    text-align: center;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--primary-green);
}

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

.hero h1 {
    font-size: 4.8rem;
    line-height: 1.08;
    margin-bottom: 1.6rem;
}

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

.hero-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-body);
    padding: 0.95rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    opacity: 0.95;
}

.btn-secondary {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    color: var(--text-primary);
    padding: 0.95rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

/* --- STATS SECTION --- */
.stats-section {
    padding: 0 10% 4rem;
    margin-top: -3rem;
    position: relative;
    z-index: 3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    padding: 1.2rem 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    max-width: 1100px;
    margin: 0 auto;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-purple);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.2);
    background: var(--bg-body);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.blue { background: rgba(37, 99, 235, 0.12); }
.stat-icon.green { background: rgba(5, 150, 105, 0.12); }
.stat-icon.purple { background: rgba(124, 58, 237, 0.12); }
.stat-icon.orange { background: rgba(217, 119, 6, 0.12); }

.stat-info h3 {
    font-size: 1.8rem;
    margin: 0;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* --- SECCIONES GENERALES --- */
.section-container {
    padding: 6rem 10%;
    position: relative;
    z-index: 2;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    background: var(--bg-gray);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    line-height: 1.15;
}

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

/* --- SOBRE MÍ CARDS CON EFECTO 3D TILT --- */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
}

.about-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.about-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-blue);
}

.about-card.main-card {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    color: white;
    border: 1px solid rgba(124, 58, 237, 0.4);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

.about-card.main-card h3,
.about-card.main-card p {
    color: white;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-card.main-card p {
    opacity: 0.9;
}

.about-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-card.main-card strong {
    color: #a7f3d0;
}

/* --- ARSENAL / SKILLS --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.skill-card[data-color="red"]::before { background: var(--primary-red); }
.skill-card[data-color="blue"]::before { background: var(--primary-blue); }
.skill-card[data-color="green"]::before { background: var(--primary-green); }
.skill-card[data-color="purple"]::before { background: var(--primary-purple); }

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.skill-emoji {
    font-size: 2rem;
}

.skill-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 0.6rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-list li::before {
    content: "✓";
    color: var(--primary-green);
    font-weight: bold;
}

/* ==========================================================================
   --- TECH STACK SECTION (100% IGUALADA A LA CAPTURA + BRILLO ANIMADO) ---
   ========================================================================== */
.techstack-section {
    background-color: transparent;
}

.techstack-title {
    font-size: 2.8rem;
    font-weight: 800;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.techstack-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    margin: 0.5rem auto 1rem;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.techstack-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 1100px) {
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tech-card {
    background: var(--tech-card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--tech-card-border);
    border-radius: 16px;
    padding: 1.4rem 1.4rem 1.6rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.tech-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 16px 32px -5px rgba(168, 85, 247, 0.2);
}

.tech-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.1rem;
}

.tech-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a855f7;
}

.tech-card-icon svg {
    stroke: #a855f7;
    width: 20px;
    height: 20px;
}

.tech-card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-content: flex-start;
}

.tech-pill {
    background: var(--tech-pill-bg);
    color: var(--tech-pill-text);
    padding: 0.38rem 0.7rem;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    line-height: 1.2;
}

.tech-pill:hover {
    background: var(--tech-pill-hover);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tech-pill .pill-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* --- TRAYECTORIA (TIMELINE) --- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background: var(--border-color);
}

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

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 1.5rem;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-blue);
    border: 3px solid var(--bg-body);
    box-shadow: 0 0 12px var(--primary-blue);
}

.timeline-content {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.timeline-content:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.timeline-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.timeline-badge.blue { background: rgba(37, 99, 235, 0.15); color: #2563eb; }
.timeline-badge.purple { background: rgba(124, 58, 237, 0.15); color: #7c3aed; }
.timeline-badge.green { background: rgba(5, 150, 105, 0.15); color: #059669; }

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.timeline-company {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-tags span {
    background: var(--bg-gray);
    color: var(--text-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

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

.cert-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.cert-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.2);
    border-color: var(--primary-purple);
}

.cert-status {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.cert-status.completed {
    background: rgba(5, 150, 105, 0.15);
    color: #059669;
}

.cert-status.in-progress {
    background: rgba(217, 119, 6, 0.15);
    color: #d97706;
}

.cert-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.cert-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
    padding-right: 4rem;
}

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

.cert-detail {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- CONTACTO SECTION --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.contact-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.contact-card-icon {
    font-size: 2rem;
    background: var(--bg-gray);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.btn-copy-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-email:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.availability-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-green);
}

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

.social-btn {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.social-btn:hover {
    color: var(--primary-purple);
}

.contact-form {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.contact-form h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-body);
    transition: border-color 0.2s, background 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 0.9rem;
}

.btn-mailto-alt {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.7rem;
    border-radius: 10px;
}

/* --- TOAST NOTIFICATION --- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-primary);
    color: var(--bg-body);
    padding: 1rem 1.8rem;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    max-width: 400px;
    line-height: 1.4;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- FOOTER --- */
.footer {
    background: var(--bg-light);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    padding: 4rem 10% 2rem;
    position: relative;
    z-index: 2;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.footer-brand .brand-name {
    font-weight: 800;
    font-size: 1.2rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
    padding-top: 1.5rem;
}

/* --- BOTÓN VOLVER ARRIBA --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--text-primary);
    color: var(--bg-body);
    transform: translateY(-3px);
}

/* --- SCROLL REVEAL ANIMATIONS --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- MEDIA QUERIES (RESPONSIVO) --- */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.8rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 880px) {
    .navbar {
        padding: 0.8rem 1.2rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        background: var(--bg-header);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-xl);
        transform: translateY(-150%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        margin: 0;
        font-size: 1.1rem;
    }

    .btn-contacto {
        margin-left: 0 !important;
    }

    .hero {
        padding: 7rem 6% 3.5rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .section-container {
        padding: 4rem 6%;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .stats-section {
        padding: 0 6% 3rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.3rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   --- NUEVA SECCIÓN: SOBRE MÍ (ESTILO PROFESIONAL) ---
   ========================================================================== */
.profile-section {
    position: relative;
    z-index: 2;
}

.profile-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-main-card, .profile-wide-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.profile-main-card:hover, .profile-wide-card:hover {
    border-color: var(--primary-purple);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.2);
    transform: translateY(-6px);
}

/* Tarjeta Principal */
.profile-main-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-image-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    z-index: 1;
}

.profile-image-glow {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    z-index: -1;
    animation: rotateGlow 3s linear infinite;
    opacity: 0.9;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-body);
    background-color: var(--bg-card); /* Previene círculo negro */
    position: relative;
    z-index: 2;
}

.profile-name {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.profile-tag {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    background: var(--bg-gray);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
}

.tag-code {
    color: var(--primary-purple);
    font-weight: bold;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: left;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Wide Cards (Stack y Ciberseguridad) */
.profile-wide-card {
    text-align: left;
    padding: 2rem 2.5rem;
}

.wide-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.wide-card-header h4 {
    font-size: 1.3rem;
    margin: 0;
    color: var(--text-primary);
}

.wide-card-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Pills Grid */
.profile-pills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.profile-pill {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.profile-pill:hover {
    transform: translateY(-6px);
    border-color: var(--primary-purple);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.2);
}

.pill-icon {
    font-size: 1.2rem;
}

.pill-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Quote container */
.profile-quote-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.profile-quote-container:hover {
    border-color: var(--primary-purple);
}

.profile-quote-text {
    font-family: monospace;
    color: var(--primary-purple);
    font-size: 1rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .profile-main-card, .profile-wide-card {
        padding: 1.5rem;
    }
    
    .profile-pills-grid {
        grid-template-columns: 1fr;
    }
}