/* =========================================================
   Rahmatullo Ergashev — Portfolio
   ========================================================= */

:root {
  --bg: #07080c;
  --bg-2: #0c0e15;
  --surface: rgb(255 255 255 / 0.03);
  --surface-2: rgb(255 255 255 / 0.055);
  --border: rgb(255 255 255 / 0.08);
  --border-2: rgb(255 255 255 / 0.14);
  --text: #eef0f6;
  --muted: #8a8fa3;
  --accent: #8b5cf6;
  --accent-soft: #c4b5fd;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --live: #4ade80;
  --grad: linear-gradient(120deg, #c4b5fd 0%, #8b5cf6 35%, #22d3ee 100%);
  --radius: 22px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(16px, 4vw, 40px);
  --container: 1200px;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}
html.no-scroll { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgb(139 92 246 / 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 6px; }

kbd {
  font-family: var(--mono);
  font-size: 0.72em;
  padding: 0.15em 0.45em;
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
}

.container {
  width: min(var(--container), 100%); margin-inline: auto;
  padding-inline: calc(var(--gutter) + var(--safe-l)) calc(var(--gutter) + var(--safe-r));
}
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.85em; }
.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

/* ---------- Scroll progress (scroll-driven animation) ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 100;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .progress { animation: progress linear both; animation-timeline: scroll(root); }
  @keyframes progress { to { transform: scaleX(1); } }
}

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; will-change: transform; }
.bg-orb--1 { width: 520px; height: 520px; background: #6d28d9; top: -180px; left: -120px; animation: drift 22s var(--ease) infinite alternate; }
.bg-orb--2 { width: 460px; height: 460px; background: #0891b2; top: -100px; right: -160px; opacity: 0.35; animation: drift 26s var(--ease) infinite alternate-reverse; }
.bg-orb--3 { width: 380px; height: 380px; background: #be185d; top: 45vh; left: 40%; opacity: 0.16; animation: drift 30s var(--ease) infinite alternate; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}
.bg-noise {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 48px; padding: 0 1.4rem;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 0.95rem; white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn svg { transition: transform 0.25s var(--ease); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12) inset, 0 10px 30px -10px rgb(139 92 246 / 0.7);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.2) inset, 0 16px 40px -10px rgb(139 92 246 / 0.9); }
.btn-primary:hover svg { transform: translateY(2px); }
.btn-ghost { border-color: var(--border-2); background: var(--surface); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: rgb(255 255 255 / 0.3); background: var(--surface-2); }
.btn-light { background: var(--text); color: var(--bg); }
.btn-light:hover { background: #fff; }
.btn-small { height: 38px; padding: 0 1rem; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; z-index: 50;
  transform: translateX(-50%);
  width: min(calc(var(--container) - 80px), calc(100% - 24px - var(--safe-l) - var(--safe-r)));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 8px 12px 8px 16px;
  border: 1px solid transparent; border-radius: 28px;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgb(12 14 21 / 0.85);
  border-color: var(--border);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.nav-logo {
  display: inline-flex; align-items: center; text-decoration: none;
}
.nav-logo-mark {
  display: block; width: 70px; height: 70px;
  border-radius: 50%; overflow: hidden;
  object-fit: cover; object-position: center 32%;
  background: linear-gradient(135deg, rgb(139 92 246 / 0.35), rgb(34 211 238 / 0.2));
  border: 2.5px solid rgba(196, 181, 253, 0.55);
  box-shadow: 0 0 24px -2px rgb(139 92 246 / 0.65);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.nav-logo:hover .nav-logo-mark {
  transform: scale(1.06);
  border-color: #c4b5fd;
  box-shadow: 0 0 30px 0 rgb(139 92 246 / 0.85);
}
.nav-logo-mark img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 32%; display: block;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.kbd-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 0.85rem; transition: border-color 0.2s, color 0.2s;
}
.kbd-btn:hover { border-color: var(--border-2); color: var(--text); }

/* Til almashtirgich — UZ / RU / EN */
.lang-switch {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
}
.lang-switch button {
  height: 30px; min-width: 36px; padding: 0 8px; border: 0; border-radius: 999px; background: none;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.lang-switch--menu { display: none; }

/* Mobil menyu — faqat ≤ 820px da ko'rinadi */
.menu-btn {
  display: none; place-items: center; align-content: center; gap: 5px;
  width: 38px; height: 38px; border-radius: 50%; padding: 0;
  border: 1px solid var(--border); background: var(--surface);
}
.menu-btn span { display: block; width: 16px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.nav.menu-open {
  background: rgb(12 14 21 / 0.92); border-color: var(--border);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.mobile-menu {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  display: grid; gap: 2px; padding: 8px; border-radius: 22px;
  border: 1px solid var(--border-2); background: rgb(12 14 21 / 0.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.9);
  animation: menu-in 0.3s var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 14px 16px; border-radius: 14px; font-size: 1.05rem; font-weight: 500; }
.mobile-menu a:active, .mobile-menu a:hover { background: var(--surface-2); }
.mobile-menu .mobile-menu-cv { margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 14px 14px; color: var(--accent-soft); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(24px); filter: blur(6px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-grid > * { min-width: 0; }
.hero-copy > .reveal:nth-child(2) { --d: 80ms; }
.hero-copy > .reveal:nth-child(3) { --d: 160ms; }
.hero-copy > .reveal:nth-child(4) { --d: 240ms; }
.hero-copy > .reveal:nth-child(5) { --d: 320ms; }

.status-pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(8px);
  font-size: 0.85rem; margin-bottom: 1.75rem;
  transition: border-color 0.2s;
}
.status-pill:hover { border-color: var(--border-2); }
.status-sep { color: var(--muted); }
.status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.status-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--live);
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.hero-title {
  font-size: clamp(2.2rem, 4.3vw, 3.75rem);
  line-height: 1.02; letter-spacing: -0.045em; font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero-title .line { display: block; }
.hero-title .serif { font-size: 1.08em; }
.rotator { display: inline-block; color: var(--muted); white-space: nowrap; }
.rotator-word {
  display: inline-block;
  transition: opacity 0.38s var(--ease), transform 0.38s var(--ease), filter 0.38s var(--ease);
}
.rotator-word.out { opacity: 0; transform: translateY(-0.3em); filter: blur(6px); }

.hero-sub { font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--muted); max-width: 540px; margin-bottom: 2rem; }
.hero-sub strong { color: var(--text); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2rem; }
.hero-socials { display: flex; gap: 8px; }
.hero-socials a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}
.hero-socials a:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-3px); }

/* Code window */
.hero-visual {
  position: relative; perspective: 1200px;
  --rx: 0deg; --ry: 0deg; --d: 200ms;
}
.window {
  position: relative;
  border-radius: 18px; border: 1px solid var(--border-2);
  background: linear-gradient(180deg, rgb(22 24 34 / 0.9), rgb(12 14 21 / 0.9));
  backdrop-filter: blur(20px);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(255 255 255 / 0.03) inset, 0 0 80px -20px rgb(139 92 246 / 0.35);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.4s var(--ease);
  overflow: hidden;
}
.window::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgb(196 181 253 / 0.6), transparent 35%, transparent 65%, rgb(34 211 238 / 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.window-title { margin-left: auto; margin-right: auto; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); transform: translateX(-24px); }
.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }

