/* Página de bio do Achei Concursos: estática, sem JavaScript e sem recursos externos.
   Cores da marca (mesmos valores dos tokens do site), com tema escuro monocromático. */

:root {
  color-scheme: light dark;
  --background: #f4f6f9;
  --surface: #ffffff;
  --foreground: #1a2130;
  --muted: #4b5568;
  --border: #dce1ea;
  --primary: #2340a8;
  --primary-hover: #1b3288;
  --primary-foreground: #ffffff;
  --highlight: #ffd84d;
  --ring: #2340a8;
  --radius: 0.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000000;
    --surface: #141414;
    --foreground: #f5f5f5;
    --muted: #bdbdbd;
    --border: #404040;
    --primary: #ffffff;
    --primary-hover: #e5e5e5;
    --primary-foreground: #000000;
    --highlight: #ffffff;
    --ring: #ffffff;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

.bio {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem calc(2rem + env(safe-area-inset-bottom));
}

/* Perfil */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile__logo {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 1.25rem;
  box-shadow: 0 0 0 1px var(--border);
}

.profile__name {
  margin: 1.25rem 0 0;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.profile__handle {
  margin: 0.125rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.profile__text {
  max-width: 22rem;
  margin: 0.875rem 0 0;
  color: var(--muted);
  text-wrap: balance;
}

/* Link principal */

.cta {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-height: 4.5rem;
  justify-content: center;
  padding: 0.875rem 3.5rem 0.875rem 1.25rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  text-decoration: none;
  transition: background-color 150ms ease;
}

.cta::before {
  content: "";
  position: absolute;
  top: 0.875rem;
  bottom: 0.875rem;
  left: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--highlight);
}

.cta:hover {
  background: var(--primary-hover);
}

.cta__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.5rem;
}

.cta__text {
  font-size: 0.875rem;
  opacity: 0.85;
}

.cta__arrow {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms ease;
}

.cta:hover .cta__arrow {
  transform: translate(3px, -50%);
}

/* Redes sociais */

.social__title {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.social__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social__link {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--surface);
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
}

.social__link:hover {
  border-color: var(--foreground);
}

.social__icon {
  width: 1.375rem;
  height: 1.375rem;
  fill: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  .bio {
    padding-top: 5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta,
  .cta__arrow,
  .social__link {
    transition: none;
  }
}

/* Entrada: cada bloco desce alguns pixels saindo do desfoque, em cascata.
   - Só CSS, sem JavaScript: roda antes de qualquer script e nunca trava a página.
   - Anima apenas opacity, transform e filter, que o navegador processa na GPU, sem
     recalcular o layout; nada muda de tamanho nem empurra o conteúdo.
   - Desfoque pequeno e curto, em poucos blocos, para caber em celulares simples.
   - O estado final é o estilo normal: se o navegador não suportar animação, a página
     aparece direto. Quem pede menos movimento no sistema não vê a animação. */

@keyframes enter {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translate3d(0, -14px, 0);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .profile__logo,
  .profile__name,
  .profile__handle,
  .profile__text,
  .cta,
  .social {
    /* backwards: aplica o "from" durante o atraso e, ao terminar, devolve o estilo
       normal (sem filter/transform residuais ocupando a GPU). */
    animation: enter 650ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: calc(var(--enter-order, 0) * 70ms);
  }

  .profile__name {
    --enter-order: 1;
  }

  .profile__handle {
    --enter-order: 2;
  }

  .profile__text {
    --enter-order: 3;
  }

  .cta {
    --enter-order: 4;
  }

  .social {
    --enter-order: 5;
  }
}
