@import url('https://fonts.googleapis.com/css2?family=Righteous&family=Work+Sans:wght@100;300;400;600;800&display=swap');

/* ===== RESET Y TIPOGRAFÍA ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Work Sans', sans-serif;
  background-color: #1e2326;
  color: #e0e0e0;
  line-height: 1.7;
}

/* ===== VARIABLES DE COLOR Y ESTILO ===== */
:root {
  --primary: #1CB698;
  --dark: #1e2326;
  --darker: #252A2E;
  --light: #ffffff;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --transition: all 0.3s ease;
}

/* ===== ENCABEZADO ===== */
.contenedor-header {
  background: var(--dark);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.contenedor-header header {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.contenedor-header header .logo a {
  font-family: 'Righteous', cursive;
  font-size: 32px;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 1px;
}

.contenedor-header header nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.contenedor-header header nav ul li a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  position: relative;
  padding: 5px 0;
}

.contenedor-header header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.contenedor-header header nav ul li a:hover::after {
  width: 100%;
}

.nav-responsive {
  background-color: var(--primary);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  display: none;
  border: none;
}

/* ===== RESPONSIVE MENU ===== */
@media (max-width: 768px) {
  .contenedor-header header nav ul {
    display: none;
    position: absolute;
    top: 70px;
    right: 20px;
    background: var(--darker);
    flex-direction: column;
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 100;
  }

  .contenedor-header header nav ul.show {
    display: flex;
  }

  .nav-responsive {
    display: block;
  }
}

/* ===== SECCIÓN INICIO ===== */
.inicio {
  height: 100vh;
  background: linear-gradient(to top, rgba(30, 35, 38, 0.9), rgba(30, 35, 38, 1)),
              url('img/3d illustration.jpg') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

.inicio .contenido-banner {
  max-width: 380px;
  padding: 40px 30px;
  background: rgba(30, 35, 38, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid rgba(28, 182, 152, 0.3);
}

.inicio .contenido-banner img {
  width: 90px;
  height: 90px;
  border: 5px solid var(--primary);
  border-radius: 50%;
  object-fit: cover;
  margin: 20px auto 10px;
  display: block;
}

.inicio .contenido-banner h1 {
  font-family: 'Righteous';
  font-size: 2.8rem;
  color: white;
  margin: 15px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.inicio .contenido-banner h2 {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 20px;
}

.inicio .contenido-banner .redes {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 25px 0;
}

.inicio .contenido-banner .redes a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  color: var(--primary);
  font-size: 18px;
  transition: all 0.3s ease;
}

.inicio .contenido-banner .redes a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: white;
  border: 2px solid var(--primary);
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(28, 182, 152, 0.3);
}

.btn span {
  position: absolute;
  top: 50%;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: skewX(-25deg);
  transition: left 0.5s;
  z-index: 0;
}

.btn:hover span {
  left: 120%;
}

/* ===== SECCIÓN SOBRE MÍ ===== */
.sobremi,
.skills,
.programación,
.formación,
.proyecto,
.contacto {
  padding: 100px 20px;
}

.sobremi h2,
.skills h2,
.programación h2,
.formación h2,
.proyecto h2,
.contacto h2 {
  font-family: 'Righteous';
  font-size: 2.5rem;
  color: white;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  display: inline-block;
}

.sobremi h2::after,
.skills h2::after,
.formación h2::after,
.proyecto h2::after,
.contacto h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary);
}

.sobremi p {
  max-width: 700px;
  margin: 0 auto 20px;
  font-size: 1.1rem;
  text-align: center;
}

.sobremi p span {
  color: var(--primary);
  font-weight: 600;
}

.sobremi .contenedor-intereses {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.sobremi .interes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 0.9rem;
  color: #ddd;
  transition: var(--transition);
}

.sobremi .interes:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
}

.sobremi .interes i {
  font-size: 28px;
  margin-bottom: 8px;
}

/* ===== HABILIDADES ===== */
.skills {
  background-color: var(--darker);
}

