/* Figma: "final website" (1920px). O'lchamlar dizayndan olingan. */

:root {
  /* Figma rang tokenlari: "Tokens" kolleksiyasi → Dark rejim (Primitives'ga alias). Nomlari Figma'dagidek */
  --color-bg: #000000;                         /* bg/canvas → neutral/1000 */
  --color-surface: #101010;                    /* bg/surface → neutral/900 */
  --color-surface-subtle: #232323;             /* bg/surface-subtle → neutral/800 */
  --tertiary-block: #353535;                   /* bg/surface-hover → neutral/700 */
  --tertiary-block-pressed: #484848;           /* neutral/600 */
  --color-primary: #4338ca;                    /* brand/primary → indigo/700 (fon, tugma) */
  --color-primary-hover: #4f46e5;              /* brand/primary-hover → indigo/600 */
  --accent-text: #818cf8;                      /* brand/accent-text → indigo/400 (qora fonda matn) */
  --text-primary: #ffffff;                     /* text/primary → neutral/0 */
  --text-secondary: #989898;                   /* text/secondary → neutral/400 (7.3:1) */
  --text-tertiary: #6f6f6f;                    /* text/muted → neutral/450 (4.2:1) */
  --text-success: #10b981;                     /* status/success → emerald/500 */
  --text-warning: #f59e0b;                     /* status/warning → amber/500 */
  --success-soft: #05160a;                     /* semantic/color-success-soft */
  --stroke-10: #232323;                        /* border/subtle → neutral/800 */
  --border-strong: #353535;                    /* border/strong → neutral/700 */
  --icon-tertiary: #484848;                    /* neutral/600 */

  /* Eski nomlar — tokenlarga bog'langan (butun sayt shular orqali bo'yaladi) */
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --surface: var(--color-surface);
  --accent: var(--color-primary);
  --bg: var(--color-bg);

  /* Figma matn stillari (Inter Tight, letter-spacing −1%) */
  --fs-heading1: 56px;   /* interface/title/heading1 — 56 / 1 */
  --fs-title2: 28px;     /* interface/title/title2   — 28 / 1 */
  --fs-bodyL: 20px;      /* interface/basic/bodyL    — 20 / 1.2 */

  --container: 1424px;   /* Figma: kontent kengligi */

  --wrap: 920px;          /* yuqori qism kengligi */
  --edge: 32px;           /* sahifa chetidan masofa */
  --side-w: 452px;        /* chap havolalar ustuni (Figma) */
  --radius-shot: 48px;

  /* Yangi dizayn shriftlari (bosh sahifa bilan bir xil): sarlavhalar Roboto Flex, matnlar Onest */
  --font: "Onest", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Roboto Flex", "Roboto Condensed", "Arial Narrow", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

/* Matn belgilanganda: och to'q sariq fon, matn o'z rangida */
::selection { background: color-mix(in srgb, var(--color-primary) 55%, transparent); color: var(--text); }
img::selection, video::selection { background: transparent; }

html { scroll-behavior: smooth; }

html { background: var(--bg); color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
  font-feature-settings: "lnum" 1, "pnum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

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

/* ---------- Hero ----------
   Figma (1920px): surat, ism va bio ishlar ustuni bilan bir chiziqda (x=500).
   Shuning uchun hero ham kontent bilan bir xil setkada: 452px bo'sh ustun + 16px + asosiy ustun. */

.hero {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  column-gap: 16px;
  padding: 100px var(--edge) 0;
}

.hero__col { grid-column: 2; min-width: 0; }

/* Dumaloq surat: 300×300, ichida 262×262 rasm (19px chetdan). Bosilganda navbatdagi surat */
.avatar {
  position: relative;
  display: block;
  width: 300px;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(0.42, 0, 0.58, 1);
}

.avatar:active { transform: scale(0.97); }
.avatar[disabled] { cursor: default; }

.avatar__img {
  position: absolute;
  inset: 0;                          /* surat doirani to'liq egallaydi */
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.3s cubic-bezier(0.42, 0, 0.58, 1);
}

.avatar__img.is-active { opacity: 1; }

.hero__name {
  max-width: var(--wrap);
  margin: 40px 0 24px;
  font-family: "Vollkorn", Georgia, "Times New Roman", serif;
  font-weight: 400;
  /* Figma: Vollkorn Regular 155 / line-height 70% / letter-spacing -4% */
  font-size: 155px;          /* tor ekranda main.js kichraytiradi */
  line-height: 0.7;
  letter-spacing: -0.04em;
  color: var(--accent-text);
  white-space: nowrap;
}

.hero__bio {
  max-width: 480px;
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  white-space: pre-line;
}

/* ---------- Havolalar ---------- */

.links { list-style: none; margin: 0; padding: 0; }

.links a {
  text-decoration: none;
  transition: color 0.15s;
}

.links a:hover { color: var(--accent-text); }

.links--side {
  display: flex;
  flex-direction: column;
  gap: 8px;               /* Figma: qatorlar orasi 37px */
  font-size: 24px;
  line-height: 1.2;
}

.links--inline {
  display: none;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  font-size: 18px;
  color: var(--muted);
}

.links--inline a:hover { color: var(--text); }

/* ---------- Tablar ---------- */

.tabs {
  display: flex;
  justify-content: center;
  padding-top: 168px;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 18px 24px;
  border-radius: 60px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s;
}

.tab:hover { background: var(--color-surface); }
.tab.is-active { background: var(--surface); }

/* ---------- Kontent ----------
   Figma (1920px): havolalar ustuni 32px → 484px, 16px oraliq, ishlar 500px → 1888px.
   Ikki yonda 32px qoladi. Katta monitorda ishlar ustuni kengayadi,
   rasmlar esa proporsiyasini saqlab kattalashadi. */

.content {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
  margin-top: 48px;
  padding: 0 var(--edge) 160px;
}

.content > .panel { grid-column: 2; grid-row: 1; }

/* Havolalar: ekranning chap pastki burchagida qotib turadi.
   Chap ustun (452px) bo'sh qoladi, shuning uchun ishlar Figma'dagi joyida turadi. */
.side {
  position: fixed;
  left: var(--edge);
  bottom: var(--edge);
  z-index: 20;
}

/* Ishlar */
.projects { display: flex; flex-direction: column; gap: 120px; }

.project__images {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shot {
  position: relative;
  display: block;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-shot);
  overflow: hidden;
  isolation: isolate;               /* Safari'da burchaklar hover paytida ham yumaloq qolsin */
}

.shot img {
  width: 100%;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  -webkit-user-drag: none;
  user-select: none;
}

/* Rasm ustidagi shaffof qatlam: Yandex brauzerining rasm asboblar paneli chiqmaydi */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Hover: rasm biroz kattalashadi (ramka o'lchami o'zgarmaydi). Loyiha sahifasida — yo'q */
@media (hover: hover) {
  .shot:hover img { transform: scale(1.03); }
  .detail .shot:hover img { transform: none; }
}

/* ---------- Rasmlarni himoyalash ---------- */

img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;      /* iPhone: barmoq bosib turganda "Saqlash" chiqmaydi */
  user-select: none;
}

.shot, .avatar, .hero__name { -webkit-touch-callout: none; user-select: none; }

/* Chop etish / PDF'ga saqlashda rasmlar chiqmaydi */
@media print {
  img, .shot, .avatar, .zoom, .bento, .card { visibility: hidden !important; }
}

/* ---------- Butun ekranda ko'rish (loyiha sahifasi) ---------- */

.detail .shot { cursor: zoom-in; }
.detail .shot:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
.detail .shot.is-zoom-source img,
.detail .shot.is-zoom-source video { visibility: hidden; }

html { scrollbar-gutter: stable; }
html.is-zoomed { overflow: hidden; }

.zoom {
  position: fixed;
  inset: 0;
  z-index: 100;
  cursor: zoom-out;
  background: rgba(0, 0, 0, 0);
  transition: background-color 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  outline: none;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: none;
}

.zoom.is-open { background: var(--color-bg); }

.zoom__img {
  position: absolute;
  max-width: none;
  transform-origin: 0 0;
  object-fit: contain;
  pointer-events: none;
  will-change: transform;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    border-radius 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Rasm ustidagi shaffof qatlam: brauzer rasm asboblari va "saqlash" ishlamaydi */
.zoom__shield { position: absolute; inset: 0; }

/* Galereya: o'tish animatsiyasi */
.zoom__img.is-leaving,
.zoom__img.is-entering {
  transition:
    transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.zoom__img.is-dragging { transition: none; }

/* Chap / o'ng strelkalar */
.zoom__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  border: 0;
  border-radius: 60px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, background 0.2s;
}
.zoom.is-open .zoom__nav { opacity: 1; }
.zoom__nav:hover { background: var(--tertiary-block); }
.zoom__nav--prev { left: var(--edge); }
.zoom__nav--next { right: var(--edge); }
.zoom__nav svg { display: block; }

.project__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Nomi (chapda) va kompaniya (o'ng chetda) bir qatorda */
.project__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
}

.project__name { color: inherit; text-decoration: none; min-width: 0; }

.project__company {
  flex: none;
  max-width: 45%;
  font-size: 24px;
  line-height: 1.2;
  color: var(--muted);
  text-align: right;
  text-decoration: none;
  transition: color 0.2s;
}
.project__company a { color: inherit; text-decoration: none; transition: color 0.2s; }
.project__company a:hover { color: var(--accent-text); }

.project:has(.project__link:hover, .project__name:hover) .project__title { color: var(--accent-text); }
.project__link:focus-visible { outline-offset: 6px; border-radius: var(--radius-shot); }

.project__title {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  transition: color 0.2s;
}


/* Shotlar */
.shots {
  columns: 2;
  column-gap: 16px;
}

.shots .shot-item {
  break-inside: avoid;
  margin: 0 0 16px;
}

.shots .shot { border-radius: 32px; }

.shot-item figcaption {
  margin-top: 12px;
  font-size: 18px;
}

.empty {
  padding: 120px 0;
  font-size: 24px;
  color: var(--muted);
}

.footer {
  padding: 0 var(--edge) 48px;
  font-size: 16px;
  color: var(--muted);
  text-align: center;
}


/* ---------- Header (Figma: loyiha sahifasi → Header 2704:7976) ----------
   Bosh sahifadagi header bilan bir xil (site.css'dan ko'chirilgan), faqat chapda logo va menyu o'rniga "orqaga" tugmasi */
.trim { text-box: trim-both cap alphabetic; }
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  padding: 12px var(--edge) 24px;
  background: rgba(255, 255, 255, 0.001);   /* Figma: oq 0,1% — amalda shaffof */
}

/* Figma: Progressive blur — tepada 32px, pastda 0.
   Bir nechta qatlam: har biri kuchsizroq blur va pastroqqacha yetadi,
   ustma-ust tushib tepada ~32px (28/14/7/3.5 → √Σ² ≈ 32), pastda 0 xiralik beradi. */
.nav__blur { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.nav__blur i { position: absolute; inset: 0; }
.nav__blur i:nth-child(1) { -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); -webkit-mask-image: linear-gradient(#000 0%, #000 20%, transparent 45%); mask-image: linear-gradient(#000 0%, #000 20%, transparent 45%); }
.nav__blur i:nth-child(2) { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); -webkit-mask-image: linear-gradient(#000 0%, #000 40%, transparent 65%); mask-image: linear-gradient(#000 0%, #000 40%, transparent 65%); }
.nav__blur i:nth-child(3) { -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); -webkit-mask-image: linear-gradient(#000 0%, #000 60%, transparent 85%); mask-image: linear-gradient(#000 0%, #000 60%, transparent 85%); }
.nav__blur i:nth-child(4) { -webkit-backdrop-filter: blur(3.5px); backdrop-filter: blur(3.5px); -webkit-mask-image: linear-gradient(#000 0%, #000 75%, transparent 100%); mask-image: linear-gradient(#000 0%, #000 75%, transparent 100%); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__left { display: flex; align-items: center; gap: 16px; }
.nav__logo { display: block; width: 42px; height: 24px; border-radius: 4px; }
.nav__logo img { width: 42px; height: 24px; }
.nav__list { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.nav__item { position: relative; }
.nav__link {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-radius: 60px;
  background: transparent;
  color: var(--text-primary);
  font: 400 condensed 16px/1.2 var(--font-head);   /* title5 */
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s var(--ease);
}
.nav__link:hover { background: var(--color-surface); }

/* "Tez kunda" — hali tayyor bo'lmagan sahifa bosilganda chiqadigan kichik yozuv */
.nav__soon {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  translate: -50% -4px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--color-surface-subtle);
  color: var(--text-secondary);
  font: 400 14px/1.3 var(--font-body);
  letter-spacing: -0.04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, translate 0.2s var(--ease);
}
.nav__item.is-soon .nav__soon { opacity: 1; translate: -50% 0; }

.nav__right { display: flex; align-items: center; gap: 16px; }
.nav__tools { display: flex; align-items: center; gap: 6px; }

/* Telegram — asosiy CTA (Figma: Header → button). control/button/m: Roboto Flex Medium 16, oddiy kenglik */
.nav__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;   /* joy Figmadagidek (stroke inside, layout'ga kiradi); chizig'i ::after'da */
  border-radius: 60px;
  background: linear-gradient(180deg, #6366f1 0%, #1e1b4b 100%) border-box;   /* indigo/500 → indigo/950, hoshiya ostidan ham */
  box-shadow: inset 0 13px 20px -5px rgba(255, 255, 255, 0.5);
  color: #ffffff;
  font: 500 16px/1.2 var(--font-head);
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.2s var(--ease);
}
/* Hover: yorqinroq qatlam (gradient'ni silliq almashtirish uchun alohida qatlam) */
.nav__cta::before { content: ""; position: absolute; inset: -1px; z-index: -1; background: rgba(255, 255, 255, 0.08); opacity: 0; transition: opacity 0.35s var(--ease); }
.nav__cta:hover::before { opacity: 1; }
/* Hoshiya — Figma: gradient stroke, tepada oq 14% → pastda 4%, 1px, ichkarida */
.nav__cta::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.nav__cta:active { transform: scale(0.97); }
.nav__sound {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.nav__sound:hover { background: var(--color-surface); color: var(--text-primary); }
.nav__sound svg { width: 20px; height: 20px; }
.nav__sound .wave { transition: opacity 0.2s; }
.nav__sound.is-off .wave { opacity: 0; }
.nav__sound .cross { opacity: 0; transition: opacity 0.2s; }
.nav__sound.is-off .cross { opacity: 1; }

/* RU / EN (Figma: "Til") */
.seg { display: flex; align-items: center; padding: 2px; border-radius: 60px; background: var(--color-surface); }
.seg__btn {
  min-width: 46px;
  padding: 12px 14px;
  border: 0;
  border-radius: 60px;
  background: transparent;
  color: var(--text-primary);
  font: 400 14px/1.3 var(--font-body);   /* bodyS */
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.seg__btn span { display: block; }
.seg__btn:not(.is-current) { color: var(--text-secondary); }
.seg__btn:not(.is-current):hover { color: var(--text-primary); }
.seg__btn.is-current { background: var(--color-bg); }

html.is-zoomed .nav { visibility: hidden; }
.nav .back { position: static; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06); }

/* ---------- Til tanlagich (eski, endi ishlatilmaydi) ---------- */

/* O'ng yuqori burchak: ovoz tugmasi va til tanlagich */
.topbar {
  position: absolute;
  top: var(--edge);
  right: var(--edge);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang {
  position: relative;
  display: flex;
  align-items: center;
}

.sound-btn {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px 10px 16px;   /* Figma: min-h 44 */
  border: 0;
  border-radius: 60px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sound-btn:hover { background: var(--tertiary-block); }

.sound-btn__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-text);
  transition: background 0.2s, transform 0.2s;
}

.sound-btn.is-off { color: var(--text-tertiary); }
.sound-btn.is-off .sound-btn__dot { background: var(--icon-tertiary); transform: scale(0.8); }

.lang__btn {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: var(--surface);
  min-height: 44px;
  padding: 10px 14px 10px 18px;   /* Figma: min-h 44 */
  border-radius: 60px;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.2s;
}
.lang__btn:hover,
.lang.is-open .lang__btn { background: var(--tertiary-block); }

.lang__chevron { display: grid; place-items: center; transition: transform 0.2s; }
.lang.is-open .lang__chevron { transform: rotate(180deg); }
.lang__chevron svg { display: block; }

/* Ochiladigan menyu */
.lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 200px;
  padding: 8px;
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: 0 0 0 1px var(--stroke-10), 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: lang-menu 0.18s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform-origin: top right;
}
.lang__menu[hidden] { display: none; }

@keyframes lang-menu {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

.lang__item {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.lang__item:hover,
.lang__item:focus-visible { background: var(--tertiary-block); outline: none; }
.lang__item.is-current { font-weight: 500; } /* saytdagi Inter Tight 500 — sarlavhalar bilan bir xil */

.lang__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: transparent; }
.lang__item.is-current .lang__dot { background: var(--accent-text); }


@keyframes fade { from { opacity: 0; } }

/* ---------- Loyiha haqida (Figma: "Loyiha haqida") ---------- */

.back {
  position: absolute;
  top: var(--edge);
  left: var(--edge);
  z-index: 30;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 60px;
  background: var(--surface);
  transition: background 0.3s var(--ease);
}

.back:hover { background: var(--color-surface-subtle); }

/* Tepaga qaytish tugmasi (loyiha sahifasi, pastki o'ng burchak) */
.to-top {
  appearance: none;
  position: fixed;
  right: var(--edge);
  bottom: var(--edge);
  z-index: 30;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 60px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); /* rasm ustida ham ajralib tursin */
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--tertiary-block); }
/* Loyiha sahifasida orqaga tugmasi, ovoz va til doim joyida turadi (skroll qilinganda ham) */
/* Orqaga tugmasi endi header ichida (.nav — fixed), header skroll qilinganda ham joyida turadi */

/* ---------- Mundarija (chap tarafda, sahifa chetiga tekislangan; faqat keng ekranda) ---------- */
.toc { display: none; }

@media (min-width: 1640px) {
  .toc {
    --detail-w: max(1232px, 64.2vw);
    --gutter: calc((100vw - var(--detail-w)) / 2);
    position: fixed;
    top: 108px;   /* Figma: kontent bilan bir chiziqda */
    left: var(--edge); /* orqaga tugmasi bilan bir chiziqda */
    z-index: 20;
    display: block;
    width: 48px;   /* tick rail kengligi; karta undan o'ngga chiqadi */
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  }
  .toc[hidden] { display: none; }
  .toc.is-shown { opacity: 1; visibility: visible; transform: none; }
  html.is-zoomed .toc { opacity: 0; visibility: hidden; }
}

/* ---------- Tick rail (microinteractions.dev/tick-rail asosida, ranglar — bizning tokenlar) ----------
   Har bo'lim — 24px qator, ichida 2px chiziqcha (to'liq uzunligi 24px, chap chetidan masshtablanadi).
   Tinch: 8px (1/3), joriy: 16px (2/3) va brand/accent-text rangida, kursor yaqinida — 24px gacha. */
.tkr__rail {
  --tkr-row: 24px;
  --tkr-tick: var(--text-tertiary);       /* text/muted */
  --tkr-lit: var(--text-primary);         /* text/primary */
  --tkr-current: var(--accent-text);      /* brand/accent-text */
  --tkr-ease: cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
  width: 48px;
  padding: 16px 0;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  scrollbar-width: none;
}
.tkr__rail::-webkit-scrollbar { display: none; }
@media (pointer: coarse) { .tkr__rail { --tkr-row: 32px; } }

.tkr__tick {
  --s: 0.3333;
  --w: 0%;
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
  height: var(--tkr-row);
  border-radius: 4px;
  outline-offset: 2px;
}
.tkr__line {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: color-mix(in oklab, var(--tkr-lit) var(--w), var(--tkr-tick));
  transform: scaleX(var(--s));
  transform-origin: left center;
  transition: transform 160ms var(--tkr-ease), background-color 120ms ease;
}
.tkr__tick.is-lit .tkr__line { background: var(--tkr-lit); }
.tkr__tick.is-current .tkr__line { background: var(--tkr-current); }
.tkr__tick.is-instant .tkr__line { transition: none; }
.tkr__tick:focus-visible { outline: 2px solid var(--accent-text); }

/* Karta — bitta, rail'ning o'ng tomonida, yoritilgan chiziqcha bilan bir balandlikda */
.tkr__card {
  --y: 0px;
  position: absolute;
  top: 0;
  left: 56px;
  width: max-content;
  max-width: 260px;   /* kontent ustiga chiqsa ham bo'ladi — o'z foni va soyasi bor */
  z-index: 1;
  padding: 12px 14px;
  border: 1px solid var(--stroke-10);           /* border/subtle */
  border-radius: 12px;
  background: var(--color-surface-subtle);      /* bg/surface-subtle */
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(var(--y)) scale(0.97);
  transform-origin: left center;
  transition: transform 200ms var(--tkr-ease, cubic-bezier(0.23, 1, 0.32, 1)), opacity 120ms var(--tkr-ease, ease), visibility 0s linear 120ms;
}
.tkr__card.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(var(--y));
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), opacity 180ms cubic-bezier(0.23, 1, 0.32, 1), visibility 0s;
}
.tkr__card.is-instant { transition: none; }
.tkr__body { display: grid; }
.tkr__content { grid-area: 1 / 1; }
.tkr__content.is-leaving { pointer-events: none; }
.tkr__title {
  margin: 0;
  font: 500 16px/1.4 var(--font);   /* bodyMAccent */
  letter-spacing: -0.04em;
  color: var(--text-primary);
}
.tkr__desc {
  margin: 4px 0 0;
  font: 400 14px/1.3 var(--font);   /* bodyS */
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .tkr__line, .tkr__card, .tkr__card.is-open { transition: none; }
}

/* ---------- "Keyingi loyihani ham bir ko'ring" (Figma) ---------- */
.page-project.has-next .detail { margin-bottom: 0; }

.next {
  width: min(100% - 2 * var(--edge), max(1232px, 64.2vw));
  margin: 160px auto 0;
  text-align: center;
}

.next__head {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 52px;
}
.next__head.is-animating { transition: opacity 0.35s; }

/* heading2 — Roboto Flex 48, tor */
.next__title {
  margin: 0;
  font: 500 condensed 48px/1 var(--font-head);
  letter-spacing: -0.02em;
  color: var(--text);
}

/* bodyVL */
.next__hint {
  margin: 0;
  font: 400 24px/1.3 var(--font);
  letter-spacing: -0.04em;
  color: var(--text-secondary);
}

.next__stage {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-shot) var(--radius-shot) 0 0;
  background: var(--surface);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  isolation: isolate;
}
.next__stage.is-grabbing { cursor: grabbing; }
.next__stage.is-animating { transition: height 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), margin-top 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.next__stage:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }

.next__stage img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-shot);
  pointer-events: none;
  -webkit-user-drag: none;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (hover: hover) { .next__stage:hover img { transform: translateY(-6px); } }

/* Pastki chetidagi oq tuman (Figma: 95px, Progressive background blur 0 → 18).
   Har qatlam o'z chizig'idan pastini xiralashtiradi — pastga tushgan sari blur kuchayadi. */
.next__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 95px;
  pointer-events: none;
}
.next__blur {
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(var(--b));
  backdrop-filter: blur(var(--b));
  -webkit-mask-image: linear-gradient(to bottom, transparent var(--s), #000 var(--e));
  mask-image: linear-gradient(to bottom, transparent var(--s), #000 var(--e));
}
.next__fade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-bg));
}

