@font-face {
  font-family: "Theater Bold";
  src: url("../fonts/Theater_Bold.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

:root {
  color-scheme: light;
  /* SF Pro на Apple-устройствах; fallback — system-ui */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", system-ui, sans-serif;
  --font-ui: var(--font-system);
  --font-name: "Theater Bold", sans-serif;

  /* iOS-like palette */
  --ios-bg-grouped: #f2f2f7;
  --ios-bg-page: #ffffff;
  --ios-bg-elevated: #fbfbfd;
  --ios-label: #1d1d1f;
  --ios-label-secondary: rgb(29 29 31 / 0.78);
  --ios-label-tertiary: rgb(60 60 67 / 0.3);
  --tool-tag-color: rgb(60 60 67 / 0.68);
  --tool-tag-weight: 500;
  --tool-tag-size: 11px;
  --tool-tag-size-compact: 10px;

  /* Unified typography scale */
  --text-title-size: 15px;
  --text-title-weight: 600;
  --text-title-line: 1.3;
  --text-title-tracking: -0.01em;
  --text-body-size: 15px;
  --text-body-weight: 400;
  --text-body-line: 1.47;
  --text-body-tracking: -0.01em;
  --text-eyebrow-size: 11px;
  --text-eyebrow-weight: 600;
  --text-eyebrow-line: 1.25;
  --text-eyebrow-tracking: 0.04em;
  --ios-separator: rgb(60 60 67 / 0.18);
  --ios-nav-frost: rgb(255 255 255 / 72%);

  --color-bg: var(--ios-bg-grouped);
  --footer-bg: var(--color-bg);
  --color-text: var(--ios-label);
  --color-text-muted: var(--ios-label-secondary);
  --color-text-strong: var(--ios-label);
  --color-link: var(--ios-label);
  --color-focus: #007aff;
  --color-divider: var(--ios-separator);
  --color-footer-muted: var(--ios-label-secondary);
  --hero-surface: var(--ios-bg-page);
  --hero-title: var(--ios-label);
  --color-about-bg: #4c6f57;
  --color-about-text: #f5f5f5;
  --lang-ink: var(--ios-label);
  --lang-ink-soft: var(--ios-label-secondary);
  --lang-line: var(--ios-separator);
  --lang-anchor: var(--ios-label);
  --lang-glow-rgb: 72, 168, 255;
  --lang-glow-soft-rgb: 100, 190, 255;
  --lang-anchor-inactive-opacity: 0.5;
  --role-card-border: rgba(255, 255, 255, 0.65);
  --role-chip-border: rgba(0, 0, 0, 0.06);
  --editorial-shadow: 0 10px 28px rgba(38, 32, 28, 0.08);
  --editorial-shadow-hover: 0 18px 40px rgba(38, 32, 28, 0.14);
  --editorial-radius-lg: 26px;
  --editorial-radius-md: 22px;
  --editorial-radius-sm: 18px;
  --editorial-frame-radius: 14px;
  --editorial-frame-bg: rgb(120 120 128 / 6%);
  --editorial-frame-border: inset 0 0 0 1px rgb(120 120 128 / 10%);
  --home-section-inline: clamp(28px, 6.5vw, 40px);
  --editorial-transition: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  --editorial-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

html,
body {
  overflow-x: hidden;
}

body {
  font-size: 17px;
  font-family: var(--font-ui);
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  scrollbar-width: none;
  -ms-overflow-style: none;
  transition:
    background-color 0.35s ease,
    color 0.35s ease;
}

body:not(.page-designer):not(.page-dev):not(.page-ml):not(.page-person) {
  --footer-bg: var(--ios-bg-page);
}

body::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  body {
    font-size: 15px;
    line-height: 1.5;
  }
}

button,
input,
textarea,
select {
  font-family: inherit;
}

/* Top Navigation Menu */
.top-navbar {
  width: 100%;
  background: var(--ios-nav-frost);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--ios-separator);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  min-height: 55px;
  box-sizing: border-box;
  z-index: 100;
  position: relative;
  font-size: inherit;
  color: var(--ios-label);
  transition:
    background-color 0.35s ease,
    color 0.35s ease;
}

.navbar-left {
  font-weight: 400;
  font-style: normal;
  font-size: inherit;
  letter-spacing: -0.01em;
  text-transform: none;
}

#nav-brand {
  margin-right: 0.35em;
  font-style: normal;
}

.navbar-copy {
  font-style: italic;
}

.navbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.navbar-cv-wrap {
  position: relative;
}

.navbar-cv {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

#languageSwitch {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: -0.01em;
  cursor: pointer;
  padding: 0;
  outline: none;
  text-transform: none;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

#languageSwitch:hover {
  opacity: 0.56;
}

/* Hero + роли: фиксированный первый экран, скролл = анимация карточек */
.hero-experience {
  --nav-h: 55px;
  --hero-viewport: calc(100svh - var(--nav-h));
  --hero-scroll-track: clamp(630px, 87vh, 900px);
  position: relative;
  height: calc(100svh + var(--hero-scroll-track));
  background-color: var(--hero-surface);
  transition: background-color 0.35s ease;
}

.hero-experience__pin {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100svh;
  overflow: visible;
  background-color: var(--hero-surface);
  transition: background-color 0.35s ease;
}

.hero-experience__pin .top-navbar--hero {
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  border-bottom: none;
}

.hero-experience.is-released .hero-experience__pin {
  position: absolute;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
}