.skills .fila {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.skills .col h3 {
  font-family: 'Righteous';
  font-size: 1.6rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 30px;
}

.skills .skills {
  margin-bottom: 20px;
}

.skills .skills > span {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: white;
}

.skills .barra-skills {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.skills .progreso {
  height: 100%;
  background: var(--primary);
  width: 0;
  border-radius: 4px;
  position: relative;
}

.skills .progreso span {
  position: absolute;
  right: 0;
  top: -25px;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

/* Animaciones de barras */
@keyframes fillBar {
  from { width: 0; }
  to { width: var(--width); }
}

/* Se aplicará con JS dinámicamente */
.skills .javascript { --width: 40%; animation: 1.5s ease-in-out 0.3s fillBar forwards; }
.skills .htmlcss    { --width: 50%; animation: 1.5s ease-in-out 0.4s fillBar forwards; }
.skills .photoshop  { --width: 85%; animation: 1.5s ease-in-out 0.5s fillBar forwards; }
.skills .quickbooks { --width: 95%; animation: 1.5s ease-in-out 0.6s fillBar forwards; }
.skills .dialux     { --width: 95%; animation: 1.5s ease-in-out 0.7s fillBar forwards; }
.skills .comunicacion        { --width: 99%; animation: 1.5s ease-in-out 0.3s fillBar forwards; }
.skills .trabajoenequipo     { --width: 90%; animation: 1.5s ease-in-out 0.4s fillBar forwards; }
.skills .entusiasmo          { --width: 95%; animation: 1.5s ease-in-out 0.5s fillBar forwards; }
.skills .resoluciondeproblemas { --width: 95%; animation: 1.5s ease-in-out 0.6s fillBar forwards; }
.skills .proyect             { --width: 94%; animation: 1.5s ease-in-out 0.7s fillBar forwards; }

/* ===== PROYECTOS Y PROGRAMACIÓN ===== */
.programación,
.proyecto {
  background-color: var(--dark);
}

.programación .galeria,
.proyecto .galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.proyecto .galeria .proyecto,
.programación .galeria .proyecto {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.proyecto .galeria .proyecto img,
.programación .galeria .proyecto img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.proyecto .galeria .proyecto:hover img,
.programación .galeria .proyecto:hover img {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(28, 182, 152, 0.85), rgba(28, 182, 152, 0.7));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: 20px;
  text-align: center;
}

.proyecto .galeria .proyecto:hover .overlay,
.programación .galeria .proyecto:hover .overlay {
  opacity: 1;
}

.overlay h3 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  font-weight: 600;
}

.overlay p {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ===== FORMACIÓN ===== */
.formación {
  background-color: var(--dark);
}

.formación .fila {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.formación .col {
  flex: 1;
  min-width: 300px;
}

.formación .col h3 {
  font-family: 'Righteous';
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 30px;
  text-align: center;
}

.formación .item {
  background: var(--darker);
  padding: 25px;
  border-radius: var(--radius);
  margin-bottom: 25px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary);
}

.formación .item h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: white;
}

.formación .casa {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  display: block;
}

.formación .fecha {
  color: #aaa;
  font-size: 0.9rem;
  margin: 5px 0 10px;
  display: block;
}

.formación .item p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ccc;
}

/* ===== CONTACTO ===== */
.contacto {
  background: url('img/gray backdrop.jpg') no-repeat center center/cover;
  background-color: #1e2326;
  color: white;
  position: relative;
}

.contacto::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 35, 38, 0.92);
  z-index: 0;
}

.contacto .contenido-seccion {
  position: relative;
  z-index: 1;
}

.contacto .fila {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.contacto .col {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
}

.contacto input,
.contacto textarea {
  width: 100%;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  margin-bottom: 16px;
}

.contacto input::placeholder,
.contacto textarea::placeholder {
  color: #aaa;
}

.contacto button {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: white;
  border: 2px solid var(--primary);
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.contacto button:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.contacto .info {
  background: rgba(37, 42, 46, 0.9);
  padding: 25px;
  border-radius: var(--radius);
  backdrop-filter: blur(5px);
}

.contacto .info ul {
  list-style: none;
}

.contacto .info li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 1.05rem;
}

.contacto .info i {
  color: var(--primary);
  font-size: 1.3rem;
}

/* ===== FOOTER ===== */
footer {
  background: var(--darker);
  color: #ccc;
  text-align: center;
  padding: 60px 20px 30px;
  position: relative;
}

footer .arriba {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 1.2rem;
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

footer .redes {
  margin: 30px 0;
  display: flex;
  justify-content: center;
  gap: 15px;
}

footer .redes a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  color: var(--primary);
  font-size: 18px;
  transition: var(--transition);
}

footer .redes a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

footer p {
  font-size: 0.9rem;
  color: #999;
}

/* ===== RESPONSIVE GENERAL ===== */
@media (max-width: 768px) {
  .inicio .contenido-banner {
    max-width: 320px;
    padding: 30px 20px;
  }

  .inicio .contenido-banner h1 {
    font-size: 2.2rem;
  }

  .sobremi h2,
  .skills h2,
  .formación h2,
  .proyecto h2,
  .contacto h2 {
    font-size: 2rem;
  }

  section {
    padding: 80px 20px;
  }
}