/* O'tish: oq parda va uchayotgan muqova */
.next-veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.next-veil.is-on { opacity: 1; }

.next-ghost {
  position: fixed;
  z-index: 91;
  overflow: hidden;
  border-radius: var(--radius-shot);
  background: var(--surface);
  pointer-events: none;
}
.next-ghost.is-out { opacity: 0; transition: opacity 0.25s ease; }
.next-ghost img { display: block; width: 100%; height: auto; }

/* Yangi sahifaga kirganda: muqovadan boshqa hamma narsa ohista paydo bo'ladi */
@keyframes next-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
html.is-entering .detail > :not(.detail__cover),
html.is-entering .back { animation: next-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

.to-top:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
html.is-zoomed .to-top { opacity: 0; visibility: hidden; }

/* 1920px'da 1232px; katta monitorda proporsional kattalashadi */
.detail {
  width: min(100% - 2 * var(--edge), max(1232px, 64.2vw));
  margin: 108px auto 160px;   /* Figma: tepadan 108 */
}

/* Figma: heading3 — Roboto Flex Medium 40, tor (75%), qator 90%, −3% */
.detail__title {
  margin: 0 0 32px;
  font: 500 condensed 40px/0.9 var(--font-head);
  letter-spacing: -0.03em;
  text-box: trim-both cap alphabetic;
}

/* Sarlavha ostida: qaysi kompaniyada qilingani */
/* Figma: bodyL 20, text/secondary; muqovagacha 38px */
.detail__company {
  display: block;
  width: fit-content;
  margin: 0 0 38px;
  font: 400 20px/1.3 var(--font);
  letter-spacing: -0.04em;
  color: var(--text-secondary);
  text-decoration: none;
  text-box: trim-both cap alphabetic;
}
.detail__company a { color: inherit; text-decoration: none; transition: color 0.2s; }
.detail__company a:hover { color: var(--accent-text); }
.detail__company + .detail__link { margin-top: -20px; display: block; width: fit-content; }

.detail__link {
  display: inline-block;
  margin: 0 0 38px;
  font: 400 20px/1.3 var(--font);
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--text-secondary);
  text-box: trim-both cap alphabetic;
}

