/* ==========================================================================
   SaidAkbar — rezume / portfolio  (faqat tungi rejim)
   Tuzilishi: shriftlar → ranglar → asos → panellar → tugmalar → bo‘limlar
   ========================================================================== */

/* ---------------------------------------------------------------- Shriftlar */
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geologica-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geologica-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geologica-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geologica-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -------------------------------------------------- Ranglar (tungi rejim)
   GitHub Dark va VS Code uslubidagi dasturchi palitrasi                      */
:root {
  color-scheme: dark;
  --font: "Geologica", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #090C10;                       /* sahifa foni (kanvas) */
  --dot: rgba(139, 148, 158, .11);     /* fondagi nuqtali to‘r */
  --surface-hi: #141B23;               /* panel yuqorisi */
  --surface: #10161D;                  /* panel */
  --surface-2: #161D26;                /* panel ichidagi elementlar */
  --surface-3: #1C2430;
  --line: #252E3A;
  --line-2: #323D4B;
  --text: #E6EDF3;
  --text-2: #B3BECA;
  --muted: #8B949E;
  --console: #0B0F14;
  --on-solid: #FFFFFF;
  --body-wght: 350;
  --ink-mix: 90%;
  --glow-a: 70%;
  --shadow-panel:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    0 1px 2px rgba(0, 0, 0, .55),
    0 20px 44px -24px rgba(0, 0, 0, .9);
  --shadow-pop: 0 30px 80px -30px rgba(0, 0, 0, .85);

  /* signal ranglari — har bir loyiha va tugmaning o‘z rangi */
  --a-brand: #3FB950;        /* asosiy: terminal yashili */
  --a-brand-solid: #238636;  /* to‘liq yashil tugma foni */
  --a-tg: #2AABEE;
  --a-gold: #E3B341;
  --a-rose: #FF7B72;
  --a-emerald: #39D3C3;
  --a-cyan: #79C0FF;
  --a-orange: #F0883E;
  --a-violet: #BC8CFF;
  --a-uz: #3FB950;
  --a-ru: #58A6FF;
  --a-en: #FF7B72;
  --a-mail: #FF7B72;
  --a-gh: #E6EDF3;
  --a-in: #58A6FF;
  --a-ig: #F778BA;

  /* kod ranglari (VS Code Dark+) */
  --j-key: #9CDCFE;
  --j-str: #CE9178;
  --j-num: #B5CEA8;
  --j-bool: #569CD6;
  --j-punc: #808B96;

  --strip: linear-gradient(90deg,
    var(--a-brand) 0 14.2857%, var(--a-gold) 0 28.5714%, var(--a-rose) 0 42.8571%,
    var(--a-emerald) 0 57.1428%, var(--a-cyan) 0 71.4285%, var(--a-orange) 0 85.7142%, var(--a-violet) 0 100%);

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius: 16px;
  --gutter: 16px;
  --header-h: 64px;
}

/* rang sinflari: .c-* elementga o‘z signal rangini beradi */
.c-brand   { --c: var(--a-brand); --solid: var(--a-brand-solid); }
.c-tg      { --c: var(--a-tg); }
.c-gold    { --c: var(--a-gold); }
.c-rose    { --c: var(--a-rose); }
.c-emerald { --c: var(--a-emerald); }
.c-cyan    { --c: var(--a-cyan); }
.c-orange  { --c: var(--a-orange); }
.c-violet  { --c: var(--a-violet); }
.c-uz      { --c: var(--a-uz); }
.c-ru      { --c: var(--a-ru); }
.c-en      { --c: var(--a-en); }
.c-mail    { --c: var(--a-mail); }
.c-gh      { --c: var(--a-gh); }
.c-in      { --c: var(--a-in); }
.c-ig      { --c: var(--a-ig); }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.3px);
  background-size: 24px 24px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: var(--body-wght);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-variation-settings: "SHRP" 100; text-wrap: balance; }
