/*
 Theme Name: David Escobar CV
 Theme URI: https://cvdavidescobar.danoteksolutions.com
 Author: David Escobar
 Author URI: https://cvdavidescobar.danoteksolutions.com
 Description: A custom WordPress theme for David Escobar's interactive CV.
 Version: 1.0
 Text Domain: david-escobar-cv
*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
body {
  background: #FFFFFF;
  color: #1E40AF;
  line-height: 1.6;
  overflow-x: hidden;
}
section {
  padding: 80px 5%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  visibility: visible;
}
h1, h2 {
  color: #1E40AF;
  margin-bottom: 20px;
}
h1 {
  font-size: 2.5em;
  font-weight: 700;
  word-wrap: break-word;
}
h2 {
  font-size: 1.8em;
  font-weight: 600;
}
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: #3B82F6;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
  z-index: 1;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
  background: #2563EB;
}
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
  z-index: -1;
}
.btn:hover::after {
  width: 200px;
  height: 200px;
}
/* Progress Bar */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #3B82F6;
  z-index: 1000;
  transition: width 0.3s ease;
}
/* Hero Section */
#hero {
  background: linear-gradient(135deg, #1E40AF, #3B82F6);
  color: #FFFFFF;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: visible;
}
#hero #particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
#hero .hero-content {
  position: relative;
  z-index: 1;
  padding: 20px;
}
#hero img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin-bottom: 20px;
  border: 4px solid #FFFFFF;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
  animation: float 3s ease-in-out infinite;
}
#hero h1 {
  max-width: 90%;
  margin: 0 auto;
  font-size: 2.2em;
  animation: fadeIn 1.5s ease-in-out;
}
#hero p {
  font-size: 1.2em;
  max-width: 90%;
  margin: 15px auto;
}
#hero .btn {
  animation: pulse 2s infinite;
  padding: 10px 20px;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
/* About Section */
#about {
  background: #DBEAFE;
  border-radius: 12px;
}
#about p {
  max-width: 90%;
  margin: 0 auto;
  font-size: 1em;
  visibility: visible;
}
/* Skills Section */
#skills .skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin-top: 25px;
}
#skills .skill {
  background: #FFFFFF;
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  font-size: 0.9em;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
#skills .skill i {
  font-size: 1.2em;
  color: #3B82F6;
}
#skills .skill:hover {
  transform: translateY(-8px);
  box-shadow: 0 5px 10px rgba(59, 130, 246, 0.3);
}
#skills .skill-bar {
  margin-top: 25px;
  background: #FFFFFF;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  display: none;
}
#skills .skill-bar.active {
  display: block;
}
#skills .bar {
  background: #3B82F6;
  height: 20px;
  border-radius: 4px;
  width: 0;
  transition: width 1.2s ease-out;
}
#skills .skill-bar h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}
#skills .skill-bar .percentage {
  font-size: 0.9em;
  color: #1E40AF;
}
/* Experience Section */
#experience {
  background: #DBEAFE;
  border-radius: 12px;
}
#experience .timeline {
  position: relative;
  margin-top: 30px;
}
#experience .timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #3B82F6;
  transform: translateX(-50%);
  z-index: 1;
}
#experience .timeline-item {
  display: flex;
  align-items: center;
  margin: 25px 0;
  position: relative;
  visibility: visible;
}
#experience .timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}
#experience .timeline-content {
  background: #FFFFFF;
  padding: 20px;
  border-radius: 10px;
  width: 45%;
  text-align: left;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  visibility: visible;
  font-size: 0.9em;
  z-index: 2;
}
#experience .timeline-content:hover {
  transform: scale(1.03);
  box-shadow: 0 5px 10px rgba(59, 130, 246, 0.3);
}
#experience .timeline-content .details {
  display: none;
  margin-top: 10px;
  font-size: 0.85em;
}
#experience .timeline-content .details.active {
  display: block;
}
/* Education Section */
#education {
  background: #DBEAFE;
  border-radius: 12px;
}
#education .education-item {
  background: #FFFFFF;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  text-align: left;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  font-size: 0.9em;
}
/* Portfolio Section */
#portfolio .carousel {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding: 15px;
  scroll-behavior: smooth;
}
#portfolio .project {
  flex: 0 0 280px;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 15px;
  text-align: left;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  visibility: visible;
  font-size: 0.9em;
}
#portfolio .project:hover {
  transform: scale(1.03);
  box-shadow: 0 5px 10px rgba(59, 130, 246, 0.3);
}
#portfolio .project img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s;
}
#portfolio .project:hover img {
  transform: scale(1.08);
}
/* Contact Section */
#contact {
  background: #DBEAFE;
  border-radius: 12px;
}
#contact .contact-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
#contact form {
  width: 50%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  visibility: visible;
}
#contact input, #contact textarea {
  padding: 10px;
  border: 1px solid #1E40AF;
  border-radius: 6px;
  font-size: 0.9em;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
}
#contact input:focus, #contact textarea:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.3);
  outline: none;
}
#contact .links {
  width: 50%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: center;
  align-items: center;
}
#contact .links a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  padding: 12px;
  font-size: 0.9em;
}
#contact .links i {
  font-size: 1.2em;
  color: #FFFFFF;
}
/* Responsive Design */
@media (max-width: 768px) {
  section {
    padding: 60px 5%;
  }
  h1 {
    font-size: 1.8em;
  }
  h2 {
    font-size: 1.5em;
  }
  #hero img {
    width: 140px;
    height: 140px;
  }
  #hero h1 {
    font-size: 1.6em;
  }
  #hero p {
    font-size: 1em;
  }
  #hero .btn {
    padding: 8px 16px;
    font-size: 0.9em;
  }
  #about p {
    font-size: 0.9em;
  }
  #skills .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }
  #skills .skill {
    padding: 12px;
    font-size: 0.85em;
  }
  #experience .timeline::before {
    left: 15px;
  }
  #experience .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    margin: 20px 0;
  }
  #experience .timeline-item:nth-child(odd) {
    flex-direction: column;
  }
  #experience .timeline-content {
    width: 100%;
    margin-left: 30px;
    padding: 15px;
    font-size: 0.85em;
  }
  #education .education-item {
    padding: 15px;
    font-size: 0.85em;
  }
  #portfolio .carousel {
    gap: 10px;
    padding: 10px;
  }
  #portfolio .project {
    flex: 0 0 250px;
    padding: 12px;
    font-size: 0.85em;
  }
  #portfolio .project img {
    height: 120px;
  }
  #contact .contact-container {
    flex-direction: column;
    align-items: center;
  }
  #contact form {
    width: 100%;
    max-width: 100%;
  }
  #contact .links {
    width: 100%;
    max-width: 100%;
    align-items: center;
  }
  #contact .links a {
    width: 100%;
    max-width: 300px;
  }
  #contact input, #contact textarea {
    padding: 8px;
    font-size: 0.85em;
  }
  #contact .btn {
    padding: 8px 16px;
    font-size: 0.85em;
  }
}
@media (max-width: 480px) {
  h1 {
    font-size: 1.5em;
  }
  h2 {
    font-size: 1.3em;
  }
  #hero img {
    width: 120px;
    height: 120px;
  }
  #hero h1 {
    font-size: 1.4em;
  }
  #hero p {
    font-size: 0.9em;
  }
  #skills .skills-grid {
    grid-template-columns: 1fr;
  }
  #portfolio .project {
    flex: 0 0 90%;
  }
}