.detail__link:hover { color: var(--accent-text); }

.detail__sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 44px;
}

/* Figma: sarlavhalar title2 (Roboto Flex 28, tor), matnlar bodyM (Onest 16, text/secondary, 760px) */
.detail__h {
  margin: 0;
  font: 500 condensed 28px/1 var(--font-head);
  letter-spacing: -0.01em;
  text-box: trim-both cap alphabetic;
}

.detail__text {
  margin: 20px 0 0;
  max-width: 760px;
  font: 400 16px/1.3 var(--font);
  letter-spacing: -0.04em;
  color: var(--text-secondary);
  white-space: pre-line;
  text-box: trim-both cap alphabetic;
}

.detail__block { margin-top: 44px; }

.detail__block .detail__h { margin-bottom: 18px; }

/* Setka: 2 ta yonma-yon yoki 2×2 */
.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.media-grid__cell {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: calc(var(--radius-shot) * 0.67);
  background: var(--surface);
}
.media-grid__cell > .shot { border-radius: 0; background: transparent; }

/* Video (saytga yuklangan) va Vimeo */
.shot__video { display: block; width: 100%; height: auto; pointer-events: none; }

.vimeo {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-shot);
  background: var(--surface);
  isolation: isolate;
}
.vimeo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Figma / FigJam embed */
.figma {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-shot);
  background: var(--surface);
  isolation: isolate;
}
.figma iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Figma embed'ning pastki qatori (chap burchakdagi Figma logotipi — figma.com'ga olib o'tadi) ko'rinmasin:
   iframe ramkadan pastga uzunroq qilinadi, ortiqcha pastki qism kesiladi */
