/* ============================================
   ESTILOS GLOBALES Y RESET
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */

h1, h2, h3 {
  color: #1a1a1a;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.8rem;
  border-bottom: 3px solid #007bff;
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.3rem;
  color: #0056b3;
}

p {
  margin-bottom: 1rem;
  text-align: justify;
}

a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* ============================================
   HEADER / PRESENTACIÓN
   ============================================ */

.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
}

.header-name {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-tagline {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.95;
  margin: 0 0 1rem 0;
}

.header-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
  margin-top: 1rem;
}

.header-contact span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ============================================
   FOTO DE PERFIL
   ============================================ */

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

.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */

.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================
   SECCIONES
   ============================================ */

.section {
  background: white;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #007bff;
}

.section-title {
  font-size: 1.8rem;
  color: #1a1a1a;
  border-bottom: 3px solid #007bff;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   SECCIÓN: ABOUT
   ============================================ */

.about p {
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.about p:last-child {
  margin-bottom: 0;
}

/* ============================================
   SECCIÓN: HABILIDADES
   ============================================ */

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.skill-category {
  background: #f5f5f5;
  padding: 1.5rem;
  border-radius: 6px;
  border-left: 4px solid #764ba2;
}

.skill-category h3 {
  color: #764ba2;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

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

.skill-category li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #555;
}

.skill-category li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #764ba2;
  font-weight: bold;
}

/* ============================================
   SECCIÓN: INTERESES
   ============================================ */

.interests-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.interest-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.interest-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ============================================
   SECCIÓN: PROYECTOS
   ============================================ */

.project-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.project-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.project-title {
  color: #0056b3;
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.project-date {
  color: #888;
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.project-description {
  color: #555;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.project-company {
  color: #764ba2;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.achievements {
  list-style: none;
  margin-top: 0.8rem;
  padding-left: 0;
}

.achievements li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #666;
  font-size: 0.95rem;
}

.achievements li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

/* ============================================
   SECCIÓN: EDUCACIÓN
   ============================================ */

.education-item {
  margin-bottom: 1.8rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid #e0e0e0;
}

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

.education-title {
  color: #0056b3;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.education-institution {
  color: #764ba2;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.education-date {
  color: #888;
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.education-description {
  color: #555;
  line-height: 1.6;
}

.education-status {
  color: #28a745;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

/* ============================================
   SECCIÓN: IDIOMAS
   ============================================ */

.languages-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.language-item {
  background: #f5f5f5;
  padding: 1.5rem;
  border-radius: 6px;
  border-left: 4px solid #764ba2;
}

.language-item h3 {
  color: #764ba2;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.language-level {
  position: relative;
  height: 24px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.level-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  transition: width 0.5s ease;
}

.level-text {
  position: absolute;
  right: 0.8rem;
  color: #333;
  font-weight: 600;
  font-size: 0.85rem;
}

/* ============================================
   SECCIÓN: CONTACTO
   ============================================ */

.contact-info {
  background: #f5f5f5;
  padding: 1.5rem;
  border-radius: 6px;
  border-left: 4px solid #764ba2;
}

.contact-info p {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.contact-info p:last-child {
  margin-bottom: 0;
}

.contact-info strong {
  color: #1a1a1a;
  margin-right: 0.5rem;
  min-width: 150px;
}

.contact-info a {
  color: #007bff;
  word-break: break-all;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: #1a1a1a;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  font-size: 0.95rem;
}

.footer p {
  margin-bottom: 0.5rem;
  text-align: center;
}

.footer p:last-child {
  margin-bottom: 0;
  opacity: 0.8;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets (768px y menores) */
@media (max-width: 768px) {
  .header {
    padding: 2rem 1rem;
  }

  .header-name {
    font-size: 2rem;
  }

  .header-tagline {
    font-size: 1rem;
  }

  .header-contact {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

  .main-content {
    padding: 0 1rem;
  }

  .section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

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

  .skills-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .interests-container {
    gap: 0.6rem;
  }

  .interest-badge {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .languages-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.1rem;
  }
}

/* Móviles (480px y menores) */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .header {
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
  }

  .header-name {
    font-size: 1.5rem;
  }

  .header-tagline {
    font-size: 0.9rem;
  }

  .header-contact {
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
  }

  .profile-photo {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 255, 255, 0.9);
  }

  .main-content {
    padding: 0 0.75rem;
  }

  .section {
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 6px;
  }

  .section-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1rem;
  }

  p {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
  }

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

  .skill-category {
    padding: 1rem;
  }

  .interests-container {
    gap: 0.5rem;
  }

  .interest-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }

  .project-item,
  .education-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .languages-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-info {
    padding: 1rem;
  }

  .contact-info p {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-info strong {
    min-width: auto;
    display: block;
    margin-bottom: 0.3rem;
  }

  .footer {
    padding: 1.5rem 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
  }
}

/* ============================================
   EFECTOS Y TRANSICIONES
   ============================================ */

.section {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

a {
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
  color: #0056b3;
}

/* ============================================
   IMPRESIÓN
   ============================================ */

@media print {
  body {
    background: white;
  }

  .section {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .header {
    background: white;
    color: #1a1a1a;
    border-bottom: 2px solid #007bff;
  }

  .header-name,
  .header-tagline {
    text-shadow: none;
    color: #1a1a1a;
  }

  a {
    color: #0056b3;
  }
}