.hero-experience__track {
  position: absolute;
  width: 0;
  height: var(--hero-scroll-track);
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

/* Hero — первый экран */
.hero-experience__pin .hero-intro {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.hero-intro {
  --nav-h: 55px;
  --hero-overlap: 0.52;
  --hero-photo-lift: clamp(0.5rem, 1.2vw, 1rem);
  --hero-title-lift: -5.5vh;
  --hero-headline-min-ratio: 0;
  --hero-photo-max-height: min(calc(100svh - 11rem), 620px);
  --hero-photo-width: min(42vw, 400px);
  min-height: 100%;
  height: 100%;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(20px, 4vh, 44px) clamp(16px, 4vw, 48px) clamp(20px, 4vh, 40px);
  margin: 0;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.hero-intro__stage {
  --hero-stage-max-width: 1140px;
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--hero-stage-max-width);
  margin-inline: auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  isolation: isolate;
  overflow: visible;
  container-type: inline-size;
  container-name: hero-stage;
}

.hero-intro .hero-intro__name {
  --hero-word-gap-tracking: -0.04em;
  --hero-word-inner-tracking: -0.05em;
  --hero-kt-letter-gap: 0.015em;
  margin: 0;
  padding: 0.06em 0 0;
  width: 100%;
  max-width: 100%;
  text-align: center;
  font-family: var(--font-name);
  font-weight: normal;
  line-height: 1.05;
  letter-spacing: normal;
  text-transform: none;
  color: var(--hero-title);
  font-synthesis: none;
  transform: translateY(var(--hero-title-lift));
  transition: color 0.35s ease;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  overflow: visible;
}

.hero-intro .hero-intro__title-line {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  white-space: nowrap;
  text-align: center;
  line-height: 1.05;
  letter-spacing: var(--hero-word-gap-tracking);
  padding-block: 0.04em;
}

.hero-intro .hero-word {
  letter-spacing: var(--hero-word-inner-tracking);
}

.hero-intro .hero-letter-gap-kt {
  margin-left: var(--hero-kt-letter-gap);
}

html:not(.hero-layout-ready) .hero-intro .hero-intro__name {
  z-index: 6;
}

html:not(.hero-layout-ready) .hero-intro .hero-intro__title-line {
  font-size: clamp(2.4rem, 11vw, 4.5rem);
}

html:not(.hero-layout-ready) .hero-intro__photo-wrap {
  visibility: hidden;
  pointer-events: none;
}

html.hero-layout-ready .hero-intro__photo-wrap {
  visibility: visible;
}

.hero-intro__photo-wrap {
  --hero-blink-photo-scale: 0.987;
  --hero-blink-photo-offset-y: 1%;
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  width: var(--hero-photo-width);
  max-width: 100%;
  max-height: var(--hero-photo-max-height);
  margin-top: calc(
    var(--hero-title-size, 4rem) * var(--hero-overlap) * -1 - 12px - var(--hero-photo-lift)
  );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
  user-select: none;
  line-height: 0;
  overflow: visible;
}

.hero-intro__photo-stack {
  position: relative;
  line-height: 0;
  max-width: 100%;
  max-height: var(--hero-photo-max-height);
  transform: scaleX(-1);
}

.hero-intro__photo {
  pointer-events: none;
  user-select: none;
}

.hero-intro__photo--open {
  display: block;
  position: relative;
  z-index: 0;
  width: auto;
  max-width: 100%;
  max-height: var(--hero-photo-max-height);
  height: auto;
  object-fit: contain;
  object-position: center bottom;
}

.hero-intro__photo--closed {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
  transform: translateY(var(--hero-blink-photo-offset-y)) scale(var(--hero-blink-photo-scale, 1));
  transform-origin: center bottom;
  opacity: 0;
  pointer-events: none;
}

.hero-intro__photo-wrap.is-blinking .hero-intro__photo--closed {
  opacity: 1;
}

/* ——— Роли на первом экране ——— */
.roles-nav--hero {
  --hero-card-stack-base: clamp(10px, 2.6vh, 24px);
  --hero-card-stack-touch: clamp(148px, 22vh, 248px);
  --hero-thought-title-lap: clamp(32px, 6vh, 56px);
  --hero-thought-upper-lift: clamp(28px, 5vh, 48px);
  /* ~30% высоты верхних облаков — опускаем дизайнер / ML */
  --hero-thought-upper-drop: clamp(52px, 7cqi, 80px);
  --hero-cloud-lower: 0px;
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  pointer-events: none;
}

.roles-nav--hero .role-card {
  position: absolute;
  pointer-events: auto;
  width: clamp(212px, 54vw, 348px);
  min-height: clamp(96px, 13vh, 122px);
  padding: clamp(18px, 3.2vw, 24px) clamp(22px, 4.5vw, 34px);
  gap: 14px;
  z-index: 2;
  opacity: 0;
}

.roles-nav--hero .role-card--scroll-settled {
  opacity: 1;
}

.roles-nav--hero .role-card__label {
  font-size: clamp(1.12rem, 3.2vw, 1.48rem);
  line-height: 1.08;
  max-width: 20ch;
}

html[lang="en"] .roles-nav--hero .role-card__label {
  max-width: 24ch;
  font-size: clamp(1.05rem, 2.9vw, 1.38rem);
}

.roles-nav--hero .role-card__chip {
  width: 2.55rem;
  height: 2.55rem;
  font-size: 1.1rem;
}

/* Облачко-кнопки (thought1–4) */
.roles-nav--hero .role-card--thought {
  --thought-bubble-scale: 0.9;
  --thought-pad-top: 25%;
  --thought-pad-bottom: 32%;
  --thought-pad-tail: 23%;
  --thought-pad-side: 12%;
  --thought-pad-text-left: 18%;
  --thought-chip-size: clamp(
    calc(2.5rem * var(--thought-bubble-scale)),
    calc(5.5cqi * var(--thought-bubble-scale)),
    calc(3rem * var(--thought-bubble-scale))
  );
  --thought-gap: clamp(
    calc(10px * var(--thought-bubble-scale)),
    calc(2cqi * var(--thought-bubble-scale)),
    calc(14px * var(--thought-bubble-scale))
  );
  position: absolute;
  display: block;
  width: clamp(
    calc(228px * var(--thought-bubble-scale)),
    calc(40cqi * var(--thought-bubble-scale)),
    calc(400px * var(--thought-bubble-scale))
  );
  min-height: 0;
  height: auto;
  padding: 0;
  gap: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  --thought-nudge-x: 0%;
  --thought-nudge-y: 0%;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.roles-nav--hero .role-card--thought:not(.role-card--scroll-anim) {
  transform: translate(var(--thought-nudge-x), var(--thought-nudge-y))
    translateY(var(--role-lift)) rotate(var(--role-rotate));
}

.roles-nav--hero .role-card__thought-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.roles-nav--hero .role-card__thought-body {
  position: absolute;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--thought-chip-size);
  align-items: center;
  column-gap: var(--thought-gap);
  justify-items: stretch;
  pointer-events: none;
}

.roles-nav--hero .role-card--designer.role-card--thought .role-card__thought-body,
.roles-nav--hero .role-card--ml.role-card--thought .role-card__thought-body {
  inset: var(--thought-pad-top) var(--thought-pad-side) var(--thought-pad-bottom)
    var(--thought-pad-text-left);
}

.roles-nav--hero .role-card--frontend.role-card--thought .role-card__thought-body,
.roles-nav--hero .role-card--person.role-card--thought .role-card__thought-body {
  inset: var(--thought-pad-top) var(--thought-pad-tail) var(--thought-pad-bottom)
    var(--thought-pad-text-left);
}

.roles-nav--hero .role-card--thought .role-card__label,
.roles-nav--hero .role-card--thought .role-card__chip {
  pointer-events: none;
}

@media (min-width: 720px) {
  .roles-nav--hero .role-card--thought:hover {
    box-shadow: none;
    filter: brightness(1.08);
  }
}

.roles-nav--hero .role-card--thought .role-card__label {
  justify-self: start;
  width: auto;
  max-width: 100%;
  text-align: left;
  line-height: 1.1;
  font-size: clamp(1.28rem, 3.6cqi, 1.78rem);
  color: #000000;
  text-shadow: none;
}

.roles-nav--hero .role-card--ml.role-card--thought .role-card__label,
.roles-nav--hero .role-card--frontend.role-card--thought .role-card__label {
  max-width: 15ch;
}

html[lang="en"] .roles-nav--hero .role-card--ml.role-card--thought .role-card__label,
html[lang="en"] .roles-nav--hero .role-card--frontend.role-card--thought .role-card__label {
  max-width: 19ch;
}

html[lang="en"] .roles-nav--hero .role-card--thought .role-card__label {
  font-size: clamp(1.14rem, 3.1cqi, 1.58rem);
}

.roles-nav--hero .role-card--thought .role-card__chip {
  justify-self: end;
  width: var(--thought-chip-size);
  height: var(--thought-chip-size);
  min-width: var(--thought-chip-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  font-size: 1.15rem;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #000000;
}

.roles-nav--hero .role-card--designer {
  --thought-nudge-x: 10%;
  --thought-nudge-y: -5%;
  left: clamp(-24px, -5%, -8px);
  right: auto;
  top: auto;
  bottom: calc(
    var(--hero-card-stack-base) + var(--hero-card-stack-touch) - 4px +
      var(--hero-thought-title-lap) + var(--hero-thought-upper-lift) -
      var(--hero-thought-upper-drop) - var(--hero-cloud-lower)
  );
  z-index: 2;
  transform-origin: left bottom;
}

.roles-nav--hero .role-card--frontend {
  --thought-nudge-x: -10%;
  --thought-nudge-y: -5%;
  right: clamp(-24px, -5%, -8px);
  left: auto;
  top: auto;
  bottom: calc(
    var(--hero-card-stack-base) + var(--hero-card-stack-touch) - 4px +
      var(--hero-thought-title-lap) + var(--hero-thought-upper-lift) -
      var(--hero-thought-upper-drop) - var(--hero-cloud-lower)
  );
  z-index: 3;
  transform-origin: right bottom;
}

.roles-nav--hero .role-card--ml {
  --thought-nudge-x: -10%;
  left: clamp(4px, 2%, 18px);
  top: auto;
  bottom: calc(var(--hero-card-stack-base) + var(--hero-thought-title-lap) - var(--hero-cloud-lower));
  z-index: 4;
  transform-origin: left bottom;
}

.roles-nav--hero .role-card--person {
  --thought-nudge-x: 10%;
  --thought-nudge-y: 0%;
  right: clamp(4px, 2%, 18px);
  left: auto;
  top: auto;
  bottom: calc(var(--hero-card-stack-base) + var(--hero-thought-title-lap) - var(--hero-cloud-lower));
  z-index: 5;
  transform-origin: right bottom;
}

/* ——— Hero: телефоны ——— */
@media (max-width: 719px) {
  .hero-experience {
    height: auto;
    background-color: var(--hero-surface);
  }

  .hero-experience__pin {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    height: 100svh;
    z-index: 2;
    background-color: var(--hero-surface);
  }

  .hero-experience.is-released .hero-experience__pin {
    position: relative;
    top: auto;
    bottom: auto;
  }

  .hero-experience__track {
    display: none;
  }

  .hero-experience__clouds {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    height: auto;
    z-index: 1;
    pointer-events: auto;
    background-color: transparent;
    padding: 0;
  }

  .hero-experience__clouds-pin {
    position: relative;
    top: auto;
    height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: visible;
    pointer-events: auto;
    background-color: var(--hero-surface);
    padding: clamp(16px, 4vh, 28px) var(--hero-mobile-inset, 16px)
      clamp(24px, 6vh, 40px);
    z-index: 3;
  }

  .hero-experience__clouds.is-pinned .hero-experience__clouds-pin {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateZ(0);
  }

  .hero-experience__clouds.is-released .hero-experience__clouds-pin {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
  }

  .hero-experience__clouds-track {
    display: block;
    height: var(--hero-clouds-scroll-track, 240px);
    pointer-events: none;
    visibility: hidden;
  }

  .hero-experience__pin .hero-intro {
    flex: 1 1 auto;
    min-height: calc(100svh - var(--nav-h, 55px));
  }

  .hero-intro {
    --hero-overlap: 0;
    --hero-title-lift: 0;
    --hero-photo-lift: 0;
    --hero-mobile-inset: clamp(12px, 4vw, 20px);
    --hero-mobile-nav-gap: clamp(14px, 3.5vh, 24px);
    --hero-mobile-photo-vh: 0.45;
    --hero-photo-max-height: min(45svh, 380px);
    padding: var(--hero-mobile-nav-gap) var(--hero-mobile-inset) 0;
    justify-content: flex-start;
  }

  .hero-intro__stage {
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: minmax(0, 1fr);
    align-content: stretch;
    justify-items: stretch;
    max-width: none;
  }

  .hero-intro .hero-intro__name {
    display: contents;
    transform: none;
    padding: 0;
    width: 100%;
    line-height: 0.88;
  }

  .hero-intro .hero-intro__title-line {
    display: block;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
    white-space: nowrap;
    text-align: center;
    line-height: 0.88;
    padding-block: 0;
    position: relative;
    z-index: 2;
  }

  .hero-intro .hero-intro__title-line:first-child {
    grid-row: 1;
    grid-column: 1;
    align-self: start;
  }

  .hero-intro .hero-intro__title-line:last-child {
    grid-row: 3;
    grid-column: 1;
    align-self: end;
  }

  .hero-intro .hero-intro__title-line + .hero-intro__title-line {
    margin-top: 0;
  }

  .hero-intro .hero-intro__title-line + .hero-intro__title-line::before {
    content: none;
  }

  .hero-intro__photo-wrap {
    grid-row: 1 / -1;
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    justify-self: center;
    flex: none;
    min-height: 0;
    width: auto;
    max-width: min(78vw, 340px);
    margin: 0;
    z-index: 5;
    overflow: hidden;
  }

  .hero-intro__photo-stack {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: var(--hero-photo-max-height);
    line-height: 0;
  }

  .hero-intro__photo--open {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: var(--hero-photo-max-height);
    object-fit: contain;
    object-position: center bottom;
  }

  .hero-experience__clouds .roles-nav--hero {
    --hero-mobile-cloud-label-size: 15px;
    --hero-mobile-cloud-chip-font-size: 14px;
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 100%;
    display: block;
    margin: 0;
    pointer-events: auto;
    z-index: 1;
  }

  .hero-experience__clouds .roles-nav--hero .role-card {
    position: absolute;
    left: 0;
    right: 0;
    margin-inline: auto;
    opacity: 0;
    display: block;
    min-height: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    gap: 0;
    --role-rotate: 0deg;
    --thought-nudge-x: 0%;
    --thought-nudge-y: 0%;
  }

  .hero-experience__clouds .roles-nav--hero .role-card--scroll-anim {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transition: none;
  }

  .hero-experience__clouds .roles-nav--hero .role-card--scroll-settled {
    will-change: auto;
  }

  .hero-experience__clouds .roles-nav--hero .role-card--thought {
    --thought-bubble-scale: var(--hero-mobile-cloud-scale, 0.792);
    --hero-mobile-cloud-text-scale: 1.28;
    --thought-pad-top: 25%;
    --thought-pad-bottom: 32%;
    --thought-pad-tail: 23%;
    --thought-pad-side: 12%;
    --thought-pad-text-left: 18%;
    --thought-chip-size: clamp(
      calc(2.5rem * var(--thought-bubble-scale) * var(--hero-mobile-cloud-text-scale)),
      calc(7.03cqi * var(--thought-bubble-scale)),
      calc(3rem * var(--thought-bubble-scale) * var(--hero-mobile-cloud-text-scale))
    );
    container-type: inline-size;
    container-name: hero-mobile-cloud;
    display: block;
    width: min(94%, calc(400px * var(--thought-bubble-scale)));
    max-width: 94%;
    height: auto;
    padding: 0;
    line-height: 0;
    transform-origin: top center;
  }

  .hero-experience__clouds .roles-nav--hero .role-card__thought-shell {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0;
  }

  .hero-experience__clouds .roles-nav--hero .role-card__thought-shell .role-card__thought-img {
    display: block;
    width: 100%;
    height: auto;
  }

  .hero-experience__clouds .roles-nav--hero .role-card__thought-shell .role-card__thought-body {
    position: absolute;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--thought-chip-size);
    align-items: center;
    column-gap: var(--thought-gap);
    justify-items: stretch;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    pointer-events: none;
    line-height: 1.1;
  }

  .hero-experience__clouds .roles-nav--hero .role-card--designer.role-card--thought .role-card__thought-shell .role-card__thought-body,
  .hero-experience__clouds .roles-nav--hero .role-card--ml.role-card--thought .role-card__thought-shell .role-card__thought-body {
    inset: var(--thought-pad-top) var(--thought-pad-side) var(--thought-pad-bottom)
      var(--thought-pad-text-left);
  }

  .hero-experience__clouds .roles-nav--hero .role-card--frontend.role-card--thought .role-card__thought-shell .role-card__thought-body,
  .hero-experience__clouds .roles-nav--hero .role-card--person.role-card--thought .role-card__thought-shell .role-card__thought-body {
    inset: var(--thought-pad-top) var(--thought-pad-tail) var(--thought-pad-bottom)
      var(--thought-pad-text-left);
  }

  .hero-experience__clouds .roles-nav--hero .role-card--thought .role-card__label {
    flex: none;
    justify-self: start;
    min-width: 0;
    max-width: none;
    justify-self: auto;
    font-size: var(--hero-mobile-cloud-label-size, 15px);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--ios-label-secondary);
  }

  html[lang="en"] .hero-experience__clouds .roles-nav--hero .role-card--thought .role-card__label {
    font-size: var(--hero-mobile-cloud-label-size, 15px);
    max-width: none;
  }

  .hero-experience__clouds .roles-nav--hero .role-card--thought .role-card__chip {
    flex: none;
    justify-self: end;
    font-size: var(--hero-mobile-cloud-chip-font-size, 14px);
    font-weight: 400;
    letter-spacing: -0.01em;
  }

  .hero-experience__clouds .roles-nav--hero .role-card--ml.role-card--thought .role-card__label,
  .hero-experience__clouds .roles-nav--hero .role-card--frontend.role-card--thought .role-card__label {
    max-width: none;
  }

  html[lang="en"] .hero-experience__clouds .roles-nav--hero .role-card--ml.role-card--thought .role-card__label,
  html[lang="en"] .hero-experience__clouds .roles-nav--hero .role-card--frontend.role-card--thought .role-card__label {
    max-width: none;
  }

  .hero-experience__clouds .roles-nav--hero .role-card--thought:not(.role-card--scroll-anim) {
    transform: none;
  }

  .hero-experience__clouds .roles-nav--hero .role-card + .role-card {
    margin-top: 0;
  }

  .hero-experience__clouds .roles-nav--hero .role-card--designer,
  .hero-experience__clouds .roles-nav--hero .role-card--frontend,
  .hero-experience__clouds .roles-nav--hero .role-card--ml,
  .hero-experience__clouds .roles-nav--hero .role-card--person {
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
  }

  .roles-nav--hero .role-card--thought {
    -webkit-tap-highlight-color: transparent;
    transition: filter 0.14s ease, opacity 0.2s ease;
  }

  .roles-nav--hero .role-card--thought:active {
    filter: brightness(1.08);
  }
}


@media (min-width: 720px) {
  .hero-experience__clouds {
    display: none;
  }
}

.roles-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

.role-card {
  --role-rotate: 0deg;
  --role-lift: 0px;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
  padding: clamp(16px, 3vw, 22px) clamp(18px, 3.5vw, 26px);
  border-radius: var(--editorial-radius-lg);
  border: 1px solid var(--role-card-border);
  box-shadow: var(--editorial-shadow);
  text-decoration: none;
  color: inherit;
  transform: translateY(var(--role-lift)) rotate(var(--role-rotate));
  transition:
    transform var(--editorial-transition),
    box-shadow var(--editorial-transition),
    color var(--editorial-transition),
    opacity 0.2s ease;
}

.role-card--scroll-anim {
  transition: none;
  will-change: transform, opacity;
  transform-origin: center center;
}

@media (min-width: 720px) {
  .roles-nav--hero .role-card--scroll-anim:not(.role-card--scroll-settled) {
    z-index: 2 !important;
    transform-origin: center center;
  }
}

.role-card--scroll-settled {
  will-change: auto;
}

.roles-nav--hero .role-card--scroll-settled {
  will-change: auto;
}

.role-card:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

@media (min-width: 720px) {
  .role-card:hover {
    --role-lift: -5px;
    box-shadow: var(--editorial-shadow-hover);
    color: var(--color-text-strong);
  }

  .roles-nav--hero .role-card--scroll-anim:hover {
    --role-lift: 0px;
  }

  .role-card:hover .role-card__chip {
    transform: translateX(3px);
  }
}

.role-card--designer {
  --role-rotate: -2.6deg;
  background: linear-gradient(145deg, #fff9f2 0%, #f5e8dc 100%);
  color: #2a221c;
}

.role-card--ml.role-card--thought,
.role-card--person.role-card--thought,
.role-card--designer.role-card--thought,
.role-card--frontend.role-card--thought {
  background: transparent;
}

.role-card--frontend {
  --role-rotate: 2.4deg;
  background: linear-gradient(145deg, #f6faf2 0%, #e4eddf 100%);
  color: #1e261e;
}

.role-card--ml {
  --role-rotate: -1.9deg;
  background: linear-gradient(145deg, #faf7fc 0%, #ebe4f0 100%);
  color: #242028;
}

.role-card--person {
  --role-rotate: 2.2deg;
  background: linear-gradient(145deg, #fff6f3 0%, #f0e6e1 100%);
  color: #2c2220;
}

.role-card__label {
  font-size: clamp(1.2rem, 3.4vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-align: left;
  text-transform: lowercase;
  text-decoration: none;
  max-width: 16ch;
}

.role-card__chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid var(--role-chip-border);
  transition: transform var(--editorial-transition);
}

.role-card--designer .role-card__chip {
  background: #2a221c;
  color: #fff8f2;
}

.role-card--frontend .role-card__chip {
  background: #3d5340;
  color: #f4faf2;
}

.role-card--ml .role-card__chip {
  background: rgba(36, 32, 40, 0.12);
  color: #342c3a;
}

.role-card--person .role-card__chip {
  background: #3d3230;
  color: #fff7f4;
}

@media (min-width: 720px) {
  .roles-nav--hero {
    --hero-card-stack-base: clamp(14px, 3.2vh, 30px);
    --hero-card-stack-touch: clamp(168px, 23.5vh, 272px);
    --hero-thought-title-lap: clamp(40px, 6.5vh, 68px);
    --hero-thought-upper-lift: clamp(32px, 5.5vh, 56px);
    --hero-thought-upper-drop: clamp(64px, 7.5cqi, 88px);
  }

  .roles-nav--hero .role-card {
    width: clamp(248px, 36cqi, 420px);
    min-height: clamp(104px, 14vh, 132px);
    padding: clamp(20px, 2.4cqi, 26px) clamp(26px, 3.2cqi, 38px);
    gap: 16px;
  }

  .roles-nav--hero .role-card__label {
    font-size: clamp(1.22rem, 2.2cqi, 1.58rem);
    max-width: 22ch;
  }

  html[lang="en"] .roles-nav--hero .role-card__label {
    max-width: 26ch;
    font-size: clamp(1.14rem, 2cqi, 1.48rem);
  }

  .roles-nav--hero .role-card__chip {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1.15rem;
  }

  .roles-nav--hero .role-card--thought {
    --thought-bubble-scale: 1;
    --thought-pad-top: 24%;
    --thought-pad-bottom: 31%;
    --thought-pad-tail: 22%;
    --thought-pad-side: 11%;
    --thought-pad-text-left: 17%;
    --thought-chip-size: calc(2.85rem * var(--thought-bubble-scale));
    width: clamp(
      calc(268px * var(--thought-bubble-scale)),
      calc(38cqi * var(--thought-bubble-scale)),
      calc(440px * var(--thought-bubble-scale))
    );
    min-height: 0;
    padding: 0;
    gap: 0;
  }

  .roles-nav--hero .role-card--thought .role-card__label {
    font-size: clamp(1.34rem, 2.5cqi, 1.82rem);
  }

  html[lang="en"] .roles-nav--hero .role-card--thought .role-card__label {
    font-size: clamp(1.26rem, 2.3cqi, 1.72rem);
  }

  .roles-nav--hero .role-card--thought .role-card__chip {
    font-size: 1.25rem;
  }

  .roles-nav--hero .role-card--designer {
    left: clamp(-32px, -4.5%, -10px);
    bottom: calc(
      var(--hero-card-stack-base) + var(--hero-card-stack-touch) + 2px +
        var(--hero-thought-title-lap) + var(--hero-thought-upper-lift) -
        var(--hero-thought-upper-drop) - var(--hero-cloud-lower)
    );
    z-index: 2;
  }

  .roles-nav--hero .role-card--frontend {
    right: clamp(-32px, -4.5%, -10px);
    bottom: calc(
      var(--hero-card-stack-base) + var(--hero-card-stack-touch) + 2px +
        var(--hero-thought-title-lap) + var(--hero-thought-upper-lift) -
        var(--hero-thought-upper-drop) - var(--hero-cloud-lower)
    );
    z-index: 3;
  }

  .roles-nav--hero .role-card--ml {
    left: clamp(8px, 3.5%, 40px);
    bottom: calc(var(--hero-card-stack-base) + var(--hero-thought-title-lap) - var(--hero-cloud-lower));
    z-index: 4;
  }

  .roles-nav--hero .role-card--person {
    right: clamp(8px, 3.5%, 40px);
    bottom: calc(var(--hero-card-stack-base) + var(--hero-thought-title-lap) - var(--hero-cloud-lower));
    z-index: 5;
  }
}

@media (min-width: 720px) and (max-width: 1399px) {
  .roles-nav--hero {
    --hero-cloud-lower: 52px;
  }
}

@media (min-width: 1400px) {
  /* верхние облака — designer (слева) и ML (справа, класс --frontend) */
  .roles-nav--hero .role-card--designer {
    left: clamp(-88px, -17%, -32px);
    --thought-nudge-x: 2%;
    --thought-nudge-y: -5%;
  }

  .roles-nav--hero .role-card--frontend {
    right: clamp(-88px, -17%, -32px);
    --thought-nudge-x: -2%;
    --thought-nudge-y: -5%;
  }

  .roles-nav--hero .role-card--ml {
    left: clamp(-16px, -1.5%, 14px);
    --thought-nudge-x: -14%;
  }

  .roles-nav--hero .role-card--person {
    right: clamp(-16px, -1.5%, 14px);
    --thought-nudge-x: 14%;
  }
}

@media (min-width: 1600px) and (min-height: 880px) {
  .hero-intro {
    --hero-headline-min-ratio: 0.7;
  }

  .hero-intro .hero-intro__title-line {
    max-width: none;
  }

  .roles-nav--hero .role-card--thought {
    --thought-bubble-scale: 1.08;
    width: clamp(
      calc(288px * var(--thought-bubble-scale)),
      calc(42cqi * var(--thought-bubble-scale)),
      calc(480px * var(--thought-bubble-scale))
    );
  }

  .roles-nav--hero .role-card--thought .role-card__label {
    font-size: clamp(1.42rem, 2.75cqi, 1.95rem);
  }

  html[lang="en"] .roles-nav--hero .role-card--thought .role-card__label {
    font-size: clamp(1.34rem, 2.55cqi, 1.86rem);
  }

  .roles-nav--hero .role-card--designer {
    left: clamp(-156px, -31%, -56px);
    --thought-nudge-x: -6%;
  }

  .roles-nav--hero .role-card--frontend {
    right: clamp(-156px, -31%, -56px);
    --thought-nudge-x: 6%;
  }

  .roles-nav--hero .role-card--ml {
    left: clamp(-72px, -14%, -12px);
    --thought-nudge-x: -22%;
  }

  .roles-nav--hero .role-card--person {
    right: clamp(-72px, -14%, -12px);
    --thought-nudge-x: 22%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-experience {
    height: auto;
  }

  .hero-experience__pin {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    display: block;
    height: auto;
    min-height: 100svh;
  }

  .hero-experience__pin .hero-intro {
    flex: none;
    min-height: var(--hero-viewport);
  }

  .hero-experience__track {
    display: none;
  }

  @media (max-width: 719px) {
    .hero-experience__clouds {
      position: relative;
      top: auto;
      bottom: auto;
      height: auto;
      pointer-events: auto;
    }

    .hero-experience__clouds-pin .roles-nav--hero .role-card,
    .hero-experience__clouds-pin .roles-nav--hero .role-card--scroll-settled {
      opacity: 1;
      transform: none;
    }
  }

  .roles-nav--hero .role-card,
  .roles-nav--hero .role-card--scroll-settled {
    opacity: 1;
  }
}

.navbar-home {
  color: inherit;
  text-decoration: none;
  font-style: italic;
}

.navbar-home:hover {
  text-decoration: underline;
}

.navbar-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
  min-width: 2rem;
  min-height: 2rem;
  margin-left: -4px;
  transition: opacity 0.2s ease;
}

.navbar-back__icon {
  font-size: 1.45rem;
  line-height: 1;
  transform: translateY(-0.04em);
}

.navbar-back:hover {
  opacity: 0.55;
}

.navbar-back:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.subpage-main {
  padding-top: 8px;
}

body:has(.top-navbar--subpage):not(.page-designer) {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

body:has(.top-navbar--subpage):not(.page-designer) .subpage-main {
  flex: 1 1 auto;
  min-height: 0;
}

body:has(.top-navbar--subpage):not(.page-designer) .footer {
  flex-shrink: 0;
}

.subpage-main--designer {
  --designer-nav-h: 55px;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  box-sizing: border-box;
}

/* ——— Designer page: Apple-style chrome (не карточки) ——— */
body.page-designer {
  background: var(--ios-bg-elevated);
  color: var(--ios-label);
  --footer-bg: var(--ios-bg-elevated);
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
}

body.page-designer .top-navbar--subpage {
  background: var(--ios-nav-frost);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--ios-separator);
}

body.page-designer .navbar-back:hover {
  opacity: 0.62;
}

.designer-tools-wrap {
  position: absolute;
  top: clamp(10px, 1.8vh, 18px);
  left: clamp(16px, 3vw, 32px);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.designer-tools__label {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ios-label-secondary);
}

.designer-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.designer-tools__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0;
}

.role-page {
  padding: 8px 20px 80px;
  text-align: center;
}

.role-page__title {
  margin: 0 0 16px;
}

.role-page__placeholder {
  margin: 0;
  color: var(--color-text-muted);
}

/* ——— Projects: веер полупрозрачных плоских панелей ——— */
.projects-section {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 30px;
  overflow: visible;
}

.projects-scene {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.projects-stack {
  position: absolute;
  top: clamp(104px, 17vh, 156px);
  right: var(--panel-scene-pad, 24px);
  bottom: 10px;
  left: var(--panel-scene-pad, 24px);
}

.project-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  line-height: normal;
  cursor: pointer;
  opacity: 1;
  z-index: var(--panel-z, 1);
  transform: translateY(0);
  transform-origin: left bottom;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-panel:hover,
.project-panel:focus-visible {
  transform: translateY(-10px);
}

.project-panel--pending {
  visibility: hidden;
}

.project-panel__stack {
  position: relative;
  display: block;
  width: 100%;
  transform: skewY(var(--panel-skew, 5deg));
  transform-origin: left bottom;
}

.project-panel__card {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
  --card-depth: clamp(2px, 0.22vw, 3px);
  --bevel-cap: max(1px, calc(var(--card-depth) * tan(var(--panel-skew, 5deg))));
  --bevel-top-gradient: linear-gradient(90deg, rgb(176 168 160), rgb(152 144 136));
  --bevel-side-gradient: linear-gradient(180deg, rgb(172 164 156), rgb(148 140 132));
  --bevel-corner: rgb(142 134 126);
  filter: drop-shadow(0 1px 1px rgba(38, 32, 28, 0.05))
    drop-shadow(0 2px 5px rgba(38, 32, 28, 0.04));
}

/* единая L-форма: верх + бок + скошенный уголок в одном контуре */
.project-panel__bevel {
  position: absolute;
  top: calc(-1 * var(--card-depth));
  left: 0;
  width: calc(100% + var(--card-depth));
  height: calc(100% + var(--card-depth));
  pointer-events: none;
  z-index: 2;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--bevel-cap)),
    calc(100% - var(--card-depth)) 100%,
    calc(100% - var(--card-depth)) var(--card-depth),
    0 var(--card-depth),
    var(--bevel-cap) 0
  );
  background:
    var(--bevel-top-gradient) 0 0 / 100% var(--card-depth) no-repeat,
    var(--bevel-side-gradient) 100% 0 / var(--card-depth) 100% no-repeat,
    var(--bevel-corner);
}

.project-panel__surface {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);
  background: transparent;
  vertical-align: top;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(
    ellipse 96% 94% at 50% 50%,
    rgb(0 0 0 / 100%) 56%,
    rgb(0 0 0 / 100%) 70%,
    rgb(0 0 0 / 76%) 86%,
    rgb(0 0 0 / 52%) 100%
  );
  mask-image: radial-gradient(
    ellipse 96% 94% at 50% 50%,
    rgb(0 0 0 / 100%) 56%,
    rgb(0 0 0 / 100%) 70%,
    rgb(0 0 0 / 76%) 86%,
    rgb(0 0 0 / 52%) 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.project-panel__caption {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 5;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--editorial-radius-sm);
  background: rgb(245 245 245 / 72%);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  box-shadow: var(--editorial-shadow);
  box-sizing: border-box;
  color: var(--color-text);
  text-align: left;
  opacity: 0;
  transform: skewY(var(--panel-skew, 5deg)) translateY(8px);
  transform-origin: left bottom;
  pointer-events: none;
  line-height: 1.35;
  transition:
    opacity var(--editorial-transition),
    transform var(--editorial-transition);
}

.project-panel__caption-title {
  margin: 0 0 6px;
  font-size: var(--tool-tag-size);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--color-text-strong);
}

.project-panel__caption-desc {
  margin: 0;
  font-size: var(--tool-tag-size);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.4;
  text-transform: none;
  color: var(--color-text-muted);
}

.project-panel__caption-meta {
  margin: -2px 0 6px;
  font-size: var(--text-eyebrow-size);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.project-overlay__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 0;
  margin: 14px 0 0;
}

.project-panel__caption-link {
  display: inline-flex;
  margin-top: 8px;
  pointer-events: auto;
  color: var(--color-text-strong);
  font-size: 11px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.005em;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-panel__caption-link:hover {
  opacity: 0.72;
}

.project-overlay__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.project-overlay__actions[hidden] {
  display: none;
}

.project-panel:hover .project-panel__caption,
.project-panel:focus-visible .project-panel__caption {
  opacity: 1;
  transform: skewY(var(--panel-skew, 5deg)) translateY(0);
}

/* ——— Projects: мобильный вертикальный стек ——— */
@media (max-width: 719px) {
  html:has(body.page-designer),
  body.page-designer {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.page-designer .footer {
    flex-shrink: 0;
  }

  .subpage-main--designer {
    flex: 1 0 auto;
    overflow: visible;
    min-height: 0;
  }

  .projects-section {
    height: auto;
    min-height: 0;
    padding: 0 0 12px;
    overflow: visible;
  }

  .designer-tools-wrap {
    left: clamp(16px, 4vw, 24px);
    right: clamp(16px, 4vw, 24px);
    width: auto;
    max-width: none;
    box-sizing: border-box;
  }

  .designer-tools {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .projects-scene {
    flex: none;
    min-height: 0;
    overflow: visible;
  }

  .projects-stack--mobile {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: 0;
    width: 100%;
    margin-top: clamp(84px, 21vw, 112px);
    padding: 0 clamp(16px, 4vw, 24px) 12px;
    box-sizing: border-box;
  }

  .projects-stack--mobile .project-panel {
    top: 0;
    bottom: auto;
    z-index: var(--panel-z, 1);
    transform: none;
    transform-style: flat;
    pointer-events: none;
  }

  .projects-stack--mobile .project-panel:hover,
  .projects-stack--mobile .project-panel:focus-within,
  .projects-stack--mobile .project-panel:focus-visible {
    transform: none;
  }

  .projects-stack--mobile .project-panel__stack {
    position: relative;
    z-index: 1;
    height: 100%;
    cursor: pointer;
    pointer-events: auto;
    transform: perspective(900px) rotateX(calc(-1 * var(--panel-tilt-x, 55deg))) translateZ(0);
    transform-origin: 50% 100%;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }

  .projects-stack--mobile .project-panel.is-preview-open .project-panel__stack {
    transform: perspective(900px) rotateX(calc(-1 * var(--panel-tilt-x, 55deg)))
      translate3d(0, -8px, 0);
  }

  .projects-stack--mobile .project-panel__card {
    --card-depth: 4px;
    height: 100%;
    overflow: visible;
    filter: none;
    transform-style: preserve-3d;
  }

  .projects-stack--mobile .project-panel__surface {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .projects-stack--mobile .project-panel__bevel {
    transform: translateZ(1px);
    backface-visibility: hidden;
    top: calc(-1 * var(--card-depth));
    left: 0;
    width: 100%;
    height: var(--card-depth);
    clip-path: none;
    background: var(--bevel-top-gradient);
  }

  .designer-tools {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .designer-tools__row {
    display: contents;
  }

  .projects-stack--mobile .project-panel__caption {
    left: 0;
    right: auto;
    width: 100%;
    max-width: none;
    bottom: auto;
    margin: 0;
    padding: 10px 12px;
    z-index: 2;
    text-align: left;
    pointer-events: none;
    transform-origin: center bottom;
    opacity: 0;
  }

  .projects-stack--mobile .project-panel__caption--elevated {
    position: fixed;
    right: auto;
    margin: 0;
    z-index: 2000;
    text-align: left;
    pointer-events: none;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(8px);
    transform-origin: center bottom;
    will-change: opacity, transform;
    transition:
      opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .projects-stack--mobile .project-panel__caption--elevated.is-caption-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .projects-stack--mobile .project-panel:hover:not(.is-preview-open) .project-panel__caption,
  .projects-stack--mobile .project-panel:focus-visible:not(.is-preview-open) .project-panel__caption,
  .projects-stack--mobile .project-panel:focus-within:not(.is-preview-open) .project-panel__caption {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-panel,
  .project-panel__stack,
  .project-panel__card,
  .project-panel__bevel,
  .project-panel__surface,
  .project-panel__caption {
    transition: none;
  }

  .projects-stack--mobile .project-panel.is-preview-open .project-panel__stack {
    transform: perspective(900px) rotateX(calc(-1 * var(--panel-tilt-x, 55deg)))
      translateY(-8px);
  }

  .project-panel:hover .project-panel__caption,
  .project-panel:focus-visible .project-panel__caption {
    transform: skewY(var(--panel-skew, 5deg)) translateY(0);
  }
}

/* ——— Project overlay (Apple sheet) ——— */
body.is-project-overlay-open {
  overflow: hidden;
}

.project-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 32px);
  box-sizing: border-box;
}

.project-overlay[hidden] {
  display: none;
}

.project-overlay__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(0 0 0 / 5%);
  backdrop-filter: blur(4px) saturate(110%);
  -webkit-backdrop-filter: blur(4px) saturate(110%);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-overlay.is-open .project-overlay__backdrop {
  opacity: 1;
}

.project-overlay__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: calc(100svh - clamp(32px, 6vw, 64px));
  border: 0.5px solid rgb(255 255 255 / 52%);
  border-radius: 12px;
  background: rgb(255 255 255 / 58%);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  box-shadow:
    0 0 0 0.5px rgb(0 0 0 / 4%),
    0 16px 48px rgb(0 0 0 / 7%);
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--color-text);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-overlay.is-open .project-overlay__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-overlay__close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--color-text-muted);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.project-overlay__close:hover,
.project-overlay__close:focus-visible {
  background: none;
  color: var(--color-text-strong);
}

.project-overlay__scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  padding:
    clamp(20px, 3vw, 28px)
    clamp(16px, 3vw, 24px)
    clamp(24px, 4vw, 32px);
  scrollbar-width: thin;
  scrollbar-color: rgb(0 0 0 / 10%) transparent;
}

.project-overlay__scroll::-webkit-scrollbar {
  width: 2px;
}

.project-overlay__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.project-overlay__scroll::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 8%);
  border-radius: 999px;
}

.project-overlay__scroll::-webkit-scrollbar-thumb:hover {
  background: rgb(0 0 0 / 14%);
}

.project-overlay__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-right: 36px;
}

