:root {
  color-scheme: light dark;
  --bg: #050816;
  --bg-alt: #070b1f;
  --bg-soft: #0b1027;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --fg: #e5e7eb;
  --fg-muted: #9ca3af;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-strong: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #6366f1, #ec4899);
  --danger: #ef4444;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);
  --radius-lg: 1.5rem;
  --radius-md: 0.875rem;
  --radius-pill: 999px;
  --transition-fast: 150ms ease-out;
  --transition-med: 220ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #111827, #020617 55%);
  color: var(--fg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  scroll-behavior: smooth;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.68),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.18), transparent),
    rgba(15, 23, 42, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.logo span {
  color: #a855f7;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.83rem;
  color: var(--fg-muted);
  border: 1px solid transparent;
  transition: background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.nav-links a:hover {
  color: #e5e7eb;
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.45);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.nav-toggle span {
  height: 2px;
  width: 52%;
  margin: 0 auto;
  background: #e5e7eb;
  border-radius: 999px;
  transition: transform var(--transition-med), opacity var(--transition-med);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(3px) rotate(40deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-3px) rotate(-40deg);
}

.theme-toggle {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  color: #e5e7eb;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero {
  padding: 5.5rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.1fr);
  gap: 2.75rem;
  align-items: center;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 3vw + 1.5rem, 3.2rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.9rem;
}

.hero-subtitle {
  margin: 0;
  font-size: 1.02rem;
  color: var(--fg-muted);
  max-width: 36rem;
}

.accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.btn.primary {
  /* Un poco más claro y menos pesado */
  background-image: linear-gradient(135deg, #818cf8, #f472b6);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.6);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.55);
  color: var(--fg-muted);
}

.btn:hover {
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.88);
}

.hero-note {
  margin-top: 1rem;
  font-size: 0.86rem;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.74rem;
  background: rgba(22, 163, 74, 0.18);
  color: #bbf7d0;
  border: 1px solid rgba(22, 163, 74, 0.55);
}

.hero-card {
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.4rem;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.3), transparent 55%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
}

.hero-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  padding: 2px;
  overflow: hidden;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.hero-role {
  margin: 1.1rem 0 0.1rem;
  font-size: 0.95rem;
}

.hero-location {
  margin: 0;
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.2rem;
}

.hero-tags span {
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: radial-gradient(circle at top right, #020617, #020617 55%);
}

.section-header {
  text-align: left;
  margin-bottom: 1.6rem;
}

.section-header h2 {
  font-size: 1.55rem;
  margin-bottom: 0.3rem;
}

.section-intro {
  margin: 0;
  max-width: 32rem;
  font-size: 0.95rem;
  color: var(--fg-muted);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 2rem;
}

.about-text p {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-size: 0.97rem;
  color: var(--fg-muted);
}

.chip-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip-list li {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.6rem;
}

.card {
  border-radius: var(--radius-md);
  padding: 1.3rem 1.1rem;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.96)
  );
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transform: translateY(0);
  transition: transform var(--transition-med), box-shadow var(--transition-med),
    border-color var(--transition-med), background var(--transition-med);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.98);
  border-color: rgba(129, 140, 248, 0.7);
  background: radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.32),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.96);
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.card-header h3 {
  margin: 0;
  font-size: 1rem;
}

.card-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.card-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.card-tags li {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.78rem;
}

.card-links {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.2rem;
}

.card-links a {
  font-size: 0.82rem;
  color: #a5b4fc;
}

.timeline {
  margin-top: 1.4rem;
  display: grid;
  gap: 1.2rem;
  border-left: 1px solid rgba(148, 163, 184, 0.4);
  padding-left: 1.2rem;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.68rem;
  top: 0.4rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--accent-gradient);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.38);
}

.timeline-meta h3 {
  margin: 0;
  font-size: 0.98rem;
}

.timeline-role {
  margin: 0.18rem 0 0.35rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.timeline-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(0, 3fr);
  gap: 2.1rem;
  align-items: center;
}

.contact-card {
  border-radius: var(--radius-md);
  padding: 1.5rem 1.4rem;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.24), transparent 55%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
}

.contact-text {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.86rem;
}

.contact-list span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--fg-muted);
}

.contact-list a {
  color: #a5b4fc;
}

.site-footer {
  padding: 1.8rem 0 2.4rem;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.96), #020617);
}

.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.footer-small {
  opacity: 0.8;
}

.theme-light {
  --bg: #f4f4f5;
  --bg-alt: #ffffff;
  --bg-soft: #f9fafb;
  --fg: #111827;
  --fg-muted: #6b7280;
  --border-subtle: rgba(15, 23, 42, 0.08);
  background: radial-gradient(circle at top left, #e5e7eb, #f9fafb);
}

.theme-light .site-header {
  background: linear-gradient(
    to bottom,
    rgba(249, 250, 251, 0.9),
    rgba(249, 250, 251, 0.78),
    transparent
  );
  border-bottom-color: rgba(148, 163, 184, 0.32);
}

.theme-light .logo {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(148, 163, 184, 0.6);
}

.theme-light .nav-links a:hover {
  background: rgba(209, 213, 219, 0.4);
}

.theme-light .btn.ghost {
  background: white;
  border-color: rgba(148, 163, 184, 0.7);
}

.theme-light .btn.primary {
  background-image: linear-gradient(135deg, #4f46e5, #ec4899);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  color: #f9fafb;
}

.theme-light .card,
.theme-light .contact-card,
.theme-light .hero-card {
  background: white;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.theme-light .card-tags li,
.theme-light .chip-list li {
  background: #f9fafb;
  border-color: rgba(148, 163, 184, 0.6);
}

.theme-light .hero-tags span {
  background: #eef2ff;
  border-color: rgba(129, 140, 248, 0.7);
  color: #1e293b;
}

.theme-light .badge {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(34, 197, 94, 0.6);
  color: #166534;
}

.theme-light .timeline {
  border-left-color: rgba(148, 163, 184, 0.6);
}

.theme-light .section-alt {
  background: #f9fafb;
}

.theme-light .theme-toggle {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.8);
  color: #0f172a;
}

.theme-light .site-footer {
  background: white;
  border-top-color: rgba(148, 163, 184, 0.3);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr);
  }

  .hero-card {
    order: -1;
  }

  .about-grid,
  .cards-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cards-grid {
    gap: 1.1rem;
  }

  .timeline {
    border-left: none;
    padding-left: 0;
  }

  .timeline-item::before {
    display: none;
  }

  .header-inner {
    padding-inline: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset-inline: 1.5rem;
    top: 3.5rem;
    padding: 0.7rem;
    border-radius: 1.3rem;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.4);
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    transform-origin: top right;
    transform: scale(0.96) translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-med),
      transform var(--transition-med);
  }

  .nav-links a {
    width: 100%;
    text-align: left;
  }

  .nav-open .nav-links {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
  }

  .section {
    padding-block: 2.7rem;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 4.5rem;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .container {
    padding-inline: 1.1rem;
  }
}

