/*
Theme Name: David Escobar CV
Theme URI: https://david-escobar.com
Author: David Escobar
Author URI: https://david-escobar.com
Description: CV interactivo de David Escobar – Ingeniero en Ciencias de la Computación
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: david-escobar-cv
Tags: portfolio, cv, one-page, responsive
*/

/* =========================================================
   BASE RESET & GLOBALS
   ========================================================= */
* {
  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;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
  background: #2563EB;
  color: #FFFFFF;
  text-decoration: none;
}

.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;
  max-width: 100%;
  padding: 0;
}

#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;
  text-align: center;
}

#hero .card {
  background: #DBEAFE;
  width: 300px;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
  z-index: 1;
  cursor: pointer;
}

#hero .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
  background: #C7D2FE;
}

#hero .card::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;
}

#hero .card:hover::after {
  width: 200px;
  height: 200px;
}

#hero .card .profile-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid #FFFFFF;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  animation: float 3s ease-in-out infinite;
  object-fit: cover;
}

#hero .card h2 {
  color: #000000;
  font-size: 1.8em;
  font-weight: 700;
  margin: 10px 0 0;
  line-height: 1.2;
}

#hero .card .underline {
  width: 40px;
  height: 2px;
  background: #3B82F6;
  margin: 5px auto 10px;
}

#hero .card p {
  color: #000000;
  font-size: 0.9em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

#hero .social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

#hero .social-icons a {
  color: #333333;
  font-size: 1.2em;
  transition: color 0.3s;
}

#hero .social-icons a:hover {
  color: #3B82F6;
}

#hero h1 {
  max-width: 90%;
  margin: 20px auto 0;
  font-size: 2.2em;
  color: #E0E7FF;
  animation: fadeIn 1.5s ease-in-out;
}

#hero p {
  font-size: 1.2em;
  max-width: 90%;
  margin: 15px auto;
  color: #FFFFFF;
}

#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;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
}

#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-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, height 0.3s ease;
}

#skills .skill.active .bar-container {
  opacity: 1;
  height: auto;
}

#skills .skill .bar {
  height: 10px;
  border-radius: 5px;
  margin-top: 5px;
  width: 0;
  transition: width 1.2s ease-out;
  flex-grow: 1;
}

#skills .skill[data-level="100"] .bar {
  background: #10B981;
}

#skills .skill:not([data-level="100"]) .bar {
  background: #3B82F6;
}

#skills .skill .percentage {
  font-size: 0.8em;
  color: #1E40AF;
  white-space: nowrap;
}

/* =========================================================
   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;
}

#experience .timeline-content .logo-container {
  text-align: left;
  margin-bottom: 15px;
}

#experience .timeline-content .logo-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #FFFFFF;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

/* =========================================================
   EDUCATION SECTION
   ========================================================= */
#education {
  background: #FFFFFF;
  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;
}

#education .education-item .logo-container {
  text-align: left;
  margin-bottom: 15px;
}

#education .education-item .logo-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #FFFFFF;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

/* =========================================================
   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 .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%;
  font-family: 'Poppins', sans-serif;
}

#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;
}

#contact .message-box {
  margin-top: 30px;
  padding: 15px 25px;
  background: linear-gradient(135deg, #3B82F6, #1E40AF);
  color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: inline-block;
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.5px;
  animation: fadeInUp 1s ease-in-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  section { padding: 60px 5%; }
  h1 { font-size: 1.8em; }
  h2 { font-size: 1.5em; }

  #hero .card { width: 260px; padding: 15px; }
  #hero .card .profile-image { width: 140px; height: 140px; }
  #hero .card h2 { font-size: 1.5em; }
  #hero .card p { font-size: 0.8em; }
  #hero .social-icons a { font-size: 1em; }
  #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; }
  #skills .skill .bar { height: 8px; }
  #skills .skill .percentage { font-size: 0.7em; }

  #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; }
  #experience .timeline-content .logo-image { width: 60px; height: 60px; }

  #education .education-item { padding: 15px; font-size: 0.85em; }
  #education .education-item .logo-image { width: 60px; height: 60px; }

  #contact .contact-container { flex-direction: column; align-items: center; }
  #contact .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; }
  #contact .message-box { font-size: 0.95em; padding: 12px 20px; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5em; }
  h2 { font-size: 1.3em; }
  #hero .card { width: 220px; padding: 10px; }
  #hero .card .profile-image { width: 120px; height: 120px; }
  #hero .card h2 { font-size: 1.2em; }
  #hero .card p { font-size: 0.7em; }
  #hero .social-icons a { font-size: 0.9em; }
  #hero h1 { font-size: 1.4em; }
  #hero p { font-size: 0.9em; }
  #skills .skills-grid { grid-template-columns: 1fr; }
  #skills .skill .bar { height: 6px; }
  #skills .skill .percentage { font-size: 0.6em; }
  #experience .timeline-content .logo-image { width: 50px; height: 50px; }
  #education .education-item .logo-image { width: 50px; height: 50px; }
  #contact .message-box { font-size: 0.85em; padding: 10px 15px; }
}
