/* Base */
:root{
  --bg:#07070c;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --muted2: rgba(255,255,255,.45);
  --shadow: 0 16px 60px rgba(0,0,0,.55);
  --shadow2: 0 10px 30px rgba(0,0,0,.55);
  --r: 18px;
  --r2: 24px;
  --accent1: #7c5cff;
  --accent2: #36d1ff;
  --accent3: #ff4fd8;
  --ease-out: cubic-bezier(.16,1,.3,1);
}

*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth;}

html, body{
  background-color:#050505;
}

body{
  position: relative;
}

/* Global black→gray smooth gradient (requested) */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  /* Pure CSS gradient (no image) to avoid visible bands/seams */
  background:
    radial-gradient(1200px 900px at 18% 12%, rgba(255,255,255,.04), transparent 60%),
    radial-gradient(900px 700px at 82% 28%, rgba(255,255,255,.03), transparent 62%),
    linear-gradient(180deg, #000000 0%, #07070c 55%, #05050a 100%);

  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 20%;
  transform: translateZ(0);
  will-change: transform;
}

body::after{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events:none;
  /* Subtle overlay to keep background smooth */
  background:
    radial-gradient(1000px 700px at 30% 20%, rgba(124,92,255,.12), transparent 60%),
    radial-gradient(900px 650px at 75% 30%, rgba(54,209,255,.10), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.35));
}


body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color: var(--text);
  overflow-x:hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* smooth page open/close */
  animation: pageIn .22s var(--ease-out) both;
  transition: opacity .17s var(--ease-out), transform .17s var(--ease-out);
}

body.is-fading{
  opacity:0;
  transform: translateY(6px);
}

@keyframes pageIn{
  from{opacity:0; transform: translateY(8px);}
  to{opacity:1; transform: translateY(0);}
}

/* Case page frame */
.caseFrame{
  padding: 14px;
  border-radius: var(--r2);
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: var(--shadow2);
}

@media (max-width: 768px){
  .caseFrame{padding: 12px;}
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

.container{width:min(1160px, 92%); margin:0 auto}

.bg-blobs{
  position:fixed; inset:-20%;
  background:
    radial-gradient(700px 520px at 20% 30%, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(620px 500px at 78% 32%, rgba(255,255,255,.04), transparent 60%),
    radial-gradient(620px 500px at 72% 78%, rgba(0,0,0,.10), transparent 60%);
  filter: blur(50px);
  pointer-events:none;
  z-index:-1;
}

.header{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10,10,18,.85), rgba(10,10,18,.55));
  border-bottom: 1px solid rgba(255,255,255,.06);
  will-change: transform;
  transform: translateZ(0);
}

.header__inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:14px 0;
}

.brand{display:flex; align-items:center; gap:10px; user-select:none}
.brand__dot{
  position: relative;
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(135deg, var(--accent2), var(--accent1), var(--accent3));
  box-shadow: 0 0 24px rgba(124,92,255,.35);
  animation: brandPulse 1.6s var(--ease-out) infinite;
}

.brand__dot::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:999px;
  background: radial-gradient(circle, rgba(124,92,255,.35), rgba(124,92,255,0) 65%);
  opacity:.65;
  filter: blur(1px);
  transform: scale(.75);
  animation: brandHalo 1.6s var(--ease-out) infinite;
  pointer-events:none;
}

@keyframes brandPulse{
  0%, 100%{ transform: scale(1); opacity: .95; box-shadow: 0 0 22px rgba(124,92,255,.30); }
  45%{ transform: scale(1.08); opacity: 1; box-shadow: 0 0 34px rgba(124,92,255,.55); }
  60%{ transform: scale(.98); opacity: .9; box-shadow: 0 0 18px rgba(124,92,255,.22); }
}

@keyframes brandHalo{
  0%, 100%{ opacity: .35; transform: scale(.75); }
  45%{ opacity: .9; transform: scale(1.05); }
  60%{ opacity: .45; transform: scale(.85); }
}

@media (prefers-reduced-motion: reduce){
  .brand__dot, .brand__dot::after{ animation: none !important; }
}
.brand__name{font-weight:600; letter-spacing:.2px}
.brand--small .brand__name{font-weight:600;font-size:14px;opacity:.9}

.nav{display:flex; gap:18px; align-items:center}
.nav__link{
  font-size:14px; color: var(--muted);
  padding:10px 10px; border-radius:12px;
  transition: transform .2s var(--ease-out), background .2s var(--ease-out), color .2s var(--ease-out);
}
.nav__link:hover{
  color: var(--text);
  background: rgba(255,255,255,.05);
  transform: translateY(-1px);
}