p { text-wrap: pretty; }
strong, b { font-weight: 620; }

::selection { background: color-mix(in srgb, var(--a-brand) 32%, transparent); }
:focus-visible { outline: 2px solid var(--a-brand); outline-offset: 3px; }

.i { width: 1.15em; height: 1.15em; flex: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -64px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: min(100% - 2 * var(--gutter), 1160px);
  margin-inline: auto;
}
@media (min-width: 640px)  { :root { --gutter: 28px; } }
@media (min-width: 1100px) { :root { --gutter: 32px; } }

html.is-locked, html.is-locked body { overflow: hidden; }

/* ---------------------------------------- Panellar: har bir blok fondan ajraladi */
.panel,
.feat,
.proj,
.j-card,
.contact-box,
.skill-table,
.footer-row {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-hi), var(--surface) 64%);
  box-shadow: var(--shadow-panel);
}
.panel {
  position: relative;
  padding: clamp(20px, 3.4vw, 40px);
  border-radius: var(--radius-xl);
}

/* --------------------------------------------------------------- Tugmalar */
@property --ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* standart rang nol spetsifiklikda — .c-* sinflari doim ustun turadi */
:where(.btn) { --c: var(--a-brand); }

.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--c) 42%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 9%, var(--surface));
  color: var(--text);
  font-family: var(--font);
  font-size: .94rem;
  font-weight: 550;
  line-height: 1.1;
  letter-spacing: -.005em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .3s ease, color .2s ease, transform .15s ease;
}
.btn .i { color: color-mix(in oklab, var(--c) var(--ink-mix), var(--text)); transition: color .2s ease; }

/* chetlar bo‘ylab aylanib yuruvchi yaltiroq halqa */
.btn::before {
  --ang: 0deg;
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--ang),
    transparent 0 60%,
    color-mix(in srgb, var(--c) 45%, #fff) 74%,
    var(--c) 84%,
    transparent 97%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.btn:focus-visible,
.btn.is-glow {
  outline: none;
  border-color: color-mix(in srgb, var(--c) 78%, transparent);
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent),
    0 0 18px -2px color-mix(in srgb, var(--c) var(--glow-a), transparent),
    0 0 42px -10px color-mix(in srgb, var(--c) 50%, transparent),
    inset 0 0 14px -6px color-mix(in srgb, var(--c) 60%, transparent);
}
.btn:focus-visible::before,
.btn.is-glow::before { opacity: 1; animation: btn-ring 2.4s linear infinite; }

@media (hover: hover) {
  .btn:hover {
    border-color: color-mix(in srgb, var(--c) 78%, transparent);
    background: color-mix(in srgb, var(--c) 14%, var(--surface));
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent),
      0 0 18px -2px color-mix(in srgb, var(--c) var(--glow-a), transparent),
      0 0 42px -10px color-mix(in srgb, var(--c) 50%, transparent),
      inset 0 0 14px -6px color-mix(in srgb, var(--c) 60%, transparent);
  }
  .btn:hover::before { opacity: 1; animation: btn-ring 2.4s linear infinite; }
}
@media (hover: none) {
  .btn:active {
    border-color: color-mix(in srgb, var(--c) 78%, transparent);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent),
      0 0 18px -2px color-mix(in srgb, var(--c) var(--glow-a), transparent);
  }
  .btn:active::before { opacity: 1; }
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .65; cursor: progress; }

@keyframes btn-ring { to { --ang: 360deg; } }

