:root {
  --brand: #0078c6;
  --brand-dark: #00558f;
  --brand-deeper: #003f6b;
  --ink: #16324a;
  --muted: #5d7186;
  --line: #e4ebf3;
  --card: #ffffff;
  --bg: #f3f6fb;
  --shadow: 0 10px 28px rgba(22, 50, 74, 0.07);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 50% -80px, rgba(0, 120, 198, 0.16), transparent 70%),
    var(--bg);
}

.page {
  width: min(440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 40px;
}

.profile {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 99, 164, 0.22);
}

.profile h1 {
  margin: 18px 0 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.slogan {
  display: inline-block;
  margin: 14px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 120, 198, 0.1);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.links {
  display: grid;
  gap: 12px;
}

.link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.link:hover {
  transform: translateY(-2px);
  background: var(--brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 32px rgba(0, 120, 198, 0.28);
}

.link:active {
  transform: translateY(0);
  background: var(--brand-deeper);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 63, 107, 0.32);
}

.link:focus:not(:hover):not(:active) {
  background: var(--card);
  color: inherit;
}

.link:focus-visible {
  outline: 3px solid rgba(0, 120, 198, 0.35);
  outline-offset: 2px;
}

.link:hover .link-icon,
.link:active .link-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.link:hover .link-sub,
.link:active .link-sub {
  color: rgba(255, 255, 255, 0.86);
}

.link-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0, 120, 198, 0.1);
  color: var(--brand);
}

.link-icon svg {
  width: 22px;
  height: 22px;
}

.link-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.link-title {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.link-sub {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
}

.nowrap {
  white-space: nowrap;
}

.social {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.social a:hover {
  transform: translateY(-2px);
  color: var(--brand);
  border-color: rgba(0, 120, 198, 0.35);
}

.social a:focus-visible {
  outline: 3px solid rgba(0, 120, 198, 0.35);
  outline-offset: 2px;
}

.social svg {
  width: 20px;
  height: 20px;
}

.footer {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer p {
  margin: 0;
}

.footer p + p {
  margin-top: 4px;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  color: var(--brand);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.back::before {
  content: "←";
}

.back:hover {
  color: var(--brand);
}

.back:focus-visible {
  outline: 3px solid rgba(0, 120, 198, 0.35);
  outline-offset: 2px;
  border-radius: 8px;
}

.filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.filter button {
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.filter button[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
}

.filter button:focus-visible {
  outline: 3px solid rgba(0, 120, 198, 0.35);
  outline-offset: 2px;
}

.contacts-status {
  margin: 0 0 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 168px;
  padding: 16px 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.contact:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 120, 198, 0.45);
  box-shadow: 0 14px 32px rgba(0, 120, 198, 0.18);
}

.contact:focus-visible {
  outline: 3px solid rgba(0, 120, 198, 0.35);
  outline-offset: 2px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0, 120, 198, 0.1);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  color: var(--brand-dark);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.contact-name {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.contact-role {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}

@media (max-width: 420px) {
  .page {
    width: min(440px, calc(100% - 24px));
    padding-top: 36px;
  }

  .profile h1 {
    font-size: 1.4rem;
  }

  .link-title {
    font-size: 0.94rem;
  }
}
