:root {
  color-scheme: light;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --ink: #191924;
  --ink-2: #4d4d61;
  --ink-3: #696978;
  --bg: #f4f2ee;
  --surface: #fbfaf8;
  --surface-2: #efece6;
  --line: #dcd8ce;
  --line-soft: #e7e3db;
  --accent: #3a2f8f;
  --accent-2: #5548c8;
  --accent-tint: #e9e6f8;
  --shadow: 0 1px 2px rgb(25 25 36 / 6%), 0 8px 24px -16px rgb(25 25 36 / 24%);
  --content-width: 73.75rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eae8f2;
  --ink-2: #b7b4c5;
  --ink-3: #918ea3;
  --bg: #111220;
  --surface: #181a2a;
  --surface-2: #1f2136;
  --line: #2b2d44;
  --line-soft: #24263a;
  --accent: #a99ff0;
  --accent-2: #c3bbff;
  --accent-tint: #20213a;
  --shadow: 0 1px 0 rgb(255 255 255 / 3%), 0 18px 40px -24px rgb(0 0 0 / 70%);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --ink: #eae8f2;
    --ink-2: #b7b4c5;
    --ink-3: #918ea3;
    --bg: #111220;
    --surface: #181a2a;
    --surface-2: #1f2136;
    --line: #2b2d44;
    --line-soft: #24263a;
    --accent: #a99ff0;
    --accent-2: #c3bbff;
    --accent-tint: #20213a;
    --shadow: 0 1px 0 rgb(255 255 255 / 3%), 0 18px 40px -24px rgb(0 0 0 / 70%);
  }
}

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

html {
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-2);
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

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

::selection {
  background: var(--accent-tint);
  color: var(--ink);
}

.shell {
  position: relative;
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding: 2.25rem 2.5rem 4rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
  gap: clamp(3rem, 6vw, 4.5rem);
  align-items: start;
  padding-top: 3.5rem;
}

.localized[lang="ru"] {
  display: none;
}

html[data-lang="ru"] .localized[lang="en"] {
  display: none;
}

html[data-lang="ru"] .localized[lang="ru"] {
  display: revert;
}

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

.page-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--accent) 18%, transparent) 1.2px, transparent 1.3px),
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--accent-tint) 42%, transparent), transparent 34rem);
  background-size: 3.5rem 3.5rem, auto;
  mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);
}

.receiver-diagram {
  position: absolute;
  z-index: 0;
  top: var(--diagram-anchor-y);
  left: var(--diagram-anchor-x);
  width: clamp(55rem, 117.5vw, 105rem);
  height: auto;
  overflow: visible;
  pointer-events: none;
  color: var(--accent);
  opacity: 0.12;
  transform: translate(-18.333%, -23.684%);
}