.header__actions{display:flex; gap:10px; align-items:center}
.burger{display:none;background:transparent;border:0;padding:10px;border-radius:12px}
.burger span{display:block;width:22px;height:2px;background:rgba(255,255,255,.7);margin:4px 0;border-radius:2px}

.mobile{
  display:none;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(10,10,18,.70);
  backdrop-filter: blur(14px);
}
.mobile__inner{padding:14px 0; display:flex; flex-direction:column; gap:10px}
.mobile__link{
  padding:12px 12px;border-radius:14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.mobile__actions{display:flex; flex-direction:column; gap:10px; margin-top:6px}
.w100{width:100%}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border: 1px solid rgba(255,255,255,.10);
  cursor:pointer;
  transition: transform .18s var(--ease-out), background .18s var(--ease-out), border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
  font-weight:600;
  letter-spacing:.2px;
  color: var(--text);
  text-shadow:
    0 1px 0 rgba(0,0,0,.65),
    0 0 12px rgba(0,0,0,.35);
  -webkit-text-stroke: .35px rgba(0,0,0,.35);
  will-change: transform;
  transform: translateZ(0);
}
.btn--small{padding:10px 12px;border-radius:12px;font-size:13px}
.btn--primary{
  background: linear-gradient(135deg, rgba(124,92,255,.9), rgba(54,209,255,.45));
  box-shadow: 0 18px 40px rgba(124,92,255,.20);
  border-color: rgba(124,92,255,.35);
}
.btn--primary:hover{transform: translateY(-2px); box-shadow: 0 22px 60px rgba(124,92,255,.24)}
.btn--ghost{
  background: rgba(255,255,255,.03);
}
.btn--ghost:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.16);
}

.main{padding-bottom:60px}
.hero{padding:34px 0 14px}
.hero__grid{
  display:grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 26px;
  align-items:stretch;
}

.badge{
  display:inline-flex; flex-wrap:wrap;
  gap:10px; align-items:center;
  padding:10px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size:13px;
}
.badge__dot{width:8px;height:8px;border-radius:999px;background:rgba(54,209,255,.9); box-shadow:0 0 16px rgba(54,209,255,.35)}
.sep{opacity:.4}

.h1{
  margin:14px 0 10px;
  font-size: clamp(30px, 3.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.6px;
}
.grad{
  background: linear-gradient(135deg, var(--accent2), var(--accent1));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.grad2{
  background: linear-gradient(135deg, var(--accent1), var(--accent3));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.muted{color: var(--muted)}
.lead{
  margin:0;
  color: var(--muted);
  font-size:16px;
  line-height:1.6;
  max-width: 58ch;
}

.hero__actions{display:flex; gap:10px; margin-top:18px; flex-wrap:wrap}
.chips{display:flex; gap:8px; flex-wrap:wrap; margin-top:14px}
.chip{
  padding:8px 10px;
  font-size:13px;
  border-radius:999px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.70);
}

.trust{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px; margin-top:16px;
}
.trust__item{
  padding:12px 12px;
  border-radius:16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
}
.trust__num{font-weight:700;letter-spacing:-.2px}
.trust__text{color:var(--muted2);font-size:13px;margin-top:4px}

.portrait{
  position:relative;
  border-radius: var(--r2);
  overflow:hidden;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  transform: translateZ(0);
}
.portrait img{
  width:100%;
  aspect-ratio: 4 / 4.8;
  object-fit: cover;
  filter: contrast(1.04) saturate(1.05);
}
.portrait__glow{
  position:absolute; inset:-30%;
  background: radial-gradient(closest-side, rgba(124,92,255,.20), transparent 60%);
  filter: blur(34px);
  pointer-events:none;
}

.heroCard{
  margin-top:12px;
  padding:14px 14px;
  border-radius: var(--r2);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow2);
}
.heroCard__name{font-weight:700;font-size:18px}
.heroCard__role{color:var(--muted);margin-top:4px}
.heroCard__row{display:flex;gap:10px;align-items:flex-start;color:var(--muted);font-size:14px;margin-top:10px}
.dot{width:8px;height:8px;border-radius:999px;background:rgba(124,92,255,.9);margin-top:6px; box-shadow:0 0 16px rgba(124,92,255,.25)}

.section{padding:24px 0}
.section--cta{padding:30px 0}
.section__top{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:14px; margin-bottom:14px
}
.h2{margin:0;font-size:22px;letter-spacing:-.2px}
.h3{margin:0;font-size:16px;letter-spacing:-.2px}
.p{margin:8px 0 0; line-height:1.6}
.link{color: rgba(255,255,255,.75)}
.link:hover{color: rgba(255,255,255,.95)}

.carousel{
  position:relative;
  border-radius: var(--r2);
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  overflow:hidden;
}
.carousel__track{
  display:flex;
  gap:14px;
  padding:16px;
  overflow:auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel__track::-webkit-scrollbar{display:none}

.caseCard{
  min-width: 290px;
  width: 320px;
  scroll-snap-align: start;
  border-radius: 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  overflow:hidden;
  box-shadow: var(--shadow2);
  transform: translateZ(0);
  transition: transform .18s var(--ease-out), border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
  will-change: transform;
}
.caseCard:hover{
  transform: translateY(-4px);
  border-color: rgba(124,92,255,.22);
  box-shadow: 0 18px 55px rgba(0,0,0,.55);
}
.caseCard__img img{
  width:100%;
  height: 190px;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.05);
}
.caseCard__content{padding:12px 12px 14px}
.caseCard__title{font-weight:700;letter-spacing:-.2px}
.caseCard__meta{color:var(--muted);font-size:13px;margin-top:6px;line-height:1.4}
.tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.tag{
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
}

.carousel__fade{
  position:absolute; top:0; bottom:0; width:72px; pointer-events:none;
}
.carousel__fade--left{left:0;background: linear-gradient(90deg, rgba(5,5,5,1), rgba(5,5,5,0))}
.carousel__fade--right{right:0;background: linear-gradient(270deg, rgba(5,5,5,1), rgba(5,5,5,0))}
.hint{margin-top:8px;color:var(--muted2);font-size:12px}

.grid3{display:grid; grid-template-columns: repeat(3, 1fr); gap:14px}
.grid2{display:grid; grid-template-columns: repeat(2, 1fr); gap:14px}

.glassCard{
  padding:14px;
  border-radius: var(--r2);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow2);
  will-change: transform;
  transform: translateZ(0);
  transition: transform .18s var(--ease-out), border-color .18s var(--ease-out);
}
.glassCard:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.12);
}
.glassCard__head{display:flex; gap:12px; align-items:flex-start}
.iconBubble{
  width:38px;height:38px;border-radius:14px;
  display:grid;place-items:center;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.list{margin:12px 0 0; padding-left:18px; color: var(--muted); line-height:1.6}
.list li{margin:6px 0}

.certCard{
  border-radius: var(--r2);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow2);
  transition: transform .18s var(--ease-out), border-color .18s var(--ease-out);
  will-change: transform;
}
.certCard:hover{transform: translateY(-3px); border-color: rgba(54,209,255,.22)}
.certCard img{width:100%; height:260px; object-fit:cover}

