/* El1k — личный сайт. Один файл стилей, без зависимостей. */

@font-face { font-family: "Onest"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("/assets/fonts/onest.woff") format("woff"); }
@font-face { font-family: "Geologica"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("/assets/fonts/geologica.woff") format("woff"); }

:root {
  --fog: #edf0f5;
  --paper: #ffffff;
  --ink: #0d1b2e;
  --ink-soft: #44536b;
  --line: #c9d1de;
  --accent: #2438e6;
  --accent-deep: #1a2bc0;
  --tint: #e0e6fb;
  --night: #0d1b2e;
  --night-deep: #091422;
  --on-night: #f2f5fb;
  --on-night-soft: #aab6cc;
  --focus: #2438e6;
  --focus-night: #a9b7ff;

  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Geologica", "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: 20px;
  --header-h: 64px;
  --radius: 20px;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(237, 240, 245, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(13, 27, 46, 0.08);
}
.site-header__bar {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  line-height: 1;
}

.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a:not(.lang-switch) {
  text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--ink-soft);
  padding: 6px 0; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.site-nav a:not(.lang-switch):hover { color: var(--ink); border-bottom-color: var(--accent); }

.lang-switch {
  font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.04em;
  text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 4px 12px; line-height: 1.4;
  transition: background .15s, color .15s;
}
.lang-switch:hover { background: var(--ink); color: #fff; }

.menu-toggle { display: none; }

/* Узкие экраны: меню раскрывается по кнопке, без горизонтальной прокрутки */
@media (max-width: 819px) {
  .menu-toggle {
    display: inline-flex; align-items: center;
    font: inherit; font-weight: 600; font-size: 0.9375rem; color: var(--ink);
    background: transparent; border: 1.5px solid var(--ink); border-radius: 999px;
    padding: 6px 16px; cursor: pointer; min-height: 40px;
  }
  .menu-toggle[aria-expanded="true"] { background: var(--ink); color: #fff; }

  .site-nav {
    flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--fog);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a:not(.lang-switch) { display: block; padding: 14px 0; font-size: 1.125rem; border-bottom: 0; color: var(--ink); }
  .lang-switch { align-self: flex-start; margin-top: 12px; }

  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
}

/* ---------- Главный баннер ---------- */

.hero { position: relative; padding: 28px 0 56px; isolation: isolate; }

/* Чертёжная сетка за заголовком: намёк на профессию, без смысловой нагрузки */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(36, 56, 230, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(36, 56, 230, 0.09) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 30% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 90% at 30% 20%, #000 20%, transparent 75%);
}

.hero__grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }

.hero__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 11.4vw, 7.4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
  /* Имя и фамилия на разных строках на любом экране */
  word-spacing: 100vw;
}

.hero__role {
  margin-top: 22px;
  font-weight: 600;
  font-size: clamp(1.35rem, 4.4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--accent);
}

.hero__intro { margin-top: 16px; max-width: 34em; font-size: 1.125rem; color: var(--ink-soft); }

.hero__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.portrait { width: 100%; }
.hero__portrait { width: 128px; }

.portrait__stub, .portrait img {
  width: 100%; aspect-ratio: 4 / 5; border-radius: 6px;
}
.portrait img { height: auto; object-fit: cover; object-position: var(--portrait-pos, 50% 20%); background: var(--tint); }
.portrait__stub {
  display: grid; place-items: center;
  background: var(--tint);
  color: var(--accent);
  font-family: var(--font-display); font-weight: 800;
  font-size: 2.4rem; letter-spacing: -0.04em;
}

.hero__portrait { position: relative; }
/* Метки по углам кадра — как обрез на чертеже; положение не зависит от содержимого */
.hero__portrait::before, .hero__portrait::after {
  content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none;
  border: 2px solid var(--ink);
}
.hero__portrait::before { top: -8px; left: -8px; border-right: 0; border-bottom: 0; }
.hero__portrait::after { bottom: -8px; right: -8px; border-left: 0; border-top: 0; }

@media (min-width: 900px) {
  .hero { padding: 56px 0 96px; }
  .hero__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr); gap: 56px; }
  .hero__text { order: 1; }
  .hero__portrait { order: 2; width: 100%; max-width: 400px; justify-self: end; }
  .portrait__stub { font-size: clamp(5rem, 11vw, 9rem); }
  .hero__intro { font-size: 1.25rem; }
}

/* Единственный анимированный момент: появление баннера при загрузке */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--rise, 0) * 90ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 26px;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-align: center;
  text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--tint); }
