:root {
  --primary: #2c3e50;
  --secondary: #3498db;
  --accent: #e74c3c;
  --light: #ecf0f1;
  --dark: #2c3e50;
  --gray: #7f8c8d;
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

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

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 80px 0;
}

h1,
h2,
h3,
h4 {
  margin-bottom: 20px;
}

h1 {
  font-size: 2.8rem;
}

h2 {
  font-size: 2.2rem;
  position: relative;
  padding-bottom: 15px;
}

p {
  margin-bottom: 15px;
}

a {
  text-decoration: none;
  color: var(--secondary);
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--secondary);
  color: white;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #27ae60;
  color: white;
  box-shadow: var(--shadow);
}

.btn:disabled,
.btn[disabled] {
  background: #bfc9d1 !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  box-shadow: none !important;
  pointer-events: none;
  transition: none;
}

.btn:active:not(:disabled) {
  background: #27ae60 !important;
  color: #fff !important;
  border-color: #219150 !important;
}

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

.mb-30 {
  margin-bottom: 30px;
}

/* Header Styles */
header {
  background: linear-gradient(135deg, var(--primary), var(--dark));
  color: white;
  padding: 20px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-container {
  display: flex;
  align-items: center;
}

.logo {
  flex: 0 0 auto;
  font-size: 1.8rem;
  font-weight: 700;
}

.logo span {
  color: var(--secondary);
}

nav {
  margin-left: auto;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 25px;
}

nav ul li a {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

nav ul li a:hover {
  color: var(--secondary);
}

.mobile-menu {
  margin-left: 20px;
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  flex: 0 0 auto;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)),
    url("https://images.unsplash.com/photo-1555066931-4365d14bab8c?ixlib=rb-4.0.3") center/cover no-repeat;
  color: white;
  text-align: center;
  padding-top: 80px;
}

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

.hero h1 {
  font-size: 3.5rem;
  color: white;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--secondary);
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 30px;
}

.hero-quote {
  font-style: italic;
  font-size: 1.2rem;
  max-width: 700px;
  margin: 40px auto 40px;
  padding: 20px;
  border-left: 4px solid var(--secondary);
  background: rgba(255, 255, 255, 0.1);
}

/* About Section */
.about {
  background: white;
}

.about-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-image {
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Skills Section */
.skills {
  background: #f8f9fa;
}

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

.skill-category {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-10px);
}

.skill-category h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--secondary);
}

.skill-item {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.skill-level {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.level-expert {
  background: #3498db;
  color: white;
}

.level-advanced {
  background: #2ecc71;
  color: white;
}

.level-intermediate {
  background: #f39c12;
  color: white;
}

/* Experience Section */
.timeline {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background: var(--secondary);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-content {
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.timeline-content h3 {
  color: var(--secondary);
}

.timeline-date {
  font-weight: 600;
  color: var(--gray);
}

.timeline-item::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--secondary);
  border: 4px solid white;
  border-radius: 50%;
  top: 20px;
  z-index: 1;
}

.timeline-item:nth-child(odd)::after {
  right: -12px;
}

.timeline-item:nth-child(even)::after {
  left: -12px;
}

.timeline-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.timeline-content ul li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 18px;
  background: rgba(52, 152, 219, 0.06);
  border-radius: 6px;
  transition: background 0.2s;
  font-size: 1.05rem;
  line-height: 1.6;
}

.timeline-content ul li:last-child {
  margin-bottom: 0;
}

.timeline-content ul li::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--secondary);
  position: absolute;
  left: 10px;
  top: 16px;
  font-size: 1rem;
  transform: translateY(-50%);
}

.timeline-content ul li strong {
  color: var(--primary);
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

/* Projects Section */
.projects {
  background: #f0f5f9;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 200px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.project-content {
  padding: 25px;
}

.project-content h3 {
  color: var(--secondary);
  margin-bottom: 15px;
}

.project-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.project-content ul li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  background: rgba(52, 152, 219, 0.07);
  border-radius: 5px;
  font-size: 1rem;
  line-height: 1.6;
  transition: background 0.2s;
}

.project-content ul li:last-child {
  margin-bottom: 0;
}