.btn--solid {
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background: var(--solid, var(--c));
  color: var(--on-solid);
  font-weight: 620;
}
.btn--solid .i { color: currentColor; }
.btn--solid:focus-visible { background: color-mix(in srgb, var(--solid, var(--c)) 94%, #fff); }
@media (hover: hover) {
  .btn--solid:hover { background: color-mix(in srgb, var(--solid, var(--c)) 94%, #fff); }
}

.btn--lg { min-height: 50px; padding: 0 22px; border-radius: 12px; font-size: 1rem; }
.btn--sm { min-height: 38px; padding: 0 13px; border-radius: 9px; font-size: .87rem; }
.btn--xs { min-height: 30px; padding: 0 10px; border-radius: 8px; font-size: .8rem; gap: .4em; }
.btn--icon { width: 42px; min-height: 42px; height: 42px; padding: 0; }
.btn--icon .i { width: 20px; height: 20px; }

/* ------------------------------------------------------------------ Sarlavha */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 12, 16, .8);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow .25s ease, background-color .25s ease;
}
.site-header.is-scrolled {
  background: rgba(11, 15, 20, .9);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, .95);
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: -4px;
  padding: 4px 8px 4px 4px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand-logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  object-fit: cover;
  transition: filter .3s ease;
}
.brand-text {
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -.012em;
  font-variation-settings: "SHRP" 100;
}
@media (hover: hover) {
  .brand:hover .brand-logo { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--a-brand) 75%, transparent)); }
}

.nav-links { display: none; }
.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-switch--header { display: none !important; }

.nav-links a {
  position: relative;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 450;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease, box-shadow .3s ease;
}
.nav-links a:focus-visible { outline-offset: 0; }
.nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--a-brand);
}
@media (hover: hover) {
  .nav-links a:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--a-brand) 9%, transparent);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--a-brand) 38%, transparent),
      0 0 18px -6px color-mix(in srgb, var(--a-brand) 75%, transparent);
  }
}

@media (min-width: 960px) {
  .nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
  .nav-tools { margin-left: 10px; }
  .lang-switch--header { display: inline-flex !important; }
  .menu-toggle { display: none; }
}

html:not(.js) .menu-toggle { display: none; }
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }
.menu-toggle[aria-expanded="true"] .i-menu { display: none; }

/* til tanlagich: har bir til o‘z rangida porlaydi */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.lang-opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 620;
  letter-spacing: .05em;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .3s ease;
}
.lang-opt[aria-current="true"] {
  color: var(--text);
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 14%, var(--surface-2));
}
.lang-opt:focus-visible {
  outline: none;
  color: var(--text);
  border-color: color-mix(in srgb, var(--c) 80%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 0 16px -2px color-mix(in srgb, var(--c) var(--glow-a), transparent);
}
@media (hover: hover) {
  .lang-opt:hover {
    color: var(--text);
    border-color: color-mix(in srgb, var(--c) 80%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 0 16px -2px color-mix(in srgb, var(--c) var(--glow-a), transparent);
  }
}

/* --------------------------------------------------------------- Mobil menyu */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 45;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.3px);
  background-size: 24px 24px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-block: 16px calc(40px + env(safe-area-inset-bottom));
}
.mm-links {
  display: flex;
  flex-direction: column;
  padding: 6px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-hi), var(--surface) 64%);
  box-shadow: var(--shadow-panel);
}
.mm-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 620;
  letter-spacing: -.012em;
  text-decoration: none;
  font-variation-settings: "SHRP" 100;
}
.mm-links a:last-child { border-bottom: 0; }
.mm-links a .i { color: var(--muted); transition: transform .2s ease, color .2s ease; }
.mm-links a[aria-current="true"] { color: color-mix(in oklab, var(--a-brand) var(--ink-mix), var(--text)); }
.mm-links a:active .i,
.mm-links a:focus-visible .i { color: var(--a-brand); transform: translate(2px, -2px); }
.mm-foot { display: flex; flex-direction: column; gap: 10px; }
.mm-label { color: var(--muted); font-size: .88rem; }
.mm-foot .lang-switch { display: flex; width: 100%; }
.mm-foot .lang-opt { flex: 1 1 0; height: 46px; font-size: .95rem; letter-spacing: 0; }
@media (min-width: 960px) { .mobile-menu { display: none !important; } }

