/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Paleta wc1store */
  --blue-100: #E6F4FE;
  --blue-200: #A5D1FD;
  --blue-300: #65A6FB;
  --blue-400: #2472F9;
  --blue-500: #0646DB;
  --blue-600: #042BA9;
  --blue-700: #000580;
  --blue-800: #020B5A;
  --blue-900: #000233;

  --green-100: #F2FAEA;
  --green-200: #DEF3C9;
  --green-300: #C4EA9F;
  --green-400: #A8DF71;
  --green-500: #81D742;
  --green-600: #6FB829;

  --gray-50: #F9FAFA;
  --gray-100: #F1F2F3;
  --gray-200: #E3E5E8;
  --gray-300: #CDD0D5;
  --gray-400: #A7ABB4;
  --gray-500: #808693;
  --gray-600: #636874;
  --gray-700: #464A53;
  --gray-800: #2F3137;
  --gray-900: #1C1E21;

  /* Tema oscuro */
  --bg-primary: var(--gray-900);
  --bg-secondary: var(--gray-800);
  --bg-card: var(--gray-700);
  --text-primary: var(--gray-50);
  --text-secondary: var(--gray-400);
  --accent: var(--blue-500);
  --accent-light: var(--blue-300);
  --accent-glow: rgba(36, 114, 249, 0.3);
  --gradient: linear-gradient(135deg, var(--blue-500), var(--blue-300));
  --gradient-green: linear-gradient(135deg, var(--green-500), var(--green-300));
  --font-main: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: white;
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
  background: rgba(28, 30, 33, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(36, 114, 249, 0.1);
  transition: all 0.3s ease;
}

.nav--scrolled {
  padding: 0.8rem 3rem;
  background: rgba(28, 30, 33, 0.95);
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-green);
  transition: width 0.3s ease;
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__link:hover::after {
  width: 100%;
}

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(36, 114, 249, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(101, 166, 251, 0.1) 0%, transparent 50%);
}

.hero__bg::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  top: 10%;
  right: 10%;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.hero__content {
  position: relative;
  text-align: center;
  padding: 0 2rem;
}

.hero__photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--green-400);
  box-shadow: 0 0 30px rgba(129, 215, 66, 0.3);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.1s forwards;
}

.hero__greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--green-400);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero__name {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero__name--accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__role {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.hero__role--highlight {
  color: var(--green-400);
  font-weight: 600;
}

.hero__location {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.7s forwards;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.8s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s ease 1.2s forwards;
}

.hero__scroll span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: var(--gradient-green);
  animation: scrollLine 2s ease infinite;
}

@keyframes scrollLine {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn--primary {
  background: var(--gradient);
  color: white;
  border: none;
  box-shadow: 0 4px 20px rgba(129, 215, 66, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(129, 215, 66, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--accent-light);
  border: 1px solid var(--accent);
}

.btn--outline:hover {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
  transform: translateY(-2px);
}

.btn--store {
  border-color: var(--green-400);
  color: var(--green-400);
}

.btn--store:hover {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
}

/* === Sections === */
.section {
  padding: 6rem 2rem;
}

.section--dark {
  background: var(--bg-secondary);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient-green);
  margin: 0.8rem auto 0;
  border-radius: 2px;
}

/* === About === */
.about {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.about__stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid rgba(36, 114, 249, 0.1);
}

.stat__number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-green);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* === Skills === */
.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.skill-category {
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid rgba(36, 114, 249, 0.1);
  transition: all 0.3s ease;
}

.skill-category:hover {
  border-color: rgba(129, 215, 66, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.skill-category__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--green-400);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  padding: 0.4rem 0.9rem;
  background: rgba(36, 114, 249, 0.15);
  border: 1px solid rgba(36, 114, 249, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--blue-500);
  border-color: var(--blue-500);
}

/* === Timeline === */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue-500), var(--green-500), transparent);
}

.timeline__item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 3rem;
}

.timeline__marker {
  position: absolute;
  left: -5px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 15px rgba(129, 215, 66, 0.4);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--green-400);
}

.timeline__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0.3rem 0;
}

.timeline__company {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.timeline__description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* === Contact === */
.contact {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact__text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact__links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.contact__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  background: var(--bg-card);
  border: 1px solid rgba(36, 114, 249, 0.2);
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact__link:hover {
  border-color: var(--green-500);
  background: rgba(129, 215, 66, 0.1);
  transform: translateY(-3px);
}

.contact__icon {
  width: 20px;
  height: 20px;
}

/* === Footer === */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid rgba(36, 114, 249, 0.1);
}

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

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

/* === Responsive === */
@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.5rem;
  }

  .nav__links {
    gap: 1rem;
  }

  .nav__link {
    font-size: 0.8rem;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .stat {
    flex: 1;
    min-width: 120px;
  }

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

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

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

@media (max-width: 480px) {
  .section {
    padding: 4rem 1.2rem;
  }

  .section__title {
    font-size: 1.6rem;
  }

  .hero__name {
    font-size: 2rem;
  }
}