* {
    font-family: 'Lexend', sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* ════════════════════════════════════════════════════════
   VARIABLES CSS
════════════════════════════════════════════════════════ */
:root {
     --bg-header: linear-gradient(
        to bottom,
        #ffffff 0%,
        #fafbff 8%,
        #f5f7ff 16%,
        #f0f3ff 24%,
        #ebeeff 32%,
        #e6eaff 40%,
        #e1e6ff 48%,
        #dce2ff 56%,
        #d8deff 64%,
        #d3daff 72%,
        #cfd6ff 80%,
        #cad2ff 88%,
        #c5ceff 96%,
        #c0caff 100%
    );
     --bg-section: linear-gradient(
        to bottom,
        #c0caff 0%,
        #bac4ff 8%,
        #b4beff 16%,
        #aeb8ff 24%,
        #a8b2ff 32%,
        #a2acff 40%,
        #9ca6ff 48%,
        #96a0ff 56%,
        #909aff 64%,
        #8a94ff 72%,
        #848eff 80%,
        #7e88ff 88%,
        #7882ff 96%,
        #727cff 100%
    );
  --bg-section-projects: linear-gradient(
        to bottom,
        #727cff 0%,
        #6d77f5 8%,
        #6872eb 16%,
        #636de1 24%,
        #5e68d7 32%,
        #5963cd 40%,
        #545ec3 48%,
        #4f59b9 56%,
        #4a54af 64%,
        #4550a5 72%,
        #404b9b 80%,
        #3b4691 88%,
        #364187 96%,
        #313c7d 100%
    );

     --bg-timeline: linear-gradient(
        to bottom,
        #313c7d 0%,
        #2e3975 8%,
        #2b366d 16%,
        #283365 24%,
        #25305d 32%,
        #222d55 40%,
        #1f2a4d 48%,
        #1c2745 56%,
        #19243d 64%,
        #162135 72%,
        #131e2d 80%,
        #101b25 88%,
        #0d181d 96%,
        #0a1515 100%
    );
    --border-header: rgba(0, 0, 0, 0.06);
    --color-name: #111;
    --color-role: #444444;
    --color-company: #131313;
    --bg-links:#ffffff;
    --color-text: #2b2b2b;
    --bg-card: linear-gradient(135deg, #6366f1, #818cf8);
    --color-card-text: #fff;
    --bg-underline: linear-gradient(135deg, #6366f1, #818cf8);
    --color-dot: #22c55e;
    --logo-hover-filter: brightness(1.3) drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    --bg-card-soft: rgba(255, 255, 255, 0.3);
    --color-dot-inactive: rgb(82, 82, 82);
    --color-dot-active: #f163dc;
    --bg-card-right: rgba(255, 255, 255, 0.25);
    --border-card-right: rgba(255, 255, 255, 0.4);

    --color-desc: #323234;
    --color-feature: #555577;
    --color-cert-text: #6366f1;
    --color-cert-bg: rgba(99, 102, 241, 0.1);
    --color-cert-border: rgba(99, 102, 241, 0.25);
     --color-section-title: #4338ca;
   
}

body.dark {
    --bg-header: linear-gradient(
        to bottom,
        #080712 0%,
        #0a091a 8%,
        #0c0b22 16%,
        #0e0d2a 24%,
        #100f32 32%,
        #12113a 40%,
        #141342 48%,
        #16154a 56%,
        #181752 64%,
        #1a195a 72%,
        #1c1b62 80%,
        #1e1d6a 88%,
        #201f72 96%,
        #22217a 100%
    );

    --bg-section: linear-gradient(
        to bottom,
        #22217a 0%,
        #242382 8%,
        #26258a 16%,
        #282792 24%,
        #2a299a 32%,
        #2c2ba2 40%,
        #2e2daa 48%,
        #302fb2 56%,
        #3231ba 64%,
        #3433c2 72%,
        #3635ca 80%,
        #3837d2 88%,
        #3a39da 96%,
        #3c3be2 100%
    );

     --bg-section-projects: linear-gradient(
        to bottom,
        #3c3be2 0%,
        #4040e8 8%,
        #4445ee 16%,
        #484af4 24%,
        #4c4ffa 32%,
        #5054ff 40%,
        #5459ff 48%,
        #585eff 56%,
        #5c63ff 64%,
        #6068ff 72%,
        #646dff 80%,
        #6872ff 88%,
        #6c77ff 96%,
        #707cff 100%
    );

    
     --bg-timeline: linear-gradient(
        to bottom,
        #707cff 0%,
        #7480ff 8%,
        #7884ff 16%,
        #7c88ff 24%,
        #808cff 32%,
        #8490ff 40%,
        #8894ff 48%,
        #8c98ff 56%,
        #909cff 64%,
        #94a0ff 72%,
        #98a4ff 80%,
        #9ca8ff 88%,
        #a0acff 96%,
        #a4b0ff 100%
    );
    

    --color-name: #f0f4ff;
    --color-role: #a5b4fc;
    --color-company: #c7d2fe;
    --bg-links:#000000;
    --color-text: #a5b4fc;
    --bg-card: linear-gradient(135deg, #4338ca, #6366f1);
    --color-card-text: #fff;
    --bg-underline: linear-gradient(135deg, #818cf8, #a5b4fc);
    --color-dot: #4ade80;
    --logo-hover-filter: brightness(0.8) drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
    --bg-card-soft: rgba(0, 0, 0, 0.2);
    --color-dot-inactive: rgba(209, 209, 209, 0.45);
    --color-dot-active: #e0e7ff;
    --bg-card-right: rgba(0, 0, 0, 0.15);
    --border-card-right: rgba(255, 255, 255, 0.08);

      --color-desc: #c7d2fe;
    --color-feature: #a5b4fc;
    --color-cert-text: #e0e7ff;
    --color-cert-bg: rgba(165, 180, 252, 0.1);
    --color-cert-border: rgba(165, 180, 252, 0.25);
     --color-section-title: #c7d2fe;
    
}

/* ════════════════════════════════════════════════════════
   RESET GLOBAL
════════════════════════════════════════════════════════ */
a {
    all: unset;
    cursor: pointer;
}

/* ════════════════════════════════════════════════════════
   NAV DE SECCIONES (fijo, lateral derecho)
════════════════════════════════════════════════════════ */
.section-nav {
    position: fixed;
    top: 1rem;
    left: calc(1rem + 42px + 0.6rem); /* mismo top que toggle + su ancho + gap */
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    z-index: 999;
    
}

.section-nav__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
    height: 42px;
    border-radius: 21px;
    background: var(--bg-card);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    max-width: 42px;
    transition: max-width 0.35s ease-in-out,
                transform 0.3s ease-in-out,
                opacity 0.3s ease-in-out;
    white-space: nowrap;
}

.section-nav__link i {
    font-size: 1rem;
    flex-shrink: 0;
}

.section-nav__link span {
    opacity: 0;
    transition: opacity 0.2s ease-in-out 0.1s;
}

.section-nav__link:hover {
    max-width: 160px;
    transform: scale(1.05);
}

.section-nav__link:hover span {
    opacity: 1;
}

.section-nav__link.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}



/* ════════════════════════════════════════════════════════
   BOTÓN MODO OSCURO
════════════════════════════════════════════════════════ */
.dark-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    z-index: 999;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.dark-toggle:hover {
    transform: scale(1.1) rotate(20deg);
    opacity: 0.9;
}

.dark-toggle i {
    transition: opacity 0.9s ease-in-out;
}

.dark-toggle i.fade {
    opacity: 0.5;
}

/* ════════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════════ */
.header {
    width: 100%;
    background: var(--bg-header);
    animation: fadeIn 1.2s ease-in-out both;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 400px;
    width: 100%;
    padding-left: 12rem;
}

/* ════════════════════════════════════════════════════════
   AVATAR
════════════════════════════════════════════════════════ */
.nav-avatar {
    margin: 0;
    padding: 0;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.nav-avatar:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.25);
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* ════════════════════════════════════════════════════════
   INFORMACIÓN PERSONAL
════════════════════════════════════════════════════════ */
.nav-info {
    display: flex;
    flex-direction: column;
}

.nav-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-name);
    margin-bottom: 2px;
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.nav-name::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bg-underline);
    transition: width 0.4s ease-in-out;
}

