/* ============================================
   VARIABLES Y RESET
   ============================================ */
:root {
  --purple-600: #9333ea;
  --pink-600: #ec4899;
  --purple-50: #faf5ff;
  --pink-50: #fce7f3;
  --purple-100: #f3e8ff;
  --purple-200: #e9d5ff;
  --purple-800: #6b21a8;
  --purple-900: #581c87;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a:focus,
button:focus {
  outline: 3px solid var(--purple-600);
  outline-offset: 2px;
}

/* ============================================
   APP CONTAINER
   ============================================ */
.app-container {
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  background: linear-gradient(to bottom right, var(--purple-50), var(--pink-50));
  color: var(--gray-900);
}

.app-container.dark-mode {
  background: var(--gray-900);
  color: var(--gray-100);
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(147, 51, 234, 0.2);
  transition: all 0.3s ease;
}

.dark-mode .header {
  background-color: rgba(17, 24, 39, 0.8);
  border-bottom-color: rgba(147, 51, 234, 0.8);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap:10px
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(to right, var(--purple-600), var(--pink-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--purple-600);
}

.theme-toggle {
  padding: 0.5rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  background-color: var(--purple-100);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode .theme-toggle {
  background-color: var(--purple-900);
}

.theme-toggle:hover {
  background-color: var(--purple-200);
}

.dark-mode .theme-toggle:hover {
  background-color: var(--purple-800);
}

@media (max-width: 540px) {
  .nav-container {
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .logo{
    font-size: 1.25rem;
  }
}

@media (max-width: 515px) {
  .hero-section{
      padding-top: 8rem !important;
  }
}

@media (max-width: 420px) {
  .hero-section{
      padding-top: 10rem !important;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  padding: 8rem 1.5rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-content {
  max-width: 56rem;
  margin: 0 auto;
  animation: fadeIn 0.8s ease-out;
}

.avatar-container {
  margin-bottom: 1.5rem;
  animation: slideDown 0.8s ease-out;
}

.avatar {
  width: 8rem;
  height: 8rem;
  margin: 0 auto;
  border-radius: 9999px;
  background: linear-gradient(to bottom right, var(--purple-600), var(--pink-600));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
  padding: 0.25rem;
  overflow: hidden;
}

.avatar:hover {
  transform: scale(1.1);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  background: linear-gradient(to right, var(--purple-600), var(--pink-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideUp 0.8s ease-out;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.75rem;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: slideUp 0.8s ease-out 0.1s both;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  animation: slideUp 0.8s ease-out 0.2s both;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(to right, var(--purple-600), var(--pink-600));
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.btn-secondary {
  border: 2px solid var(--purple-600);
  color: var(--purple-600);
}

.dark-mode .btn-secondary {
  color: white;
}

.btn-secondary:hover {
  background-color: var(--purple-600);
  color: white;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
  padding: 5rem 1.5rem;
  background-color: white;
}

.dark-mode .about-section {
  background-color: var(--gray-800);
}

.container {
  max-width: 56rem;
  margin: 0 auto;
}

.section-title {
  font-size: 2.25rem;
  font-weight: bold;
  margin-bottom: 2rem;
  text-align: center;
  background: linear-gradient(to right, var(--purple-600), var(--pink-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-content {
  padding: 2rem;
  border-radius: 1rem;
  background-color: var(--purple-100);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.dark-mode .about-content {
  background-color: var(--gray-900);
}

.about-content:hover {
  transform: scale(1.05);
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.about-text:last-child {
  margin-bottom: 0;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-section {
  padding: 5rem 1.5rem;
}

.skills-section .container {
  max-width: 72rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skill-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  background-color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  animation: fadeIn 0.5s ease-out both;
}

.dark-mode .skill-card {
  background-color: var(--gray-800);
}

.skill-card:hover {
  transform: scale(1.05);
}

.skill-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.skill-icon {
  color: var(--purple-600);
  margin-right: 0.75rem;
  display: flex;
  align-items: center;
}

.skill-name {
  font-size: 1.25rem;
  font-weight: 600;
}

.skill-bar-container {
  position: relative;
}

.skill-bar-bg {
  height: 0.75rem;
  border-radius: 9999px;
  background-color: var(--gray-200);
  overflow: hidden;
}

.dark-mode .skill-bar-bg {
  background-color: var(--gray-700);
}

.skill-progress {
  height: 100%;
  background: linear-gradient(to right, var(--purple-600), var(--pink-600));
  border-radius: 9999px;
  transition: width 1s ease-out;
  width: 0;
}

.skill-progress.animate {
  width: var(--skill-level);
}

.skill-percentage {
  display: block;
  margin-top: 0.5rem;
  color: var(--purple-600);
  font-weight: 600;
  font-size: 0.875rem;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-section {
  padding: 5rem 1.5rem;
  background-color: white;
}

.dark-mode .projects-section {
  background-color: var(--gray-800);
}

.projects-section .container {
  max-width: 72rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  background-color: var(--purple-100);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  animation: slideUp 0.5s ease-out both;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.dark-mode .project-card {
  background-color: var(--gray-900);
}

.project-card:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 12rem;
  background: linear-gradient(to bottom right, var(--purple-600), var(--pink-600));
  border-radius: 0.5rem;
  object-fit: cover;
}

.project-image a{
  width: 100%;
  height: 100%;
}

.project-image a img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.4rem;
  opacity: .6;
}

.project-title {
  font-size: 1.25rem;
  font-weight: bold;
}

.project-description {
  color: var(--gray-600);
}

.project-button{
  font-size: 0.9rem;
  padding-top: 10px;
  color: var(--purple-800);
}

.project-button:hover{
  font-weight: bold;
   transition: .2s;
}

.dark-mode .project-description {
  color: var(--gray-300);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  background-color: var(--purple-200);
  color: var(--purple-800);
}

.dark-mode .tech-tag {
  background-color: var(--purple-900);
  color: var(--purple-200);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
  padding: 5rem 1.5rem;
}

.contact-section .container {
  text-align: center;
}

.contact-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-link {
  padding: 1rem;
  border-radius: 9999px;
  background-color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-600);
}

.dark-mode .social-link {
  background-color: var(--gray-800);
}

.dark-mode .social-link:hover {
  background-color: var(--gray-700);
}

.social-link:hover {
  background-color: var(--purple-100);
  transform: scale(1.1);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 2rem 1.5rem;
  text-align: center;
  background-color: white;
  border-top: 1px solid rgba(147, 51, 234, 0.2);
}

.dark-mode .footer {
  background-color: var(--gray-900);
  border-top-color: rgba(147, 51, 234, 0.8);
}

.footer-text {
  opacity: 0.75;
  margin: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SCROLLBAR PERSONALIZADO
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--purple-600), var(--pink-600));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, var(--purple-800), var(--pink-600));
}

.dark-mode ::-webkit-scrollbar-track {
  background: var(--gray-800);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
  }
  
  .nav-link {
    font-size: 0.875rem;
  }
  
  .hero-section {
    padding: 6rem 1rem 3rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.875rem;
  }

}