.figma iframe { top: 0; bottom: auto; height: calc(100% + 56px); }

.detail__block .shot + .shot { margin-top: 16px; }
.detail__block > * + * { margin-top: 16px; }

/* Formatlangan matn (rich text) */
.rt { white-space: normal; }
.rt > * { margin: 0; }
.rt > * + * { margin-top: 10px; }
.rt ul, .rt ol { padding-left: 1.4em; }
.rt li + li { margin-top: 4px; }
.rt li::marker { color: var(--muted); }
.rt h3 { font: 500 condensed 20px/1.1 var(--font-head); color: var(--text); }
.rt * + h3 { margin-top: 24px; }
.rt strong { font-weight: 500; }
.rt a { color: inherit; text-decoration: underline; text-decoration-color: var(--text-tertiary); text-underline-offset: 3px; transition: color 0.2s, text-decoration-color 0.2s; }
.rt a:hover { color: var(--accent-text); text-decoration-color: currentColor; }

/* Blok ichidagi matn (rasmlar orasida) */
.detail__note {
  margin: 0;
  max-width: 760px;
  font: 400 16px/1.3 var(--font);   /* bodyM — bo'lim matnlari bilan bir xil */
  letter-spacing: -0.04em;
  color: var(--text-secondary);
  white-space: pre-line;
}
.detail__block > :not(.detail__h) + .detail__note { margin-top: 40px; }
.detail__block > .detail__note + * { margin-top: 24px; }