.project-content ul li::before {
  content: "\f111";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--secondary);
  position: absolute;
  left: 10px;
  top: 50%;
  font-size: 0.7rem;
  transform: translateY(-50%);
  opacity: 0.8;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.project-tag {
  background: #e0f7fa;
  color: #00838f;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* Certifications Section */
.certifications {
  background: #f8f9fa;
}

.certifications ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.certifications ul li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  background: rgba(52, 152, 219, 0.07);
  border-radius: 5px;
  font-size: 1rem;
  line-height: 1.6;
  transition: background 0.2s;
}

.certifications ul li:last-child {
  margin-bottom: 0;
}

.certifications ul li::before {
  content: "\f111";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--secondary);
  position: absolute;
  left: 10px;
  top: 50%;
  font-size: 0.7rem;
  transform: translateY(-50%);
  opacity: 0.8;
}

.certs-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.cert-card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.cert-card:hover {
  transform: translateY(-10px);
}

.cert-card h3 {
  color: var(--secondary);
  margin-bottom: 15px;
}

.cert-type {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 15px;
}

/* Achievements Section */
#achievements {
  background: #f0f5f9;
}

.achievement-card {
  background: white;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.achievement-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  min-width: 60px;
}

.achievement-content h3 {
  color: var(--secondary);
  margin-bottom: 10px;
}

.company {
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 15px;
  display: block;
}

/* Contact Section */
.contact {
  background: linear-gradient(135deg, var(--primary), var(--dark));
  color: white;
}

.contact h2 {
  color: white;
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--secondary);
}

.contact-form {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 8px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--primary), var(--dark));
  color: #fff;
  padding: 40px 0 20px 0;
  text-align: center;
  box-shadow: 0 -2px 12px rgba(44, 62, 80, 0.08);
  position: relative;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

footer .logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--secondary);
  margin-bottom: 8px;
}

footer p {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #e0e0e0;
}

footer .social-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 18px 0 10px 0;
}

footer .social-links a {
  color: #fff;
  font-size: 2rem;
  background: rgba(52, 152, 219, 0.12);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

footer .social-links a:hover {
  color: var(--secondary);
  background: #fff;
  transform: translateY(-4px) scale(1.12);
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.15);
}

footer .logo,
footer .social-links,
footer p {
  z-index: 1;
}

footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: url("https://www.transparenttextures.com/patterns/diamond-upholstery.png");
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 600px) {
  footer .logo {
    font-size: 1.3rem;
  }

  footer .social-links a {
    font-size: 1.3rem;
    width: 34px;
    height: 34px;
  }

  footer p {
    font-size: 0.98rem;
  }
}

@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }

  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
    left: 0 !important;
  }

  .timeline-item::after {
    left: 20px !important;
  }
}

@media (max-width: 768px) {
  .mobile-menu {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--primary);
    flex-direction: column;
    padding: 20px 0;
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    margin: 10px 20px;
  }

  h1 {
    font-size: 2.2rem;
  }

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

@media (max-width: 600px) {
  .timeline-content ul li {
    font-size: 0.98rem;
    padding-left: 28px;
  }

  .timeline-content ul li::before {
    left: 6px;
    font-size: 0.95rem;
  }

  .project-content ul li {
    font-size: 0.97rem;
    padding-left: 22px;
  }

  .project-content ul li::before {
    left: 4px;
    font-size: 0.65rem;
  }
}

#testing-experience {
  background: #f0f5f9;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}

.error-label {
  color: #e74c3c;
  font-size: 0.95em;
  display: block;
  margin: 0;
}

.char-counter {
  font-size: 0.9em;
  text-align: right;
  margin-left: 10px;
  transition: color 0.2s;
}

.input-error {
  border: 2px solid #e74c3c !important;
  outline: none !important;
}

.input-success {
  border: 2px solid #27ae60 !important;
  outline: none !important;
}

