:root{
  --blue:#0054ff;
  --text:#1a1a1a;
  --muted:#666;
  --bg:#ffffff;
  --max: 1100px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

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

/* Prevent accidental horizontal scroll on mobile due to big transforms */
body{ overflow-x:hidden; }

.container{
  width:min(var(--max), calc(100% - 48px));
  margin-inline:auto;
}

/* ---------- header ---------- */
.header{
  position:sticky;
  top:0;
  z-index:50;
  background:#ffffffd9;
  border-bottom:1px solid rgba(255, 255, 255, 0.04);
}
.header__inner{
  height:88px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.lang{
  display:flex;
  gap:22px;
  align-items:flex-end;
}
.lang__btn{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  background:transparent;
  border:0;
  padding:6px 4px;
  cursor:pointer;
  color:var(--text);
}
.lang__btn img{
  width:50px;
  height:50px;
  object-fit:contain;
}
.lang__btn span{
  font-size:13px;
  letter-spacing:.02em;
  opacity:.9;
}
.lang__btn.is-active span{
  font-weight:700;
}

.burger{
  width:54px;
  height:42px;
  border:0;
  background:transparent;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:7px;
}
.burger span{
  height:3px;
  width:36px;
  background:var(--blue);
  border-radius:999px;
  margin-left:auto;
}

/* ---------- menu overlay ---------- */
.menu{
  position:fixed;
  inset:0;
  z-index:80;
  pointer-events:none;
  font-family: bely-display, sans-serif;
  font-style: normal;
  font-weight: 400;
  color:#0054ff;
}
.menu.is-open{ pointer-events:auto; }

.menu__backdrop{
  position:absolute;
  inset:0;
  background:rgba(255,255,255,.356);
  border:0;
  opacity:0;
  transition:opacity .2s ease;
  z-index:0;
}
.menu.is-open .menu__backdrop{ opacity:1; }

.menu__panel{
  position:absolute;
  top:0; right:0;
  width:min(380px, 92vw);
  height:100%;
  background:#fff;
  transform:translateX(100%);
  transition:transform .25s ease;
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:12px;
  z-index:1;

  /* mobile/iOS: allow menu content to scroll if it doesn’t fit */
  overflow-y:auto;
  -webkit-overflow-scrolling: touch;
}
.menu.is-open .menu__panel{ transform:translateX(0); }

.menu__close{
  align-self:flex-end;
  border:0;
  background:transparent;
  font-size:20px;
  cursor:pointer;
  padding:8px;
}
.menu__link{
  padding:14px 10px;
  border-radius:0;
  font-size:18px;
}
.menu__link:hover{ background:rgba(10,102,255,.08); }

/* ---------- logo rotate ---------- */
@keyframes logoRotate{
  0%   { transform: rotate(0deg); }
  40%  { transform: rotate(90deg); }
  60%  { transform: rotate(90deg); }
  100% { transform: rotate(0deg); }
}

/* ---------- hero mark ---------- */
.heroMark{ padding:70px 0 90px; }
.heroMark__inner{ text-align:center; }

.heroMark__logo{
  width:min(220px, 70vw);
  margin:0 auto 24px;
  transform-origin:center center;
  animation: logoRotate 10s ease-in-out infinite;
}

.heroMark__name{
  font-family: bely-display, sans-serif;
  font-style: normal;
  font-weight: 400;
  margin:0;
  font-size:44px;
  font-weight:800;
  letter-spacing:-.02em;
}
.heroMark__role{
  margin:8px 0 0;
  color:var(--muted);
  font-size:18px;
}

/* ---------- section titles ---------- */
.titleBlue{
  color:var(--blue);
  font-weight:900;
  letter-spacing:-.02em;
  margin:0 0 34px;
  font-size:54px;
  line-height:1;
  font-family: bely-display, sans-serif;
  font-style: normal;
}
.titleBlue--center{ text-align:center; }
.titleBlue--mt{ margin-top:46px; }

.titleBig{
  font-family: bely-display, sans-serif;
  font-style: normal;
  color:var(--blue);
  font-weight:900;
  font-size:78px;
  margin:0 0 10px;
  line-height:1;
}

/* ---------- hi section ---------- */
.hi{ padding:70px 0 90px; }
.hi__inner{ text-align:center; max-width:840px; }
.hi__lead{
  font-family:"montserrat", sans-serif;
  font-weight:400;
  font-style:normal;
  font-size:24px;
  margin:0 0 20px;
  line-height:1.35;
}
.hi__sub{
  font-family:"montserrat", sans-serif;
  font-weight:400;
  font-style:normal;
  color:var(--muted);
}
.hi__body{
  font-family:"montserrat", sans-serif;
  font-weight:400;
  font-style:normal;
  margin:0 auto;
  color:var(--muted);
  font-size:20px;
  line-height:1.8;
  max-width:760px;
}

/* ---------- band ---------- */
.band{
  background:var(--blue);
  color:#fff;
  padding:100px 0;
  margin-top:100px;
}
.band__inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
  text-align:center;
}
.band__text{
  margin:0;
  font-size:16px;
  letter-spacing:.02em;
  opacity:.95;
}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:16px 28px;
  border-radius:0;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:lowercase;
  font-family:bely-display, sans-serif;
  font-style:normal;
  font-size:34px;
  line-height:1;
  border:2px solid transparent;
}
.btn--light{ background:#fff; color:var(--blue); }
.btn--blue{ background:var(--blue); color:#fff; }
.btn--wide{
  width:min(560px, 100%);
  font-size:40px;
  padding:18px 24px;
}

/* ---------- generic sections ---------- */
.section{ padding:90px 0; margin-top:100px; }
.section--split{ padding:90px 0 110px; }

/* ---------- lists ---------- */
.stack{
  display:flex;
  flex-direction:column;
  gap:18px;
  max-width:760px;
}

.item{
  display:grid;
  grid-template-columns:90px 1fr;
  gap:22px;
  align-items:start;
}
.item__year{ font-weight:900; font-size:20px; }
.item__title{ font-weight:700; font-size:18px; margin-bottom:4px; }
.item__meta{ color:var(--muted); font-size:16px; }

/* ---------- education layout + image ---------- */
.educationGrid{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:60px;
  align-items:start;
}

.educationMedia{
  position:sticky;
  top:120px;
  align-self:start;
  pointer-events:none;
}

.educationMedia__img{
  width:450px;
  max-width:450px;
  height:auto;
  display:block;
  transform: translateX(140%) translateX(-40px);
  will-change: transform;
}

/* ---------- experience split ---------- */
.split{
  display:grid;
  grid-template-columns:1.2fr .9fr;
  gap:80px;
  align-items:start;
}
.stack--spaced{ gap:26px; }

.xp{
  display:grid;
  grid-template-columns:110px 1fr;
  gap:22px;
}
.xp__year{ font-weight:900; font-size:18px; }
.xp__role{ font-weight:800; margin-bottom:2px; }
.xp__company, .xp__place{ color:var(--muted); line-height:1.5; }

/* hobbies + side projects icons */
.miniList{ display:flex; flex-direction:column; gap:18px; }
.mini{ display:flex; gap:12px; align-items:center; color:var(--text); }
.mini img{ width:64px; height:64px; object-fit:contain; }
.mini small{ color:var(--muted); font-size:13px; }

/* ---------- experience image ---------- */
.experienceMedia{
  position: sticky;
  top: calc(50vh - 326px); /* 326 = half of 652px image height */
  width:100%;
  display:flex;
  justify-content:flex-start;
  pointer-events:none;
  z-index:1;
  margin-top:10px;
}

.experienceMedia__img{
  width:550px;
  height:auto;
  object-fit:contain;
  display:block;
  transform: translateX(-120vw);
  will-change: transform;
}

/* ---------- expertise layout + sticky images ---------- */
.expertiseGrid{
  display:grid;
  grid-template-columns: 1fr 380px;
  gap:60px;
  align-items:start;
}

.expertiseMedia{
  position:sticky;
  top:120px;
  align-self:start;
  pointer-events:none;
  position:relative;
  overflow:visible;
}

.expertiseMedia__img{
  width:100%;
  max-width:380px;
  height:auto;
  display:block;
  transform: translateX(140%);
  will-change: transform;
}

/* UFO above abducted man */
.expertiseUfo__img{
  position:absolute;
  top:-320px;
  right:-100px;
  width:520px;
  height:auto;
  display:block;
  transform: translateX(-120vw);
  will-change: transform;
}

/* ---------- expertise icons grid ---------- */
.grid{
  display:grid;
  gap:34px;
}
.grid--expertise{
  grid-template-columns: repeat(4, 1fr);
  align-items:start;
  margin-top:10px;
}
.skill{ text-align:center; }
.skill img{
  width:100px;
  height:100px;
  object-fit:contain;
  margin:0 auto 12px;
}
.skill p{ margin:0; color:var(--muted); }

/* ---------- portfolio grid ---------- */
.grid--portfolio{
  grid-template-columns: repeat(2, 1fr);
  gap:22px;
  margin-top:14px;
}
.card{
  position:relative;
  background:var(--blue);
  min-height:220px;
  overflow:hidden;
}
.card img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform:scale(1.01);
  transition:transform .25s ease;
}
.card:hover img{ transform:scale(1.05); }

.center{ display:flex; justify-content:center; margin-top:40px; }

/* ---------- contact ---------- */
.section--contact{ padding:90px 0 60px; }
.contact{ text-align:center; }
.contact__text{
  margin:0 auto 28px;
  color:var(--muted);
  font-size:18px;
  line-height:1.7;
  max-width:520px;
}
.contact__follow{ margin:46px 0 14px; color:var(--muted); }
.social{ display:flex; justify-content:center; gap:26px; margin:16px 0 26px; }
.social__icon{
  width:46px;
  height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.social__icon img{ width:46px; height:46px; object-fit:contain; }

.footer{
  margin-top:20px;
  color:var(--muted);
  font-size:12px;
  letter-spacing:.06em;
}

/* --- Made with AI line --- */
.footer__ai{
  margin-top:20px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap; /* mobile wrap instead of overflow */
  text-align:center;
}
.footer__ai img{
  width:30px;
  height:30px;
  object-fit:contain;
  display:block;
}

/* ---------- responsive ---------- */
@media (max-width: 980px){
  .split{ grid-template-columns:1fr; gap:60px; }
  .grid--expertise{ grid-template-columns:repeat(3, 1fr); }
  .educationGrid{ grid-template-columns:1fr; }
  .educationMedia{ position:relative; top:auto; }
  .educationMedia__img{ max-width:420px; margin:28px auto 0; transform:none; }

  .experienceMedia{ position:relative; top:auto; justify-content:center; }
  .experienceMedia__img{ width:min(750px, 92vw); height:auto; transform:none; }

  .expertiseGrid{ grid-template-columns:1fr; }
  .expertiseMedia{ position:relative; top:auto; }
  .expertiseMedia__img{ max-width:520px; margin:28px auto 0; transform:none; }
  .expertiseUfo__img{
    position:relative;
    top:auto; right:auto;
    width:min(520px, 92vw);
    margin:0 auto 14px;
    transform:none;
  }
}

@media (prefers-reduced-motion: reduce){
  .educationMedia__img,
  .experienceMedia__img,
  .expertiseMedia__img,
  .expertiseUfo__img{
    transform:none !important;
    transition:none !important;
  }
}

/* Existing mobile breakpoint */
@media (max-width: 680px){
  .header__inner{ height:78px; }

  .titleBlue{ font-size:44px; }
  .titleBig{ font-size:62px; }
  .heroMark__name{ font-size:36px; }

  .btn{ font-size:28px; }
  .btn--wide{ font-size:30px; }

  .grid--expertise{ grid-template-columns:repeat(2, 1fr); }
  .grid--portfolio{ grid-template-columns:1fr; }

  .item{ grid-template-columns:70px 1fr; }
  .xp{ grid-template-columns:92px 1fr; }
  .mini img{ width:56px; height:56px; }

  /* Reduce “too tall” feeling on mobile */
  .section{ padding:56px 0; margin-top:48px; }
  .section--split{ padding:56px 0 64px; }
  .band{ padding:64px 0; margin-top:48px; }
  .heroMark{ padding:56px 0 64px; }
  .hi{ padding:56px 0 64px; }
}

/* NEW: small phones */
@media (max-width: 420px){
  .container{
    width: min(var(--max), calc(100% - 24px));
  }

  .lang{ gap:10px; align-items:center; }
  .lang__btn{ padding:4px 2px; gap:4px; }
  .lang__btn img{ width:34px; height:34px; }
  .lang__btn span{ font-size:11px; }

  .burger{ width:44px; height:38px; }
  .burger span{ width:28px; }

  .titleBig{ font-size:52px; }
  .titleBlue{ font-size:38px; margin-bottom:24px; }
  .heroMark__name{ font-size:32px; }
  .heroMark__role{ font-size:16px; }

  .hi__lead{ font-size:20px; }
  .hi__body{ font-size:18px; }

  .btn{ font-size:24px; padding:14px 22px; }
  .btn--wide{ font-size:26px; }
  .menu__link{ font-size:17px; padding:12px 10px; }
}

/* NEW: ultra-small (old iPhone SE etc.) */
@media (max-width: 360px){
  .lang{ gap:8px; }
  .lang__btn img{ width:30px; height:30px; }
  .titleBig{ font-size:46px; }
  .btn--wide{ font-size:24px; }
}