/* ---------- Oldin / Keyin slayderi ---------- */

.compare { --pos: 50%; margin: 0; }

.compare__stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-shot);
  background: var(--surface);
  cursor: ew-resize;
  touch-action: pan-y;               /* vertikal skroll ishlaydi, gorizontal — slayder */
  user-select: none;
  -webkit-touch-callout: none;
  isolation: isolate;
}

.compare__img { display: block; width: 100%; height: auto; pointer-events: none; }

.compare__img--before {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.compare__shield { position: absolute; inset: 0; z-index: 1; }

.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  outline: none;
}

.compare__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s;
}
.compare.is-dragging .compare__knob,
.compare__stage:hover .compare__knob { transform: translate(-50%, -50%) scale(1.08); }
.compare__handle:focus-visible .compare__knob { outline: 3px solid rgba(129, 140, 248, 0.45); outline-offset: 3px; }

.compare__label {
  margin-top: 16px;
  text-align: center;
  font: 400 20px/1.3 var(--font);   /* bodyL */
  letter-spacing: -0.04em;
  color: var(--muted);
}

/* ---------- Moslashuvchanlik ---------- */

/* Kichik noutbuk va planshet: havolalar bio ostiga tushadi, ishlar to'liq kenglikda */
@media (max-width: 1100px) {
  :root { --radius-shot: 32px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 96px; }   /* til tanlagich surat ustiga tushmasin */
  .hero__col { grid-column: 1; }
  .avatar { width: 240px; }
  .tabs { padding-top: 96px; }
  .content { grid-template-columns: minmax(0, 1fr); }
  .content > .panel { grid-column: 1; }
  .side { display: none; }
  .links--inline { display: flex; }
  .projects { gap: 80px; }
}