.nav-name:hover::after {
    width: 75%;
}

.nav-role {
    font-size: 1.4rem;
    font-style: italic;
    color: var(--color-role);
    margin: 0;
    margin-top: 2px;
}

/* ════════════════════════════════════════════════════════
   EMPRESAS
════════════════════════════════════════════════════════ */
.nav-companies {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.nav-company {
    font-weight: 400;
    color: var(--color-company);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
    cursor: pointer;
}

.nav-company a {
    transition: transform 0.3s ease-in-out;
    display: inline-block;
}

.nav-company a:hover {
    transform: translateX(6px);
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-dot);
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

/* ════════════════════════════════════════════════════════
   CARD DE DATOS
════════════════════════════════════════════════════════ */
.nav-card {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    display: inline-block;
    align-self: flex-start;
    animation: fadeInBottom 2.1s ease-in-out;
    cursor: pointer;
}

.nav-details {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-details li {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--color-card-text);
    transition: transform 0.3s ease-in-out;
}

.nav-details li:hover {
    transform: translateX(6px);
}

.nav-details li + li {
    margin-top: 12px;
}

/* ════════════════════════════════════════════════════════
   SOBRE MÍ
════════════════════════════════════════════════════════ */
.nav-about {
    align-self: center;
    margin-left: auto;
    margin-right: 4rem;
    max-width: 340px;
}

.nav-about-text {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text);
    line-height: 1.8;
    margin: 0;
}

