/* Robotics/AI inspired palette and motion */
:root {
  --bg: #05060a;
  --panel: rgba(255, 255, 255, 0.02);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --grid: rgba(127, 255, 212, 0.08);
  --primary: #7df9ff;
  --accent: #ff8f3f;
  --magenta: #ff4b9f;
  --text: #e9f4ff;
  --muted: #9fb1c6;
  --glow: 0 0 10px rgba(125, 249, 255, 0.2);
  --orbit-a: rgba(125, 249, 255, 0.35);
  --orbit-b: rgba(255, 143, 63, 0.35);
  --orbit-c: rgba(255, 75, 159, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(135deg, #040509 0%, #07090f 55%, #05060a 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* Variaciones por página */
body.theme-home {
  background:
    radial-gradient(circle at 12% 20%, rgba(125, 249, 255, 0.12), transparent 22%),
    radial-gradient(circle at 82% 8%, rgba(255, 79, 159, 0.08), transparent 32%),
    linear-gradient(135deg, #05060a 0%, #080b11 55%, #05060a 100%);
}

body.theme-experience {
  --primary: #ffb347;
  --accent: #7df9ff;
  --magenta: #4adede;
  --orbit-a: rgba(255, 179, 71, 0.4);
  --orbit-b: rgba(125, 249, 255, 0.35);
  --orbit-c: rgba(74, 222, 222, 0.4);
  background: radial-gradient(circle at 20% 30%, rgba(255, 179, 71, 0.1), transparent 30%),
              radial-gradient(circle at 80% 10%, rgba(74, 222, 222, 0.12), transparent 35%),
              linear-gradient(135deg, #070809 0%, #0a0d11 55%, #06080e 100%);
}

body.theme-research {
  --primary: #9b8cff;
  --accent: #7df9ff;
  --magenta: #ff6fb7;
  --orbit-a: rgba(155, 140, 255, 0.4);
  --orbit-b: rgba(125, 249, 255, 0.35);
  --orbit-c: rgba(255, 111, 183, 0.4);
  background: radial-gradient(circle at 18% 25%, rgba(155, 140, 255, 0.14), transparent 28%),
              radial-gradient(circle at 82% 5%, rgba(125, 249, 255, 0.14), transparent 36%),
              linear-gradient(135deg, #03040a 0%, #0a0a13 55%, #05060d 100%);
}

body.theme-contact {
  --primary: #7df9ff;
  --accent: #ff8f3f;
  --magenta: #4bffb0;
  --orbit-a: rgba(125, 249, 255, 0.4);
  --orbit-b: rgba(75, 255, 176, 0.35);
  --orbit-c: rgba(255, 143, 63, 0.4);
  background: radial-gradient(circle at 20% 30%, rgba(75, 255, 176, 0.12), transparent 32%),
              radial-gradient(circle at 80% 10%, rgba(125, 249, 255, 0.1), transparent 35%),
              linear-gradient(135deg, #030709 0%, #041018 55%, #05060a 100%);
}

canvas#grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 52px;
  text-align: center;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(125, 249, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  margin-bottom: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary);
  text-decoration: none;
}

.nameplate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.brand .pulse {
  width: 12px;
  height: 12px;
  background: var(--magenta);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 75, 159, 0.7);
  animation: pulse 1.4s infinite alternate;
}

@keyframes pulse {
  to { transform: scale(1.3); opacity: 0.5; }
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.01);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
  justify-items: center;
  text-align: center;
}

.hero-copy {
  text-align: left;
  justify-self: start;
}

.hero .title {
  font-size: clamp(30px, 4.6vw, 42px);
  font-weight: 700;
  line-height: 1.2;
}

.hero .subtitle {
  color: var(--muted);
  margin-top: 12px;
  max-width: 520px;
}

.chip-row {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--panel);
  color: var(--primary);
  font-size: 14px;
}

.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(120deg, rgba(125, 249, 255, 0.12), rgba(255, 143, 63, 0.06));
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.02);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 8px 0 20px;
  justify-items: center;
}

.card {
  padding: 16px;
  background: var(--panel);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(125, 249, 255, 0.18), transparent 35%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin-bottom: 8px;
  color: var(--primary);
}

.card p {
  color: var(--muted);
  font-size: 15px;
}

.section {
  margin-top: 26px;
  text-align: left;
}

.section h2 {
  font-size: 24px;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.section .hint {
  color: var(--muted);
  margin-bottom: 14px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.timeline-item {
  width: min(760px, 100%);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.timeline-item .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--primary);
  font-size: 13px;
}

.matrix {
  display: grid;
  gap: 12px;
}

.matrix-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.matrix-item {
  flex: 1;
  min-width: 220px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.02), rgba(125, 249, 255, 0.05));
}

.footer {
  margin-top: 32px;
  padding: 16px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.orbit {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.35));
}

.ring:nth-child(2) {
  inset: 12px;
  border-color: rgba(125, 249, 255, 0.35);
}

.ring:nth-child(3) {
  inset: 24px;
  border-color: rgba(255, 143, 63, 0.3);
}

.core-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px rgba(125, 249, 255, 0.8);
}

.orbiting {
  position: absolute;
  inset: 0;
  animation: spin 10s linear infinite;
}

.orbiting:nth-child(5) { animation-duration: 14s; }
.orbiting:nth-child(6) { animation-duration: 18s; }

.orbiting .dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 143, 63, 0.8);
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.orbiting.orb-b .dot {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(125, 249, 255, 0.8);
}

.orbiting.orb-c .dot {
  background: var(--magenta);
  box-shadow: 0 0 10px rgba(255, 75, 159, 0.8);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Utility */
.mono {
  font-family: "Space Mono", "JetBrains Mono", "SFMono-Regular", monospace;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(125, 249, 255, 0.3);
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 143, 63, 0.7);
}

.layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

@media (max-width: 700px) {
  nav { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero { grid-template-columns: 1fr; }
  .orbit { width: 220px; height: 220px; }
}