.project-overlay__title {
  margin: 0;
  padding-right: 0;
  font-family: inherit;
}

body.page-designer .project-overlay__title {
  text-transform: uppercase;
}

.project-overlay__meta {
  margin: 6px 0 0;
  padding-right: 36px;
  font-size: var(--text-eyebrow-size);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.project-overlay__meta[hidden] {
  display: none;
}

.project-overlay__desc {
  margin: clamp(14px, 2vw, 18px) 0 0;
  max-width: none;
  font-family: inherit;
  color: var(--color-text-muted);
  text-wrap: wrap;
  hyphens: none;
  -webkit-hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

.project-overlay__process {
  margin-top: clamp(22px, 3.2vw, 30px);
}

.project-process--ml .project-process__text {
  color: var(--color-text-muted);
}

.project-overlay__process[hidden] {
  display: none;
}

.project-process__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-process__steps--cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-process__steps--last-full .project-process__step:last-child {
  grid-column: 1 / -1;
}

.project-process__steps--cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.project-process__step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 100%;
  padding: 16px 16px 18px;
  border-radius: var(--editorial-frame-radius);
  background: rgb(255 255 255 / 36%);
  box-shadow: var(--editorial-frame-border);
}

.project-process__index {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgb(120 120 128 / 72%);
}

.project-process__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-process__label {
  margin: 0;
  letter-spacing: 0.06em;
  color: var(--ios-label);
}

.project-process__text {
  margin: 0;
  color: var(--ios-label-secondary);
  text-wrap: wrap;
  hyphens: none;
  -webkit-hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

.project-process__nda {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: 0;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px dashed rgb(120 120 128 / 34%);
  background: rgb(120 120 128 / 7%);
  font-size: 11px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ios-label-secondary);
}

.project-overlay__gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.4vw, 12px);
  margin-top: clamp(18px, 3vw, 24px);
  margin-bottom: 0;
  width: 100%;
}

