:root {
  --font: "Manrope", "Segoe UI", sans-serif;
  --bg-0: #020617;
  --bg-1: #071428;
  --bg-2: #0a1a3d;
  --ink: #f4f8ff;
  --muted: rgba(226, 232, 240, 0.68);
  --line: rgba(255, 255, 255, 0.1);
  --tile: rgba(11, 22, 48, 0.88);
  --tile-hover: rgba(16, 29, 61, 0.96);
  --accent: #22d3ee;
  --avatar-from: #1d4ed8;
  --avatar-to: #0ea5e9;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(18, 53, 111, 0.55), transparent 58%),
    radial-gradient(ellipse 40% 30% at 90% 80%, rgba(14, 165, 233, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.hero {
  text-align: center;
  margin-bottom: 44px;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.brand {
  display: inline-block;
  margin: 0 auto 22px;
}

.brand img {
  display: block;
  width: min(220px, 64vw);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.35));
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3.8vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero p {
  margin: 12px auto 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
  font-weight: 500;
}

.directory {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: grid;
  gap: 16px;
}

.row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: calc((200% - 16px) / 3);
  max-width: 100%;
  margin-inline: auto;
}

.row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 100%;
  padding: 28px 20px 22px;
  border-radius: 20px;
  background: var(--tile);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.35s ease;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.row-2 .person:nth-child(1) { animation-delay: 0.06s; }
.row-2 .person:nth-child(2) { animation-delay: 0.12s; }
.row-3 .person:nth-child(1) { animation-delay: 0.18s; }
.row-3 .person:nth-child(2) { animation-delay: 0.24s; }
.row-3 .person:nth-child(3) { animation-delay: 0.3s; }

.person:hover,
.person:focus-visible {
  transform: translateY(-4px);
  background: var(--tile-hover);
  border-color: rgba(34, 211, 238, 0.28);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
  outline: none;
}

.avatar {
  width: 60px;
  height: 60px;
  margin: 0 0 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  background: linear-gradient(145deg, var(--avatar-from), var(--avatar-to));
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.06),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

.person h2 {
  margin: 0;
  text-align: center;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.person h2 .lastname {
  font-weight: 800;
}

.role {
  margin: 0;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
  min-height: 1.4em;
}

.cta {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.person:hover .cta,
.person:focus-visible .cta {
  color: #7dd3fc;
}

.footer {
  margin: 40px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .row-2,
  .row-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .row-3 .person:last-child {
    grid-column: 1 / -1;
    max-width: calc((100% - 16px) / 2);
    justify-self: center;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .page {
    padding: 36px 0 52px;
  }

  .row-2,
  .row-3 {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-inline: auto;
  }

  .row-3 .person:last-child {
    grid-column: auto;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .person,
  .footer {
    animation: none !important;
  }

  .person:hover,
  .person:focus-visible {
    transform: none;
  }
}
