@font-face { font-family: Geist; src: url(../fonts/GeistVF.woff) format('woff'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(../fonts/GeistMonoVF.woff) format('woff'); font-weight: 100 900; font-display: swap; }

:root {
  --bgc: 241 240 236; --fgc: 11 12 14;
  --bg: rgb(var(--bgc)); --fg: rgb(var(--fgc)); --mute: rgb(var(--fgc) / .62); --dim: rgb(var(--fgc) / .4); --line: rgb(var(--fgc) / .14);
  --pad: clamp(20px, 5vw, 76px); --out: cubic-bezier(.23, 1, .32, 1);
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { font: 400 16px/1.55 Geist, system-ui, -apple-system, sans-serif; color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
ol, ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ortdagi ulkan so'z: telefon uning oldida turadi */
#ghost { position: fixed; inset: 0; z-index: 1; display: grid; place-items: center; overflow: hidden; pointer-events: none; }
#ghost span { font-weight: 640; letter-spacing: -.06em; line-height: 1; white-space: nowrap; color: var(--fg); will-change: transform, opacity; }
#ghost span.duo { display: inline-grid; grid-template-columns: 1fr 3.3em 1fr; letter-spacing: -.055em; }
#ghost span.duo b { font-weight: inherit; } #ghost span.duo b:first-child { text-align: right; }
#gl { position: fixed; left: 0; top: 0; z-index: 2; width: 100%; height: 100vh; display: block; touch-action: pan-y; cursor: grab; }
#gl:active { cursor: grabbing; }
#loader { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; transition: opacity .6s var(--out), visibility 0s .6s; }
#loader span { width: 120px; height: 2px; background: var(--line); position: relative; overflow: hidden; }
#loader span::after { content: ''; position: absolute; inset: 0; background: var(--fg); transform-origin: left; animation: ld 1.1s var(--out) infinite; }
@keyframes ld { from { transform: scaleX(0); } 60% { transform: scaleX(1); opacity: 1; } to { transform: scaleX(1); opacity: 0; } }
.ready #loader { opacity: 0; visibility: hidden; }

/* ---------- HUD ---------- */
.hud { position: fixed; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--pad); font: 500 11.5px/1 var(--mono); color: var(--mute); pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud.top { top: 0; padding-top: max(18px, env(safe-area-inset-top)); }
.hud.bot { bottom: 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.brand { color: var(--fg); font: 600 14.5px/1 Geist, sans-serif; letter-spacing: -.015em; }
#nav { display: flex; gap: 2px; }
#nav button { padding: 9px 12px; border-radius: 999px; color: var(--dim); transition: color .2s, background-color .2s; }
#nav button.on { color: var(--bg); background: var(--fg); }
@media (hover: hover) { #nav button:not(.on):hover { color: var(--fg); } }
.now { display: none; color: var(--fg); }
.bar { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 21; }
.bar i { display: block; height: 100%; background: var(--fg); transform-origin: left; transform: scaleX(0); }

/* ---------- boblar ---------- */
.pin { position: fixed; inset: 0; z-index: 5; display: flex; align-items: center; padding: 92px var(--pad); pointer-events: none; opacity: var(--p, 0); visibility: hidden; }
.st:first-child .pin { --p: 1; }
.pin.vis { visibility: visible; }
.pin.on .box { pointer-events: auto; }
.pin.right { justify-content: flex-end; }
.box { width: min(100%, 27.5rem); transform: translate3d(0, calc((1 - var(--p, 0)) * 26px), 0); }
.pin.hero { align-items: flex-end; justify-content: space-between; padding-bottom: 76px; }
.pin.hero .box { width: min(42%, 22rem); }
.pin.hero .side { text-align: right; }

.big { font-size: clamp(1.25rem, 1.9vw, 1.7rem); font-weight: 520; letter-spacing: -.025em; line-height: 1.22; text-wrap: balance; }
.note { color: var(--mute); font-size: .95rem; }
.hint { margin-top: 14px; font: 500 11.5px/1.4 var(--mono); color: var(--fg); display: inline-flex; align-items: center; gap: 12px; }
.hint i { width: 1.5px; height: 30px; background: var(--fg); animation: drop 2.2s var(--out) infinite; transform-origin: top; }
@keyframes drop { from { transform: scaleY(0); } 50% { transform: scaleY(1); opacity: 1; } to { transform: scaleY(1); opacity: 0; } }

.eye { font: 500 11.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--mute); margin-bottom: 20px; display: flex; justify-content: space-between; }
h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); font-weight: 620; letter-spacing: -.045em; line-height: 1; text-wrap: balance; }
.logo-h { display: flex; align-items: center; gap: .32em; }
.logo-h img { width: 1.12em; height: 1.12em; border-radius: 26%; background: #fff; object-fit: cover; transform: scale(1); box-shadow: 0 6px 20px rgb(0 0 0 / .14); }
.lead { margin-top: 18px; color: var(--mute); font-size: 1.02rem; max-width: 26rem; }
.lead b { color: var(--fg); font-weight: 620; }
.k { margin-top: 12px; font: 500 12.5px/1.4 var(--mono); color: var(--mute); }

/* ro'yxat: aylantirganda navbat bilan ochiladi */
.acc { margin-top: 26px; border-top: 1.5px solid var(--line); }
.acc li { border-bottom: 1.5px solid var(--line); }
.acc button { width: 100%; display: flex; align-items: baseline; gap: 14px; padding: 13px 0; text-align: left; color: var(--dim); transition: color .25s; }
.acc button i { font: 500 11px/1 var(--mono); font-style: normal; width: 1.6em; flex: none; }
.acc button b { font-weight: 580; font-size: 1.12rem; letter-spacing: -.02em; }
.acc button span { margin-left: auto; font: 400 11.5px/1.3 var(--mono); text-align: right; }
.acc li.on button { color: var(--fg); }
@media (hover: hover) { .acc button:hover { color: var(--fg); } }
.acc .more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--out); }
.acc li.on .more { grid-template-rows: 1fr; }
.acc .more > div { overflow: hidden; }
.acc .more p { padding: 0 0 16px calc(1.6em + 14px); color: var(--mute); font-size: .96rem; opacity: 0; transition: opacity .3s; }
.acc li.on .more p { opacity: 1; transition-delay: .1s; }
.acc .more strong { color: var(--fg); font-weight: 580; }

.links { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 4px 18px; font: 500 12px/1.4 var(--mono); }
.links a { padding: 6px 0; border-bottom: 1.5px solid var(--line); transition: border-color .2s; }
@media (hover: hover) { .links a:hover { border-color: var(--fg); } }
.tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font: 500 11px/1 var(--mono); padding: 7px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--mute); }
#pjBody { min-height: 15.5rem; }
#pjBody.swap > * { animation: swap .4s var(--out) both; }
#pjBody.swap > :nth-child(2) { animation-delay: .03s; } #pjBody.swap > :nth-child(3) { animation-delay: .06s; } #pjBody.swap > :nth-child(4) { animation-delay: .09s; }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } }
.all { display: none; }

