/* Reset y configuración base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 1rem;
}

/* Navbar principal */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(102, 126, 234, 0.3);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo a {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: bold;
  color: #a78bfa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.navbar-logo a:hover {
  color: #ffffff;
}

.navbar-menu {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}

.navbar-menu a {
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  color: #f7fafc;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.navbar-menu a:hover {
  color: #a78bfa;
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: #f7fafc;
  cursor: pointer;
}

@media (max-width: 768px) {
  .navbar-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    gap: 1.5rem;
    padding: 2rem 4vw;
    display: none;
    text-align: right;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  }

  .navbar-menu.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }
}

/* Hero Section */
.hero-section {
  background-color: rgba(0, 0, 0, 0);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  margin-bottom: -2rem;
}

.hero-content {
  max-width: 900px;
}

.logo-container {
  position: relative;
  margin-bottom: 2rem;
  display: inline-block;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(150px, 20vw, 200px);
  height: clamp(150px, 20vw, 200px);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

.logo-phoenix {
  width: clamp(100px, 15vw, 120px);
  height: clamp(100px, 15vw, 120px);
  background: linear-gradient(135deg, #667eea 0%, #a78bfa 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 5vw, 3rem);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25);
  position: relative;
  z-index: 2;
}

.logo-phoenix:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 30px 60px rgba(102, 126, 234, 0.4);
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #a78bfa 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 400;
  color: #f7fafc;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: #e2e8f0;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  min-width: 128px;
}

.btn-secondary {
  background: #667eea;
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary:hover {
  background: #5a6fd8;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

/* Contenedor principal */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5vw;
}

.section-title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sección Sobre Mí */
.about-section {
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0);
}

.about-section p {
  text-align: justify;
  font-weight: 400;
  margin-bottom: 1.2rem;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.7;
  color: #f7fafc;
}

.about-section ul,
.about-section li {
  color: #e2e8f0; 
  margin-bottom: 1.2rem;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.7;
  text-align: justify;
}

.about-section ul {
  padding-left: 1.5rem;
  list-style-type: disc;
}

.about-section li {
  margin-bottom: 0.6rem;
}

.about-section p,
.about-section li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-section p.visible,
.about-section li.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skills */
.skills-section {
  padding: 5rem 2rem;
  background: rgba(247, 250, 252, 0);
}

.skills-category {
  text-align: center;
  font-size: clamp(1.25rem, 3vw, 1.4rem);
  color: #f7fafc;
  margin: 4rem 0 2rem;
  font-weight: 600;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(128px, 20vw, 160px), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  max-width: 1000px;
  margin: 0 auto;
  justify-items: center;
}

.skill-card {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.skill-card:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25);
  border-color: #667eea;
}

.skill-card i {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 0.5rem;
  color: #667eea;
  transition: all 0.3s ease;
}

.skill-card:hover i {
  color: #5a6fd8;
  transform: scale(1.1);
}

.skill-card span {
  font-size: clamp(0.875rem, 2vw, 1rem);
  font-weight: 500;
  color: #2d3748;
  line-height: 1.2;
  text-align: center;
}

/* Timeline */
.timeline-section {
  padding: 5vh 4vw;
  background: rgba(247, 250, 252, 0);
}

.section-subtitle {
  text-align: center;
  color: #e2e8f0;
  margin-top: -1vh;
  margin-bottom: 4vh;
  font-size: clamp(1.3rem, 1vw, 1rem);
}

.timeline-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 3vh 0;
}