/* ------------------------------------------------------------ Bo‘limlar */
.section { padding-block: clamp(48px, 7vw, 88px) 0; }
.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 32px);
}
@media (min-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; align-items: end; }
}
.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.026em;
}
.section-lead { margin: 0; max-width: 52ch; color: var(--muted); font-size: 1.02rem; }

.prose p { margin: 0 0 14px; max-width: 66ch; color: var(--text-2); }
.prose p:last-child { margin-bottom: 0; }
.handle {
  color: color-mix(in oklab, var(--a-tg) var(--ink-mix), var(--text));
  font-weight: 550;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--a-tg) 45%, transparent);
  text-underline-offset: 3px;
}

/* --------------------------------------------- Men haqimda (sahifa boshi) */
.about { padding-top: clamp(16px, 3vw, 32px); }
.about-grid {
  display: grid;
  grid-template-areas: "title" "photo" "copy";
  gap: 22px clamp(28px, 4.5vw, 56px);
  align-items: start;
}
.about-title { grid-area: title; }
.about-copy { grid-area: copy; min-width: 0; }
@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "photo title" "photo copy";
    row-gap: 18px;
  }
}
.about-photo {
  grid-area: photo;
  position: relative;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--surface-2);
}
@media (min-width: 900px) { .about-photo { max-width: 300px; } }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  pointer-events: none;
}
.photo-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(165deg, color-mix(in srgb, var(--a-brand) 15%, var(--surface-2)), var(--surface-2) 72%);
}
.photo-empty span {
  color: color-mix(in oklab, var(--a-brand) 80%, var(--text));
  font-size: clamp(3.2rem, 7vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -.04em;
  font-variation-settings: "SHRP" 100;
}

.facts {
  display: grid;
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .facts { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.fact {
  display: grid;
  grid-template-columns: minmax(112px, 42%) minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.fact dt { color: var(--muted); font-size: .9rem; }
.fact dd { margin: 0; color: var(--text); font-size: .96rem; overflow-wrap: anywhere; }
.fact dd.is-strong { font-weight: 620; }
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 8px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--a-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-brand) 25%, transparent);
}
.link-btn,
.cert-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: color-mix(in oklab, var(--c) var(--ink-mix), var(--text));
  font-weight: 600;
}
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--c) 45%, transparent);
  text-underline-offset: 3px;
}
.link-btn .i, .cert-inline .i { color: var(--c); }