.btn--stub { border: 2px dashed var(--line); color: var(--ink-soft); cursor: default; }

.btn--light:focus-visible, .project a:focus-visible, .contacts a:focus-visible, .site-footer a:focus-visible {
  outline-color: var(--focus-night);
}

@media (max-width: 519px) {
  .hero__actions .btn { width: 100%; }
}

/* ---------- Секции ---------- */

.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 112px 0; } }

.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.1rem, 6vw, 3.75rem);
  line-height: 1.02; letter-spacing: -0.03em;
}

/* ---------- Обо мне ---------- */

.about { padding-top: 24px; padding-bottom: 32px; }
.about + .projects { padding-top: 32px; }
.about__grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .about { padding-top: 40px; padding-bottom: 40px; }
  .about + .projects { padding-top: 40px; }
  .about__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 80px; }
}

.about__lead {
  margin-top: 28px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 4.2vw, 2.4rem);
  line-height: 1.15; letter-spacing: -0.02em;
  max-width: 20em;
}
.about__text { margin-top: 16px; max-width: 34em; font-size: 1.1875rem; color: var(--ink-soft); }

.profiles { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.profiles a {
  font-weight: 600; font-size: 0.9875rem;
  text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
  text-decoration-color: var(--accent);
}
.profiles a:hover { color: var(--accent); }

.facts { border-top: 2px solid var(--ink); }
.facts__row {
  display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--ink-soft); font-size: 0.95rem; }
.facts dd { font-weight: 500; overflow-wrap: anywhere; }
.facts a { text-decoration-line: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.facts a:hover { color: var(--accent); }

@media (max-width: 419px) {
  .facts__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Специализация */
.bitrix {
  margin-top: 24px;
  display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.bitrix__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.2;
}
.bitrix__body p { margin-top: 8px; max-width: 34em; color: var(--ink-soft); font-size: 1rem; }
.bitrix__body p:has(.btn) { margin-top: 16px; }
.bitrix__cert { max-width: 320px; }

.cert { display: block; position: relative; text-decoration: none; border-radius: 10px; }
.cert img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--fog); }
.cert__hint {
  position: absolute; right: 12px; bottom: 12px;
  background: var(--ink); color: #fff; font-size: .875rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px;
}
.cert--stub {
  display: grid; place-items: center; text-align: center;
  aspect-ratio: 4 / 3; padding: 20px;
  border: 2px dashed var(--line); background: var(--fog); color: var(--ink-soft); font-weight: 500;
}

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1100px); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(9, 20, 34, 0.82); }
.lightbox img { width: 100%; height: auto; max-height: 86vh; object-fit: contain; border-radius: 8px; background: #fff; }
.lightbox form { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.lightbox__close {
  font: inherit; font-weight: 600; background: #fff; color: var(--ink);
  border: 0; border-radius: 999px; padding: 8px 20px; min-height: 40px; cursor: pointer;
}

/* ---------- Проекты ---------- */

.projects__list { margin-top: 40px; display: grid; gap: 24px; }

.project {
  position: relative; overflow: hidden;
  display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: center;
  background: var(--night); color: var(--on-night);
  border-radius: 32px; padding: 32px 24px;
}
.project__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  line-height: 1; letter-spacing: -0.035em;
}
.project__url { margin-top: 12px; font-weight: 500; color: var(--on-night-soft); }
.project__text { margin-top: 16px; max-width: 30em; color: var(--on-night-soft); }
.project__body p:has(.btn) { margin-top: 28px; }
.project__art { color: #8ea0ff; max-width: 360px; width: 100%; justify-self: center; }
.project__art svg { width: 100%; height: auto; }
.project__mono { font-family: var(--font-display); font-weight: 800; font-size: 8rem; line-height: 1; }

@media (min-width: 900px) {
  .project { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); padding: 64px 64px; gap: 48px; border-radius: 40px; }
}

/* ---------- Сервисы для друзей ---------- */

.friends { padding-top: 0; }
.friends__list { margin-top: 32px; display: grid; gap: 20px; }
.friend {
  display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: center;
  background: var(--tint);
  border: 2px dashed rgba(36, 56, 230, 0.45);
  border-radius: 24px; padding: 28px 24px;
}
.friend__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.12; letter-spacing: -0.025em;
  max-width: 20em;
}
.friend__body p { margin-top: 10px; color: var(--ink-soft); max-width: 32em; }
.status {
  display: inline-block; justify-self: start;
  padding: 8px 20px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-weight: 600; border: 1.5px solid rgba(36, 56, 230, 0.45);
}
@media (min-width: 760px) {
  .friend { grid-template-columns: minmax(0, 1fr) auto; padding: 36px 40px; gap: 32px; }
  .friend__action { justify-self: end; }
}

