/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0f1a;
  --bg2: #111327;
  --card: #161929;
  --card2: #1a1d2e;
  --border: rgba(255,255,255,0.07);
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --purple-dim: rgba(139,92,246,0.15);
  --text: #e8eaf0;
  --text-muted: #8890aa;
  --text-dim: #555b72;
  --white: #ffffff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Red Hat Text', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  background: rgba(13,15,26,0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--purple-light);
  letter-spacing: -0.01em;
}

.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--white); }

.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lang-btn img { display: block; }

/* ── HAMBURGER (mobile only) ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV DRAWER ── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(13,15,26,0.97);
  backdrop-filter: blur(16px);
  z-index: 150;
  padding: 80px 32px 40px;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 400;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--white); }
.mobile-nav .mobile-lang {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
}

/* ── SECCIONES ── */
section { position: relative; z-index: 1; }

/* ── HERO ── */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.hero-glow-left {
  width: 500px; height: 500px;
  background: rgba(80,20,180,0.18);
  top: 10%; left: -100px;
}
.hero-glow-right {
  width: 400px; height: 400px;
  background: rgba(130,60,200,0.14);
  bottom: 5%; right: -80px;
}

.hero-content { position: relative; z-index: 1; max-width: 760px; }

.hero-badge {
  display: inline-block;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.3);
  color: var(--purple-light);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 13px 18px;
  border-radius: 99px;
  margin-bottom: 22px;
  letter-spacing: 0.04em;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 1500;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  background: var(--purple);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 99px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--purple-light); transform: translateY(-1px); }

/* ── SOBRE MÍ ── */
#about {
  padding: 100px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--purple-light);
  margin-bottom: 36px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-text .btn-primary { margin-top: 12px; display: inline-block; }

.avatar-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px;
}

.avatar {
  width: 260px;
  height: 260px;
  border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
  background: linear-gradient(160deg, #2a2060 0%, #1a1530 100%);
  border: 2px solid rgba(139,92,246,0.2);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.avatar {
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(139,92,246,0.4);
  box-shadow: 0 0 30px rgba(139,92,246,0.15);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar svg { width: 180px; opacity: 0.35; }

/* ── EXPERTISE CARDS ── */
.expertise-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--purple-light);
  margin: 56px 0 24px;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.exp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  transition: border-color 0.25s, background 0.25s;
  
}
.exp-card:hover {
  border-color: rgba(139,92,246,0.35);
  background: var(--card2);
}

.exp-icon {
  width: 44px; height: 44px;
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--purple-light);
}

.exp-card h4 {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.exp-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── SKILLS ── */
#skills {
  padding: 60px 60px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tech-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  transition: border-color 0.25s;
}
.tech-card:hover { border-color: rgba(139,92,246,0.3); }

.tech-icon {
  color: var(--purple-light);
  margin-bottom: 12px;
}

.tech-card h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 20px;
}

.tech-tags { display: flex; flex-wrap: wrap; gap: 10px; }

.tech-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}
.tech-tag span { font-size: 0.85rem; }

/* ── EXPERIENCIA ── */
#experience {
  padding: 100px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 0;
  position: relative;
}

.timeline-line {
  grid-column: 2;
  grid-row: 1 / 10;
  background: linear-gradient(to bottom, transparent, var(--purple), transparent);
  width: 2px;
  justify-self: center;
}

.timeline-item {
  padding: 0 32px 40px;
  position: relative;
}
.timeline-item.left { grid-column: 1; text-align: right; }
.timeline-item.right { grid-column: 3; }

.timeline-dot {
  position: absolute;
  top: 16px;
  width: 10px; height: 10px;
  background: var(--purple);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
}
.timeline-item.left .timeline-dot { right: -37px; }
.timeline-item.right .timeline-dot { left: -37px; }

.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  transition: border-color 0.25s;
}
.timeline-card:hover { border-color: rgba(139,92,246,0.3); }

.timeline-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.timeline-item.left .timeline-card-head { flex-direction: row-reverse; }

.tc-icon { color: var(--purple-light); flex-shrink: 0; }

.tc-role {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--white);
}

.tc-badge {
  background: transparent;
  border: 1px solid var(--purple);
  color: var(--purple-light);
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 99px;
}

.tc-company {
  font-size: 0.82rem;
  color: var(--purple-light);
  margin-bottom: 2px;
  font-weight: 500;
}

.tc-date {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── CONTACTO ── */
#contact {
  padding: 100px 60px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 48px;
  max-width: 560px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}
.form-label span { color: var(--purple-light); margin-left: 2px; }

.form-input, .form-textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-input:focus, .form-textarea:focus { border-color: rgba(139,92,246,0.5); }
.form-textarea { height: 120px; }

.btn-send {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 13px 24px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, color 0.2s;
}
.btn-send:hover { background: var(--purple-dim); color: var(--purple-light); border-color: rgba(139,92,246,0.4); }

.social-panel { display: flex; flex-direction: column; gap: 12px; }

.social-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  padding-bottom: 14px;
  border-bottom: 2px solid;
  border-image: linear-gradient(to right, var(--purple), transparent) 1;
  margin-bottom: 6px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.social-link:hover { border-color: rgba(139,92,246,0.4); background: var(--card2); }
.social-link svg { color: var(--purple-light); flex-shrink: 0; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 60px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  position: relative;
  z-index: 1;
}

/* ── ANIMACIONES ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge { animation: fadeUp 0.5s ease both; }
.hero-title  { animation: fadeUp 0.55s 0.1s ease both; }
.hero-sub    { animation: fadeUp 0.55s 0.2s ease both; }
.hero-btns   { animation: fadeUp 0.55s 0.3s ease both; }



/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 18px 24px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  #about, #skills, #experience, #contact { padding: 60px 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .avatar-wrap { display: none; }
  .expertise-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .timeline-line { display: none; }
  .timeline-item { grid-column: 1 !important; text-align: left !important; padding: 0 0 24px; }
  .timeline-item.left .timeline-card-head { flex-direction: row; }
  .timeline-dot { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .mobile-nav { display: flex; }
}
