:root {
  --ink: #16324f;
  --text: #24384c;
  --muted: #5d6b78;
  --line: rgba(22, 50, 79, 0.14);
  --side: #e7f3fb;
  --card: #f4f8fb;
  --blue: #1b6ec8;
  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: #d5dee8; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.02rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  position: absolute;
  z-index: 10;
  top: 1.15rem;
  left: calc(22rem + 2.2rem);
  right: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.pdf,
.video,
.share {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.pdf {
  background: var(--ink);
  color: #fff;
}

.video,
.share {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.intro-actions {
  display: flex;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.9rem;
}

.intro-actions .video,
.intro-actions .beyond-link {
  flex: 1 1 0;
  justify-content: center;
  width: 0;
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.share.is-copied {
  background: var(--ink);
  color: #fff;
}

.video svg,
.share svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.pdf::before {
  content: "↓";
}

.lang {
  display: flex;
  padding: 0.2rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(22, 50, 79, 0.14);
}

.lang a {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.lang a:hover { color: var(--blue); }

.lang a[aria-current="page"] {
  background: var(--blue);
  color: #fff;
}

.layout {
  position: relative;
  display: grid;
  grid-template-columns: 22rem 1fr;
  align-items: stretch;
  max-width: 64rem;
  min-height: calc(100vh - 3rem);
  margin: 1.5rem auto;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(22, 50, 79, 0.12);
}

aside {
  background: var(--side);
  padding: 2.6rem 1.7rem 3rem;
}

main {
  padding: 4.6rem 2.4rem 3.5rem 2.2rem;
  background: #fff;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.5rem, 4vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.role-line,
.where {
  margin: 0.85rem 0 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
}

.role-line { font-weight: 700; }
.role-line .pipe { font-weight: 400; }

.where { margin-top: 0.95rem; }

.contacts {
  margin: 1.35rem 0 0;
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.55;
}

.contacts a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  text-decoration: none;
}

.contacts a svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  color: #b7cfe2;
}

.contacts a:hover { color: var(--blue); }

.sep { display: none; }

h2 {
  margin: 2.1rem 0 0.7rem;
  color: #8b98a6;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.skills,
.stack,
.role ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.role ul {
  margin-top: 0.35rem;
  padding-left: 1.15rem;
  list-style: disc;
}

.skills {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.skills ul {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.28rem;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  border: 1px solid rgba(22, 50, 79, 0.35);
  border-radius: 12px;
}

.skills li {
  display: flex;
  flex: 1 1 46%;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.skills li:first-child,
.skills li.feature {
  font-size: 0.95rem;
  font-weight: 700;
}

.skills li:nth-child(5n + 1) { flex: 1.7 1 100%; }
.skills li:nth-child(5n + 2) { flex: 1 1 42%; }
.skills li:nth-child(5n + 3) { flex: 1.35 1 55%; }
.skills li:nth-child(5n + 4) { flex: 1 1 40%; }
.skills li:nth-child(5n) { flex: 1.5 1 70%; }
.skills li.feature { flex: 2.2 1 100%; }
.skills ul:has(> li:nth-child(6)) > li:nth-child(5),
.skills ul:has(> li:nth-child(6)) > li:nth-child(6) { flex: 1 1 46%; }
.skills ul:has(> li:nth-child(7)) > li:nth-child(7) { flex: 1.5 1 100%; }
.skills ul:has(> li:nth-child(8)) > li:nth-child(2),
.skills ul:has(> li:nth-child(8)) > li:nth-child(5) { flex: 1.35 1 55%; }
.skills ul:has(> li:nth-child(8)) > li:nth-child(3),
.skills ul:has(> li:nth-child(8)) > li:nth-child(4) { flex: 1 1 42%; }
.skills ul:has(> li:nth-child(8)) > li:nth-child(6),
.skills ul:has(> li:nth-child(8)) > li:nth-child(7) { flex: 1 1 46%; }
.skills ul:has(> li:nth-child(8)) > li:nth-child(8) { flex: 1.5 1 100%; }

.lead {
  margin: 1.15rem auto 0;
  max-width: 46rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: #fffdf2;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.5;
  text-align: center;
  text-wrap: pretty;
}

.lead p { margin: 0; }
.lead-mobile { display: none; }
.fit.fit-mobile { display: none; }

.lead .logos { margin: 0.9rem 0 0.05rem; }

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.61rem 1.05rem;
  margin: 1.15rem 0 0.15rem;
  padding: 0;
  list-style: none;
}

.logos li {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
}

.logos li.logo-break {
  flex-basis: 100%;
  height: 0;
  margin-top: -0.61rem;
}

.logos img {
  display: block;
  width: auto;
  height: 1.05rem;
  object-fit: contain;
  filter: brightness(0) invert(0.63);
  opacity: 0.45;
}

.logos img.logo-lg { height: 1.52rem; }
.logos img.logo-epam { height: 1.79rem; }
.logos img.logo-sm { height: 0.64rem; }
.logos img[src$="epam.svg"] { transform: translateY(10%); }
.logos img.logo-lion { height: 1.35rem; }

.fit {
  display: block;
  position: relative;
  margin: 1.15rem auto 0.4rem;
  max-width: 46rem;
  padding: 1rem 2.15rem 1rem 1.15rem;
  border-radius: 12px;
  background: #c5dff6;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  text-wrap: pretty;
  cursor: pointer;
}

.fit b { font-weight: 800; }

.block { margin: 0; }

.role {
  margin: 0 0 0.7rem;
  padding: 0.95rem 1.1rem 1.05rem;
  border-radius: 12px;
  background: var(--card);
}

.when {
  color: var(--blue);
  font-weight: 400;
}

.role h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.35;
  text-wrap: pretty;
}

.role .about {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.45;
  text-wrap: pretty;
}

.role li {
  margin-top: 0.5rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.stack li {
  margin: 0 0 0.55rem;
  padding: 0.8rem 1.05rem;
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  text-wrap: pretty;
}

.stack li.ocean,
.stack li.pilot,
.stack li.visa {
  position: relative;
  cursor: pointer;
  padding-right: 1.9rem;
}

.stack li.ocean::after,
.stack li.pilot::after,
.stack li.visa::after,
.fit::after {
  content: "";
  position: absolute;
  top: 0.62rem;
  right: 0.62rem;
  width: 0.78rem;
  height: 0.78rem;
  pointer-events: none;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4.2 11.8 11.8 4.2M6.6 4.2H11.8V9.4' stroke='%239aabbc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.stack li.ocean:hover,
.stack li.ocean:focus-visible,
.stack li.pilot:hover,
.stack li.pilot:focus-visible,
.stack li.visa:hover,
.stack li.visa:focus-visible,
.fit:hover,
.fit:focus-visible {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.stack li.ocean.is-leaping { z-index: 6; }

.jack-stage {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 17rem;
  overflow: hidden;
  pointer-events: none;
}

.jack {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 16rem;
  width: auto;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 105%);
}

.jack-say {
  position: absolute;
  left: calc(50% + 1.35rem);
  top: 0.15rem;
  z-index: 2;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: "Caveat", cursive;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 0.8;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(22, 50, 79, 0.2);
  opacity: 0;
}

.jack-say::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  bottom: -0.42rem;
  border: 0.48rem solid transparent;
  border-top-color: #fff;
  border-bottom-width: 0;
}

.ocean.is-leaping .jack {
  animation: jack-peek 1.8s ease-in-out forwards;
}

.ocean.is-leaping .jack-say {
  animation: jack-say 1.8s ease-in-out forwards;
}

@keyframes jack-peek {
  0% { opacity: 0; transform: translate(-50%, 105%); }
  10% { opacity: 1; }
  32% { opacity: 1; transform: translate(-50%, 8%); }
  64% { opacity: 1; transform: translate(-50%, 4%); }
  100% { opacity: 0; transform: translate(-50%, 105%); }
}

@keyframes jack-say {
  0%, 16% { opacity: 0; transform: translateY(0.35rem) rotate(-6deg); }
  30%, 68% { opacity: 1; transform: rotate(-6deg); }
  100% { opacity: 0; transform: translateY(0.35rem) rotate(-6deg); }
}

.plane {
  position: fixed;
  top: 36vh;
  left: 0;
  z-index: 30;
  height: 4.8rem;
  width: auto;
  pointer-events: none;
  opacity: 0;
}

.pilot.is-flying .plane {
  animation: plane-fly 2.6s linear forwards;
}

.stack li.visa.is-stamping { z-index: 6; }

.visa-card {
  position: absolute;
  top: -0.55rem;
  right: 0.15rem;
  z-index: 5;
  width: 8.2rem;
  height: auto;
  pointer-events: none;
  opacity: 0;
  border-radius: 4px;
  box-shadow: 0 8px 16px rgba(22, 50, 79, 0.28);
  transform: translateY(-14px);
  transform-origin: 100% 0;
}

.visa.is-stamping .visa-card {
  animation: visa-stamp 2.4s linear forwards;
}

@keyframes visa-stamp {
  0% { opacity: 0; transform: translateY(-18px) scale(1.04); }
  12% { opacity: 1; transform: translateY(3px) scale(0.98); }
  20% { opacity: 1; transform: translateY(0) scale(1); }
  72% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(0) scale(1); }
}

@keyframes plane-fly {
  0% { opacity: 0; transform: translate3d(-14rem, 10px, 0) rotate(-4deg); }
  7% { opacity: 1; }
  30% { transform: translate3d(24vw, -8px, 0) rotate(-1deg); }
  55% { transform: translate3d(50vw, 4px, 0) rotate(1deg); }
  80% { transform: translate3d(76vw, -6px, 0) rotate(-1deg); }
  93% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(108vw, 8px, 0) rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ocean.is-leaping .jack {
    animation: none;
    opacity: 1;
    transform: translate(-50%, 8%);
  }
  .ocean.is-leaping .jack-say {
    animation: none;
    opacity: 1;
    transform: rotate(-6deg);
  }
  .pilot.is-flying .plane {
    animation: none;
    opacity: 1;
    left: 50%;
    transform: translateX(-50%);
  }
  .visa.is-stamping .visa-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

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

::selection {
  background: #cfe4f8;
  color: var(--ink);
}

.beyond-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.beyond-link:hover {
  background: var(--ink);
  color: #fff;
}

.beyond {
  display: block;
  background: #fff;
}

.beyond main { padding: 0 0 2.8rem; }
.beyond h2 { color: var(--muted); }

.b-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  background: var(--side);
}

.b-top-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.back {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.back:hover {
  background: var(--ink);
  color: #fff;
}

.b-hero-media {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: min(28rem, 58vh);
  width: 100%;
  overflow: hidden;
  background: var(--ink);
}

.b-hero-media img,
.b-hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.b-hero-media video {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.b-hero-media video.is-on { opacity: 1; }

.b-on-video {
  position: absolute;
  z-index: 2;
  top: 0.85rem;
  left: 0.85rem;
  max-width: calc(100% - 1.7rem);
  color: #fff;
  text-shadow: 0 1px 2px rgba(10, 22, 36, 0.45);
}

.b-qualities {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  font-size: clamp(2.15rem, 4.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.b-qualities span {
  display: block;
  opacity: 0;
  animation: b-line 0.7s ease forwards;
}

.b-qualities span:nth-child(2) { animation-delay: 2.4s; }
.b-qualities span:nth-child(3) { animation-delay: 4.8s; }

@keyframes b-line {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: none; }
}

.b-pause {
  position: absolute;
  z-index: 3;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.4rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.b-hero-text { padding: 1.6rem 1.25rem 0; }

.beyond h1 {
  max-width: 44rem;
  font-size: clamp(1.75rem, 5.2vw, 2.7rem);
  letter-spacing: -0.035em;
  line-height: 1.06;
  text-wrap: balance;
}

.b-section { padding: 0 1.25rem; }

.b-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-top: 2.1rem;
}

.b-card {
  overflow: hidden;
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
}

.b-card:hover,
.b-card:focus-visible {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.b-card.is-text { cursor: default; }
.b-card.is-text:hover,
.b-card.is-text:focus-visible { box-shadow: none; }

.b-points {
  margin: 0.7rem 0 0;
  padding-left: 1.15rem;
}

.b-points li {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.b-points em { font-style: italic; }

.b-card picture,
.b-card-img {
  display: block;
  width: 100%;
}

.b-card-img,
.b-ph {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

.b-card-img[src*="pilot"] { object-position: 50% 30%; }
.b-card-img[src*="ocean"] { object-position: 50% 55%; }
.b-card-img[src*="visa"] {
  aspect-ratio: 668 / 452;
  object-fit: contain;
  background: #fff;
}

.b-ph {
  display: grid;
  place-items: center;
  width: 100%;
  background: repeating-linear-gradient(135deg, #eaf0f6 0 12px, #e2eaf2 12px 24px);
}

.b-card-body { padding: 0.95rem 1.1rem 1.1rem; }

.b-card h3,
.b-col h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.b-card p {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.b-card .b-for {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
}

.todo {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: #fff1cc;
  color: #7a4a00;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.b-gallery {
  columns: 2;
  column-gap: 0.55rem;
}

.g-fig {
  margin: 0 0 0.7rem;
  break-inside: avoid;
}

.g-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  cursor: zoom-in;
}

.g-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.g-item:hover img { transform: scale(1.03); }

.g-mark {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.g-fig figcaption {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.b-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.b-col {
  padding: 0.95rem 1.1rem 1.05rem;
  border-radius: 12px;
  background: var(--card);
}

.b-col ul {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
}

.b-col li {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.b-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.b-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.05rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.b-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.b-btn:hover,
.b-btn-main {
  background: var(--ink);
  color: #fff;
}

.b-btn-main:hover { background: var(--blue); }

.b-btn.is-todo {
  flex-wrap: wrap;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--muted);
  color: var(--muted);
  cursor: default;
}

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(10, 22, 36, 0.95);
  color: #fff;
}

.lightbox::backdrop { background: transparent; }

.lb-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100% - 3.5rem);
  padding: 3.5rem 0.75rem 0;
  touch-action: pan-y;
}

.lb-stage img,
.lb-stage video {
  max-width: min(100%, 1100px);
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
}

.lb-meta {
  margin: 0;
  padding: 0.9rem 1rem;
  color: #dbe7f2;
  font-size: 0.88rem;
  text-align: center;
}

.lb-count { margin-left: 0.5rem; color: #9fb4c8; }

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-family: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lb-btn:hover { background: rgba(255, 255, 255, 0.28); }
.lb-close { top: 0.6rem; right: 0.6rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 0.5rem; }
.lb-next { right: 0.5rem; }

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

.lightbox button:focus-visible { outline-color: #fff; }

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .b-qualities span { opacity: 1; animation: none; transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .g-item img { transition: none; }
  .g-item:hover img { transform: none; }
}

@media (min-width: 760px) {
  .b-cards { grid-template-columns: 1fr 1fr; }
  .b-card:last-child:nth-child(odd):not(.is-text) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .b-card:last-child:nth-child(odd):not(.is-text) .b-card-img { height: 100%; }
  .b-card:last-child:nth-child(odd):not(.is-text) .b-card-img[src*="visa"] { height: auto; }
  .b-card.is-text { align-self: start; }
  .b-gallery { columns: 3; }
  .b-cols { grid-template-columns: repeat(2, minmax(16rem, 1fr)); }
}

@media (min-width: 861px) {
  .b-top { padding: 1.1rem 1.4rem; }
  .b-hero-text { padding: 2.2rem 2.4rem 0; }
  .b-section { padding: 0 2.4rem; }
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; margin: 0; border-radius: 0; min-height: 100vh; }
  .topbar { left: 1rem; right: 1rem; }
  aside { padding-top: 4.6rem; }
  main { padding-top: 1.6rem; }
  .lead-desktop { display: none; }
  .lead-mobile { display: block; }
  .fit.fit-desktop { display: none; }
  .fit.fit-mobile { display: block; }
  .skills { gap: 0.7rem; }
}

@media (max-width: 540px) {
  .topbar { left: 0.7rem; right: 0.7rem; }
  .actions { gap: 0.28rem; }
  .pdf,
  .video,
  .share {
    flex: none;
    padding: 0.4rem 0.55rem;
    white-space: nowrap;
  }
}

@page { size: A4; margin: 0; }

@media print {
  .b-qualities span { opacity: 1; animation: none; transform: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html { background: #fff; font-size: 14.5px; }
  body { line-height: 1.35; }
  body::before {
    content: "";
    position: fixed;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 0;
    width: 32%;
    background: #e7f3fb;
  }
  .topbar, .video, .jack-stage, .jack, .plane, .visa-card, .beyond-link { display: none; }
  .stack li.ocean,
  .stack li.ocean:hover,
  .stack li.ocean:focus,
  .stack li.ocean:focus-visible,
  .stack li.pilot,
  .stack li.pilot:hover,
  .stack li.pilot:focus,
  .stack li.pilot:focus-visible,
  .stack li.visa,
  .stack li.visa:hover,
  .stack li.visa:focus,
  .stack li.visa:focus-visible {
    cursor: auto;
    box-shadow: none;
    outline: none;
    padding-right: 1.05rem;
  }
  .stack li.ocean::after, .stack li.pilot::after, .stack li.visa::after, .fit::after { content: none; }
  .layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 32% 1fr;
    align-items: stretch;
    max-width: none;
    min-height: 0;
    margin: 0;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
  }
  aside {
    float: none;
    width: auto;
    height: auto;
    align-self: stretch;
    background: #e7f3fb;
  }
  main { display: block; width: auto; background: #fff; }
  aside, main { padding: 7mm 6mm; }
  h1 { font-size: 1.9rem; line-height: 0.95; }
  h2 { margin: 0.85rem 0 0.32rem; break-after: avoid; }
  .print-break { break-before: page; padding-top: 16mm; }
  .role-line, .where { margin-top: 0.32rem; font-size: 0.84rem; line-height: 1.32; }
  .where { margin-top: 0.7rem; }
  .contacts { margin-top: 0.55rem; font-size: 0.8rem; line-height: 1.32; }
  .lead-mobile { display: none; }
  .lead-desktop { display: block; }
  .fit.fit-mobile { display: none; }
  .fit.fit-desktop { display: block; }
  .lead {
    margin-top: 0.55rem;
    padding: 0.42rem 0.62rem;
    font-size: 0.84rem;
    line-height: 1.34;
  }
  .logos { gap: 0.2rem 0.51rem; margin: 0.35rem 0 0.08rem; }
  .lead .logos { margin: 0.28rem 0 0; }
  .logos img { height: 0.51rem; }
  .logos img.logo-lion { height: 0.62rem; }
  .logos img.logo-lg { height: 0.71rem; }
  .logos img.logo-epam { height: 0.83rem; }
  .logos img.logo-sm { height: 0.33rem; }
  .logos li.logo-break { margin-top: -0.2rem; }
  .fit,
  .fit:hover,
  .fit:focus,
  .fit:focus-visible {
    margin: 0.45rem auto 0.12rem;
    padding: 0.42rem 0.62rem;
    font-size: 0.84rem;
    line-height: 1.32;
    box-shadow: none;
    outline: none;
    cursor: auto;
  }
  .role { margin: 0 0 0.32rem; padding: 0.38rem 0.5rem 0.4rem; }
  .when { font-weight: 400; }
  .role h3 { font-size: 0.9rem; line-height: 1.25; }
  .role .about { margin: 0.1rem 0 0; font-size: 0.72rem; line-height: 1.28; }
  .role li { margin-top: 0.16rem; font-size: 0.84rem; line-height: 1.3; }
  .stack li { margin: 0 0 0.22rem; padding: 0.32rem 0.46rem; font-size: 0.8rem; line-height: 1.3; }
  .skills { gap: 0.32rem; }
  .skills ul { padding: 0.18rem; gap: 0.1rem; }
  .skills li { min-height: 0; padding: 0.12rem 0.2rem; }
  .role, .stack li { break-inside: avoid; }
}