@media (max-width: 640px) {
  :root { --edge: 16px; --radius-shot: 20px; }
  .lang__btn { padding: 10px 10px 10px 14px; font-size: 16px; }
  .lang__menu { min-width: 180px; }
  .lang__item { font-size: 16px; padding: 11px 12px; }
  .sound-btn { padding: 10px 14px 10px 12px; font-size: 16px; gap: 8px; }
  .sound-btn__dot { width: 7px; height: 7px; }
  .topbar { gap: 4px; }
  .hero { padding-top: 72px; }
  .avatar { width: 180px; }
  .back { width: 40px; height: 40px; }
  .nav { padding-inline: var(--edge); }
  .back img { width: 26px; height: 26px; }
  .detail { margin-top: 88px; }
  .detail__title { font-size: 28px; margin-bottom: 20px; }
  .next { margin-top: 96px; }
  .next__head { gap: 12px; margin-bottom: 32px; }
  .next__title { font-size: 28px; }
  .next__hint { font-size: 18px; }
  .next__fade { height: 60px; }
  .detail__company { font-size: 16px; margin: 0 0 24px; }
  .detail__h { font-size: 24px; }
  .media-grid { grid-template-columns: 1fr; gap: 8px; }
  .figma { aspect-ratio: auto; height: 70vh; min-height: 360px; } /* telefonda 16:9 juda past bo'lib qoladi */
  @media (hover: none) { .zoom__nav { display: none; } } /* telefonda — surish bilan */
  .detail__text, .detail__note { font-size: 16px; }
  .compare__knob { width: 40px; height: 40px; }
  .compare__label { font-size: 16px; margin-top: 10px; }
  .detail__sections { gap: 20px; margin-top: 32px; }
  .detail__block { margin-top: 32px; }
  .hero__name { margin: 28px 0 16px; }
  .hero__bio { font-size: 18px; }
  .links--inline { font-size: 16px; gap: 6px 16px; }
  .tabs { padding-top: 64px; }
  .tab { padding: 14px 18px; font-size: 16px; }
  .content { margin-top: 32px; padding-bottom: 96px; }
  .projects { gap: 64px; }
  .project__images { gap: 8px; }
  .project__meta { margin-top: 16px; gap: 16px; }
  .project__title, .project__company { font-size: 18px; }
  .shots { columns: 1; }
  .shots .shot { border-radius: 20px; }
  .empty { padding: 64px 0; font-size: 18px; }
}

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

/* Scroll chizig'i: ingichka, och kulrang, dumaloq tutqich, strelkalarsiz */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--icon-tertiary); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
@supports (-moz-appearance: none) {
  html { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
}

/* =====================================================================
   BOSH SAHIFA — Figma "Bosh sahifa" (2361:4013), qora mavzu
   Kontent 1424px markazda; bo'limlar orasi 130px.
   Matnlar Figma'dagidek "Vertical trim: cap height to baseline" bilan.
   ===================================================================== */

.trim { text-box: trim-both cap alphabetic; }

.container {
  width: min(var(--container), 100% - 2 * var(--edge));
  margin-inline: auto;
}

/* Til va ovoz tugmalari kontentning o'ng cheti bilan bir chiziqda (Figma: right 248 @1920) */
.page-home .topbar { right: max(var(--edge), (100% - var(--container)) / 2); }

/* ---------- Kirish: surat + ism, rol, holat + sarlavha ---------- */
.intro { padding-top: 64px; }

.intro__in {
  display: flex;
  align-items: center;
  gap: 72px;
}

.page-home .avatar { flex: none; width: 300px; overflow: hidden; }

.intro__text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 40px;   /* Figma: Introduction pt 40 — surat 340px blokning o'rtasida */
}

/* interface/title/title2 — 28 / 1 / −1% */
.intro__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: var(--fs-title2);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.intro__dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--text-primary);
}

/* "Loyihaga oçiqman": semantic/color-success-soft + text/status/color-text-success, bodyL 20 / 1.2 */
.status {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 60px;
  background: var(--success-soft);
  color: var(--text-success);
  font-size: var(--fs-bodyL);
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* interface/title/heading1 — 56 / 1 / −1%; asosiy rang text-teartiry (30%) */
.intro__title {
  margin: 0;
  font-size: var(--fs-heading1);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text-tertiary);
}
.hl-o { color: var(--text-warning); }   /* Figma: B2B / B2C / ERP — status/warning */
.hl-w { color: var(--text-primary); }

/* Havolalar — Figma "Link" (2395:5769): ikonka 20px + bodyL 20 / 1.2.
   Hover: color-surface fon, har tomondan 10px kattaroq (Figma Hover: 16/18/14 ichki joy).
   Fon ::before bilan chiziladi — qo'shni havolalar joyidan siljimaydi. */
.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 12px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
}
.links[hidden] { display: none; }
.link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 6px;
  border-radius: 60px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--fs-bodyL);
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.link::before {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: -1;
  border-radius: 60px;
  background: var(--color-surface);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.link:hover::before,
.link:focus-visible::before { opacity: 1; transform: none; }
.link:focus-visible { outline: none; }
.link:focus-visible::before { box-shadow: 0 0 0 2px var(--text-tertiary); }
.link__ico { width: 20px; height: 20px; flex: none; display: block; pointer-events: none; }

/* ---------- Bento: kodda, Figma "hero-image" (1424×716) bo'yicha ---------- */
.bento { position: relative; padding-top: 130px; }

/* Rasm ustidagi shaffof qatlam (bento, kartalar, surat): Yandex va boshqa brauzerlarning
   rasm asboblar paneli ("saqlash", "matnni olish", "qidirish") chiqmaydi, rasmni sudrab yoki
   o'ng tugma bilan saqlab bo'lmaydi. Bosish (havola, nuqtalar, surat almashishi) ishlayveradi. */
.bento::after,
.card::after,
.avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.bento, .card, .avatar { -webkit-touch-callout: none; user-select: none; }

/* ---------- Karusellar ---------- */
.rail { padding-top: 130px; }
.rail[hidden] { display: none; }

.rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  padding-left: 40px;
}