.project-overlay__gallery--two-columns {
  display: block;
  columns: 2;
  column-gap: clamp(8px, 1.4vw, 12px);
  max-width: 100%;
}

.project-overlay__gallery--two-columns .project-overlay__image-btn {
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 0 clamp(8px, 1.4vw, 12px);
}

.project-overlay__gallery--two-columns .project-overlay__image-btn:last-child {
  margin-bottom: 0;
}

.project-overlay__image-btn {
  display: block;
  width: 100%;
  max-width: min(880px, 100%);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.project-overlay__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 18px rgb(0 0 0 / 8%);
}

@media (max-width: 640px) {
  .project-overlay {
    padding: clamp(12px, 3.5vw, 18px);
  }

  .project-overlay__panel {
    max-height: calc(100svh - clamp(24px, 7vw, 36px));
    border-radius: 10px;
  }

  .project-overlay__scroll {
    padding:
      clamp(16px, 4vw, 22px)
      clamp(14px, 4vw, 18px)
      clamp(20px, 5vw, 28px);
  }

  .project-overlay__desc {
    font-size: 15px;
    line-height: 1.5;
  }

  .project-process__steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-process__step {
    padding: 14px 14px 16px;
  }

  .project-overlay__gallery--two-columns {
    display: flex;
    flex-direction: column;
    align-items: center;
    columns: auto;
    column-gap: 0;
  }

  .project-overlay__gallery--two-columns .project-overlay__image-btn {
    max-width: min(880px, 100%);
    margin-bottom: 0;
  }
}