.code {
  margin: 0; padding: 18px 0 22px; overflow-x: auto;
  font-family: var(--mono); font-size: clamp(0.72rem, 0.95vw, 0.86rem); line-height: 1.75; color: #d4d7e3;
}
.code-line {
  display: block; padding-right: 20px; white-space: pre;
  opacity: 0; transform: translateX(-8px);
  animation: line-in 0.5s var(--ease) forwards;
  animation-delay: calc(500ms + var(--i) * 75ms);
}
@keyframes line-in { to { opacity: 1; transform: none; } }
.ln { display: inline-block; width: 3.2em; padding-right: 1.2em; text-align: right; color: rgb(255 255 255 / 0.2); user-select: none; }
.t-key { color: #c792ea; }
.t-var { color: #82aaff; }
.t-str { color: #c3e88d; }
.t-num { color: #f78c6c; }
.t-fn { color: #22d3ee; }
.t-com { color: #676e95; font-style: italic; }
.caret {
  display: inline-block; width: 8px; height: 1.1em; margin-left: 3px; vertical-align: -0.2em;
  background: var(--accent-soft); animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px; font-size: 0.8rem; line-height: 1.35;
  background: rgb(18 20 30 / 0.85); border: 1px solid var(--border-2);
  backdrop-filter: blur(14px); box-shadow: 0 20px 40px -15px rgb(0 0 0 / 0.7);
  animation: float 6s ease-in-out infinite;
}
.float-card strong { font-weight: 600; }
.float-card--a { left: -28px; bottom: -26px; }
.float-card--b { right: -18px; top: 70px; animation-delay: -3s; }
.float-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgb(255 255 255 / 0.08); }
.float-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px rgb(74 222 128 / 0.2), 0 0 16px var(--live); }
@keyframes float { 50% { transform: translateY(-10px); } }


/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--border); padding: 18px 0; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; gap: 28px; align-items: center; animation: marquee 45s linear infinite; }
.marquee-track span { font-size: 1.05rem; font-weight: 500; color: var(--muted); letter-spacing: -0.01em; }
.marquee-track i { font-style: normal; color: var(--accent); font-size: 0.7rem; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Spotlight surface (cards, services, stats) ---------- */
.card, .service, .stat {
  position: relative; isolation: isolate;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.card::after, .service::after, .stat::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgb(139 92 246 / 0.14), transparent 45%);
}
.card:hover::after, .service:hover::after, .stat:hover::after { opacity: 1; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-block: 70px 10px; }
.stat { padding: 26px 24px; display: flex; flex-direction: column; gap: 6px; }
.stat:nth-child(2) { --d: 80ms; } .stat:nth-child(3) { --d: 160ms; } .stat:nth-child(4) { --d: 240ms; }
.stat-num {
  font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1;
  background: linear-gradient(180deg, #fff, rgb(255 255 255 / 0.55));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--muted); font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 12vw, 140px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.75rem; }
.eyebrow { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-soft); letter-spacing: 0.02em; margin-bottom: 0.9rem; }
.section-title { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.05; letter-spacing: -0.04em; font-weight: 600; }
.section-title .serif { font-size: 1.08em; }
.section-lead { color: var(--muted); max-width: 440px; font-size: 1.02rem; }
.section-head .section-lead { --d: 120ms; }

/* ---------- Filters ---------- */
.filters {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; white-space: nowrap;
  border: 0; background: transparent; padding: 8px 16px; border-radius: 999px;
  font-size: 0.88rem; color: var(--muted); transition: color 0.2s, background 0.25s;
}
.chip sup { font-family: var(--mono); font-size: 0.68rem; margin-left: 4px; opacity: 0.7; }
.chip:hover { color: var(--text); }
.chip[aria-selected="true"] { background: var(--text); color: var(--bg); }

/* ---------- Project cards ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.3s, transform 0.5s var(--ease), opacity 0.9s var(--ease), filter 0.9s var(--ease);
  opacity: 0; transform: translateY(24px); filter: blur(6px);
}
.card.in { opacity: 1; transform: none; filter: none; }
.card:hover { border-color: var(--border-2); }
@media (hover: hover) { .card.in:hover { transform: translateY(-4px); } }
.card-link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.card-media {
  position: relative; height: clamp(260px, 30vw, 360px); overflow: hidden;
  background:
    radial-gradient(80% 90% at 50% 110%, rgb(139 92 246 / 0.28), transparent 70%),
    linear-gradient(180deg, rgb(255 255 255 / 0.02), transparent);
  border-bottom: 1px solid var(--border);
}
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-meta .mono { margin-left: auto; }
.card-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; }
.card-text { color: var(--muted); font-size: 0.95rem; }
.card-cta {
  margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.88rem; font-weight: 500; color: var(--accent-soft);
}
.card-cta svg { transition: transform 0.3s var(--ease); }
.card:hover .card-cta svg { transform: translate(3px, -3px); }

.card--wide { grid-column: 1 / -1; flex-direction: row; }
.card--wide .card-media { flex: 1.25; height: auto; min-height: 420px; border-bottom: 0; border-right: 1px solid var(--border); }
.card--wide .card-body { flex: 1; padding: 36px; justify-content: center; }
.card--wide .card-title { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.card--wide .card-text { font-size: 1.05rem; }
.card--wide .card-cta { margin-top: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.74rem; font-weight: 500; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border-2); color: var(--text); background: var(--surface-2);
}
.badge-live { color: var(--live); border-color: rgb(74 222 128 / 0.3); background: rgb(74 222 128 / 0.08); }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-company { color: var(--accent-2); border-color: rgb(34 211 238 / 0.3); background: rgb(34 211 238 / 0.08); }

/* IT Progress — kompaniya bo'limi */
.company-strip {
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  margin-bottom: 24px; padding: 16px 22px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface); transition: border-color 0.2s;
}
.company-strip:hover { border-color: var(--border-2); }
.company-name { font-weight: 600; font-size: 1.05rem; }
.company-strip .mono { margin-left: auto; font-size: 0.8rem; }
@media (max-width: 600px) { .company-strip .mono { margin-left: 0; } }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 0.76rem; padding: 4px 10px; border-radius: 8px;
  background: rgb(255 255 255 / 0.04); border: 1px solid var(--border); color: #c7cad6;
}

/* Media: phones */
.media-phones { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-end; }
.phone {
  position: absolute; bottom: -18%; width: 34%; max-width: 190px; aspect-ratio: 9 / 19.5;
  border-radius: 26px; padding: 5px; overflow: hidden;
  background: #111; border: 1px solid rgb(255 255 255 / 0.16);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.9);
  transition: transform 0.7s var(--ease);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 21px; }
.phone--0 { z-index: 2; transform: translateY(0); }
.phone--1 { transform: translateX(-72%) rotate(-8deg) translateY(6%) scale(0.92); opacity: 0.9; }
.phone--2 { transform: translateX(72%) rotate(8deg) translateY(6%) scale(0.92); opacity: 0.9; }
.card:hover .phone--0 { transform: translateY(-6%); }
.card:hover .phone--1 { transform: translateX(-84%) rotate(-11deg) translateY(2%) scale(0.92); }
.card:hover .phone--2 { transform: translateX(84%) rotate(11deg) translateY(2%) scale(0.92); }
.card--wide .phone { width: 31%; max-width: 230px; bottom: -22%; }
.card--wide .phone--1 { transform: translateX(-80%) rotate(-7deg) translateY(5%) scale(0.92); }
.card--wide .phone--2 { transform: translateX(80%) rotate(7deg) translateY(5%) scale(0.92); }
.card--wide:hover .phone--1 { transform: translateX(-96%) rotate(-10deg) translateY(1%) scale(0.92); }
.card--wide:hover .phone--2 { transform: translateX(96%) rotate(10deg) translateY(1%) scale(0.92); }

/* Media: rasm hali yo'q */
.media-soon { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.media-soon-mark {
  width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center;
  font-size: 2.4rem; font-weight: 600; color: var(--text);
  border: 1px solid var(--border-2); background: rgb(14 16 24 / 0.7);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.9);
}
.media-soon .mono { font-size: 0.74rem; }
.media-logo {
  width: 150px; height: 150px; padding: 14px; border-radius: 50%; object-fit: contain;
  background: #fff; box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.9);
  transition: transform 0.7s var(--ease);
}
.card:hover .media-logo { transform: translateY(-6px) scale(1.03); }
.card--wide .media-logo { width: 190px; height: 190px; }
.pd-logo { width: 28px; height: 28px; padding: 2px; border-radius: 50%; object-fit: contain; background: #fff; }

/* Media: browser */
.media-browser {
  position: absolute; left: 8%; right: 8%; top: 12%; bottom: -10%;
  border-radius: 14px 14px 0 0; overflow: hidden;
  border: 1px solid var(--border-2); background: #0e1018;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.9);
  transition: transform 0.7s var(--ease);
}
.media-browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.media-browser-bar .dot { width: 9px; height: 9px; }
.media-browser .url {
  margin-left: 10px; flex: 1; max-width: 60%; padding: 3px 10px; border-radius: 6px;
  background: rgb(255 255 255 / 0.05); color: var(--muted); font-size: 0.7rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.media-browser img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card:hover .media-browser { transform: translateY(-4%); }

/* Media: code (backend) */
.media-code {
  position: absolute; left: 10%; right: 10%; top: 50%; transform: translateY(-50%);
  border-radius: 14px; border: 1px solid var(--border-2); background: rgb(14 16 24 / 0.9);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.9); padding-bottom: 8px;
  transition: transform 0.7s var(--ease);
}
.media-code-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.media-code-bar .dot { width: 9px; height: 9px; }
.media-code-bar .mono { margin-left: 8px; font-size: 0.72rem; }
.ep { display: flex; align-items: center; gap: 10px; padding: 7px 14px; font-size: 0.85rem; }
.ep .mono { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-ok { font-family: var(--mono); font-size: 0.7rem; color: var(--live); }
.ep-m { font-family: var(--mono); font-size: 0.66rem; font-weight: 600; padding: 2px 7px; border-radius: 5px; min-width: 52px; text-align: center; }
.ep-get { color: #4ade80; background: rgb(74 222 128 / 0.12); }
.ep-post { color: #60a5fa; background: rgb(96 165 250 / 0.12); }
.ep-put, .ep-patch { color: #fbbf24; background: rgb(251 191 36 / 0.12); }
.ep-delete { color: #f87171; background: rgb(248 113 113 / 0.12); }
.card:hover .media-code { transform: translateY(-54%); }

/* View transitions for filter changes */
::view-transition-group(*) { animation-duration: 0.5s; animation-timing-function: var(--ease); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.service-top { display: flex; justify-content: space-between; align-items: center; }
.service-top .mono { font-size: 0.72rem; }
.service-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--border-2); }
.service-icon--mobile { color: #c4b5fd; background: rgb(139 92 246 / 0.12); }
.service-icon--web { color: #67e8f9; background: rgb(34 211 238 / 0.1); }
.service-icon--backend { color: #f9a8d4; background: rgb(244 114 182 / 0.1); }
.service h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.03em; }
.service p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.service-flow {
  position: absolute; top: 52px; right: -19px; width: 20px; height: 2px; z-index: 2;
  background: var(--border-2); overflow: hidden;
}
.service-flow i {
  position: absolute; top: 0; left: -8px; width: 8px; height: 2px; background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2); animation: flow 1.6s linear infinite;
}
@keyframes flow { to { left: 100%; } }

/* ---------- Journey ---------- */
.journey-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.journey-grid > div { position: sticky; top: 120px; }
.journey-grid .section-lead { margin-top: 1.25rem; }
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--border) 60%);
}
.tl-item { position: relative; padding: 0 0 2.4rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -32px; top: 6px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border-2);
}
.tl-item--now .tl-dot { border-color: var(--accent); box-shadow: 0 0 0 5px rgb(139 92 246 / 0.18), 0 0 20px var(--accent); }
.tl-when { display: inline-block; font-size: 0.78rem; color: var(--accent-soft); margin-bottom: 6px; }
.tl-item h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.tl-item p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact { padding-bottom: 100px; }
.contact-card {
  position: relative; overflow: hidden;
  padding: clamp(28px, 5vw, 64px); border-radius: 32px;
  border: 1px solid var(--border-2);
  background:
    radial-gradient(60% 80% at 100% 0%, rgb(34 211 238 / 0.12), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgb(139 92 246 / 0.2), transparent 60%),
    var(--bg-2);
}
.contact-title { font-size: clamp(2.2rem, 5.4vw, 4.2rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 600; margin-bottom: 1rem; }
.contact-title .serif { font-size: 1.08em; }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); margin-top: 2.5rem; }

.contact-form { display: flex; flex-direction: column; gap: 14px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; padding: 22px 16px 8px; border-radius: 14px;
  border: 1px solid var(--border-2); background: rgb(255 255 255 / 0.03);
  color: var(--text); font: inherit; font-size: 0.98rem; resize: vertical;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 130px; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: rgb(139 92 246 / 0.05);
  box-shadow: 0 0 0 4px rgb(139 92 246 / 0.15);
}
.field label {
  position: absolute; left: 17px; top: 15px; color: var(--muted); font-size: 0.98rem; pointer-events: none;
  transform-origin: 0 0; transition: transform 0.2s var(--ease), color 0.2s;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-9px) scale(0.76); color: var(--accent-soft);
}

.contact-links { display: flex; flex-direction: column; gap: 10px; }
.contact-link {
  display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 12px;
  padding: 16px 18px; border-radius: 14px; text-align: left;
  border: 1px solid var(--border); background: rgb(255 255 255 / 0.02);
  transition: border-color 0.2s, background 0.2s, transform 0.25s var(--ease);
}
.contact-link:hover { border-color: var(--border-2); background: rgb(255 255 255 / 0.05); transform: translateX(4px); }
.contact-link-label { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.contact-link-value { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-link-action { font-size: 0.8rem; color: var(--accent-soft); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 28px 0 36px; font-size: 0.85rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

/* ---------- Project dialog ---------- */
dialog { color: var(--text); }
.project-dialog {
  width: min(1080px, calc(100% - 24px)); max-height: calc(100dvh - 40px);
  padding: 0; border: 1px solid var(--border-2); border-radius: 26px;
  background: var(--bg-2); overflow: hidden;
  box-shadow: 0 50px 120px -30px rgb(0 0 0 / 0.9);
}
.project-dialog::backdrop, .cmdk::backdrop { background: rgb(4 5 8 / 0.7); backdrop-filter: blur(8px); }
.project-dialog[open] { animation: dlg-in 0.45s var(--ease); }
.project-dialog[open]::backdrop, .cmdk[open]::backdrop { animation: fade-in 0.3s ease; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
@keyframes fade-in { from { opacity: 0; } }

.pd { display: grid; grid-template-columns: 1.05fr 1fr; max-height: calc(100dvh - 40px); overflow-y: auto; }
.pd-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border-2); background: rgb(12 14 21 / 0.8); backdrop-filter: blur(8px);
  transition: transform 0.25s var(--ease), background 0.2s;
}
.pd-close:hover { transform: rotate(90deg); background: var(--surface-2); }

.pd-media {
  position: sticky; top: 0; align-self: start; height: min(720px, calc(100dvh - 40px));
  background: radial-gradient(70% 70% at 50% 100%, rgb(139 92 246 / 0.25), transparent 70%), #0a0b11;
  border-right: 1px solid var(--border);
}
.pd-media[hidden] { display: none; }
.pd:has(> .pd-media[hidden]) { grid-template-columns: 1fr; }
.project-dialog:has(.pd-media[hidden]) { width: min(760px, calc(100% - 24px)); }
.pd-track {
  display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.pd-track::-webkit-scrollbar { display: none; }
.pd-slide { flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 40px 30px 56px; }
.pd-slide img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 22px; box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.9); }
.pd-media[data-frame="screen"] .pd-slide img { border-radius: 12px; }
.pd-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.4rem; line-height: 1;
  border: 1px solid var(--border-2); background: rgb(12 14 21 / 0.75); backdrop-filter: blur(8px);
  transition: background 0.2s;
}
.pd-nav:hover { background: var(--surface-2); }
.pd-nav--prev { left: 12px; } .pd-nav--next { right: 12px; }
.pd-dots { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; justify-content: center; gap: 6px; }
.pd-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: rgb(255 255 255 / 0.25); transition: width 0.3s var(--ease), background 0.3s; }
.pd-dots button.active { width: 22px; background: var(--text); }