.cta{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  padding:18px;
  border-radius: var(--r2);
  background: linear-gradient(135deg, rgba(124,92,255,.14), rgba(54,209,255,.08));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow2);
}
.cta__actions{display:flex; gap:10px; flex-wrap:wrap}

.footer{
  border-top: 1px solid rgba(255,255,255,.06);
  padding:18px 0;
  background: rgba(7,7,12,.55);
  backdrop-filter: blur(14px);
}
.footer__inner{display:flex; align-items:center; justify-content:space-between; gap:14px}
.footer__meta{color:var(--muted2); font-size:13px; margin-top:6px}
.footer__right{display:flex; gap:14px}

.floatbar{
  position:fixed;
  right:16px;
  bottom:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index:60;
}
.floatbtn{
  min-width: 92px;
  padding:12px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow2);
  cursor:pointer;
  transition: transform .18s var(--ease-out), background .18s var(--ease-out), box-shadow .18s var(--ease-out);
  transform: translateZ(0);
  will-change: transform;
}
.floatbtn span{
  display:block;
  font-weight:700;
  letter-spacing:.2px;
  text-align:center;
  text-shadow: 0 1px 0 rgba(0,0,0,.65);
  -webkit-text-stroke: .35px rgba(0,0,0,.40);
}
.floatbtn:hover{
  transform: translateY(-3px);
  background: rgba(255,255,255,.06);
}
.floatbtn--up{
  background: linear-gradient(135deg, rgba(54,209,255,.16), rgba(124,92,255,.16));
}

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(18px);
  opacity:0;
  pointer-events:none;
  padding:10px 12px;
  border-radius: 14px;
  background: rgba(15,15,24,.75);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
  color: rgba(255,255,255,.86);
  transition: transform .18s var(--ease-out), opacity .18s var(--ease-out);
  z-index:100;
}
.toast.is-show{
  opacity:1;
  transform: translateX(-50%) translateY(0);
}

.reveal{opacity:0; transform: translateY(10px) scale(.99); transition: transform .5s var(--ease-out), opacity .5s var(--ease-out)}
.reveal.is-in{opacity:1; transform: translateY(0) scale(1)}

.using-mouse :focus{ outline:none; }

.is-pressed{ transform: translateY(0) scale(.99) !important; }

