:root {
  --brand-primary-dark: #0a264f;
  --brand-primary-medium: #133e70;
  --brand-primary-light: #36598b;
  --brand-neutral: #e0e0e0;
  --brand-white: #ffffff;
  --brand-cta-orange: #ff7a00;
  --brand-cta-green: #40d798;
  --brand-cta-yellow: #f7d794;
  --font-ui: 'Montserrat', sans-serif;
  --font-serif: 'Lora', serif;
}

/* Globales y Resets */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  font-family: var(--font-ui);
  color: var(--brand-neutral);
  background-color: var(--brand-primary-dark);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-y: auto;
}

main.container {
  max-width: 90%;
  width: 100%;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  z-index: 1;
}

/* Animación de fondo */
#stars-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: no-preference) {
  #stars-background {
    animation: twinkle 50s linear infinite;
  }
}

@keyframes twinkle {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 10000px 5000px;
  }
}

/* Cabecera */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--brand-primary-medium);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--brand-white);
  text-transform: uppercase;
}

.language-selector {
  display: flex;
  background-color: var(--brand-primary-medium);
  border-radius: 50px;
  overflow: hidden;
  padding: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lang-btn {
  font-family: var(--font-ui);
  font-weight: 600;
  padding: 8px 16px;
  border: none;
  background-color: transparent;
  color: var(--brand-neutral);
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.2s ease-in-out;
}

.lang-btn.active {
  background-color: var(--brand-primary-dark);
  color: var(--brand-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.lang-btn:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Contenido Principal */
.profile-section {
  width: 100%;
  margin-top: 1rem;
}

.profile-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-white);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

.profile-description {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 400;
  color: var(--brand-neutral);
  margin-top: 0.5rem;
}

.links-section {
  width: 100%;
}

.links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 18px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  min-height: 44px; /* Cumplimiento WCAG */
}

.link-btn:focus,
.link-btn:active {
  outline: none;
  box-shadow: 0 0 0 4px var(--brand-cta-yellow), 0 4px 10px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.link-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.link-btn-primary {
  background-color: var(--brand-primary-light);
  color: var(--brand-white);
}

.link-btn-primary:hover {
  background-color: var(--brand-primary-medium);
}

.link-btn-cta-green {
  background-color: var(--brand-cta-green);
  color: var(--brand-primary-dark);
}

.link-btn-cta-green:hover {
  background-color: #34b382;
}

.link-btn-cta-orange {
  background-color: var(--brand-cta-orange);
  color: var(--brand-white);
}

.link-btn-cta-orange:hover {
  background-color: #d86900;
}

.link-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
}

/* Pie de página */
.footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
  font-size: 0.8rem;
  color: var(--brand-neutral);
}

.footer .brand-name {
  font-size: 0.85rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .container {
    padding: 4rem 2rem;
  }
  .profile-title {
    font-size: 2.8rem;
  }
  .profile-description {
    font-size: 1.1rem;
  }
  .links-list {
    max-width: 600px;
  }
}
