@font-face {
  font-family: "Registry Sans";
  src: url("/assets/shared/fonts/roboto-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Registry Sans";
  src: url("/assets/shared/fonts/roboto-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Registry Sans";
  src: url("/assets/shared/fonts/roboto-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Registry Sans", Inter, system-ui, sans-serif;
  color: #1d2b36;
  background: #fff;
  font-synthesis: none;
  --surface: #f6f8fa;
  --surface-hover: #f1f4f6;
  --muted: #687684;
  --line: rgb(24 54 79 / 13%);
  --line-strong: rgb(24 54 79 / 27%);
  --accent: #315f83;
  --accent-dark: #18364f;
  --signal: #b9924b;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #fff;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

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

.shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 64px;
  border-bottom: 2px solid var(--signal);
  background: rgb(24 54 79 / 96%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--accent-dark);
  background: #fff;
  place-items: center;
}

.brand-mark svg {
  width: 19px;
  fill: currentColor;
}

.desktop-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.desktop-nav a,
.site-footer nav a {
  font-size: 14px;
  text-decoration: none;
  transition: color 160ms ease;
}

.desktop-nav a {
  color: rgb(255 255 255 / 76%);
}

.desktop-nav a:hover {
  color: #fff;
}

.site-footer nav a {
  color: var(--muted);
}

.site-footer nav a:hover {
  color: #1d2b36;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 34%);
  border-radius: 11px;
  color: #fff;
  background: rgb(255 255 255 / 10%);
  place-items: center;
}

.menu-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.mobile-nav {
  padding: 8px 20px 16px;
  border-top: 1px solid rgb(255 255 255 / 18%);
  background: #122c43;
}

.mobile-nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  color: #fff;
  font-size: 15px;
  text-decoration: none;
}

.hero {
  padding-block: 78px 64px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 5.3vw, 68px);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: .98;
  color: #1b3651;
}

.hero-copy {
  margin: 25px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.search {
  position: relative;
  width: min(680px, 100%);
  margin: 38px auto 0;
}

.search input {
  width: 100%;
  height: 62px;
  padding: 0 58px 0 54px;
  border: 1px solid rgb(49 95 131 / 20%);
  border-radius: 15px;
  outline: none;
  color: #1d2b36;
  background: var(--surface);
  box-shadow: 0 12px 34px rgb(24 54 79 / 7%);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.search input::placeholder {
  color: #a1a1aa;
}

.search input:focus {
  border-color: rgb(49 95 131 / 72%);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(49 95 131 / 12%);
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 20px;
  width: 21px;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-width: 1.7;
  transform: translateY(-50%);
  pointer-events: none;
}

.clear-search {
  position: absolute;
  top: 50%;
  right: 11px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
  place-items: center;
}

.clear-search:hover {
  color: #1d2b36;
  background: rgb(24 24 27 / 6%);
}

.clear-search svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.about {
  display: grid;
  grid-template-columns: minmax(180px, .72fr) 1.6fr;
  gap: 52px;
  padding-block: 42px;
  border-block: 1px solid var(--line);
}

.about h2,
.catalog-heading h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.03em;
}

.about p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.about p + p {
  margin-top: 4px;
}

.catalog {
  padding-block: 72px 104px;
}

.catalog-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.catalog-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.catalog-heading h2 {
  position: relative;
  padding-left: 14px;
  color: var(--accent-dark);
}

.catalog-heading h2::before {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 4px;
  border-radius: 2px;
  background: var(--signal);
  content: "";
}

.profile-grid {
  display: grid;
  gap: 18px;
}

.profile-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #1d2b36;
  background: #fff;
  box-shadow: 0 7px 24px rgb(24 54 79 / 5%);
  text-decoration: none;
  transform: translateY(0);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.profile-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 32px rgb(24 54 79 / 9%);
  transform: translateY(-2px);
}

.card-title {
  padding: 13px 20px 14px;
  background: var(--accent-dark);
}

.card-title h3 {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 165px;
  background: #fff;
}

.profile-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef2f5;
}

.card-main .profile-photo {
  width: 220px;
  border-right: 1px solid var(--line);
}

.profile-photo::after {
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--line);
  content: "";
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.profile-card:hover .profile-photo img {
  transform: scale(1.018);
}

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  color: #8091a0;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -.04em;
  place-items: center;
}

.photo-placeholder::before {
  position: absolute;
  width: 96px;
  height: 96px;
  border: 1px solid rgb(24 54 79 / 13%);
  border-radius: 50%;
  content: "";
}

.detail-copy h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.25;
}

.detail-copy h1 small {
  display: block;
  margin-top: 5px;
  color: #566878;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -.01em;
}