@media (prefers-reduced-motion: reduce){
  .reveal, .btn, .floatbtn, .caseCard, .certCard, .glassCard, .toast{
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 980px){
  .nav{display:none}
  .burger{display:block}
  .header__actions{display:none}
  .mobile.is-open{display:block}
  .hero__grid{grid-template-columns: 1fr; }
  .trust{grid-template-columns: 1fr; }
  .grid3{grid-template-columns: 1fr}
  .grid2{grid-template-columns: 1fr}
  .cta{flex-direction:column; align-items:flex-start}
}

/* ===== Articles ===== */
.articleTile{display:block}
.articleMeta{margin-top:10px;color:rgba(255,255,255,.48);font-size:12px}
.article__top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.article{scroll-margin-top: 84px}
.article__cta{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}

/* ===== Skills ===== */
.skillHero{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;flex-wrap:wrap}
.skillHero__stats{display:grid;grid-template-columns: repeat(3,1fr);gap:10px;min-width:min(420px,100%)}
.pillRow{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.pill{
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.74);
}

.callout{
  margin-top:12px;
  padding:12px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.82);
}

/* ===== Contacts UI form ===== */
.contactList{display:flex;flex-direction:column;gap:10px}
.contactRow{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px;border-radius:16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
}
.contactLabel{font-size:12px;color:rgba(255,255,255,.48)}
.contactValue{font-weight:700;letter-spacing:-.15px}

.form{margin-top:12px;display:flex;flex-direction:column;gap:12px}
.formGrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
 @media (max-width: 720px){.formGrid{grid-template-columns:1fr}}
.field{display:flex;flex-direction:column;gap:6px}
.field__label{font-size:12px;color:rgba(255,255,255,.55)}
.field__input{
  width:100%;
  padding:12px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.88);
  outline: none;
  transition: border-color .18s var(--ease-out), transform .18s var(--ease-out), background .18s var(--ease-out);
}
.field__input:focus{
  border-color: rgba(124,92,255,.35);
  background: rgba(255,255,255,.04);
  transform: translateY(-1px);
}
.field__textarea{resize: vertical; min-height: 120px}


/* File attachment */
.fileInput{display:block}
.fileInput__native{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}
.fileInput__btn{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.16);
  color: rgba(255,255,255,.80);
  cursor:pointer;
  transition: transform .18s var(--ease-out), background .18s var(--ease-out), border-color .18s var(--ease-out);
}
.fileInput__btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.04);
  border-color: rgba(124,92,255,.28);
}
.fileInput__icon{opacity:.9}
.fileInput__text{font-weight:600}
.fileHint{font-size:12px; margin-top:6px; color: rgba(255,255,255,.55)}

.form__actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.form__note{margin-top:2px;font-size:12px}

.success{
  margin-top:14px;
  padding:14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(54,209,255,.10), rgba(124,92,255,.10));
  border: 1px solid rgba(255,255,255,.10);
}
.success__icon{font-size:20px;margin-bottom:6px}

@media (max-width: 980px){
  .skillHero__stats{grid-template-columns: 1fr; min-width: 100%}
  .article__cta{flex-direction:column;align-items:flex-start}
}


/* ===== Language switch ===== */
.langSwitch{
  display:flex;
  gap:6px;
  padding:6px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}
.langSwitch__btn{
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,.70);
  padding:8px 10px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:700;
  letter-spacing:.2px;
  transition: transform .18s var(--ease-out), background .18s var(--ease-out), border-color .18s var(--ease-out), color .18s var(--ease-out);
}
.langSwitch__btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.04);
}
.langSwitch__btn.is-active{
  background: linear-gradient(135deg, rgba(124,92,255,.35), rgba(54,209,255,.20));
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
}