.pd-body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 12px; }
.pd-meta { display: flex; gap: 10px; align-items: center; }
.pd-title:focus { outline: none; }
.pd-title { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.pd-tagline { color: var(--accent-soft); font-size: 1.02rem; }
.pd-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.pd-links:empty { display: none; }
.link-icon { display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.btn-store {
  border-color: var(--border-2);
  background: var(--surface);
  color: var(--text);
}
.btn-store:hover {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: #8b5cf6;
  color: #fff;
  box-shadow: 0 10px 25px -8px rgb(139 92 246 / 0.7);
}
.pd-desc { color: #b6bac8; }
.pd-h { font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.pd-features { display: flex; flex-direction: column; gap: 8px; }
.pd-features li { position: relative; padding-left: 26px; font-size: 0.95rem; }
.pd-features li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 16px; height: 16px; border-radius: 50%;
  background: rgb(139 92 246 / 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4b5fd' stroke-width='3.5'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.pd-endpoints { display: flex; flex-direction: column; gap: 6px; }
.pd-endpoints li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }

/* ---------- Command palette ---------- */
.cmdk {
  width: min(600px, calc(100% - 24px)); margin-top: 14vh; padding: 0;
  border: 1px solid var(--border-2); border-radius: 18px; background: rgb(14 16 24 / 0.92);
  backdrop-filter: blur(20px); box-shadow: 0 40px 100px -20px rgb(0 0 0 / 0.9); overflow: hidden;
}
.cmdk[open] { animation: dlg-in 0.3s var(--ease); }
.cmdk-search { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); color: var(--muted); }
.cmdk-search input { flex: 1; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 1.05rem; }
.cmdk-list { max-height: min(420px, 55vh); overflow-y: auto; padding: 8px; }
.cmdk-group { padding: 10px 10px 6px; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.cmdk-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 0.95rem; }
.cmdk-item .muted { font-size: 0.82rem; }
.cmdk-item[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.cmdk-empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px)); z-index: 200;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px; font-size: 0.9rem;
  background: var(--text); color: var(--bg); font-weight: 500;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
/* Katta ekranlar: kengroq konteyner, biroz kattaroq shrift */
@media (min-width: 1600px) {
  :root { --container: 1360px; }
  html { font-size: 17px; }
  .card--wide .card-media { min-height: 480px; }
}
@media (min-width: 2200px) {
  :root { --container: 1560px; }
  html { font-size: 19px; }
  .card-media { height: 420px; }
  .card--wide .card-media { min-height: 560px; }
  .phone { max-width: 230px; }
  .card--wide .phone { max-width: 280px; }
}

/* Planshet va undan kichik */
@media (max-width: 1024px) {
  .hero { min-height: auto; padding-bottom: 100px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { width: 100%; max-width: 620px; margin-inline: auto; }
  .hero-title { font-size: clamp(2.2rem, 6.5vw, 3.6rem); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: 1fr; }
  .service-flow { top: auto; bottom: -19px; left: 52px; right: auto; width: 2px; height: 20px; }
  .service-flow i { width: 2px; height: 8px; left: 0; top: -8px; animation-name: flow-v; }
  @keyframes flow-v { to { top: 100%; } }
  .journey-grid { grid-template-columns: 1fr; }
  .journey-grid > div { position: static; }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .lang-switch--nav { display: none; }
  .mobile-menu .lang-switch--menu { display: flex; justify-self: start; margin: 8px 8px 4px; }
  .mobile-menu .lang-switch--menu button { height: 36px; min-width: 52px; font-size: 0.8rem; }
  .section-head { align-items: flex-start; }
  .card--wide { flex-direction: column; }
  .card--wide .card-media { flex: none; min-height: 0; height: 340px; border-right: 0; border-bottom: 1px solid var(--border); }
  .card--wide .card-body { padding: 22px 24px 24px; }
  .card--wide .phone { width: 34%; }
  .contact-grid { grid-template-columns: 1fr; }
  .pd { grid-template-columns: 1fr; }
  .pd-media { position: relative; height: 62dvh; border-right: 0; border-bottom: 1px solid var(--border); }
  .float-card--a { left: 8px; }
  .float-card--b { right: 8px; top: -18px; }
}

@media (max-width: 600px) {
  .projects { grid-template-columns: 1fr; }
}

/* Telefonlar */
@media (max-width: 520px) {
  .rotator { white-space: normal; }
  .nav { padding: 6px 10px; }
  .nav-logo-mark { width: 52px; height: 52px; }
  .nav-actions .btn-small { padding: 0 0.85rem; }
  .kbd-btn-label, .kbd-btn kbd { display: none; }
  .section-head { margin-bottom: 2rem; gap: 1.25rem; }
  .card-body { padding: 20px 18px 22px; }
  .card--wide .card-body { padding: 20px 18px 22px; }
  .card-title { font-size: 1.35rem; }
  .code { font-size: 0.7rem; }
  .ln { width: 2.4em; padding-right: 0.9em; }
  .company-strip { padding: 14px 16px; }
  /* Loyiha oynasi — pastdan chiquvchi to'liq panel */
  .project-dialog, .project-dialog:has(.pd-media[hidden]) {
    width: 100%; max-width: 100%; max-height: 94dvh; margin: auto 0 0;
    border-radius: 24px 24px 0 0; border-bottom: 0;
  }
  .pd { max-height: 94dvh; padding-bottom: env(safe-area-inset-bottom); }
  .pd-media { height: 56dvh; }
  .pd-slide { padding: 28px 20px 48px; }
  .pd-nav { display: none; }
  .project-dialog[open] { animation: sheet-in 0.45s var(--ease); }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
  .kbd-btn { width: 38px; padding: 0; justify-content: center; }
  .hero { padding-top: 100px; }
  .hero-cta .btn { flex: 1; }
  .stats { gap: 10px; }
  .stat { padding: 20px 18px; }
  .card-media { height: 280px; }
  .card--wide .card-media { height: 300px; }
  .float-card--a { bottom: -34px; }
  .contact-link { grid-template-columns: 72px 1fr auto; padding: 14px; }
  .footer-inner > .muted:nth-child(2) { display: none; }
}

/* Juda tor ekranlar (320–360px) */
@media (max-width: 360px) {
  .hero-title { font-size: 2rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 2rem; }
  .contact-link { grid-template-columns: 1fr auto; }
  .contact-link-label { grid-column: 1 / -1; }
}

/* Past balandlikdagi landshaft telefonlar */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; padding-block: 100px 60px; }
  .pd-media { height: 80dvh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .card, .code-line { opacity: 1; transform: none; filter: none; }
}

@media print {
  .bg, .nav, .progress, .marquee { display: none; }
}