.center-btn {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.btn-modal {
  cursor: pointer;
  background: #2980d9;
  color: #fff;
  padding: 8px 22px;
  border-radius: 6px;
  border: none;
  font-size: 0.8em;
  transition: background 0.2s;
  display: inline-block;
  text-align: center;
}

.btn-modal:hover {
  background: #27ae60;
}

.modal-toggle {
  display: none;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-content {
  background: #222e3c;
  color: #fff;
  padding: 48px 38px 38px 38px;
  border-radius: 14px;
  max-width: 760px;
  width: 99vw;
  min-height: 340px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  text-align: center;
  font-size: 1.12rem;
  line-height: 1.8;
  animation: modalFadeIn 0.25s;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal-content ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
  text-align: left;
  margin: 24px auto 0 auto;
  max-width: 660px;
  padding-left: 0;
  list-style: none;
}

.modal-content ul li {
  background: rgba(52, 152, 219, 0.10);
  border-radius: 6px;
  margin-bottom: 13px;
  padding: 12px 16px 12px 38px;
  position: relative;
  font-size: 1.01em;
  color: #e3eaf3;
  transition: background 0.18s;
}

.modal-content ul li:nth-last-child(1):nth-child(even) {
  grid-column: 2;
  grid-row: auto / span 1;
  margin-bottom: 13px;
  min-height: 0;
}

.modal-content ul li:last-child {
  margin-bottom: 0;
}

.modal-content ul li::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--secondary);
  position: absolute;
  left: 14px;
  top: 50%;
  font-size: 1.1em;
  transform: translateY(-50%);
  opacity: 0.92;
}

@media (max-width: 600px) {
  .modal-content {
    padding: 22px 8px 18px 8px;
    max-width: 98vw;
    font-size: 0.98rem;
  }

  .modal-content ul {
    display: block;
    max-width: 98vw;
  }

  .modal-content ul li {
    width: 100%;
    display: block;
    padding-left: 32px;
    font-size: 0.97em;
  }

  .modal-content ul li::before {
    left: 8px;
    font-size: 1em;
  }
}

.close-modal {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 1.7rem;
  color: #fff;
  cursor: pointer;
  z-index: 2;
  background: rgba(34, 46, 60, 0.85);
  border-radius: 50%;
  padding: 4px 10px;
  line-height: 1;
  transition: background 0.18s;
}

.close-modal:hover {
  background: #e74c3c;
  color: #fff;
}

@media (max-width: 600px) {
  .close-modal {
    top: 10px;
    right: 10px;
    font-size: 1.3rem;
    padding: 2px 7px;
  }
}

.modal-toggle:checked+.modal {
  display: flex;
}

.g-recaptcha {
  margin-bottom: 22px;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 22px auto;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 600px) {
  .g-recaptcha>div {
    margin: 0;
    transform: scale(0.88);
    transform-origin: center;
  }
}

@media (max-width: 600px) {
  header {
    padding: 1.2em 0;
    min-height: 4em;
  }

  .header-container {
    flex-direction: row;
    align-items: center;
    padding: 0 1em;
  }

  .logo {
    font-size: 1.2em;
    word-break: break-all;
    max-width: 90vw;
    line-height: 1.3;
    white-space: normal;
  }

  nav ul {
    top: 4em;
  }

  .hero {
    padding-top: 15em;
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-left: 12px;
    padding-right: 12px;
  }

  .project-card {
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 600px) {
  .form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .error-label {
    text-align: left;
    width: 100%;
    margin-left: 0;
    display: block;
    margin-bottom: 2px;
  }

  .char-counter {
    text-align: left;
    width: 100%;
    margin-left: 0;
    display: block;
    margin-top: 0;
    font-size: 0.92em;
  }
}

/* Estilos generales para el selector de idioma */
#lang-switcher {
  background: #223046;
  color: #fff;
  border: 1px solid #3498db;
  border-radius: 6px;
  padding: 6px 18px 6px 10px;
  font-size: 1em;
  margin-left: 18px;
  outline: none;
  cursor: pointer;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.06);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  z-index: 2;
}

#lang-switcher:focus {
  border: 1.5px solid #3498db;
  box-shadow: 0 0 0 2px #3498db33;
}

#lang-switcher {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%233498db' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 12px;
  padding-right: 32px;
}

@media (max-width: 600px) {
  #lang-switcher {
    font-size: 0.98em;
    padding: 5px 28px 5px 8px;
    margin-left: 8px;
    min-width: 90px;
    max-width: 120px;
  }
}

@media (max-width: 768px) {
  nav ul #lang-switcher-li {
    margin: 10px 20px;
    display: flex;
    justify-content: flex-start;
  }

  nav ul #lang-switcher-li #lang-switcher {
    margin-left: 0;
    width: 100%;
    max-width: 160px;
  }
}