@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Tema oscuro (default) ── */
body {
  --bg-primary: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-card: rgba(255, 255, 255, 0.06);
  --text-primary: #e8e8ed;
  --text-secondary: #7a7a8e;
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --hover-glow: rgba(99, 102, 241, 0.15);
}

/* ── Tema gradientes (override) ── */
html.gradient-theme body {
  --bg-primary: transparent;
  --bg-card: rgba(255, 255, 255, 0.07);
  --border-card: rgba(255, 255, 255, 0.12);
  --text-primary: #f0f0ff;
  --text-secondary: #a8a4c8;
  --accent-1: #e040fb;
  --accent-2: #7c4dff;
  --hover-glow: rgba(224, 64, 251, 0.15);
}

html.gradient-theme body {
  background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #0f0c29) !important;
  background-size: 400% 400%;
  animation: gradientShift 18s ease infinite;
}

html.gradient-theme .card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.gradient-theme .link-btn,
html.gradient-theme .cv-item {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

.container { max-width: 900px; margin: 0 auto; padding: 3rem 1.5rem; }

/* ── Header ── */
.site-header { text-align: center; margin-bottom: 4rem; }

.logo {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline { color: var(--text-secondary); font-size: 1.05rem; margin-top: 0.4rem; }

/* ── Section titles ── */
.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

/* ── Cards grid ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--hover-glow);
  background: rgba(255, 255, 255, 0.06);
}

.card-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.card-icon { width: 18px; height: 18px; flex-shrink: 0; }

.skill-tag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.8rem; background: var(--bg-card);
  border: 1px solid var(--border-card); border-radius: 6px; font-size: 0.82rem;
}

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

/* ── Profile header ── */
.profile-header { text-align: center; margin-bottom: 3rem; }

.avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2.2rem; font-weight: 700;
}

.profile-name { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.profile-role { color: var(--text-secondary); margin-top: 0.3rem; }

/* ── Links row ── */
.links-row {
  display: flex; justify-content: center; gap: 1rem;
  margin-bottom: 3rem; flex-wrap: wrap;
}

.link-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.2rem; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border-card);
  color: var(--text-primary); text-decoration: none; font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.link-btn:hover { background: rgba(255, 255, 255, 0.06); transform: translateY(-1px); }

/* ── CV section ── */
.cv-section { margin-bottom: 3rem; }

.cv-item {
  padding: 1.2rem; background: var(--bg-card);
  border: 1px solid var(--border-card); border-radius: 10px;
  margin-bottom: 0.8rem;
}

.cv-role { font-weight: 600; font-size: 0.95rem; }
.cv-company { color: var(--accent-1); font-size: 0.85rem; }
.cv-date { color: var(--text-secondary); font-size: 0.8rem; margin-top: 0.2rem; }

/* ── Footer ── */
.site-footer {
  text-align: center; padding: 3rem 1.5rem 2rem;
  color: var(--text-secondary); font-size: 0.8rem;
  border-top: 1px solid var(--border-card);
}

/* ── Theme toggle ── */
.theme-toggle {
  position: fixed; top: 1.2rem; right: 1.2rem; z-index: 100;
  background: var(--bg-card); border: 1px solid var(--border-card);
  color: var(--text-primary); width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover { background: rgba(255, 255, 255, 0.08); transform: scale(1.1); }

/* ── Nav links ── */
.nav-links { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; }

.nav-link {
  color: var(--accent-1); text-decoration: none; font-size: 0.9rem;
  padding: 0.4rem 0.8rem; border-radius: 6px; transition: background 0.2s ease;
}

.nav-link:hover { background: rgba(99, 102, 241, 0.1); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .logo, .profile-name { font-size: 1.8rem; }
  .cards { grid-template-columns: 1fr; }
  .container { padding: 2rem 1rem; }
}