/* ===== Language Toggle (RU / EN) ===== */
.langToggle{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.langToggle__label{
  font-size:12px;
  color: rgba(255,255,255,.65);
  font-weight:600;
}
.langToggle__switch{
  position:relative;
  width:44px;
  height:24px;
  border-radius:999px;
  background: rgba(124,92,255,.35);
  border: 1px solid rgba(255,255,255,.15);
  cursor:pointer;
  transition: background .25s cubic-bezier(.16,1,.3,1);
}
.langToggle__thumb{
  position:absolute;
  top:2px;
  left:2px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.langToggle.is-en .langToggle__switch{
  background: rgba(54,209,255,.45);
}
.langToggle.is-en .langToggle__thumb{
  transform: translateX(20px);
}

/* Extra smooth hover */
.btn, .caseCard, .glassCard{
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s cubic-bezier(.16,1,.3,1);
}
.h1,.h2,.h3{font-family:Manrope,Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}

.carousel__track{scroll-behavior:smooth;cursor:grab;}
.carousel__track.is-dragging{cursor:grabbing;scroll-behavior:auto;}

@media (max-width: 720px){
  .floatbar{right:12px;bottom:12px;}
  .floatbtn{min-width:84px;padding:11px 11px;}
}

/* Mobile button stacking */
@media (max-width: 768px){
  .header__actions{display:flex; align-items:center; gap:10px;}
  .btn{min-height:44px;}
}


/* Hide buttons on mobile */
@media (max-width: 768px){
  .btn-up,.btn-main,.btn-contacts{display:none !important;}
}


/* Keep sections transparent so the background image is visible everywhere */
main, section, .section, .page, .wrap, .container{background: transparent;}


/* === Mobile adaptation: hide desktop-only buttons === */
@media (max-width: 768px) {
  .btn-up,
  .btn-main,
  .btn-home,
  .btn-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}



@media (max-width: 768px){
  /* Show language switch on mobile */
  .header__actions{display:flex !important;}
  .header__actions > :not(.langToggle){display:none !important;}
  .langToggle{transform: scale(.95);}
}



/* === Mobile: hide floating "Главная/Кнопка" buttons, keep only language toggle === */
@media (max-width: 980px){
  /* show header actions so language toggle is visible */
  .header__actions{display:flex !important; align-items:center; gap:10px;}
  /* hide everything inside header actions except the language switch */
  .header__actions > :not(.langToggle){display:none !important;}
  /* hide floating bar (contains "Кнопка" + "Главная") */
  .floatbar{display:none !important;}
  .floatbtn, .floatbtn--up{display:none !important;}
  /* slightly snappier UI on mobile */
  .btn, .nav__link, .caseCard, .glassCard{transition-duration:.18s !important;}
}

.langToggle{position:relative; z-index: 5;}



/* === Mobile performance & feel === */

/* more "inertial" feel for scrollable areas (iOS) */
.carousel__track,
.mobile,
.nav,
.section,
.main{
  -webkit-overflow-scrolling: touch;
}

/* remove tap delay feel / micro-lag on touch */
a, button, .btn, .floatbtn, .nav__link{
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* on touch devices: avoid hover transitions sticking / delays */
@media (hover: none){
  .nav__link:hover,
  .btn:hover,
  .caseCard:hover,
  .glassCard:hover{
    transform:none !important;
    box-shadow: none !important;
  }
}

/* faster, snappier interactions on mobile */
@media (max-width: 980px){
  *{
    scroll-behavior: auto;
  }
  .btn, a, button, .nav__link{
    transition-duration: .14s !important;
  }
}

/* optimize heavy effects for weak phones */
@media (max-width: 980px){
  /* reduce blur cost */
  .card, .panel, .glassCard, .toast{
    backdrop-filter: none !important;
  }
  /* reduce big shadows */
  .card, .panel, .caseCard, .glassCard{
    box-shadow: 0 10px 30px rgba(0,0,0,.45) !important;
  }
}

/* accessibility + battery saver: reduce motion */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}



/* === FINAL MOBILE NAV FIX: show language toggle, hide float buttons === */
@media (max-width: 980px){
  /* Hide floating buttons ("Кнопка" + "Главная") */
  .floatbar, .floatbtn, .floatbtn--up{display:none !important;}

  /* Make language toggle always visible (even on tight widths) */
  .header__actions{display: contents !important;}
  .header__actions > :not(.langToggle){display:none !important;}
  }



/* === Mobile: center language toggle without blocking burger/menu === */
@media (max-width: 980px){
  .header__inner{position:relative;}
  /* keep burger clickable above everything */
  .burger{position:relative; z-index: 90;}
  /* show only burger + lang switch in header actions */
  .header__actions{display:flex !important; align-items:center; gap:10px;}
  .header__actions > :not(.langToggle):not(.burger){display:none !important;}

  .langToggle{
    position:absolute;
    left:50%;
    top:50%;
    transform: translate(-50%,-50%) scale(.95);
    z-index: 60;
    margin:0;
  }
  /* avoid header growing too tall */
  .header{padding-top:0;}
}



/* === Mobile-only: spacing so language toggle never overlaps brand or burger/menu === */
@media (max-width: 980px){
  /* keep header layout stable */
  .header__inner{
    display:flex !important;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  /* reserve space for actions on the right */
  .brand{
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 10px;
  }
  .brand__name{
    max-width: calc(100vw - 170px); /* room for lang toggle + burger */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header__actions{
    display:flex !important;
    align-items:center;
    gap:10px;
    flex: 0 0 auto;
  }

  /* language toggle stays inline (no overlay) and keeps distance from brand */
  .langToggle{
    position: static !important;
    margin-left: 8px;
    margin-right: 2px;
    transform: none !important;
    z-index: 1;
  }

  /* burger always clickable */
  .burger{position:relative; z-index: 5;}

  /* when mobile menu is open, ensure it sits above content (but below header) */
  .mobile{
    z-index: 4;
  }
}



/* === Hero portrait on homepage === */
.heroPortrait{
  position: relative;
  width: min(420px, 44vw);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.10);
}

.heroPortrait__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  transform: translateZ(0);
}

/* light gradient overlay (requested) */
.heroPortrait::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.55) 100%);
}