.network-lines {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.network-nodes {
  fill: var(--bg);
  stroke: currentColor;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.125rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: var(--ink);
}

.brand span {
  color: var(--ink-3);
}

.site-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preference-menu {
  position: relative;
}

.control {
  display: inline-flex;
  min-height: 2.3125rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease;
}

.control:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.control > svg {
  width: 0.9375rem;
  height: 0.9375rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.control .control-chevron {
  width: 0.6875rem;
  height: 0.6875rem;
  color: var(--ink-3);
  transition: transform 160ms ease;
}

.control[aria-expanded="true"] .control-chevron {
  transform: rotate(180deg);
}

.control--icon {
  width: 2.3125rem;
  padding: 0;
}

.control-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.5rem);
  right: 0;
  display: grid;
  min-width: 11rem;
  gap: 0.125rem;
  padding: 0.375rem;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.control-option {
  position: relative;
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.625rem;
  align-items: center;
  width: 100%;
  padding: 0.5625rem 1.75rem 0.5625rem 0.625rem;
  border: 0;
  border-radius: 0.625rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.84375rem;
  text-align: left;
}

.control-option:hover,
.control-option:focus-visible,
.control-option[aria-checked="true"] {
  background: var(--accent-tint);
}

.control-option[aria-checked="true"]::after {
  position: absolute;
  right: 0.75rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.control-option svg {
  width: 1rem;
  height: 1rem;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.control-option--language {
  grid-template-columns: 2.125rem minmax(0, 1fr);
}

.language-code {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
}

.profile {
  --diagram-anchor-x: 4.125rem;
  --diagram-anchor-y: 4.125rem;
  position: relative;
  min-width: 0;
}

.identity,
.intro,
.topics {
  position: relative;
  z-index: 1;
}

.identity {
  display: grid;
  grid-template-columns: 8.25rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2.125rem;
}

.avatar-frame {
  position: relative;
  width: 8.25rem;
  height: 8.25rem;
  padding: 0.125rem;
  border: 1px solid color-mix(in srgb, var(--accent) 52%, transparent);
  border-radius: 50%;
}

.avatar-frame::after {
  position: absolute;
  inset: -1px;
  border: 1px solid var(--accent);
  border-radius: inherit;
  animation: avatar-pulse 4.2s ease-out infinite;
  content: "";
  opacity: 0;
}

@keyframes avatar-pulse {
  0% {
    opacity: 0.38;
    transform: scale(1);
  }

  72%,
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.identity-copy {
  min-width: 0;
  padding-bottom: 0.375rem;
}

.eyebrow {
  margin: 0 0 0.625rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.tagline {
  max-width: 29ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 0.84375rem;
  line-height: 1.55;
}

.intro h1 {
  margin: 0 0 1.375rem;
  overflow-wrap: anywhere;
  font-size: clamp(2.5rem, 5.6vw, 4.625rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  text-wrap: balance;
}

.intro p {
  max-width: 56ch;
  margin: 0 0 1.375rem;
  color: var(--ink-3);
  font-size: 0.90625rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.intro p:first-of-type {
  max-width: 48ch;
  margin-bottom: 1.125rem;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  line-height: 1.5;
}

.intro p:last-child {
  margin-bottom: 2.5rem;
}

.topics {
  max-width: 35rem;
  border-top: 1px solid var(--line-soft);
}

.topic {
  display: grid;
  grid-template-columns: 9.375rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8125rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.84375rem;
  line-height: 1.55;
}

.topic:last-child {
  border-bottom: 0;
}

.topic dt {
  padding-top: 0.1875rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.65625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topic dd {
  min-width: 0;
  margin: 0;
  color: var(--ink-2);
}

.topic dd p {
  margin: 0;
}

.topic dd p + p {
  margin-top: 0.75rem;
}

.contact-card {
  position: sticky;
  top: 2.25rem;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-title {
  margin: 0 0 0.75rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.65625rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-list {
  display: grid;
}

.contact-link {
  display: grid;
  grid-template-columns: 2.375rem minmax(0, 1fr) auto;
  gap: 0.875rem;
  align-items: center;
  margin-inline: -0.5rem;
  padding: 0.75rem 0.5rem;
  border-radius: 0.875rem;
  color: var(--ink);
  transition: background 160ms ease;
}

.contact-link:hover {
  background: var(--accent-tint);
  color: var(--ink);
}

.contact-icon {
  display: grid;
  width: 2.375rem;
  height: 2.375rem;
  place-items: center;
  border-radius: 0.75rem;
  background: var(--surface-2);
  color: var(--accent);
}

.contact-icon svg {
  width: 1.1875rem;
  height: 1.1875rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.contact-copy {
  display: grid;
  min-width: 0;
  gap: 0.1875rem;
}

.contact-copy small {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.65625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-copy strong {
  overflow-wrap: anywhere;
  font-size: 0.9375rem;
  font-weight: 500;
}

.contact-arrow {
  width: 1rem;
  height: 1rem;
  color: var(--ink-3);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.625rem;
  padding: 1rem 0;
  border-block: 1px solid var(--line-soft);
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.8125rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: border-color 160ms ease, background 160ms ease;
}

.profile-link svg {
  width: 0.9375rem;
  height: 0.9375rem;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.profile-link:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--ink);
}

.gpg {
  padding-top: 1rem;
}

.gpg-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.65625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gpg code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.7;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4.5rem;
  padding-top: 1.125rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.71875rem;
}

.site-footer a {
  color: inherit;
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

@media (max-width: 56.25rem) {
  .shell {
    padding: 1.5rem 1.125rem 3rem;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.75rem;
    padding-top: 2.25rem;
  }

  .contact-card {
    position: static;
  }
}

@media (max-width: 35rem) {
  .profile {
    --diagram-anchor-x: 3.5rem;
    --diagram-anchor-y: 3.5rem;
  }

  .identity {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  .avatar-frame {
    width: 7rem;
    height: 7rem;
  }

  .identity-copy {
    padding: 0;
  }

  .intro h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
  }

  .topic {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.375rem;
  }

  .contact-card {
    padding: 1.125rem;
  }

  .site-footer {
    display: grid;
  }
}

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

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

  .avatar-frame::after {
    animation: none;
  }
}

@media print {
  .page-background,
  .site-controls {
    display: none;
  }

  .shell {
    max-width: none;
    padding: 0;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .contact-card {
    position: static;
    box-shadow: none;
  }
}