/* ════════════════════════════════════════════════════════
   LOGOS TECNOLOGÍAS
════════════════════════════════════════════════════════ */
.nav-logos {
    align-self: stretch;
    margin-left: 1rem;
     flex: 1;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    padding: 40px;
}

.nav-bio {
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--color-role);
    line-height: 1.7;
    margin: 0.75rem 0 0;
    max-width: 320px;
    font-style: italic;
}

.logo-float {
    position: absolute;
    object-fit: contain;
    opacity: 0.25;
    cursor: pointer;
    border-radius: 10%;
    animation: floatUp 4s ease-in-out infinite;
    transition: opacity 0.3s ease-in-out;
}

.logo-float:hover {
    opacity: 0.85;
    filter: var(--logo-hover-filter);
}

.logo-float:nth-child(1) { top: 5%; left: 15%; animation-delay: 0.0s; }
.logo-float:nth-child(2) { top: 30%; left: 17%; animation-delay: 0.4s; }
.logo-float:nth-child(3) { top: 20%; left: 42%; animation-delay: 0.8s; }
.logo-float:nth-child(4) { top: 58%; left: 48%; animation-delay: 1.2s; }
.logo-float:nth-child(5) { top: 8%;  left: 60%; animation-delay: 1.6s; }
.logo-float:nth-child(6) { top: 48%; left: 68%; animation-delay: 2.0s; }
.logo-float:nth-child(7) { top: 18%; left: 78%; animation-delay: 2.4s; }
.logo-float:nth-child(8) { top: 62%; left: 82%; animation-delay: 2.8s; }
.logo-float:nth-child(9) { top: 72%; left: 12%; animation-delay: 2.3s; }
.logo-float:nth-child(10) { top: 52%; left: 32%; animation-delay: 2.3s; }
.logo-float:nth-child(11) { top: 32%; left: 55%; animation-delay: 2.3s; }

img {
    outline: none;
}

/* ════════════════════════════════════════════════════════
   ANIMACIONES
════════════════════════════════════════════════════════ */
.nav-avatar, .nav-name, .nav-role, .nav-companies > h2, .dark-toggle , .section-nav {
    animation: fadeInLeft 2.1s ease-in-out both;
}

/* ════════════════════════════════════════════════════════
   SECCIÓN TECNOLOGÍAS
════════════════════════════════════════════════════════ */
.tech-section {
    background: var(--bg-section);
    animation: fadeIn 1.2s ease-in-out both;
}

.tech-slider {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    position: relative;
    min-height: 420px;
    align-items: center;
    margin: 0 4rem;
}

/* ─── Panel izquierdo ─────────────────────────────────── */
.tech-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem;
    border: 1px solid var(--border-header);
    border-radius: 16px;
    background: var(--bg-card-soft);
    min-height: 280px;
    position: relative;
}

.tech-logo-wrap {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10%;
}

.tech-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
     transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8%;
}

.tech-logo.fade {
    opacity: 0;
}

.tech-logo:hover {
    transform: scale(1.1);
}

.tech-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-name);
    margin: 0;
    text-align: center;
}

.tech-links {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.tech-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-company);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-header);
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
    cursor: pointer;
    background-color: var(--bg-links);
}

.tech-link:hover {
    transform: translateX(4px);
    background: black;
    color: white;
}

/* ─── Panel derecho ───────────────────────────────────── */
.tech-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    position: relative;
    background: var(--bg-card-right);
    border-radius: 5%;
}