/* ——— Языки ——— */
.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;
}

.home-section__inner {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* ——— Unified typography ——— */
.text-title,
.intro-section__title,
.trust-section__title,
.languages-section__title,
.about-block h3,
.frontend-card__title,
.ml-card__title,
.project-overlay__title,
.navbar-page-title,
.role-page__title {
  font-size: var(--text-title-size);
  font-weight: var(--text-title-weight);
  letter-spacing: var(--text-title-tracking);
  line-height: var(--text-title-line);
}

.text-body,
.intro-section__lead,
.intro-contact,
.about-block li,
.about-entry__desc,
.frontend-card__desc,
.ml-card__desc,
.project-overlay__desc,
.project-process__text,
.role-page__placeholder,
.person-tagline {
  font-size: var(--text-body-size);
  font-weight: var(--text-body-weight);
  letter-spacing: var(--text-body-tracking);
  line-height: var(--text-body-line);
}

.text-eyebrow,
.designer-tools__label,
.intro-section__status-label,
.project-process__label {
  font-size: var(--text-eyebrow-size);
  font-weight: var(--text-eyebrow-weight);
  letter-spacing: var(--text-eyebrow-tracking);
  line-height: var(--text-eyebrow-line);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--editorial-frame-radius);
  background: var(--editorial-frame-bg);
  box-shadow: var(--editorial-frame-border);
  color: var(--ios-label);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: lowercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  opacity: 0.78;
}

