/* =========================
   Base
   ========================= */
:root {
  /* Максимальная ширина контента на больших экранах */
  --page-max: 980px;

  /* Базовые боковые отступы (растут на больших экранах) */
  --page-pad: clamp(16px, 3vw, 32px);

  /* Внутренние отступы карточек */
  --card-pad: 20px;

  /* Вертикальные отступы между секциями */
  --section-gap: 40px;

  /* Ширина левой колонки (заголовки в строках) */
  --label-min: 167px;
}

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

html,
body {
  width: 100%;
}

body {
  margin: 0;
  font-family: "Helvetica", "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
  color: #000000;

  /* Центрируем “колонку” сайта */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lang-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  display: inline-flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dadada;
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.lang-toggle__btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #6a6a6a;
  transition: all 0.2s ease;
}

.lang-toggle__btn:hover {
  color: #000;
}

.lang-toggle__btn--active {
  background: linear-gradient(135deg, #a370f0, #7a4ccc);
  color: #fff;
  box-shadow: 0 4px 12px rgba(122, 76, 204, 0.35);
}

/* Общий контейнер для основных блоков (header/sections/footer) */
.header,
.links,
footer {
  width: min(100% - (2 * var(--page-pad)), var(--page-max));
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   Header
   ========================= */
.header {
  margin: var(--section-gap) 0;
}

.header__avatar {
  width: clamp(180px, 22vw, 300px);
  height: clamp(180px, 22vw, 300px);
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  border: 4px solid transparent;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.header__avatar:hover {
  border: 4px solid #a370f0;
  box-shadow: 0 0 12px rgba(179, 107, 240, 0.4);
}

.header__title {
  margin: 26px 0 10px 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  font-family: "Helvetica Neue", "Helvetica", Arial, sans-serif;
  text-align: left;
}

.header__subtitle {
  margin: 0;
  color: #8f8f8f;
  font-size: 16px;
  line-height: 1.4;
  font-weight: normal;
  text-align: left;
}

/* =========================
   Sections
   ========================= */
.links {
  margin: 0 auto var(--section-gap);
}

.links__header {
  margin: 0 0 15px 0;
  font-family: "Helvetica Neue", "Helvetica", Arial, sans-serif;
  font-size: 24px;
  line-height: 1.4;
}

/* “Карточка” со списком */
.links__container {
  list-style-type: none;
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: var(--card-pad);
  padding-bottom: calc(var(--card-pad) - 10px);
  gap: 10px;
  margin: 0;
}

/* Строка в карточке */
.links__link {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  padding: 0 0 10px 0;
  border-bottom: 1px solid #dadada;
  width: 100%;
}

/* Последнюю строку без разделителя */
.links__link:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Текст в строках */
.links__title {
  margin: 0;
  min-width: var(--label-min);
  font-size: 14px;
  line-height: 1.35;
}

.links__text {
  font-weight: 400;
  white-space: pre-line;
}

/* =========================
   About
   ========================= */
.about-card {
  background: #ffffff;
  border-radius: 12px;
  padding: var(--card-pad);
}

.about-card__intro {
  display: grid;
  gap: 12px;
}

.about-card__lead,
.about-card__body,
.about-card__note {
  margin: 0;
}

.about-card__lead {
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.28;
  font-weight: 600;
  max-width: 840px;
  position: relative;
  padding: 8px 0 8px 22px;
  border-left: 4px solid #a370f0;
}

.about-card__lead::before {
  content: "“";
  position: absolute;
  left: 10px;
  top: -2px;
  font-size: 34px;
  line-height: 1;
  color: #a370f0;
}

.about-card__lead::after {
  content: "”";
  color: #a370f0;
  font-size: 0.9em;
  line-height: 1;
  margin-left: 0.08em;
}

.about-card__body {
  font-size: 15px;
  line-height: 1.55;
  max-width: 860px;
}

.about-inline-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.about-inline-link:hover,
.about-inline-link:focus-visible {
  text-decoration: underline;
}

.about-card__note {
  font-size: 15px;
  line-height: 1.55;
  color: inherit;
  max-width: 860px;
}

.about-proof {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 24px 0 0 0;
  padding: 0;
}

.about-proof__item {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f4f1fc 0%, #efedf8 100%);
  border: 1px solid #e3def3;
}

.about-proof__value {
  display: block;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 8px;
}

.about-proof__label {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: #4f4f4f;
}

.about-block {
  margin-top: 26px;
}

.about-block__label {
  margin: 0 0 12px 0;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6a6a6a;
}

.about-grid,
.about-audience {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.about-grid__item,
.about-audience__item {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fafafa;
  border: 1px solid #ececec;
}

.about-grid__title,
.about-audience__title {
  margin: 0 0 8px 0;
  font-size: 15px;
  line-height: 1.35;
}

.about-grid__text,
.about-audience__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #4f4f4f;
}

.projects__intro {
  margin-bottom: 18px;
}

.projects__group + .projects__group {
  margin-top: 22px;
}

.projects__anchor {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease, text-decoration 0.25s ease;
}

.projects__anchor:visited {
  color: inherit;
}

.projects__anchor:hover,
.projects__anchor:focus-visible {
  color: #1c4bff;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.projects__meta-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #1c4bff;
  text-decoration: none;
}

.projects__meta-link:visited {
  color: #a370f0;
}

.projects__meta-link:hover,
.projects__meta-link:focus-visible {
  color: #0e2fd2;
  text-decoration: underline;
}

/* Ссылки */
.links__anchor {
  color: #1c4bff;
  text-decoration: none;
  transition: color 0.25s ease, text-decoration 0.25s ease;
  font-size: 14px;
  line-height: 1.35;

  /* чтобы длинные ссылки/почта не ломали верстку */
  word-break: break-word;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.links__anchor:visited {
  color: #a370f0;
}

.links__anchor:hover,
.links__anchor:focus-visible {
  color: #0e2fd2;
  text-decoration: underline;
}

.link-logo {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-logo svg {
  width: 24px;
  height: 24px;
}

.link-logo--telegram svg {
  fill: #06c5f4;
}

.link-logo--email svg {
  fill: #f37c05;
}

.link-logo--github svg {
  fill: #0a0a0a;
}

.link-logo--dzen img {
  width: 24px;
  height: 24px;
  display: block;
}

.link-logo--linkedin svg {
  fill: #265cff;
}

.link-logo--instagram svg {
  fill: #c13584;
}

.link-logo--twitter svg {
  fill: #2e77ff;
}

.links__body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.links__body .links__anchor {
  flex: 1;
  min-width: 0;
}

.links__date {
  font-size: 12px;
  color: #6a6a6a;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: 10px;
  background-color: #f0eef8;
  margin-left: auto;
}

.links__note {
  margin-top: 10px;
  font-size: 12px;
  color: #6a6a6a;
  line-height: 1.4;
}

/* =========================
   Footer
   ========================= */
footer {
  margin: 0 0 var(--section-gap) 0;
}

.button-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 14px;
  width: 100%;

  background: #a370f0;
  border-radius: 20px;

  font-size: 14px;
  line-height: 1.4;

  color: #ffffff;
  text-decoration: none;
}

/* =========================
   Mobile tweaks
   ========================= */
@media (max-width: 520px) {
  .about-card__lead {
    font-size: 22px;
  }

  .about-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid,
  .about-audience {
    grid-template-columns: 1fr;
  }

  .links__link {
    flex-direction: column;
    gap: 6px;
  }

  .links__title {
    min-width: 0;
    font-weight: 600;
  }
}