/* Mobile: show portrait, keep it clean and not huge */
@media (max-width: 980px){
  .heroPortrait{
    width: min(360px, 92vw);
    margin: 0 auto 16px;
    border-radius: 22px;
  }
  .hero__grid{
    grid-template-columns: 1fr !important;
  }
  .hero__visual{
    order: -1;
  }
}



/* === Portrait overlay gradient (requested) === */
.portrait{
  position: relative;
  overflow: hidden;
}
.portrait::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.28) 55%, rgba(0,0,0,.52) 100%);
}

/* Mobile: keep portrait visible and nicely placed */
@media (max-width: 980px){
  .hero__grid{grid-template-columns: 1fr !important;}
  .hero__right{order:-1;}
  .portrait{max-width: 92vw; margin: 0 auto 14px;}
}



/* === Contacts page premium tweaks (safe, minimal) === */
.contactList{display:flex;flex-direction:column;gap:10px}
.contactRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 12px;
  border-radius:16px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
}
.contactValue{color: rgba(255,255,255,.90)}
.callout{
  border-radius:18px;
  background: rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.09);
}
@media (max-width: 980px){
  .grid2{grid-template-columns:1fr !important;}
  .contactRow{padding:12px}
}



/* === Contacts: single centered wide block === */
.contactsOne{
  display:flex;
  justify-content:center;
}
.contactsOne > .glassCard{
  width:100%;
  max-width: 980px;
}
@media (max-width: 980px){
  .contactsOne{justify-content:stretch;}
  .contactsOne > .glassCard{max-width: 100%;}
}

/* === Active menu highlight === */
.nav__link.is-active,
.mobile__link.is-active{
  color: rgba(255,255,255,.95);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}



/* === Contacts single card premium layout === */
.contactsCard{
  text-align:left;
}
.contactsCard .h3{letter-spacing:.2px;}
.contactsCard .btn--primary{min-width: 240px;}
@media (max-width: 980px){
  .contactsCard .btn--primary{width:100%; min-width:0;}
}



/* === Neutral home button (replaces removed float buttons) === */
.btn--soft{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
}
.btn--soft:hover{background: rgba(255,255,255,.08); transform: translateY(-1px);}
.btn--soft:active{background: rgba(0,0,0,.35); transform: translateY(0);}
.btn--soft{transition: transform .18s var(--ease-out), background .18s var(--ease-out), color .18s var(--ease-out);}

body.is-fading{opacity:0; transition: opacity .18s var(--ease-out);}
body{transition: opacity .18s var(--ease-out);}

/* Contacts consent */
.consent{margin-top:10px; font-size: 13px; line-height: 1.35;}

/* === Cases showcase === */
.casesShow{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 14px;
}
.caseTile{
  padding:0;
  overflow:hidden;
}
.caseTile__img{
  width:100%;
  height: 180px;
  object-fit: cover;
  display:block;
}
.caseTile__body{padding:14px 14px 16px;}

/* Consent checkbox row (contacts form) */
.consent-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:4px;
  flex-wrap:wrap;
}

/* Premium consent frame (more visible on mobile) */
.consentFrame{
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
}

/* Show different consent blocks per breakpoint (desktop stays as-is) */
.consentFrame--mobile{display:none;}
@media (max-width: 640px){
  .consentFrame--desktop{display:none;}
  .consentFrame--mobile{display:block;}
}
.consentFrame__head{display:flex; flex-direction:column; gap:4px; margin-bottom:10px;}
.consentFrame__title{font-size:13px; font-weight:600; letter-spacing:.2px; color: rgba(255,255,255,.92);}
.consentFrame__sub{font-size:12px; line-height:1.35; color: rgba(255,255,255,.68);}

.consentFrame .consent-row{margin-top:0;}
.consentFrame .consent-label{font-size:13px; color: rgba(255,255,255,.86);}
.consentFrame .consent-label input{width:20px;height:20px}