.btn:active {
  opacity: 0.72;
}

.btn--ghost {
  background: transparent;
  box-shadow: var(--editorial-frame-border);
}

.btn.navbar-cv,
.btn.navbar-cv .btn__label {
  text-transform: uppercase;
}

.btn__icon {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.btn__label {
  white-space: nowrap;
}

.editorial-panel {
  padding: clamp(18px, 3.5vw, 24px) clamp(18px, 3.5vw, 24px) clamp(20px, 3.5vw, 26px);
  border-radius: var(--editorial-frame-radius);
  background: var(--editorial-frame-bg);
  box-shadow: var(--editorial-frame-border);
}

.intro-section {
  padding: clamp(48px, 10vw, 72px) var(--home-section-inline) clamp(28px, 6vw, 40px);
  background-color: var(--ios-bg-page);
  color: var(--ios-label);
}

.intro-section__title {
  margin: 0 0 14px;
  color: var(--ios-label);
}

.intro-section__lead {
  margin: 0;
  color: var(--ios-label);
  hyphens: none;
  -webkit-hyphens: none;
  text-wrap: pretty;
  word-break: normal;
  overflow-wrap: break-word;
}

.intro-section__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
}

.intro-section__status-label {
  color: var(--ios-label-secondary);
}

.intro-section__status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 6px;
  border-radius: 6px;
  border: 1px solid rgb(120 120 128 / 18%);
  background: rgb(120 120 128 / 4%);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 100%;
  pointer-events: none;
  user-select: none;
}

.intro-section__status-dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2f9e44;
}

.intro-section__status-value {
  font-weight: 500;
  color: var(--ios-label);
}

.intro-section__cta {
  margin-top: 20px;
  font-size: 14px;
}

.intro-section__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.intro-section__ctas .intro-section__cta {
  margin-top: 0;
}

.page-intro-section {
  margin: 0 0 24px;
  width: 100%;
}

.page-intro-section .intro-panel {
  padding: clamp(20px, 4vw, 28px);
}

.page-intro-section .intro-section__title {
  margin-bottom: 12px;
}

.page-intro-section .page-intro-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 0;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.cv-picker {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.cv-picker:not([hidden]) {
  pointer-events: auto;
}

.cv-picker[hidden] {
  display: none;
}

.cv-picker__backdrop {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  cursor: default;
}

.cv-picker__panel {
  position: fixed;
  z-index: 1;
  width: min(220px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  padding: 4px;
  border: 0.5px solid rgb(255 255 255 / 52%);
  border-radius: 14px;
  background: rgb(255 255 255 / 58%);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  box-shadow:
    0 0 0 0.5px rgb(0 0 0 / 4%),
    0 4px 24px rgb(0 0 0 / 7%),
    0 12px 40px rgb(0 0 0 / 5%),
    inset 0 1px 0 rgb(255 255 255 / 72%);
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--color-text);
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  transform-origin: top right;
  transition:
    opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.cv-picker.is-open .cv-picker__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .cv-picker__panel,
  .project-overlay__panel,
  .project-overlay__backdrop {
    transition: none;
  }
}

.cv-picker__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cv-picker__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  padding: 7px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--ios-label);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.cv-picker__option + .cv-picker__option {
  margin-top: 0;
}

.cv-picker__list > li + li {
  border-top: 0.5px solid var(--ios-separator);
}

.cv-picker__list > li {
  position: relative;
}

.cv-picker__option:hover,
.cv-picker__option:focus-visible {
  background: rgb(0 0 0 / 5%);
  opacity: 1;
}

.cv-picker__option:active {
  background: rgb(0 0 0 / 8%);
  opacity: 1;
}

.cv-picker__option-label {
  flex: 1;
}

.cv-picker__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.45;
}

.trust-section {
  padding: clamp(20px, 4vw, 28px) var(--home-section-inline) clamp(48px, 10vw, 72px);
  background-color: var(--ios-bg-page);
  color: var(--ios-label);
}

.trust-section__title {
  margin: 0 0 18px;
  color: var(--ios-label);
}

.intro-trust__logos {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intro-trust__item {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
}

.intro-trust__item:first-child {
  justify-content: flex-start;
}

.intro-trust__item:last-child {
  justify-content: flex-end;
}

.intro-trust__link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.intro-trust__link:hover,
.intro-trust__link:focus,
.intro-trust__link:focus-visible,
.intro-trust__link:active {
  color: inherit;
  text-decoration: none;
  outline: none;
  opacity: 1;
}

.intro-trust__link:hover .intro-trust__logo-img,
.intro-trust__link:focus .intro-trust__logo-img,
.intro-trust__link:focus-visible .intro-trust__logo-img,
.intro-trust__link:active .intro-trust__logo-img {
  opacity: 0.48;
  filter: grayscale(1);
}

.intro-trust__logo-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(24px, 4.2vw, 48px);
  object-fit: contain;
  object-position: center;
  opacity: 0.48;
  filter: grayscale(1);
}

.intro-contact {
  margin: 0;
  color: var(--ios-label);
  hyphens: none;
  -webkit-hyphens: none;
  text-wrap: pretty;
  word-break: normal;
  overflow-wrap: break-word;
}

.contact-section {
  padding: 0 var(--home-section-inline);
  background-color: var(--ios-bg-page);
  color: var(--ios-label);
}

.contact-panel .intro-social {
  margin-top: 16px;
}

.intro-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.languages-section {
  --lang-glow-accent-rgb: 255, 148, 108;
  --lang-glow: rgba(var(--lang-glow-rgb), 0.95);
  --lang-glow-soft: rgba(var(--lang-glow-soft-rgb), 0.45);
  --lang-glow-accent: rgba(var(--lang-glow-accent-rgb), 0.85);
  --lang-glow-blur-outer: 5px;
  --lang-glow-blur-inner: 6px;
  --lang-glow-opacity: 0.7;
  --lang-glow-size-outer: 27px;
  --lang-glow-size-inner: 17px;
  --lang-anchor-size: 7px;
  --lang-anchor-active-size: 16px;
  --lang-anchor-steps: 6;
  position: relative;
  padding: clamp(32px, 7vw, 56px) var(--home-section-inline) clamp(40px, 8vw, 64px);
  background-color: var(--ios-bg-page);
  color: var(--ios-label);
  overflow: hidden;
}

.languages-panel {
  position: relative;
  overflow: hidden;
}

.languages-section__title {
  margin: 0 0 8px;
  color: var(--ios-label);
  text-align: left;
}

.lang-map {
  position: relative;
  padding: 4px 0;
}

.lang-map__glow {
  position: absolute;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.lang-map__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.lang-map__rows {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lang-map__row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7.25rem) minmax(0, 1fr) minmax(1.5rem, 2rem);
  align-items: center;
  gap: clamp(12px, 2.4vw, 20px);
  padding: calc(8px * 1.1) 0;
  transition: opacity 0.25s ease;
}

.lang-map__row--ru,
.lang-map__row--en {
  opacity: 1;
}

.lang-map__row--fr,
.lang-map__row--ko {
  opacity: 0.88;
}

.lang-map__row:hover {
  opacity: 1;
}

.lang-map__label {
  font-size: inherit;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ios-label);
  line-height: 1.47;
}

.lang-map__label--left {
  text-align: left;
  padding-right: 0.25rem;
  white-space: nowrap;
}

.lang-map__label--right {
  text-align: right;
  color: var(--ios-label);
  letter-spacing: -0.01em;
  font-weight: 400;
}

.lang-map__track {
  min-width: 0;
}

.lang-map__rail {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 34px;
}

.lang-map__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
  background: var(--lang-line);
  z-index: 0;
}

.lang-map__anchor {
  --anchor-i: 0;
  position: absolute;
  top: 50%;
  left: calc(var(--anchor-i) * 100% / var(--lang-anchor-steps));
  z-index: 2;
  width: var(--lang-anchor-size);
  height: var(--lang-anchor-size);
  border-radius: 50%;
  background: var(--lang-anchor);
  opacity: var(--lang-anchor-inactive-opacity);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.lang-map__anchor--active {
  z-index: 5;
  width: var(--lang-anchor-active-size);
  height: var(--lang-anchor-active-size);
  opacity: 1;
  background: transparent;
  box-shadow: none;
  transition: transform 0.25s ease;
}

.lang-map__anchor-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--lang-anchor);
  z-index: 2;
}

