/* Palette and type from style-guide.md. */
:root {
  --clr-green: hsl(75, 94%, 57%);
  --clr-white: hsl(0, 0%, 100%);
  --clr-grey-700: hsl(0, 0%, 20%);
  --clr-grey-800: hsl(0, 0%, 12%);
  --clr-grey-900: hsl(0, 0%, 8%);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-card: 12px;
  --radius-link: 8px;
}

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

body {
  margin: 0;
  padding: 1.5rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;

  background-color: var(--clr-grey-900);
  color: var(--clr-white);
  font-family: var(--font-body);
  font-size: 0.875rem;
}

.profile {
  /* Fluid below the design width; the old fixed 400px overflowed a 375px phone
     once body padding was taken into account. */
  width: 100%;
  max-width: 384px;
  padding: 1.5rem;

  background-color: var(--clr-grey-800);
  border-radius: var(--radius-card);
  text-align: center;
}

.profile__avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.profile__name {
  margin: 1.5rem 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.profile__location {
  /* No fixed height here: a longer location would have been clipped. */
  margin: 0;
  color: var(--clr-green);
  font-weight: 700;
}

.profile__bio {
  margin: 1.5rem 0;
}

.profile__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile__link {
  display: block;
  padding: 0.75rem;

  background-color: var(--clr-grey-700);
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-link);
  font-weight: 700;

  transition: background-color 150ms ease, color 150ms ease;
}

.profile__link:hover {
  background-color: var(--clr-green);
  color: var(--clr-grey-900);
}

/* Keyboard users need to see where they are; the hover style alone leaves
   them navigating blind. */
.profile__link:focus-visible {
  outline: 2px solid var(--clr-green);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .profile__link {
    transition: none;
  }
}