@media (max-width: 640px){
  .consentFrame{padding: 14px 14px; border-radius: 20px;}
  .consentFrame__title{font-size:14px;}
  .consentFrame__sub{font-size:12px;}
  .consentFrame .consent-row{align-items:flex-start;}
  .consentFrame .consent-label{gap:12px; font-size:14px; line-height:1.35;}
}
.consent-label{
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  user-select:none;
  font-size:13px;
  color: rgba(255,255,255,.82);
}
.consent-label input{width:18px;height:18px}
.consent-link{text-decoration:underline;opacity:.9;white-space:nowrap}
.consent-link:hover{opacity:1}
.consent-error{
  outline:2px solid rgba(255,80,80,.9);
  outline-offset:6px;
  border-radius:12px;
}
button.is-disabled{opacity:.6;cursor:not-allowed}

@media (max-width: 980px){
  .casesShow{grid-template-columns: 1fr; gap: 12px;}
  .caseTile__img{height: 190px;}
}


/* Consent block on Contacts */
.consent-box{
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--r);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow2);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.consent-box__title{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}


/* Final adaptive polish */
:root{--header-h:72px;--focus:#36d1ff;}
:focus-visible{outline:2px solid var(--focus);outline-offset:3px;}
.burger{min-width:44px;min-height:44px;align-items:center;justify-content:center;}
.burger.is-open span:nth-child(1){transform:translateY(6px) rotate(45deg);}
.burger.is-open span:nth-child(2){opacity:0;}
.burger.is-open span:nth-child(3){transform:translateY(-6px) rotate(-45deg);}
.burger span{transition:transform .2s var(--ease-out), opacity .2s var(--ease-out);}
.mobile{max-height:0;overflow:hidden;display:block;opacity:0;transform:translateY(-6px);transition:max-height .25s var(--ease-out),opacity .2s var(--ease-out),transform .2s var(--ease-out);}
.mobile.is-open{max-height:calc(100vh - var(--header-h));overflow:auto;opacity:1;transform:translateY(0);}
body.menu-open{overscroll-behavior:contain;}
.nav__link.is-active,.mobile__link.is-active{color:var(--text);background:rgba(54,209,255,.12);border-color:rgba(54,209,255,.25);}
.articleMedia{margin:0 0 18px;border-radius:18px;overflow:hidden;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);}
.articleMedia img{width:100%;aspect-ratio:16/7;object-fit:cover;}
select.field__input{appearance:none;background-image:linear-gradient(45deg,transparent 50%,rgba(255,255,255,.7) 50%),linear-gradient(135deg,rgba(255,255,255,.7) 50%,transparent 50%);background-position:calc(100% - 18px) 50%,calc(100% - 12px) 50%;background-size:6px 6px;background-repeat:no-repeat;}
@media (max-width:980px){
  .header__inner{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;padding:10px 0;}
  .brand__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:42vw;}
  .nav{display:none!important;}
  .header__actions{display:flex!important;position:static!important;transform:none!important;grid-column:2;}
  .header__actions>:not(.langToggle){display:none!important;}
  .burger{display:inline-flex!important;grid-column:3;position:relative;z-index:91;}
  .mobile{position:fixed;left:0;right:0;top:64px;z-index:80;background:rgba(7,7,12,.96);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.10);box-shadow:0 24px 70px rgba(0,0,0,.42);}
  .mobile__inner{padding:16px 4%;}
  .mobile__link{min-height:48px;display:flex;align-items:center;}
  .h1{font-size:clamp(34px,7vw,56px);line-height:1.02;}
  .lead{font-size:16px;}
  .hero__actions,.form__actions{display:grid;grid-template-columns:1fr;}
  .btn{min-height:46px;}
  .articleMedia img{aspect-ratio:16/10;}
}
@media (max-width:520px){
  .container{width:min(100% - 28px,1160px);}
  .badge{border-radius:16px;}
  .section__top{align-items:flex-start;}
  .caseCard__img img,.portrait img{min-height:260px;object-fit:cover;}
  .heroCard{position:static;margin-top:12px;}
  .chips{gap:8px;}
  .chip,.tag{font-size:12px;}
  .footer__inner{gap:14px;}
}