.lang-map__anchor--active::before,
.lang-map__anchor--active::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.lang-map__anchor--active::before {
  inset: calc(-1 * var(--lang-glow-size-outer));
  background: radial-gradient(
    circle,
    transparent 0%,
    rgba(var(--lang-glow-rgb), var(--lang-glow-opacity)) 22%,
    rgba(var(--lang-glow-rgb), calc(var(--lang-glow-opacity) * 0.625)) 40%,
    rgba(var(--lang-glow-rgb), calc(var(--lang-glow-opacity) * 0.3125)) 58%,
    rgba(var(--lang-glow-rgb), calc(var(--lang-glow-opacity) * 0.104)) 74%,
    transparent 88%
  );
  filter: blur(var(--lang-glow-blur-outer));
}

.lang-map__anchor--active::after {
  inset: calc(-1 * var(--lang-glow-size-inner));
  background: radial-gradient(
    circle,
    transparent 0%,
    rgba(var(--lang-glow-soft-rgb), var(--lang-glow-opacity)) 24%,
    rgba(var(--lang-glow-rgb), calc(var(--lang-glow-opacity) * 0.5)) 50%,
    rgba(var(--lang-glow-rgb), calc(var(--lang-glow-opacity) * 0.182)) 70%,
    transparent 86%
  );
  filter: blur(var(--lang-glow-blur-inner));
}

.lang-map__row:hover .lang-map__anchor--active {
  transform: translate(-50%, -50%) scale(1.06);
}

@media (max-width: 560px) {
  .lang-map__row {
    grid-template-columns: minmax(4.5rem, 5.75rem) minmax(0, 1fr) 1.35rem;
    gap: 12px;
    padding: clamp(calc(8px * 1.1), calc(1.8vh * 1.1), calc(13px * 1.1)) 0;
  }

}

@media (prefers-reduced-motion: reduce) {
  .lang-map__row:hover .lang-map__anchor--active {
    transform: translate(-50%, -50%);
  }
}

/* Experience section */
.about-section {
  padding: 60px var(--home-section-inline);
  background-color: var(--ios-bg-page);
  color: var(--ios-label);
  transition:
    background-color 0.35s ease,
    color 0.35s ease;
}

.about-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.about-block {
  min-width: 0;
}

.about-block:nth-child(3) {
  grid-column: 1 / -1;
}

.about-block h3 {
  margin: 0 0 10px;
  color: var(--ios-label);
}

.about-block ul {
  list-style-type: disc;
  padding-left: 20px;
}

.about-block li {
  margin-bottom: 10px;
  color: var(--ios-label);
  hyphens: none;
  -webkit-hyphens: none;
  text-wrap: pretty;
  word-break: normal;
  overflow-wrap: break-word;
}

.about-entry__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
}

.about-entry__title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.text-link {
  color: var(--ios-label);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  text-decoration-color: rgb(29 29 31 / 42%);
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--ios-label);
  text-decoration-color: var(--ios-label);
}

.about-entry__title .text-link,
.frontend-card__title .text-link,
.ml-card__title .text-link,
.project-overlay__title .text-link,
.project-panel__caption-title .text-link {
  font-weight: inherit;
}

.about-entry__period {
  flex: 0 0 auto;
  color: #8e8e93;
  text-align: right;
  white-space: nowrap;
}

.about-entry__desc {
  margin: 4px 0 0;
  color: var(--ios-label);
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  padding: clamp(40px, 6vw, 56px) 40px 30px;
  background-color: var(--footer-bg);
  color: var(--color-footer-muted);
  font-size: 14px;
}

.footer-link {
  color: var(--color-footer-muted);
  text-decoration: underline;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--color-footer-muted);
  opacity: 0.88;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-social__link:hover,
.footer-social__link:focus-visible {
  opacity: 1;
}

.footer-social__icon {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

.footer-copy {
  font-style: italic;
}


/* Mobile styles */
@media (max-width: 900px) {
  .hero-intro {
    padding: clamp(6px, 1.5vw, 14px) clamp(16px, 4vw, 32px) clamp(10px, 2vw, 20px);
  }

  .hero-intro .hero-intro__name {
    --hero-word-gap-tracking: -0.03em;
    --hero-word-inner-tracking: -0.038em;
  }

  .project-img {
    height: min(70vh, 420px);
  }

  .project-description {
    width: min(280px, 85vw);
  }

  .role-card__label {
    font-size: clamp(1.1rem, 4.5vw, 1.35rem);
  }
}

@media (max-width: 719px) {
  /* ——— Mobile UI typography (design page system, site-wide) ——— */
  :root {
    --text-title-size: 13px;
    --text-body-size: 13px;
    --text-body-line: 1.25;
  }

  body {
    font-size: var(--text-body-size);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: var(--text-body-line);
    color: var(--ios-label-secondary);
  }

  .top-navbar {
    font-size: var(--text-body-size);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--ios-label-secondary);
  }

  .text-title,
  .intro-section__title,
  .trust-section__title,
  .languages-section__title,
  .about-block h3,
  .navbar-page-title,
  .designer-tools__label,
  .frontend-card__title,
  .ml-card__title,
  .role-page__title,
  .project-panel__caption-title,
  .project-overlay__title {
    color: var(--ios-label-secondary);
  }

  .text-body,
  .intro-section__lead,
  .intro-contact,
  .about-block li,
.about-entry__desc,
  .lang-map__label,
  .person-tagline,
  .role-page__placeholder,
  .frontend-card__desc,
  .ml-card__desc,
  .project-panel__caption-desc,
  .project-overlay__desc,
  .project-process__text {
    color: var(--ios-label-secondary);
  }

  .footer {
    padding: clamp(32px, 8vw, 48px) clamp(16px, 4vw, 24px) 24px;
    font-size: var(--text-body-size);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--ios-label-secondary);
  }

  .footer-copy {
    font-style: normal;
  }

  .roles-nav--hero .role-card--thought .role-card__label,
  html[lang="en"] .roles-nav--hero .role-card--thought .role-card__label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--ios-label-secondary);
  }

  .roles-nav--hero .role-card--thought .role-card__chip {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
  }

  .languages-section {
    padding: clamp(28px, 7vw, 48px) var(--home-section-inline) clamp(40px, 9vw, 56px);
    --lang-anchor-size: 6px;
    --lang-anchor-active-size: 13px;
    --lang-glow-size-outer: 21px;
    --lang-glow-size-inner: 13px;
    --lang-glow-blur-outer: 4px;
    --lang-glow-blur-inner: 5px;
    --lang-glow-opacity: 0.55;
    --lang-glow-line-min: 2.8px;
    --lang-glow-line-max: 26px;
    --lang-glow-line-reach: 42px;
  }

  .languages-section__title {
    margin-bottom: 10px;
  }

  .lang-map {
    padding: 2px 0;
  }

  .lang-map__rows {
    gap: 0;
  }

  .lang-map__row {
    gap: 12px;
    padding: calc(7px * 1.1) 0;
    grid-template-columns: minmax(4.5rem, 6rem) minmax(0, 1fr) minmax(1.35rem, 1.85rem);
  }

  .lang-map__label {
    line-height: 1.25;
  }

  .lang-map__rail {
    height: 34px;
  }

  .lang-map__rail .lang-map__anchor:not(.lang-map__anchor--active) {
    display: none;
  }

  .lang-map__rail .lang-map__anchor:not(.lang-map__anchor--active)[style*="--anchor-i: 0"] {
    display: block;
  }

  .lang-map__rail .lang-map__anchor:not(.lang-map__anchor--active)[style*="--anchor-i: 6"] {
    display: block;
  }

  .about-section {
    padding: clamp(40px, 9vw, 56px) var(--home-section-inline) clamp(48px, 10vw, 64px);
  }

  .trust-section {
    padding: clamp(24px, 5vw, 32px) var(--home-section-inline) clamp(48px, 10vw, 64px);
  }

  .intro-section {
    padding-inline: var(--home-section-inline);
  }

  .contact-section {
    padding-inline: var(--home-section-inline);
  }

  .intro-trust__logos {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(10px, 3vw, 18px);
    row-gap: clamp(22px, 5.5vw, 30px);
    width: 100%;
    align-items: center;
  }

  .intro-trust__item {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .intro-trust__item:nth-child(1) {
    grid-column: 1 / span 4;
    justify-content: flex-start;
  }

  .intro-trust__item:nth-child(2) {
    grid-column: 5 / span 4;
    justify-content: center;
  }

  .intro-trust__item:nth-child(3) {
    grid-column: 9 / span 4;
    justify-content: flex-end;
  }

  .intro-trust__item:nth-child(4) {
    grid-column: 1 / span 3;
    justify-content: flex-start;
  }

  .intro-trust__item:nth-child(5) {
    grid-column: 4 / span 3;
    justify-content: center;
  }

  .intro-trust__item:nth-child(6) {
    grid-column: 7 / span 3;
    justify-content: center;
  }

  .intro-trust__item:nth-child(7) {
    grid-column: 10 / span 3;
    justify-content: flex-end;
  }

  .intro-trust__link {
    display: inline-flex;
    max-width: 100%;
  }

  .intro-trust__logo-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: clamp(36px, 10.5vw, 52px);
    max-height: 52px;
    object-fit: contain;
    opacity: 0.48;
    filter: grayscale(1);
  }

  .intro-trust__item:nth-child(1) .intro-trust__logo-img,
  .intro-trust__item:nth-child(4) .intro-trust__logo-img {
    object-position: left center;
  }

  .intro-trust__item:nth-child(3) .intro-trust__logo-img,
  .intro-trust__item:nth-child(7) .intro-trust__logo-img {
    object-position: right center;
  }

  .about-columns {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-block:nth-child(3) {
    grid-column: auto;
  }

  .about-block {
    width: 100%;
  }

  .about-block h3 {
    margin-bottom: 14px;
  }

  .about-block ul {
    padding-left: 18px;
    margin: 0;
  }

  .about-block li {
    margin-bottom: 14px;
  }

  .about-entry__head {
    gap: 8px 12px;
  }

  .about-entry__period {
    white-space: normal;
  }

  .about-block li:last-child {
    margin-bottom: 0;
  }
}