.rail__title {
  margin: 0;
  font-size: var(--fs-heading1);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.rail__nav { display: flex; align-items: center; }
.rail__nav[hidden] { display: none; }

/* Figma: Component 22 — fon color-bg, 8px ichki joy, 32px strelka */
.rail__btn {
  appearance: none;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 0;
  border-radius: 60px;
  background: var(--color-bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.rail__btn svg { display: block; }
.rail__btn:hover:not(:disabled) { background: var(--color-surface); }
.rail__btn:disabled { opacity: 0.3; cursor: default; }

/* Lenta: chapda kontent bilan bir chiziqda, o'ngda ekran chetigacha (keyingi karta ko'rinib turadi) */
.rail__track {
  --gutter: max(var(--edge), (100% - var(--container)) / 2);
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-inline: var(--gutter);
  scrollbar-width: none;
  outline: none;
}
.rail__track::-webkit-scrollbar { display: none; }

/* Karta: 1184×666 (1424 kenglikning 83%), burchak 48px */
.card {
  position: relative;
  flex: none;
  display: block;
  width: calc(min(var(--container), 100vw - 2 * var(--edge)) * 0.8315);
  aspect-ratio: 1184 / 666;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-shot);
  clip-path: inset(0 round var(--radius-shot)); /* Safari: hover'dagi kattalashuvda burchak chiqib ketmasin */
  background: var(--color-surface);
  scroll-snap-align: start;
  isolation: isolate;
  -webkit-touch-callout: none;
  user-select: none;
}

.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card__img.is-active { opacity: 1; }
@media (hover: hover) { a.card:hover .card__img.is-active { transform: scale(1.02); } }
a.card:focus-visible { outline-offset: 4px; border-radius: var(--radius-shot); }

/* Nuqtalar: Figma — fon #000 10% + blur 12, nuqta 10px (faol 60%, qolgani 28%) */
.card__dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 2;
  display: flex;
  gap: 3px;
  padding: 4px;
  border-radius: 60px;
  background: rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.card__dot {
  appearance: none;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: background 0.2s;
}
.card__dot.is-active { background: rgba(0, 0, 0, 0.6); }
.card__dot:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.page-home .footer { padding: 130px var(--edge) 48px; color: var(--text-tertiary); }

@media (max-width: 1100px) {
  .intro { padding-top: 104px; }
  .intro__in { flex-direction: column; align-items: flex-start; gap: 40px; }
  .intro__text { padding-top: 0; }
  .page-home .avatar { width: 220px; }
  .intro__title { font-size: 44px; }
  .rail__head { padding-left: 0; }
  .rail__title { font-size: 44px; }
  .bento, .rail { padding-top: 96px; }
  .card { width: calc((100vw - 2 * var(--edge)) * 0.88); }
}

@media (max-width: 640px) {
  .intro { padding-top: 88px; }
  .intro__in { gap: 32px; }
  .page-home .avatar { width: 160px; }
  .intro__text { gap: 24px; }
  .intro__meta { font-size: 20px; gap: 8px 10px; }
  .status { font-size: 16px; padding: 8px 10px; }
  .intro__title { font-size: 32px; }
  .rail__head { margin-bottom: 24px; }
  .rail__title { font-size: 32px; }
  .rail__btn { padding: 4px; }
  .bento, .rail { padding-top: 72px; }
  .card { width: calc(100vw - 2 * var(--edge) - 24px); }
  .page-home .footer { padding-top: 96px; }
}

/* =====================================================================
   BENTO — Figma "hero-image" (2383:4798). Ichki o'lchamlar 1424px dizayndagidek;
   kichik ekranda butun blok "zoom" bilan kichrayadi (main.js → fitBento),
   telefonda kartalar ustma-ust, har biri ekran kengligiga moslanadi.
   ===================================================================== */

.bento__grid {
  position: relative;
  width: 1424px;
  height: 716px;
  zoom: var(--z, 1);
}

.bc {
  position: absolute;
  overflow: hidden;
  border-radius: 48px;
  isolation: isolate;
  /* Figma "Clip content": Safari (iPhone) blur/filter'li bolalarni border-radius bilan qirqmaydi —
     clip-path kartadan tashqariga chiqqan hamma narsani yumaloq burchak bo'yicha aniq kesadi */
  clip-path: inset(0 round 48px);
  -webkit-clip-path: inset(0 round 48px);
  transform: translateZ(0);
  color: var(--text-primary);
}
/* Ichki soya (Figma: inner shadow) — hamma narsaning ustida */
.bc::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 45px 0 var(--glow);
}
.bc p { margin: 0; }
.bc__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }

/* Matn stillari: title4 (20 / 1.2), heading3 (40 / 1), title3 (24 / 1.2), bodyS (14 / 1.2); −1% */
.bc__label { font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }
.bc__title { font-size: 40px; line-height: 1; letter-spacing: -0.01em; color: var(--text-primary); }
.bc__sub, .bc__body { font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; color: var(--text-primary); }
.bc__head { position: absolute; z-index: 4; display: flex; flex-direction: column; gap: 20px; }
.bc__head--center { left: 50%; transform: translateX(-50%); align-items: center; text-align: center; }
.bc > .bc__label, .bc > .bc__title, .bc > .bc__body, .bc > .bc__num { position: absolute; z-index: 4; }
.bc__shot { position: absolute; z-index: 3; border-radius: 6px; object-fit: cover; }