.tech-desc {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text);
    line-height: 1.8;
    margin: 0;
}

.tech-certs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    position: relative;
}

.tech-cert-badge {
    font-size: 0.75rem;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--color-cert-text);
    background: var(--color-cert-bg);
    border: 1px solid var(--color-cert-border);
}

.tech-desc {
    color: var(--color-desc);
}

.tech-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tech-features li {
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--color-feature);
    display: flex;
    align-items: center;
    gap: 8px;
    
}

.tech-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bg-card);
    flex-shrink: 0;
}

/* ─── Flechas ─────────────────────────────────────────── */
.tech-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-header);
    background: transparent;
    color: var(--color-text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tech-arrow:hover {
    background: var(--bg-card);
    color: #fff;
    transform: scale(1.1);
}

.tech-arrow--prev { left: calc(50% - 52px); bottom: -3rem; }
.tech-arrow--next { left: calc(50% + 10px);  bottom: -3rem; }

/* ─── Dots ────────────────────────────────────────────── */
.tech-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 1.5rem;
    
}
.tech-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
    cursor: pointer;
    background-color: var(--color-dot-inactive);
}

.tech-dot.active {
    background: var(--bg-card);
    transform: scale(1.3);
    background-color: var(--color-dot-active);
      box-shadow: 0 0 8px 3px rgba(239, 130, 228, 0.6);
}

/* ─── Animación de transición ─────────────────────────── */
.tech-fade {
    animation: techFade 0.4s ease-in-out;
}

.tech-section {
    padding-top: 0;
}

.section-header {
    text-align: left;
    padding-top: 2rem;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-section-title);
    margin: 0;
    padding: 1.5rem 0 0.5rem 4rem;
    position: relative;
    display: block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    border-radius: 2px;
}

/* ════════════════════════════════════════════════════════
   SECCIÓN PROYECTOS
════════════════════════════════════════════════════════ */
.projects-section {
    padding: 2rem 0 4rem;
    background: var(--bg-section-projects);
    animation: fadeIn 1.2s ease-in-out both;
}

.projects-slider {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 0 4rem;
    align-items: center;
    min-height: 420px;
}

/* ─── Dots proyectos ──────────────────────────────────── */
.projects-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* ─── Panel izquierdo ─────────────────────────────────── */
.project-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    background: var(--bg-card-soft);
    border: 1px solid var(--border-header);
    border-radius: 16px;
    min-height: 380px;
    justify-content: center;
}

.project-status-wrap {
    display: flex;
}

.project-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.project-status.activo {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.project-status.en-desarrollo {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.project-status.archivado {
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

body.dark .project-status.activo {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}

body.dark .project-status.en-desarrollo {
    background: rgba(165, 180, 252, 0.1);
    color: #a5b4fc;
    border-color: rgba(165, 180, 252, 0.2);
}

body.dark .project-status.archivado {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-name);
    margin: 0;
}

.project-desc {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--color-desc);
    line-height: 1.7;
    margin: 0;
}

.project-stack-logos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-stack-logos img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

.project-stack-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.project-tag {
    font-size: 0.75rem;
    font-weight: 400;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--bg-card-right);
    border: 1px solid var(--border-card-right);
    color: var(--color-text);
}

/* ─── Panel derecho ───────────────────────────────────── */
.project-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.project-image-wrap {
    flex: 1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-header);
}

.project-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: opacity 0.4s ease-in-out;
}

.project-img.fade {
    opacity: 0;
}