/* =========================================================
   SUBPAGE NAV (centered title)
========================================================= */

.top-navbar--centered {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.top-navbar--centered .navbar-left {
  justify-self: start;
}

.top-navbar--centered .navbar-center {
  justify-self: center;
  text-align: center;
}

.top-navbar--centered .navbar-right {
  justify-self: end;
}

.navbar-page-title {
  color: var(--ios-label-secondary);
  white-space: nowrap;
}

@media (max-width: 719px) {
  .top-navbar--centered {
    grid-template-columns: auto 1fr auto;
  }

  .top-navbar--centered .navbar-center {
    justify-self: start;
    margin-left: 10px;
    text-align: left;
  }
}

/* =========================================================
   PERSON PAGE
========================================================= */

.person-page {
  width: min(1700px, calc(100% - 64px));
  margin: 16px auto 0;
}

.person-tagline {
  margin: 0 0 14px;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ios-label);
}

.gallery {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.gallery-column {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.gallery-column__spacer {
  flex: 0 0 0;
  height: 0;
  min-height: 0;
  margin-top: auto;
}

.gallery-item {
  width: 100%;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 0;
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .45s ease,
    transform .45s ease,
    filter .25s ease;
  box-sizing: border-box;
}

.gallery-item img,
.gallery-item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  pointer-events: none;
}

.gallery-item__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:hover {
  filter: brightness(.96);
}

.gallery-item--video {
  position: relative;
  background: var(--color-bg);
}

.gallery-item--video .gallery-item__video {
  position: absolute;
  inset: 0;
}

.gallery-item__poster[hidden],
.gallery-item__video[hidden] {
  display: none !important;
}

/* -------------------- LIGHTBOX -------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15,15,15,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 40px;
  opacity: 1;
  transition: opacity .25s ease;
}

.lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;

  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 14px;
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 34px;

  background: none;
  border: none;

  color: white;
  font-size: 46px;

  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: block;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  opacity: 1;
}

.lightbox-nav--prev {
  left: 8px;
}

.lightbox-nav--next {
  right: 8px;
}

.lightbox-nav[hidden] {
  display: none;
}

#project-lightbox {
  z-index: 400;
}

/* -------------------- RESPONSIVE -------------------- */

@media (max-width:1200px){

.gallery{
    gap:6px;
}

.gallery-column{
    gap:6px;
}

}

@media (max-width:900px){

.gallery{
    gap:5px;
}

.gallery-column{
    gap:5px;
}

}

@media (max-width: 719px) {
  .person-page {
    width: auto;
    margin-top: 12px;
    margin-bottom: 0;
    margin-left: clamp(16px, 4vw, 24px);
    margin-right: clamp(16px, 4vw, 24px);
    box-sizing: border-box;
  }

  .person-tagline {
    max-width: min(320px, 72vw);
    line-height: 1.3;
  }

  .gallery {
    gap: 4px;
  }

  .gallery-column {
    gap: 4px;
  }
}

/* =========================================================
   FRONTEND PAGE
========================================================= */

.frontend-page {
  width: min(1200px, calc(100% - 64px));
  margin: 20px auto 0;
}

body.page-dev .subpage-main.frontend-page,
body.page-frontend .subpage-main.frontend-page {
  min-height: auto;
  overflow-y: visible;
}

.frontend-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 0;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.frontend-page__skill,
.frontend-card__tool,
.ml-page__skill,
.ml-card__tool {
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: var(--tool-tag-size);
  font-weight: var(--tool-tag-weight);
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--tool-tag-color);
  white-space: normal;
}

.frontend-page__skill:not(:last-child)::after,
.frontend-card__tool:not(:last-child)::after,
.ml-page__skill:not(:last-child)::after,
.ml-card__tool:not(:last-child)::after {
  content: "·";
  margin: 0 0.35em;
  font-style: normal;
}

.frontend-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.frontend-grid.card-grid--columns {
  flex-direction: row;
  align-items: flex-start;
}

.card-grid__column {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: inherit;
  min-width: 0;
}

.frontend-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: var(--editorial-radius-md);
  overflow: hidden;
  box-shadow: var(--editorial-shadow);
  transition:
    transform var(--editorial-transition),
    box-shadow var(--editorial-transition);
}

.frontend-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--editorial-shadow-hover);
}

.frontend-card--static {
  cursor: default;
}

.frontend-card--static:hover {
  transform: none;
  box-shadow: var(--editorial-shadow);
}

.frontend-card__preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgb(120 120 128 / 8%);
}

.frontend-card__preview--empty {
  background: linear-gradient(135deg, rgb(120 120 128 / 10%), rgb(120 120 128 / 4%));
}

.frontend-card__image,
.frontend-card__iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
}

.frontend-card__iframe {
  transform: scale(0.35);
  transform-origin: top left;
  width: 285%;
  height: 285%;
}

.frontend-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 22px;
}

.frontend-card__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.frontend-card__title {
  margin: 0;
}

.frontend-card__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.frontend-card__desc {
  margin: 0;
  color: var(--color-text-muted);
}

.frontend-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

@media (min-width: 640px) {
  .frontend-grid.card-grid--columns {
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .frontend-grid.card-grid--columns {
    gap: 22px;
  }
}

@media (max-width: 719px) {
  .frontend-page {
    width: auto;
    margin-top: 14px;
    margin-left: clamp(16px, 4vw, 24px);
    margin-right: clamp(16px, 4vw, 24px);
    box-sizing: border-box;
  }

  .frontend-skills {
    margin-bottom: 18px;
    gap: 0.2em 0;
    max-width: 100%;
  }

  .frontend-card__body {
    padding-inline: clamp(16px, 4vw, 20px);
  }

  .frontend-card__tools {
    max-width: 100%;
  }

  .languages-section,
  .about-section {
    color: var(--ios-label-secondary);
  }

  .lang-map__label {
    color: var(--ios-label-secondary);
  }

  .person-tagline {
    color: var(--ios-label-secondary);
  }

  .frontend-card__title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ios-label-secondary);
  }

  .frontend-card__desc {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--ios-label-secondary);
  }

  .frontend-page__skill,
  .frontend-card__tool,
  .ml-page__skill,
  .ml-card__tool {
    font-size: var(--tool-tag-size);
  }

  .project-overlay__panel {
    font-size: 13px;
    color: var(--ios-label-secondary);
  }

  .project-overlay__desc {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--ios-label-secondary);
  }

  .project-panel__caption-title,
  .project-panel__caption-desc {
    font-size: 13px;
    letter-spacing: -0.01em;
    color: var(--ios-label-secondary);
  }

  .project-panel__caption-title {
    font-weight: 600;
  }

  .project-panel__caption-desc {
    font-weight: 400;
    line-height: 1.25;
  }
}

/* =========================================================
   ML PAGE
========================================================= */

.ml-page {
  width: min(1200px, calc(100% - 64px));
  margin: 20px auto 0;
}

body.page-ml .subpage-main.ml-page {
  min-height: auto;
  overflow-y: visible;
}

.ml-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 0;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.ml-card__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 0;
  margin-top: 2px;
}

.ml-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ml-grid.card-grid--columns {
  flex-direction: row;
  align-items: flex-start;
}

.ml-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: var(--editorial-radius-md);
  overflow: hidden;
  box-shadow: var(--editorial-shadow);
  transition:
    transform var(--editorial-transition),
    box-shadow var(--editorial-transition);
}

.ml-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--editorial-shadow-hover);
}

.ml-card__preview {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #fff;
}

.ml-card__preview--placeholder {
  min-height: 0;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgb(120 120 128 / 10%), rgb(120 120 128 / 4%));
}

.ml-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.ml-card__body {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 22px;
}

.ml-card__title {
  margin: 0;
}

.ml-card__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ml-card__status {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(120 120 128 / 12%);
  font-size: var(--tool-tag-size-compact);
  font-weight: var(--tool-tag-weight);
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--tool-tag-color);
  white-space: nowrap;
}

.ml-card__desc {
  margin: 0;
  color: var(--color-text-muted);
}

.ml-card__inline-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgb(120 120 128 / 35%);
  text-underline-offset: 0.14em;
  transition: opacity 0.2s ease;
}

.ml-card__inline-link:hover {
  opacity: 0.72;
}

.ml-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

@media (min-width: 640px) {
  .ml-grid.card-grid--columns {
    gap: 20px;
  }
}

@media (max-width: 719px) {
  .ml-page {
    width: auto;
    margin-top: 14px;
    margin-left: clamp(16px, 4vw, 24px);
    margin-right: clamp(16px, 4vw, 24px);
    box-sizing: border-box;
  }

  .ml-skills {
    margin-bottom: 18px;
    gap: 0.2em 0;
    max-width: 100%;
  }

  .ml-card__body {
    padding-inline: clamp(16px, 4vw, 20px);
  }

  .ml-card__tools {
    max-width: 100%;
  }

  .ml-card__title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ios-label-secondary);
  }

  .ml-card__status {
    font-size: var(--tool-tag-size-compact);
  }
}

/* =========================================================
   DESKTOP CURSOR TRAIL
========================================================= */

@media (min-width: 720px) and (hover: hover) and (pointer: fine) {
  body.has-cursor-trail,
  body.has-cursor-trail * {
    cursor: none !important;
  }

  .cursor-trail {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    overflow: hidden;
  }

  .cursor-trail__lead,
  .cursor-trail__dot {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    transform: translate3d(-100px, -100px, 0);
    will-change: transform;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .cursor-trail.is-visible .cursor-trail__lead,
  .cursor-trail.is-visible .cursor-trail__dot {
    opacity: 1;
  }

  .cursor-trail__lead {
    width: 7px;
    height: 7px;
    background: rgb(29 29 31 / 0.82);
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.35);
  }

  .cursor-trail__dot {
    width: calc(7px - var(--trail-index) * 0.55px);
    height: calc(7px - var(--trail-index) * 0.55px);
    background: rgb(29 29 31 / calc(0.34 - var(--trail-index) * 0.028));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-trail {
    display: none;
  }
}