/* 1) Qizil — 98.27% */
.bc--red { left: 0; top: 0; width: 464px; height: 442px; --glow: #fe1a1a; }
.bc--red .bc__label { left: 36px; top: 36px; color: #f8ac96; white-space: pre; }
/* Figma: raqam va matn bitta guruh (gap 32), pastdan 36px — RU/EN'da matn 2 qator bo'lsa ham pastda turadi */
.bc__stat { position: absolute; z-index: 4; left: 36px; bottom: 36px; width: 392px; display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.bc__stat .bc__num { display: block; width: 302px; height: auto; }

/* 2) Binafsha — interfeys + mockup */
.bc--purple { left: 480px; top: 0; width: 612px; height: 258px; --glow: #704aff; }
.bc--purple::after { box-shadow: inset 0 0 45px 0 #704aff, inset 0 -12px 24px 0 rgba(255, 255, 255, 0.16); }
.bc--purple .bc__label { left: 36px; top: 36px; color: #c2b2fb; white-space: pre; }
.bc--purple .bc__title { left: 36px; top: 71px; width: 290px; }

/* 3) Kulrang — 6 bosqich */
.bc--grey { left: 1108px; top: 0; width: 316px; height: 442px; --glow: #494750; }
.bc--grey .bc__head { left: 36px; top: 36px; width: 256px; }
/* Admin'da Enter bilan qator tashlansa, saytda ham yangi qatordan chiqadi */
:where(.bc [data-b]) { white-space: pre-line; }
.bc--grey .bc__label { color: #737681; }
.bc__shot--hayot { left: 36px; top: 212px; width: 280px; height: 230px; border-radius: 6px 0 0 0; }

/* 4) Ish qidiryapman — Figma: bg/surface + ichki oq soya 35% / 28 */
.bc--orange { left: 480px; top: 274px; width: 224px; height: 168px; background: var(--color-surface); }
.bc--orange::after { box-shadow: inset 0 0 28px 0 rgba(255, 255, 255, 0.35); }
.bc__otitle { position: absolute; left: 36px; top: 36px; width: 152px; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }
.bc__otext { position: absolute; left: 36px; top: 88px; width: 166px; font-size: 14px; line-height: 1.2; letter-spacing: -0.01em; color: var(--text-secondary); }

/* 5) Ko'k — AI */
.bc--blue { left: 720px; top: 274px; width: 372px; height: 442px; }
.bc--blue::after { box-shadow: inset 0 0 36px 0 rgba(255, 255, 255, 0.55), inset 0 0 45px 0 #a4dbff; }
.bc--blue .bc__head { top: 36px; width: 300px; }
.bc--blue .bc__label { color: #41637c; }
.bc--blue .bc__title { color: #252525; }   /* text/color-text-primary-inverse */
.glow { position: absolute; z-index: 1; border-radius: 50%; pointer-events: none; }
.glow--1 { left: 205px; top: 205px; width: 135px; height: 135px; background: #fff; filter: blur(43.5px); }
.glow--2 { left: -47px; top: -43px; width: 135px; height: 135px; background: #fff; filter: blur(43.5px); }
.glow--3 { left: -3px; top: 276px; width: 341px; height: 171px; background: #b5e1ff; filter: blur(54px); }
.glow--4 { left: 50px; top: 132px; width: 171px; height: 171px; background: #fff; filter: blur(54px); }
.bc__stack { position: absolute; z-index: 2; left: 60px; top: 124px; width: 252px; height: 219px; border-radius: 8.8px; background: #a6d1ef; }
.bc__icons { position: absolute; z-index: 3; left: 36px; top: 131px; width: 300px; height: 275px; }

/* 6) Oltin — dizayn tizimi */
.bc--gold { left: 0; top: 458px; width: 704px; height: 258px; --glow: #aa8008; }
.bc--gold .bc__head { top: 36px; width: max-content; max-width: 640px; }
.bc--gold .bc__label { color: #837352; }
.bc--gold .bc__title { white-space: pre; }

.chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #513b11;
  border-radius: 10px;
  background: rgba(47, 35, 3, 0.8);
  box-shadow: inset 0 4px 12px 0 rgba(189, 189, 189, 0.15);
  white-space: nowrap;
}
.chip code, .chip__ag {
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.09em;
  color: var(--text-primary);
}
.chip__ag { font-family: var(--font); font-weight: 400; letter-spacing: -0.01em; }
.chip--a { left: 36px; top: 144px; }
.chip--b, .chip--c { height: 34px; padding: 3px 3px 3px 8px; }
.chip--b { left: 36px; top: 188px; }
.chip--c { left: 301px; top: 144px; }
.chip__sw { width: 16px; height: 16px; flex: none; border-radius: 4px; background: #c4530d; }
.chip__prop { width: 16px; height: 16px; flex: none; display: grid; place-items: center; }
.chip__prop::before { content: ""; width: 10px; height: 10px; border: 1.3px solid #fff; border-radius: 2.9px; transform: rotate(45deg); }
.chip__dot { width: 4px; height: 4px; flex: none; border-radius: 50%; background: var(--text-primary); }
.chip__tags { display: flex; gap: 3px; }
.chip__tags code { padding: 5px 6px 7px; border-radius: 7px; background: rgba(255, 255, 255, 0.11); }

/* 7) Yashil — dizayn muhandisligi */
.bc--green { left: 1108px; top: 458px; width: 316px; height: 258px; --glow: #18ad69; }
.bc--green .bc__head { left: 36px; top: 36px; width: 256px; }
.bc--green .bc__label { color: #83af96; }
.bc__shot--code { left: 36px; top: 141px; width: 280px; height: 117px; border-radius: 6px 0 0 0; }

/* Binafsha karta ichidagi mobil ilova (Figma "Home Page 1" — rasm) */
.bc__phone {
  position: absolute;
  z-index: 3;
  left: 322px;
  top: 36px;
  width: 254px;
  height: 247px;
  object-fit: cover;
  border: 1px solid #2a223c;
  border-radius: 24px 24px 0 0;
}

/* Telefon va kichik planshet: kartalar ustma-ust, har biri kenglikka moslanadi */
/* Telefon: 2 ustunli joylashuv (main.js → fitBento hisoblaydi). Qatorlar:
   qizil | binafsha | kulrang + ko'k | oltin | to'q sariq + yashil */
.bento__grid.is-stack { width: auto; height: auto; zoom: 1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.bento__grid.is-stack .bc { position: relative; left: auto; top: auto; zoom: var(--cz, 1); flex: none; }
.bento__grid.is-stack .bc--red { order: 1; }
.bento__grid.is-stack .bc--purple { order: 2; }
.bento__grid.is-stack .bc--grey { order: 3; }
.bento__grid.is-stack .bc--blue { order: 4; }
.bento__grid.is-stack .bc--gold { order: 5; }
.bento__grid.is-stack .bc--orange { order: 6; }
.bento__grid.is-stack .bc--green { order: 7; }

/* =====================================================================
   Matnlar paydo bo'lishi (bosh sahifa): 16px pastdan suzib, xiradan aniqqa.
   "translate" xossasi ishlatiladi — elementlarning o'z transform'lari (markazlash va h.k.) buzilmaydi.
   Kirish qismi sahifa ochilganda, bento va bo'lim sarlavhalari ekranga kirganda.
   Til almashganda — qisqa (0.35s) qayta chiqish.
   ===================================================================== */
.rv-on .rv {
  opacity: 0;
  translate: 0 16px;
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--rv-d, 0s),
    translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--rv-d, 0s);
}
.rv-on .rv.is-in { opacity: 1; translate: none; }
.rv-on .rv.rv-quick { transition-duration: 0.35s, 0.35s; }
.rv-on .rv.rv-reset { transition: none; opacity: 0; translate: 0 8px; }

@media (prefers-reduced-motion: reduce) {
  .rv-on .rv { opacity: 1; translate: none; transition: none; }
}