/* ---------- Услуги ---------- */

.offers { padding-top: 0; }
.offers__list { margin-top: 40px; border-top: 2px solid var(--ink); }
.offer {
  display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr);
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.offer__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.02em;
}
.offer__text { color: var(--ink-soft); max-width: 36em; }
@media (min-width: 900px) {
  .offer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding: 34px 0; align-items: baseline; }
}
.offers__cta { margin-top: 40px; }

/* ---------- Контакты ---------- */

.contacts { background: var(--night); color: var(--on-night); padding: 80px 0; }
@media (min-width: 900px) { .contacts { padding: 120px 0; } }
.contacts__grid { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); align-items: end; }
.contacts__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.3rem, 8.6vw, 5.6rem);
  line-height: 1; letter-spacing: -0.04em;
}
.contacts__text { margin-top: 22px; max-width: 28em; font-size: 1.25rem; color: var(--on-night-soft); }
.contacts__grid p:has(.btn) { margin-top: 32px; }
.contacts__list { display: grid; gap: 22px; }
.contacts__list dt { color: var(--on-night-soft); font-size: .95rem; }
.contacts__list dd { margin-top: 2px; }
.contacts__list a {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.25rem, 5vw, 2rem); letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
  text-decoration-color: #8ea0ff;
}
.contacts__list a:hover { color: #c3ceff; }
@media (min-width: 900px) {
  .contacts__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 80px; }
}

/* ---------- Футер ---------- */

.site-footer { background: var(--night-deep); color: var(--on-night-soft); padding: 28px 0 36px; font-size: .95rem; }
.site-footer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; justify-content: space-between; }
.site-footer__name { color: var(--on-night); font-weight: 600; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { text-decoration-line: underline; text-underline-offset: 4px; text-decoration-color: rgba(170, 182, 204, .5); }
.site-footer a:hover { color: #fff; }

/* ---------- Путешествия ---------- */

.travel { padding-top: 0; }
.travel__intro { margin-top: 20px; max-width: 30em; font-size: 1.1875rem; color: var(--ink-soft); }
.travel__hint { margin-top: 6px; font-size: .95rem; color: var(--ink-soft); }
.travel__sub {
  margin-top: 44px; margin-bottom: 16px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.75rem); line-height: 1.15; letter-spacing: -0.02em;
}
.travel__split { display: grid; gap: 0 56px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .travel__split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
  .travel__split--countries { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}

/* Карта: подложка — SVG, точки — обычные элементы, поэтому на любом экране они одного размера */
.map { position: relative; width: 100%; aspect-ratio: var(--ratio); }
.map__base { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__pts { position: absolute; inset: 0; }

.pt {
  position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(13, 27, 46, 0.35);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.pt::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; } /* зона касания шире точки */
.pt--multi { width: 16px; height: 16px; margin: -8px 0 0 -8px; box-shadow: 0 0 0 4px rgba(36, 56, 230, 0.22), 0 1px 3px rgba(13, 27, 46, 0.35); }
.pt:hover, .pt.is-on { transform: scale(1.35); box-shadow: 0 0 0 5px rgba(36, 56, 230, 0.28); z-index: 2; }
@media (min-width: 900px) { .pt { width: 14px; height: 14px; margin: -7px 0 0 -7px; } .pt--multi { width: 18px; height: 18px; margin: -9px 0 0 -9px; } }

.map__tip {
  position: absolute; z-index: 5; pointer-events: none;
  transform: translate(-50%, calc(-100% - 16px));
  max-width: 260px; width: max-content;
  background: var(--ink); color: #fff; font-size: .9rem; font-weight: 500; line-height: 1.35;
  padding: 7px 12px; border-radius: 10px; text-align: center;
}
.map__tip[hidden] { display: none; }
.map__tip::after {
  content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px;
  border: 6px solid transparent; border-top-color: var(--ink);
}

/* Список мест — полный текстовый вариант карты */
.places { display: grid; gap: 4px 0; grid-template-columns: minmax(0, 1fr); }
.places--cols { gap: 0; }
@media (min-width: 340px) { .places--cols { display: block; columns: 2; column-gap: 20px; } }
.places li {
  position: relative; padding: 5px 0 5px 22px; break-inside: avoid; font-weight: 500;
  transition: color .15s;
}
.places li::before {
  content: ""; position: absolute; left: 3px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%; background: var(--accent);
}
.places li:hover, .places li.is-on { color: var(--accent); }