.cta { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 560; font-size: .96rem; letter-spacing: -.01em; transition: transform .16s var(--out); }
.btn.ghost { background: none; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn[aria-disabled=true] { background: none; color: var(--mute); box-shadow: inset 0 0 0 1.5px var(--line); pointer-events: none; }
.rnd { width: 48px; height: 48px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .16s var(--out); }
.btn:active, .rnd:active { transform: scale(.96); }
.btn.uh { gap: 10px; padding: 0 24px 0 12px; height: 54px; font-size: 1.02rem; }
.btn.uh img { width: 30px; height: 30px; border-radius: 9px; background: #fff; }
.handle { margin-top: 10px; font: 500 12.5px/1.4 var(--mono); color: var(--mute); }

#toast { position: fixed; left: 50%; bottom: 64px; z-index: 40; transform: translate(-50%, 8px); padding: 12px 18px; border-radius: 999px; background: var(--fg); color: var(--bg); font: 560 13px/1 Geist, sans-serif; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--out); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- tik ekran (telefon) ---------- */
@media (max-aspect-ratio: 9/10) {
  #nav, .hud.bot { display: none; }
  .now { display: block; }
  #ghost { place-items: start center; padding-top: 59vh; }
  .pin, .pin.right, .pin.hero { align-items: flex-end; justify-content: flex-start; padding: 76px var(--pad) max(26px, env(safe-area-inset-bottom)); }
  .pin.hero { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 10px; }
  .pin.hero .box { width: 100%; } .pin.hero .side { text-align: left; } .note { display: none; }
  .big { font-size: 1.16rem; } .hint { margin-top: 2px; } .hint i { height: 20px; }
  .eye { margin-bottom: 10px; }
  h2 { font-size: clamp(1.5rem, 7.2vw, 2rem); }
  .lead { font-size: .92rem; margin-top: 10px; line-height: 1.45; }
  .acc { margin-top: 12px; }
  .acc li:not(.on) { display: none; }
  .acc li { border-bottom: 0; } .acc button { padding: 11px 0 6px; } .acc button b { font-size: 1.05rem; }
  .acc .more p { padding: 0 0 4px; font-size: .9rem; line-height: 1.45; min-height: 5.3em; }
  .pin:not(.hero) .lead:has(+ .acc) { display: none; }
  #aloqa .lead { display: none; }
  .links { margin-top: 8px; } .cta { margin-top: 14px; } .tags { margin-top: 10px; }
  #pjBody { min-height: 12.6rem; } #pjB { font-size: .9rem; }
  .btn { height: 44px; padding: 0 20px; } .rnd { width: 44px; height: 44px; }
}
@media (max-height: 640px) and (min-aspect-ratio: 9/10) { .lead { display: none; } h2 { font-size: 2rem; } .acc button { padding: 9px 0; } }

/* ---------- WebGL bo'lmasa: oddiy sahifa ---------- */
.no-gl #gl, .no-gl #ghost, .no-gl .hud.bot, .no-gl #nav, .no-gl .bar, .no-gl .hint, .no-gl .note, .no-gl .rnd, .no-gl #pjBody, .no-gl #pjUrl { display: none; }
.no-gl .st { height: auto !important; }
.no-gl .pin { position: static; opacity: 1; visibility: visible; padding: 64px var(--pad); justify-content: flex-start; border-top: 1.5px solid var(--line); }
.no-gl .pin.hero { padding-top: 120px; } .no-gl .sr { position: static; width: auto; height: auto; clip-path: none; font-size: 3rem; letter-spacing: -.04em; line-height: 1; display: block; margin-bottom: 20px; }
.no-gl .pin.hero { display: block; }
.no-gl .box { transform: none; pointer-events: auto; width: min(100%, 40rem) !important; }
.no-gl .acc li { display: block !important; } .no-gl .acc .more { grid-template-rows: 1fr; } .no-gl .acc .more p { opacity: 1; } .no-gl .acc button { color: var(--fg); }
.no-gl .all { display: block; margin-top: 20px; color: var(--mute); } .no-gl .all li { padding: 12px 0; border-top: 1.5px solid var(--line); } .no-gl .all b { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .box { transform: none; }
}

/* ---------- Ma'lumotnoma: 3D hikoyadan keyingi oddiy o'qiladigan varaq ----------
   Statik HTML (tools/build.mjs): JS'siz ham, qidiruv va AI agentlar uchun ham to'liq. */
.dossier { position: relative; z-index: 12; margin-top: -2px; background: #fbfaf7; color: #0b0c0e; border-radius: 36px 36px 0 0; box-shadow: 0 -24px 60px -30px rgb(0 0 0 / .25); padding: clamp(64px, 9vw, 120px) var(--pad) 72px; }
.dossier-in { max-width: 760px; margin: 0 auto; }
.dossier-eye { font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #6b7078; margin-bottom: 18px; }
.dossier h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 640; letter-spacing: -.045em; line-height: 1.02; text-wrap: balance; }
.dossier h3 { margin-top: 48px; padding-top: 22px; border-top: 1.5px solid rgb(0 0 0 / .1); font-size: 1.35rem; font-weight: 640; letter-spacing: -.03em; }
.dossier p { margin-top: 14px; color: #3a3e45; font-size: 1.02rem; line-height: 1.65; }
.dossier .dossier-lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: #0b0c0e; line-height: 1.5; letter-spacing: -.01em; margin-top: 22px; }
.dossier-alt { font-size: .92rem !important; color: #6b7078 !important; }
.dossier a { color: #0b0c0e; text-decoration: underline; text-decoration-color: rgb(0 0 0 / .25); text-underline-offset: 3px; }
.dossier-facts { margin-top: 30px; display: grid; gap: 0; border-top: 1.5px solid rgb(0 0 0 / .1); }
.dossier-facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 16px; padding: 13px 0; border-bottom: 1.5px solid rgb(0 0 0 / .1); }
.dossier-facts dt { font: 500 12px/1.6 var(--mono); color: #6b7078; text-transform: uppercase; letter-spacing: .04em; }
.dossier-facts dd { margin: 0; color: #0b0c0e; line-height: 1.5; }
.dossier-list { margin-top: 14px; padding-left: 1.2em; display: grid; gap: 10px; color: #3a3e45; line-height: 1.6; }
.dossier-list b { color: #0b0c0e; font-weight: 600; }
.dossier-projects { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; list-style: none; padding: 0; }
.dossier-projects li { padding: 16px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / .07); }
.dossier-projects a { display: grid; gap: 2px; text-decoration: none; }
.dossier-projects b { font-size: 1.05rem; font-weight: 640; letter-spacing: -.02em; }
.dossier-projects span { font: 500 11.5px/1.4 var(--mono); color: #6b7078; }
.dossier-projects p { margin-top: 8px; font-size: .9rem; line-height: 1.5; }
.dossier-langs { margin-top: 44px; display: grid; gap: 4px; }
.dossier-langs p { font-size: .95rem; }
.dossier-links { margin-top: 30px !important; display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 12.5px/1.4 var(--mono); }
.dossier-meta { margin-top: 18px !important; font: 400 12px/1.5 var(--mono) !important; color: #8a8f97 !important; }
.no-gl .dossier { border-radius: 0; box-shadow: none; border-top: 1.5px solid var(--line); }
@media (max-width: 640px) { .dossier-facts div { grid-template-columns: 1fr; gap: 2px; } .dossier { border-radius: 26px 26px 0 0; } }