.project-img-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.project-img-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.project-img-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* ─── Flechas proyectos ───────────────────────────────── */
.project-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-header);
    background: transparent;
    color: var(--color-text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.project-arrow:hover {
    background: var(--bg-card);
    color: #fff;
    transform: scale(1.1);
}

/* ════════════════════════════════════════════════════════
   LÍNEA DE TIEMPO
════════════════════════════════════════════════════════ */
.timeline-section {
    padding: 3rem 0;
    background: var(--bg-timeline);
    animation: fadeIn 1.2s ease-in-out both;
}

.timeline-track {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 4rem;
}

.timeline-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(to right, #6366f1, #a5b4fc);
    border-radius: 3px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-items {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    cursor: default;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
}

.timeline-dot.formacion {
    background: #6366f1;
}

.timeline-dot.experiencia {
    background: #22c55e;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.timeline-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    max-width: 150px;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.timeline-item:hover .timeline-info {
    opacity: 1;
    transform: translateY(0);
}

.timeline-icon {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.timeline-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.timeline-institution {
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.timeline-period {
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}



@keyframes techFade {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}



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

@keyframes floatUp {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-18px); }
}

@keyframes floatIn {
    from { opacity: 0; transform: translateY(-40px); }
    to   { opacity: 0.25; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInBottom {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */

/* ─── TABLET (≤ 1024px) ──────────────────────────────── */
@media (max-width: 1024px) {
    .nav {
        padding-left: 4rem;
        gap: 1rem;
    }

    .nav-logos {
        width: 360px;
    }

    .nav-avatar {
        width: 180px;
        height: 180px;
    }

    .nav-name {
        font-size: 1.6rem;
    }

    .nav-role {
        font-size: 1.1rem;
    }
}

/* ─── TABLET PEQUEÑA (≤ 768px) ──────────────────────── */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        height: auto;
        padding: 2rem 1.5rem;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    .nav-logos {
        display: none;
    }

    .nav-avatar {
        width: 140px;
        height: 140px;
        animation: none;
    }

    .nav-name {
        font-size: 1.4rem;
        animation: none;
    }

    .nav-role {
        font-size: 1rem;
        animation: none;
    }

    .nav-companies > h2 {
        animation: none;
        justify-content: center;
    }

    .nav-info {
        align-items: center;
    }

    .nav-card {
        width: 100%;
        animation: none;
    }

    .nav-details li {
        font-size: 0.95rem;
        justify-content: center;
    }

    .dark-toggle {
        animation: none;
    }

     .tech-slider {
        grid-template-columns: 1fr;
        gap: 1.5rem;
         margin: 0 1rem;
        
    }

    .tech-arrow--prev { left: calc(50% - 52px); }
    .tech-arrow--next { left: calc(50% + 10px); }

     .tech-links {
        position: absolute;
        top: -2.5rem;
        right: -3.75rem;
        align-items: flex-end;
    }

    .tech-link{
        font-size: 0.765rem;
    }

     .projects-slider {
        grid-template-columns: 1fr;
        margin: 0 1rem;
        gap: 1.5rem;
    }

    .project-img {
        height: 200px;
    }

     .timeline-track {
        padding: 0 1.5rem;
        flex-direction: row;
        gap: 0;
    }

    .timeline-bar {
        width: 6px;
        height: auto;
        min-height: 100%;
        position: absolute;
        left: 2.5rem;
    }

    .timeline-progress {
        width: 100%;
        height: 0%;
        transition: height 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .timeline-items {
        flex-direction: column;
        gap: 1.5rem;
        padding-left: 3rem;
        align-items: flex-start;
    }

    .timeline-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }

    .timeline-info {
        opacity: 1;
        transform: none;
        text-align: left;
        align-items: flex-start;
        max-width: none;
    }

     .timeline-title {
        font-size: 1.1rem;
    }

    .timeline-institution {
        font-size: 0.9rem;
        display: block;
    }

    .timeline-period {
        font-size: 0.8rem;
    }

    .timeline-icon {
        font-size: 1rem;
    }

     .section-title {
        padding: 1.5rem 0 0.75rem 0;
        text-align: center;
        display: block;
    }

    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

     .section-nav {
        left: calc(1rem + 36px + 0.5rem);
    }

    .section-nav__link {
        height: 36px;
        max-width: 36px;
        border-radius: 18px;
        font-size: 0.75rem;
    }

    .section-nav__link i {
        font-size: 0.85rem;
    }
}

/* ─── MÓVIL (≤ 480px) ────────────────────────────────── */
@media (max-width: 480px) {
    .nav {
        padding: 1.5rem 1rem;
    }

    .nav-avatar {
        width: 110px;
        height: 110px;
    }

    .nav-name {
        font-size: 1.1rem;
    }

    .nav-role {
        font-size: 0.85rem;
    }

    .nav-company {
        font-size: 0.8rem;
    }

    .nav-details li {
        font-size: 0.85rem;
    }

    .dark-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

}

/* ─── MÓVIL PEQUEÑO (≤ 400px) ────────────────────────── */
@media (max-width: 400px) {
    .tech-slider {
        margin: 0 1rem;
        gap: 1rem;
    }

    .tech-section {
        padding: 1rem 0;
    }

    .tech-left {
        padding: 1.5rem 1rem;
    }

    .tech-right {
        padding: 1.5rem 1rem;
    }
}