:root {
  --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); /* Fondo suave neutro por defecto */
  --card-bg: #ffffff;
  --text-main: #000000;
  --text-muted: #666666;
  --border-color: #000000;
  --primary: #000000;
  --shadow: 0 20px 40px rgba(0,0,0,0.08); /* Sombra elegante */
}

body[data-theme="dark"] {
  --bg-gradient: #111;
  --card-bg: #000000;
  --text-main: #ffffff;
  --text-muted: #aaaaaa;
  --border-color: #333333; /* Borde más sutil en dark */
  --primary: #ffffff;
  --shadow: 0 20px 40px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  color: var(--text-main);
}

/* Tarjeta Principal ("Page") que imita el estilo de la foto */
.page {
  width: 100%;
  max-width: 480px; /* Ancho típico móvil/tarjeta */
  background: var(--card-bg);
  border-radius: 20px; /* Bordes muy redondeados como en la foto */
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  text-align: center;
}

/* --- Hero Image Section --- */
.profile {
  margin-bottom: 30px;
}

.hero-image-container {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden; /* Para recortar la imagen en las esquinas */
  margin-bottom: 16px;
  background: #f0f0f0; /* Placeholder color */
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.avatar {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 4/5; /* Formato vertical, retrato */
  transform: scale(1.01); /* Evita líneas blancas en bordes por render */
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 80px 20px 20px;
  /* Degradado para que el texto resalte sobre cualquier foto */
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.name {
  color: #ffffff; /* Siempre blanco sobre la foto */
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  margin: 0;
}

.bio {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 auto;
  max-width: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bio::before {
  content: "👩‍💼"; 
  filter: grayscale(1);
}

/* --- Theme Toggle --- */
.theme-toggle {
  position: absolute;
  top: 30px;
  right: 30px;
  background: rgba(255,255,255,0.8);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  font-size: 1.1rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}
.theme-toggle:hover { transform: scale(1.1); }

/* --- Links (Estilo "Pill" Outline) --- */
.links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-main);
  background: var(--card-bg);
  border: 1.5px solid var(--border-color); /* Borde grueso como referencia */
  padding: 14px 24px;
  border-radius: 999px; /* Pill shape */
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.link:hover {
  background: var(--text-main);
  color: var(--card-bg); /* Invertir colores al hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  border-color: var(--text-main);
}

.link .icon {
  width: 24px;
  height: 24px;
  margin-right: 16px;
  transition: all 0.2s;
}

/* En light mode, iconos negros. En dark mode, blancos. */
/* Al hacer hover, se invierte por la regla de .link:hover */

.link .badge {
  background: var(--border-color);
  color: var(--card-bg);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Cambios específicos para Dark Mode en botones */
body[data-theme="dark"] .link {
  border-color: rgba(255,255,255,0.3);
}
body[data-theme="dark"] .link:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

/* --- Footer --- */
.footer {
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.6;
}

@media (max-width: 480px) {
  .page { padding: 16px; border-radius: 16px; }
  .name { font-size: 1.8rem; }
}