.timeline-container::after {
  content: '';
  position: absolute;
  width: 4px;
  background: linear-gradient(to bottom, #667eea, #a78bfa);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-item {
  padding: 2vh 2vw;
  position: relative;
  width: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: #fff;
  border: 3px solid #667eea;
  top: 1.5vh;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item.right::after {
  left: -8px;
}

.timeline-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 2vh 2vw;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.timeline-date {
  background: linear-gradient(135deg, #667eea, #a78bfa);
  color: #ffffff;
  display: inline-block;
  padding: 0.3em 0.9em;
  border-radius: 8px;
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.timeline-box h3 {
  margin-bottom: 0.5rem;
  color: #2d3748;
}

.timeline-box p {
  color: #4a5568;
  margin-bottom: 0.5rem;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.6;
}

/* Projects Section */
.projects-section {
  background: transparent;
  background-attachment: fixed;
  text-align: center;
  padding: 5rem 2rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: clamp(2rem, 5vw, 4rem);
  max-width: clamp(320px, 85vw, 960px);
  margin: 0 auto;
  margin-bottom: 4rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.5rem);
  text-align: left;
  margin-bottom: 3vh;
}

.project-logo {
  width: clamp(64px, 10vw, 96px);
  height: clamp(64px, 10vw, 96px);
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.project-title {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin: 0;
  color: #2d3748;
}

.project-description {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: #4a5568;
  margin: 0.5rem 0 0.3rem;
}

.project-link {
  font-size: clamp(0.85rem, 1vw, 1rem);
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: #5a6fd8;
  text-decoration: underline;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1vw;
  margin-bottom: 3vh;
}

.project-tags span {
  font-size: clamp(0.75rem, 1vw, 0.95rem);
  padding: 0.4em 1em;
  background: linear-gradient(135deg, #667eea, #a78bfa);
  color: #ffffff;
  border-radius: 9999px;
  font-weight: 500;
}

.toggle-details-btn {
  background: linear-gradient(135deg, #667eea, #a78bfa);
  color: white;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  font-weight: 600;
  padding: 1em 2em;
  border: none;
  border-radius: 32px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 2vh auto;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.toggle-details-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.toggle-details-btn:focus {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}
/* Project Details */
.project-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-20px);
  margin-top: 0;
  background: transparent;
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.project-details.show {
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 25px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.client {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: flex-start;
  margin-bottom: 2vh;
  background: rgba(255, 255, 255, 0.8);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.client img {
  width: clamp(40px, 6vw, 56px);
  height: clamp(40px, 6vw, 56px);
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.client strong {
  display: block;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.client p {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  color: #4a5568;
  margin-bottom: 0.3rem;
}

.client a {
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

.client a:hover {
  color: #5a6fd8;
  text-decoration: underline;
}

/* Footer */
.custom-footer {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #ffffff;
  padding: 40px 40px;
  text-align: center;
  border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.footer-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.footer-container p {
  font-size: 16px;
  margin: 0;
  color: #e2e8f0;
}

.footer-social {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-in-out;
  font-size: 22px;
  text-decoration: none;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.footer-icon:hover {
  transform: scale(1.1);
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.footer-icon.linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
}

.footer-icon.email:hover {
  background: #a78bfa;
  border-color: #a78bfa;
}

/* Scroll to top */
.scroll-to-top {
  position: fixed;
  bottom: 5vh;
  right: 5vw;
  background: linear-gradient(135deg, #667eea, #a78bfa);
  color: white;
  padding: 0.8em 0.9em;
  border-radius: 50%;
  font-size: 1.2rem;
  z-index: 9999;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
  text-decoration: none;
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

/* Responsive timeline */
@media (max-width: 768px) {
  .timeline-container::after {
    left: 16px;
    transform: none;
  }

  .timeline-item {
    width: 100%;
    padding-left: 48px;
    padding-right: 24px;
  }

  .timeline-item.right {
    left: 0;
  }

  .timeline-item::after {
    left: 16px;
    right: auto;
  }

  .hero-title {
    font-size: 2rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

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

.timeline-item.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }

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

/* Animaciones */
@keyframes pulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1); 
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.1); 
  }
}
#particles-container {
  position: fixed;
  width: 105%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  top: 0;
  left: 0;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float 20s linear infinite;
}

@keyframes float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100vh);
  }
}