/* Themed case imagery */
.caseTile__img{background:#0d1017;object-fit:cover;border-bottom:1px solid rgba(255,255,255,.08);}
.caseTile.glassCard{transition:transform .18s var(--ease-out),border-color .18s var(--ease-out),box-shadow .18s var(--ease-out);}
.caseTile.glassCard:hover{transform:translateY(-3px);border-color:rgba(54,209,255,.22);box-shadow:0 18px 46px rgba(0,0,0,.34);}
.caseTile__body .h3{line-height:1.25;}
.caseTile__body .p{margin-top:8px;}
@media (max-width:980px){.caseTile__img{height:210px;}}
@media (max-width:520px){.caseTile__img{height:188px;}}


/* Contact channel select cleanup */
select.field__input{color:var(--text);background-color:rgba(255,255,255,.045);}
select.field__input option{background:#12141c;color:#f3f5fb;}
select.field__input option:checked{background:#2563d6;color:#fff;}
.form__actions .btn{flex:0 1 auto;}
@media (max-width:720px){.form__actions .btn{width:100%;}}


/* Contact channel segmented choice */
.channelChoice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.channelChoice__item{position:relative;display:flex;align-items:center;justify-content:center;min-height:44px;padding:11px 14px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.04);color:var(--muted);font-weight:700;cursor:pointer;transition:background .18s var(--ease-out),border-color .18s var(--ease-out),color .18s var(--ease-out),box-shadow .18s var(--ease-out);}
.channelChoice__item input{position:absolute;opacity:0;pointer-events:none;}
.channelChoice__item:has(input:checked){color:var(--text);border-color:rgba(54,209,255,.38);background:linear-gradient(135deg,rgba(124,92,255,.26),rgba(54,209,255,.16));box-shadow:0 12px 34px rgba(54,209,255,.10);}
.channelChoice__item:focus-within{outline:2px solid var(--focus);outline-offset:3px;}
@media (max-width:520px){.channelChoice{grid-template-columns:1fr;}}


/* Footer legal note */
.footer__note{width:min(1160px,92%);margin:12px auto 0;color:rgba(255,255,255,.38);font-size:12px;line-height:1.45;}
@media (max-width:640px){.footer__note{width:min(100% - 28px,1160px);font-size:11px;}}

/* Mobile layout v2 — one source of truth for controls and viewport */
html {overflow-x:clip;scroll-padding-top:88px;overscroll-behavior-x:none;}
body {width:100%;min-width:0;overflow-x:clip;overscroll-behavior-x:none;}
img,video,svg {max-width:100%;}
.header {transform:none;will-change:auto;isolation:isolate;}
.header__inner {min-height:64px;}
.mobile {visibility:hidden;pointer-events:none;}
.mobile.is-open {visibility:visible;pointer-events:auto;}
@media(max-width:980px){
  :root{--header-h:64px;}
  .header{position:sticky;top:0;z-index:200;}
  .header .container{width:calc(100% - 28px);max-width:1160px;}
  .header__inner{display:flex!important;position:relative;align-items:center;justify-content:space-between;gap:8px;padding:8px 0!important;min-height:64px;}
  .brand{flex:1 1 auto;min-width:0;max-width:none;padding:0;}
  .brand__name{font-size:clamp(13px,3.7vw,16px);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .nav{display:none!important;}
  .header__actions{display:flex!important;position:static!important;transform:none!important;flex:0 0 auto;grid-column:auto;gap:0;margin:0;}
  .header__actions>:not(.langToggle){display:none!important;}
  .langToggle,.header__actions .langToggle{display:flex!important;position:static!important;transform:none!important;margin:0!important;padding:5px 6px;gap:5px;}
  .langToggle__switch{width:40px;height:25px;flex:none;}
  .langToggle__thumb{width:19px;height:19px;}
  .langToggle.is-en .langToggle__thumb{transform:translateX(15px);}
  .langToggle__label{font-size:11px;}
  .burger{display:inline-flex!important;position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;flex:0 0 44px;flex-direction:column;align-items:center;justify-content:center;z-index:202;min-width:44px;min-height:44px;padding:7px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.1);}
  .burger span{flex:none;margin:3px 0;}
  .mobile{display:block!important;position:fixed;top:var(--header-h);left:0;right:0;bottom:auto;max-height:0;opacity:0;overflow:hidden;visibility:hidden;pointer-events:none;transform:translateY(-10px);transition:max-height .32s cubic-bezier(.22,1,.36,1),opacity .24s ease,transform .32s ease,visibility .32s;background:rgba(9,10,19,.98);border-bottom:1px solid rgba(255,255,255,.10);box-shadow:0 22px 40px rgba(0,0,0,.35);z-index:201;}
  .mobile.is-open{max-height:calc(100dvh - var(--header-h));overflow-y:auto;overscroll-behavior:contain;opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0);-webkit-overflow-scrolling:touch;}
  .mobile__inner{width:calc(100% - 28px);padding:16px 0 24px;}
  .mobile__link{min-height:48px;display:flex;align-items:center;}
  .main,main,.footer,section{min-width:0;}
  .hero__grid{min-width:0;}
}
@media(max-width:370px){.header .container{width:calc(100% - 20px)}.header__inner{gap:5px}.langToggle{gap:3px!important;padding:4px!important}.langToggle__label{font-size:10px}.brand__name{font-size:12px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}.mobile,.burger span{transition:none!important}}

/* Mobile viewport scale lock — normal vertical page scrolling remains enabled. */
@media (pointer:coarse) {
  html, body { touch-action: pan-y; -ms-touch-action: pan-y; }
  input, textarea, select { font-size: max(16px, 1em); }
}
