html {
    scroll-behavior: smooth;
}

section {
    padding: 80px 20px;
    min-height: auto;
    border-bottom: 1px solid #eee;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #2c3e50;
    z-index: 1000;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    transform: translateY(-3px);
}

#sobre-mi {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
}

.sobre-mi-contenido {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.foto-perfil img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 5px solid #2c3e50;
    object-fit: cover;
}

.experiencia-contenedor {
    max-width: 800px;
    margin: 0 auto;
}

.puesto {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #2c3e50;
    border-radius: 5px;
}

.puesto h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.fecha {
    font-weight: bold;
    color: #e67e22;
    display: block;
    margin-bottom: 10px;
}

#formulario-contacto {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
    gap: 15px;
}

#formulario-contacto input,
#formulario-contacto textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#formulario-contacto button {
    background: #2c3e50;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.carrusel-contenedor {
    width: 100%;
    overflow: hidden;
    background: #fff;
    padding: 20px 0;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.carrusel-track {
    display: flex;
    width: calc(250px * 7);
    animation: scroll-infinito 20s linear infinite;
}

.carrusel-item {
    width: 250px;
    padding: 0 10px;
    overflow: hidden;
}

.carrusel-item img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.carrusel-item img:hover {
    transform: scale(1.05);
}

@keyframes scroll-infinito {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 5)); }
}

.zoom-medio {
    transform: scale(2.2);
}

.bajar-imagen {
    width: 50%;
    height: 65%;
    object-fit: cover;
    object-position: 50% -30%;
}

.redes-sociales {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.icon-link {
    font-size: 2rem;
    color: #2c3e50;
    transition: all 0.3s ease;
    text-decoration: none;
}

.linkedin:hover { color: #0077b5; transform: translateY(-5px); }
.instagram:hover { color: #e4405f; transform: translateY(-5px); }
.github:hover { color: #333; transform: translateY(-5px); }

:root {
  --card-bg: rgba(20, 25, 35, 0.95);
  --accent: #e67e22;
  --text-white: #fafbfd;
  --text-dim: #c6c7cc;
  --radius: 20px;
}

#conocimientos {
    background-color: #fcfcfc;
    padding-bottom: 120px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  perspective: 1000px;
  cursor: pointer;
  height: 380px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: var(--radius);
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: var(--card-bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backface-visibility: hidden;
  color: var(--text-white);
}

.card-front h2 {
  font-family: 'Segoe UI', sans-serif;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 15px;
}

.card-back {
  transform: rotateY(180deg);
  background: #1a1a1a;
  border: 2px solid var(--accent);
}

.card-back h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

ul.features {
  list-style: none;
  text-align: left;
}

ul.features li {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text-dim);
}

ul.features li::before {
  content: "⚡ ";
  color: var(--accent);
}

.one { background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1555066931-4365d14bab8c?auto=format&fit=crop&w=400'); background-size: cover; }
.two { background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1677442136019-21780ecad995?auto=format&fit=crop&w=400'); background-size: cover; }
.three { background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=400'); background-size: cover; }
.four { background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1558494949-ef010cbdcc51?auto=format&fit=crop&w=400'); background-size: cover; }

.educacion-horizontal {
    padding: 60px 0;
    overflow-x: auto;
}

.timeline-h-container {
    position: relative;
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px 0;
}

.timeline-h-line {
    position: absolute;
    top: 45%;
    left: 0;
    width: 100%;
    height: 4px;
    background: #2c3e50;
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-h-wrapper {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.timeline-h-item {
    width: 25%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.h-icon {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.h-date {
    font-weight: bold;
    color: #e67e22;
    margin-bottom: 15px;
}

.h-dot {
    width: 20px;
    height: 20px;
    background: #e67e22;
    border-radius: 50%;
    border: 4px solid #fff;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.timeline-h-item:hover .h-dot { transform: scale(1.3); }
.timeline-h-item:hover .h-icon { color: #e67e22; transform: translateY(-5px); }

.h-content h3 { font-size: 1rem; color: #2c3e50; margin-bottom: 5px; }
.h-content p { font-size: 0.85rem; color: #7f8c8d; }

.current .h-dot {
    background: #2c3e50;
    box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.4);
    animation: pulse-orange 2s infinite;
}
.current .h-icon { color: #e67e22; }

@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(230, 126, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0); }
}

@media (max-width: 768px) {
    .timeline-h-wrapper { flex-direction: column; gap: 30px; }
    .timeline-h-line { display: none; }
    .timeline-h-item { width: 100%; flex-direction: row; text-align: left; gap: 20px; }
    .h-date { margin: 0; min-width: 90px; }
    .h-icon { margin-bottom: 0; min-width: 30px; }
}

.subtitulo-idiomas {
    color: #2c3e50;
    margin-top: 60px;
    margin-bottom: 30px;
}

.idiomas-bloque {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.idioma-caja {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.flag-img {
    width: 47px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bar-container {
    flex-grow: 1;
}

.bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: bold;
    color: #34495e;
    margin-bottom: 5px;
}

.nivel {
    color: #e67e22;
}

.bar-bg {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2c3e50, #e67e22);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .idiomas-bloque {
        flex-direction: column;
        gap: 25px;
    }
    .subtitulo-idiomas {
        margin-top: 40px;
    }
}