.card-data {
  display: grid;
  min-width: 0;
  padding: 22px 28px;
  align-items: center;
}

.card-data dl {
  display: grid;
  gap: 13px;
  margin: 0;
}

/* Описание: три строки с многоточием, чтобы карточки остались одной высоты. */
.card-bio {
  display: -webkit-box;
  overflow: hidden;
  margin: 16px 0 0;
  color: #566878;
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-data dl > div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
}

.card-data dt {
  color: #74818d;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.card-data dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #273947;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  min-height: 48px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  color: #687684;
  background: #f8fafc;
  font-size: 13px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-weight: 500;
}

.card-link svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: transform 180ms ease;
}

.profile-card:hover .card-link svg {
  transform: translateX(2px);
}

.catalog-actions {
  display: grid;
  margin-top: 42px;
  justify-items: center;
}

.load-more {
  min-width: 172px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 160ms ease, background 160ms ease;
}

.load-more:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.all-shown {
  margin: 0;
  color: #687684;
  font-size: 14px;
}

.empty-state {
  padding: 72px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
  background: var(--surface);
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--accent);
  background: #eef2f5;
  place-items: center;
}

.empty-icon svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.empty-state h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
}

.empty-state p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  border-top: 3px solid var(--accent);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 156px;
  align-items: center;
  gap: 36px;
}

.footer-brand .brand-mark {
  width: 29px;
  height: 29px;
  border-radius: 8px;
}

.footer-brand {
  color: #1d2b36;
}

.footer-inner > p {
  margin: 0;
  justify-self: end;
  color: #687684;
  font-size: 13px;
}

.profile-view {
  min-height: calc(100vh - 221px);
  padding-block: 56px 96px;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 160ms ease;
}

.back-link:hover {
  color: var(--accent-dark);
}

.back-link svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.profile-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  overflow: hidden;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 44px rgb(24 54 79 / 7%);
}

.detail-photo {
  min-height: 420px;
}

.detail-copy {
  display: flex;
  min-width: 0;
  padding: clamp(32px, 5vw, 68px);
  flex-direction: column;
  justify-content: center;
}

.detail-copy h1 {
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -.045em;
}

.detail-copy h1 small {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

.detail-copy dl {
  margin: 42px 0 0;
  border-top: 1px solid var(--line);
}

.detail-copy dl > div {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.detail-copy dt {
  color: #687684;
}

.detail-copy dd {
  margin: 0;
  color: #566878;
  text-align: right;
}

.detail-bio {
  margin: 28px 0 0;
  color: #566878;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-line;
}

.detail-auth {
  width: 100%;
  min-height: 48px;
  margin-top: 28px;
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  color: #fff;
  background: var(--accent-dark);
  font-weight: 500;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.detail-auth:hover {
  border-color: #244d6c;
  background: #244d6c;
}

.detail-auth:disabled {
  cursor: default;
  opacity: .65;
}

.profile-missing {
  max-width: 580px;
  padding-block: 100px;
}

.profile-missing h1 {
  margin: 0;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -.04em;
}

.profile-missing p {
  margin: 18px 0 28px;
  color: var(--muted);
  line-height: 1.6;
}

.profile-missing a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .profile-detail {
    grid-template-columns: 1fr;
  }

  .detail-photo {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 36px, 1180px);
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: grid;
  }

  .hero {
    padding-block: 48px 42px;
    text-align: left;
  }

  .hero h1 {
    max-width: 330px;
    font-size: 43px;
    line-height: 1.02;
  }

  .hero-copy {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.55;
  }

  .hero-copy br {
    display: none;
  }

  .search {
    margin-top: 26px;
  }

  .search input {
    height: 56px;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-block: 30px;
  }

  .catalog {
    padding-block: 46px 76px;
  }

  .catalog-heading {
    display: block;
    margin-bottom: 24px;
  }

  .catalog-heading p {
    margin-top: 8px;
  }

  .profile-grid {
    gap: 16px;
  }

  .card-title {
    padding: 13px 16px 14px;
  }

  .card-title h3 {
    overflow: visible;
    font-size: 17px;
    text-overflow: clip;
    white-space: normal;
  }

  .card-main {
    grid-template-columns: 1fr;
  }

  .card-main .profile-photo {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .card-data {
    padding: 20px;
  }

  .card-data dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .card-data dd {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .card-meta {
    padding-inline: 16px;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    min-height: 190px;
    padding-block: 34px;
  }

  .site-footer nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .footer-inner > p {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-view {
    min-height: calc(100vh - 255px);
    padding-block: 30px 72px;
  }

  .profile-detail {
    margin-top: 18px;
  }

  .detail-copy {
    padding: 28px 22px 32px;
  }

  .detail-copy dl {
    margin-top: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