/* ---------------------------------------------- Ism, rol va API konsol bloki */
.hero { padding-top: 16px; }
.hero-grid { display: grid; gap: clamp(28px, 4vw, 48px); align-items: center; }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); }
}
/* ixcham, bir qatorda turadigan ism */
.hero-name {
  margin: 0;
  font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.3rem);
  font-weight: 640;
  line-height: 1.15;
  letter-spacing: -.022em;
  font-variation-settings: "SHRP" 60;
}
.hero-role {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin: 10px 0 0;
  font-size: clamp(1.05rem, .98rem + .35vw, 1.22rem);
  line-height: 1.35;
}
.role-main {
  color: color-mix(in oklab, var(--a-brand) var(--ink-mix), var(--text));
  font-weight: 650;
  font-variation-settings: "SHRP" 100;
}
.role-sub { color: var(--muted); }
.hero-lead {
  margin: 16px 0 0;
  max-width: 56ch;
  color: var(--text-2);
  font-size: clamp(1rem, .96rem + .2vw, 1.08rem);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
@media (max-width: 479px) {
  .hero-cta .btn { flex: 1 1 100%; }
}

/* API javobi oynasi */
.console {
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--console);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 16px 36px -22px rgba(0, 0, 0, .95);
}
.console::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--strip);
}
.console-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .015);
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.4;
}
.method { color: color-mix(in oklab, var(--a-brand) var(--ink-mix), var(--text)); font-weight: 700; }
.req { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--text-2); }
.req-text { display: inline-block; max-width: 100%; overflow: hidden; vertical-align: bottom; white-space: nowrap; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: color-mix(in oklab, var(--a-brand) var(--ink-mix), var(--text));
  font-weight: 600;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--a-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-brand) 22%, transparent);
}
.ms { color: var(--muted); font-weight: 400; }
.console-body {
  margin: 0;
  padding: 16px 18px 20px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
.j-k { color: var(--j-key); }
.j-s { color: var(--j-str); }
.j-n { color: var(--j-num); }
.j-b { color: var(--j-bool); }
.j-p { color: var(--j-punc); }
.caret {
  display: inline-block;
  width: .55em;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -.2em;
  background: var(--a-brand);
  opacity: .85;
}

/* har bir qator: chuqurlik (--d) bo‘yicha chekinish, o‘ralsa davomi ichkarida */
.console-body .ln {
  display: block;
  padding-left: calc(var(--d, 0) * 2ch + 4ch);
  text-indent: -4ch;
}
/* ro‘yxatlar: keng ekranda bir qatorda, telefonda ustun bo‘lib */
.console-body .ln--narrow { display: none; }
@media (max-width: 559px) {
  .console-body .ln--wide { display: none; }
  .console-body .ln--narrow { display: block; }
}
@media (max-width: 479px) {
  .console-bar { font-size: .74rem; padding-inline: 14px; }
  .console-body { font-size: .78rem; padding: 14px 14px 18px; }
}
@media (max-width: 359px) {
  .console-body { font-size: .72rem; }
}

/* sahifa ochilishidagi yagona animatsiya: so‘rov yoziladi, javob qatorma-qator keladi */
@media (prefers-reduced-motion: no-preference) {
  .js .req-text { animation: type-req .9s steps(var(--n), end) .3s both; }
  .js .status { animation: fade-in .3s ease 1.25s both; }
  .js .console-body .ln { animation: fade-in .35s ease both; animation-delay: calc(1.35s + var(--i, 0) * 55ms); }
  .js .caret { animation: fade-in .2s ease 2.45s both, blink 1.1s steps(1) 2.65s 6; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 559px) {
  .js .console-body .ln { animation-delay: calc(1.35s + var(--j, 0) * 55ms); }
}
@keyframes type-req { from { width: 0; } to { width: calc(var(--n) * 1ch); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }

/* --------------------------------------------------------------- Loyihalar */
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--c) 13%, transparent);
  color: color-mix(in oklab, var(--c) var(--ink-mix), var(--text));
  font-size: .76rem;
  font-weight: 620;
  white-space: nowrap;
}
.proj-type { margin: 3px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.slogan {
  margin: 0;
  color: color-mix(in oklab, var(--c) var(--ink-mix), var(--text));
  font-size: .9rem;
  font-weight: 560;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.tag {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.2;
}
.proj-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* loyiha rasmi: kichik, qirrasi aniq ko‘rinadigan plitka */
.thumb {
  position: relative;
  display: block;
  flex: none;
  width: 56px; height: 56px;
  overflow: hidden;
  border-radius: 11px;
  background: color-mix(in srgb, var(--c) 13%, var(--surface-2));
}
.thumb--sm { width: 48px; height: 48px; border-radius: 10px; }
.thumb--lg { width: 72px; height: 72px; border-radius: 14px; }
.thumb--xl { width: 88px; height: 88px; border-radius: 17px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent), inset 0 0 0 2px rgba(255, 255, 255, .05);
  pointer-events: none;
}
.thumb--empty { display: grid; place-items: center; }
.thumb--empty span {
  color: color-mix(in oklab, var(--c) var(--ink-mix), var(--text));
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
  font-variation-settings: "SHRP" 100;
}
.thumb--lg.thumb--empty span { font-size: 1.3rem; }
.thumb--xl.thumb--empty span { font-size: 1.55rem; }

/* asosiy loyiha */
.feat {
  position: relative;
  display: grid;
  gap: 22px;
  padding: 24px 22px 22px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color .25s ease, box-shadow .3s ease;
}
.feat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--strip);
}
@media (min-width: 900px) {
  .feat { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 44px; align-items: center; padding: 32px; }
}
.feat-id { display: flex; gap: 18px; align-items: flex-start; min-width: 0; }
.feat-titles { min-width: 0; }
.feat-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.feat-name {
  margin: 0;
  font-size: clamp(1.3rem, 1.1rem + .9vw, 1.65rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.feat-body { display: grid; gap: 14px; }
.feat-desc { margin: 0; max-width: 60ch; color: var(--text-2); font-size: 1.04rem; }
.feat .proj-actions { margin-top: 4px; }

/* qolgan loyihalar */
.proj-grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 700px)  { .proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .proj-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.proj {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .25s ease, box-shadow .3s ease;
}
.proj::before {
  content: "";
  position: absolute;
  top: 34px; left: -1px;
  width: 3px; height: 32px;
  border-radius: 0 3px 3px 0;
  background: var(--c);
}
.proj-top { display: flex; gap: 14px; align-items: center; min-width: 0; }
.proj-id { min-width: 0; }
.proj-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 640;
  line-height: 1.25;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.proj-desc { flex: 1 1 auto; margin: 0; color: var(--text-2); font-size: .96rem; }
.proj .proj-actions { margin-top: 2px; }

@media (hover: hover) {
  .proj:hover,
  .feat:hover {
    border-color: color-mix(in srgb, var(--c) 50%, var(--line));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .05),
      0 0 0 1px color-mix(in srgb, var(--c) 20%, transparent),
      0 24px 50px -28px color-mix(in srgb, var(--c) 70%, transparent);
  }
}

/* ------------------------------------------------------------- Ko‘nikmalar */
.skill-table { padding: 4px clamp(18px, 3vw, 28px); border-radius: var(--radius-lg); }
.skill-row { display: grid; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.skill-row:last-child { border-bottom: 0; }
@media (min-width: 800px) {
  .skill-row { grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: center; padding: 20px 0; }
}
.skill-name {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  font-size: 1.02rem;
  font-weight: 620;
  letter-spacing: -.005em;
}
.skill-name::before {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .9rem;
  line-height: 1.4;
}

/* --------------------------------------------------------- Tajriba va ta’lim */
.journey-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .journey-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.j-card {
  position: relative;
  padding: clamp(22px, 3vw, 30px);
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.j-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--c);
}
.j-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: color-mix(in oklab, var(--c) var(--ink-mix), var(--text));
  font-size: .95rem;
  font-weight: 620;
}
.j-heading .i { color: var(--c); }
.j-role {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.015em;
  font-variation-settings: "SHRP" 100;
}
.j-org { margin: 4px 0 0; color: var(--text-2); }
.j-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .92rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 13%, transparent);
  color: color-mix(in oklab, var(--c) var(--ink-mix), var(--text));
  font-size: .8rem;
  font-weight: 650;
}
.j-list { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.j-list li { position: relative; padding-left: 20px; color: var(--text-2); }
.j-list li::before {
  content: "";
  position: absolute;
  top: .68em; left: 2px;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--c);
}
.j-status { display: inline-flex; align-items: center; gap: 6px; color: color-mix(in oklab, var(--a-brand) var(--ink-mix), var(--text)); font-weight: 560; }
.j-status .i { color: var(--a-brand); }
.j-desc { margin: 14px 0 0; color: var(--text-2); }
.j-extra {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: .95rem;
}
.j-extra strong { color: var(--text); }

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  padding: 10px 14px;
  border: 1px dashed color-mix(in srgb, var(--c) 55%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 8%, transparent);
  color: color-mix(in oklab, var(--c) var(--ink-mix), var(--text));
  font-weight: 600;
}
.cert-badge .i { color: var(--c); }

