/* Reset y configuración base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background-color: #f4f7f9;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.cv-header {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.profile-photo {
  width: 200px; 
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transform: rotate(30deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
  transform: rotate(30deg) scale(1.05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}



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

.cv-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.header-subtitle {
  font-size: 1.2rem;
  opacity: 0.95;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

/* Navigation */
.cv-nav {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid #e8ecef;
}

.cv-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 15px 0;
}

.cv-nav a {
  text-decoration: none;
  color: #5a6c7d;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.cv-nav a:hover {
  color: #3498db;
  background-color: #ebf5fb;
}

/* Main Content */
main {
  padding: 40px 20px;
}

/* Secciones */
.cv-section {
  background: white;
  border-radius: 12px;
  padding: 35px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8ecef;
  transition: box-shadow 0.3s ease;
}

.cv-section:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.section-title {
  color: #2c3e50;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid #3498db;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 1.3rem;
}

/* Experiencia */
.experience-item {
  margin-bottom: 30px;
  padding-left: 25px;
  border-left: 4px solid #3498db;
}

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

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.experience-header h3 {
  font-size: 1.3rem;
  color: #2c3e50;
  font-weight: 600;
}

.experience-period {
  color: #7f8c8d;
  font-size: 0.9rem;
  font-weight: 500;
}

.experience-company {
  color: #3498db;
  font-weight: 500;
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.experience-description {
  color: #5a6c7d;
  line-height: 1.7;
}

/* Educación */
.education-item {
  margin-bottom: 25px;
  padding: 20px;
  background: #f8fafb;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

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

.education-item h3 {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 8px;
}

.education-institution {
  color: #3498db;
  font-weight: 500;
  margin-bottom: 5px;
}

.education-period {
  color: #7f8c8d;
  font-size: 0.9rem;
}

/* Habilidades */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.skills-subtitle {
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 600;
}

.skills-list {
  list-style-position: inside;
  color: #5a6c7d;
}

.skills-list li {
  padding: 8px 0;
  line-height: 1.6;
}

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

.contact-list li {
  padding: 10px 0;
  color: #5a6c7d;
  line-height: 1.6;
}

.contact-list a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-list a:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* Tabla de Proyectos */
.table-container {
  overflow-x: auto;
  margin-top: 20px;
}

.projects-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.projects-table thead {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.projects-table th,
.projects-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #e8ecef;
}

.projects-table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.projects-table tbody tr {
  transition: background-color 0.3s ease;
}

.projects-table tbody tr:hover {
  background-color: #f8fafb;
}

.project-name {
  font-weight: 600;
  color: #2c3e50;
}

.project-tech {
  color: #7f8c8d;
  font-size: 0.95rem;
}

/* Multimedia */
.multimedia-item {
  margin-bottom: 40px;
}

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

.multimedia-item h3 {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 600;
}

.media-wrapper {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #e8ecef;
}

.media-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* Aspect ratio 16:9 */
  height: 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Testimonios */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.testimonial-card {
  background: #f8fafb;
  padding: 25px;
  border-radius: 10px;
  border-left: 4px solid #3498db;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.testimonial-card blockquote {
  font-style: italic;
  color: #5a6c7d;
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.testimonial-author {
  border-top: 1px solid #e8ecef;
  padding-top: 15px;
}

.author-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 3px;
}

.author-role,
.author-company {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

/* Formulario */
.cv-form {
  max-width: 700px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e8ecef;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-fieldset {
  border: 2px solid #e8ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.form-fieldset legend {
  font-weight: 600;
  color: #2c3e50;
  padding: 0 10px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radio-item input[type="radio"] {
  width: auto;
  cursor: pointer;
}

.radio-item label {
  cursor: pointer;
  color: #5a6c7d;
  margin: 0;
}

.btn-submit {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.btn-submit:active {
  transform: translateY(0);
}

/* Footer */
.cv-footer {
  background: #2c3e50;
  color: white;
  padding: 30px 20px;
  margin-top: 50px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-content p {
  font-style: italic;
  opacity: 0.9;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #3498db;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 20px;
  }
/*
  .profile-photo {
    width: 300px !important;
    height: 300px !important;
  }
*/
  .cv-header h1 {
    font-size: 2rem;
  }

  .header-subtitle {
    font-size: 1rem;
    flex-direction: column;
    gap: 8px;
  }

  .cv-nav ul {
    flex-direction: column;
    align-items: center;
  }

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

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

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .cv-section {
    padding: 25px 20px;
  }
}

@media (max-width: 480px) {
  .cv-header {
    padding: 40px 20px;
  }

  .cv-header h1 {
    font-size: 1.75rem;
  }

  .projects-table th,
  .projects-table td {
    padding: 12px 8px;
    font-size: 0.9rem;
  }
}

/* Disposición lado a lado para Educación y Habilidades */
.edu-skills-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

/* Responsivo: apilar en pantallas pequeñas */
@media (max-width: 992px) {
  .edu-skills-container {
    grid-template-columns: 1fr;
  }
}

/* Contenedor de todas las habilidades */
.padre {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

/* Cada carta de habilidad */
.skill {
  width: 110px;
  height: 150px;
  perspective: 1000px;
}

/* Oculta el checkbox (sirve para el flip) */
.flip-checkbox {
  display: none;
}

/* Parte interna de la carta */
.card-inner {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  cursor: pointer;
  position: relative;
}

/* Frente y reverso de la carta */
.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Frente */
.card-front {
  background: white;
  padding: 10px;
}

.card-front img {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
}

/* Reverso */
.card-back {
  background: #95bcda;
  color: black;
  transform: rotateY(180deg);
  padding: 15px;
  text-align: center;
  font-size: 0.8rem;
}

/* Efecto de voltear */
.flip-checkbox:checked + .card-inner {
  transform: rotateY(180deg);
}

.center-img {
  display: flex;
  justify-content: center;
  align-items: center;
}