.cert-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 18px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .25s ease, box-shadow .3s ease;
}
.cert-preview img {
  width: 120px;
  height: auto;
  aspect-ratio: 160 / 113;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cert-preview .btn { flex: 1 1 auto; }
@media (max-width: 479px) {
  .cert-preview { flex-direction: column; align-items: stretch; gap: 12px; }
  .cert-preview img { width: 100%; }
  .cert-preview .btn { flex: none; width: 100%; }
}
.cert-preview:focus-visible { outline: none; }
.cert-preview:focus-visible,
.cert-preview:active { border-color: color-mix(in srgb, var(--c) 60%, transparent); }
@media (hover: hover) {
  .cert-preview:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 22px -10px var(--c); }
  .cert-preview:hover .btn {
    border-color: color-mix(in srgb, var(--c) 78%, transparent);
    background: color-mix(in srgb, var(--c) 14%, var(--surface));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 0 18px -2px color-mix(in srgb, var(--c) var(--glow-a), transparent);
  }
  .cert-preview:hover .btn::before { opacity: 1; animation: btn-ring 2.4s linear infinite; }
}
.cert-preview:focus-visible .btn {
  border-color: color-mix(in srgb, var(--c) 78%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 0 18px -2px color-mix(in srgb, var(--c) var(--glow-a), transparent);
}

/* ------------------------------------------------------------------- Aloqa */
.contact { padding-bottom: clamp(48px, 7vw, 88px); }
.contact-box {
  position: relative;
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  padding: clamp(24px, 4.5vw, 52px);
  overflow: hidden;
  border-radius: var(--radius-xl);
}
.contact-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--strip);
}
@media (min-width: 960px) {
  .contact-box.has-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
.contact-title { font-size: clamp(1.8rem, 1.2rem + 2.3vw, 2.8rem); max-width: 18ch; }
.contact-copy .section-lead { margin-top: 16px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.contact-links--side { margin-top: 0; }
.contact-links .btn { max-width: 100%; }
.contact-links .btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
@media (min-width: 900px) {
  .contact-box.no-form { grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); align-items: end; }
  .contact-links--side { flex-direction: column; flex-wrap: nowrap; }
  .contact-links--side .btn { width: 100%; }
}
@media (max-width: 479px) {
  .contact-links .btn { flex: 1 1 100%; }
  .proj-actions .btn { flex: 1 1 auto; }
}

.cform { display: grid; gap: 14px; min-width: 0; }
.cform-title { margin: 0 0 2px; font-weight: 620; }
.field { display: grid; gap: 6px; }
.field label { color: var(--text-2); font-size: .88rem; font-weight: 500; }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: var(--console);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: var(--body-wght);
  line-height: 1.5;
  transition: border-color .2s ease, box-shadow .3s ease;
}
.field textarea { min-height: 124px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: .85; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--a-brand) 72%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--a-brand) 40%, transparent), 0 0 18px -4px color-mix(in srgb, var(--a-brand) 60%, transparent);
}
.field [aria-invalid="true"] { border-color: var(--a-rose); }
.field-err { margin: 0; color: color-mix(in oklab, var(--a-rose) var(--ink-mix), var(--text)); font-size: .85rem; }
.field-err:empty { display: none; }
.cform-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 4px; }
.form-status { margin: 0; font-size: .92rem; }
.form-status:empty { display: none; }
.form-status.is-ok { color: color-mix(in oklab, var(--a-brand) var(--ink-mix), var(--text)); }
.form-status.is-error { color: color-mix(in oklab, var(--a-rose) var(--ink-mix), var(--text)); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------- Footer */
.site-footer {
  padding: 0 0 calc(28px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: .9rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 18px 22px;
  border-radius: var(--radius);
}
.footer-copy { margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-nav a { color: var(--muted); text-decoration: none; transition: color .2s ease; }
.footer-nav a[aria-current="true"] { color: var(--text); }
@media (hover: hover) { .footer-nav a:hover { color: var(--text); } }

.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  background: color-mix(in srgb, var(--c) 8%, var(--surface));
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, border-color .2s ease, box-shadow .3s ease, background-color .2s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ---------------------------------------------------- Batafsil oynalari */
.dlg {
  width: min(780px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--c) 32%, var(--line));
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop), 0 0 80px -46px var(--c);
}
.dlg[open] { display: flex; flex-direction: column; }
.dlg:focus, .dlg:focus-visible { outline: none; }
.dlg::backdrop {
  background: rgba(1, 4, 9, .7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.dlg-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
  padding: 24px 74px 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, var(--surface-hi)), var(--surface));
}
.dlg-head::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--c);
}
.dlg-head--compact { padding: 18px 70px 16px 22px; }
.dlg-id { min-width: 0; }
.dlg-title {
  margin: 0;
  font-size: clamp(1.3rem, 1.12rem + .8vw, 1.65rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.dlg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 0; }
.dlg-meta .proj-type { margin: 0; }
.dlg-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  color: color-mix(in oklab, var(--c) var(--ink-mix), var(--text));
  font-size: .9rem;
  font-weight: 560;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.dlg-link .i { width: 1em; height: 1em; }
.dlg-close { position: absolute; top: 16px; right: 16px; }
.dlg-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.dlg-sec + .dlg-sec { margin-top: 28px; }
.dlg-sec h3 { margin: 0 0 12px; font-size: 1rem; font-weight: 650; letter-spacing: -.005em; }
.slogan--dlg { margin-top: 14px; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.stat b {
  color: color-mix(in oklab, var(--c) var(--ink-mix), var(--text));
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  font-variation-settings: "SHRP" 100;
}
.stat span { color: var(--muted); font-size: .82rem; line-height: 1.35; }

.checks { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.checks .i { width: 1.05em; height: 1.05em; margin-top: .26em; color: var(--c); }

.code-block {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--console);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .76rem;
}
.code-block pre {
  margin: 0;
  padding: 14px 16px 16px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code-req { color: var(--j-key); }

.dlg-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: none;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.dlg--image { width: min(980px, calc(100% - 32px)); }
.dlg-body--image { padding: 16px; background: var(--surface-2); }
.dlg-body--image img { width: 100%; height: auto; margin-inline: auto; border-radius: 10px; }

@media (max-width: 639px) {
  .dlg,
  .dlg--image {
    width: 100%;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    margin: auto 0 0;
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
  }
  .dlg-head { gap: 14px; padding: 20px 64px 16px 18px; }
  .dlg-head--compact { padding: 16px 62px 14px 18px; }
  .dlg-close { top: 12px; right: 12px; }
  .dlg-body { padding: 20px 18px; }
  .dlg-foot { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
  .dlg-foot .btn { flex: 1 1 auto; }
  .dlg .thumb--xl { width: 64px; height: 64px; border-radius: 13px; }
  .dlg .thumb--xl.thumb--empty span { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .dlg[open] { animation: dlg-in .28s cubic-bezier(.2, .8, .2, 1); }
  .dlg[open]::backdrop { animation: fade-in .28s ease; }
  .dlg.is-closing { animation: dlg-out .17s ease forwards; }
  .dlg.is-closing::backdrop { animation: fade-out .17s ease forwards; }
}
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes dlg-out { to { opacity: 0; transform: translateY(10px) scale(.985); } }
@media (max-width: 639px) {
  @keyframes dlg-in { from { transform: translateY(100%); } }
  @keyframes dlg-out { to { transform: translateY(100%); } }
}

/* --------------------------------------------------------------- Kamroq harakat */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --------------------------------------------------------------------- Chop */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-hi: #fff; --surface-2: #fff; --text: #000; --text-2: #222; --muted: #444; --line: #ccc; }
  .site-header, .mobile-menu, .to-top, .hero-cta, .proj-actions, .cform, .contact-links, .footer-nav, .console, dialog { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 20px; }
  .panel, .feat, .proj, .j-card, .contact-box, .skill-table, .footer-row { box-shadow: none; break-inside: avoid; }
}
