/* =========================================================
   MIRAN — Portfolio
   Tuzilma:
     1. O‘zgaruvchilar (ranglar, o‘lchamlar)
     2. Asosiy uslublar
     3. Umumiy komponentlar (tugma, chip, glass)
     4. Loader, navigatsiya
     5. Bo‘limlar: hero, about, tech, projects, goals, contact
     6. Modal, toast, footer
     7. Responsive
   ========================================================= */

/* ---------- 1. O‘ZGARUVCHILAR ---------- */
:root {
  --bg: #07090c;
  --bg-alt: #0a0d12;
  --surface: #0f141b;
  --surface-2: #151c25;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e9eef4;
  --text-soft: #b4bfcc;
  --muted: #7d8898;

  --accent: #39ff88;          /* neon yashil */
  --accent-2: #2fb8ff;        /* elektr ko‘k */
  --accent-rgb: 57, 255, 136;
  --gradient: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);

  --warn: #ffc857;
  --danger: #ff6b6b;

  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --glow: 0 0 0 1px rgba(var(--accent-rgb), 0.35), 0 10px 40px -10px rgba(var(--accent-rgb), 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;

  color-scheme: dark;
}

/* ---------- 2. ASOSIY USLUBLAR ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

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

body.is-loading,
body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

::selection { background: rgba(var(--accent-rgb), 0.3); color: #fff; }

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

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* Scroll paneli */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #24303d; }

/* ---------- 3. UMUMIY KOMPONENTLAR ---------- */

/* Glassmorphism — faqat kartalarda, me’yorida */
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Tugmalar */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  white-space: nowrap;
}

.btn svg { transition: transform 0.3s var(--ease); }

.btn--primary {
  background: var(--gradient);
  color: #04120a;
  box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.6);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -10px rgba(var(--accent-rgb), 0.75);
}
.btn--primary:hover svg { transform: translateX(4px); }

.btn--ghost {
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: rgba(var(--accent-rgb), 0.6);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--small { padding: 9px 18px; font-size: 0.88rem; }
.btn--block { width: 100%; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn--ghost:disabled:hover { color: var(--text); border-color: var(--border-strong); }

.btn.is-loading { color: transparent; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid #04120a;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Chip — texnologiya darajasi */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  border: 1px solid;
}
.chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.chip--learning { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.35); background: rgba(var(--accent-rgb), 0.08); }
.chip--basics   { color: var(--accent-2); border-color: rgba(47, 184, 255, 0.35); background: rgba(47, 184, 255, 0.08); }
.chip--planned  { color: var(--text-soft); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.03); }

/* Status — loyiha holati */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid;
}
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--progress { color: var(--warn); border-color: rgba(255, 200, 87, 0.35); background: rgba(255, 200, 87, 0.07); }
.status--progress .status__dot { animation: pulse 1.8s ease-in-out infinite; }
.status--planned  { color: var(--accent-2); border-color: rgba(47, 184, 255, 0.35); background: rgba(47, 184, 255, 0.07); }
.status--done     { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.35); background: rgba(var(--accent-rgb), 0.07); }

/* Scroll animatsiyasi */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Kartalardagi sichqoncha yorug‘ligi */
.tech-card::before,
.project-card::before,
.contact-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.09), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.tech-card:hover::before,
.project-card:hover::before,
.contact-link:hover::before { opacity: 1; }

/* ---------- 4. LOADER ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }

.loader__inner { display: grid; gap: 18px; justify-items: center; }
.loader__logo {
  font-family: var(--mono);
  font-size: 1.15rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.loader__logo b { color: var(--text); font-weight: 700; }
.loader__bar {
  width: 180px; height: 2px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.loader__bar span {
  display: block;
  width: 40%; height: 100%;
  background: var(--gradient);
  animation: loading 1s var(--ease) infinite;
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  z-index: 200;
  background: var(--gradient);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- NAVIGATSIYA ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
}
/* Fon pseudo-elementda: header’ning o‘ziga backdrop-filter berilsa,
   ichidagi fixed mobil menyu header o‘lchamiga qamalib qoladi */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(7, 9, 12, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transition: opacity 0.4s;
}
.header.is-scrolled::before { opacity: 1; }

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  position: relative;
  z-index: 2;
}
.nav__logo-bracket { color: var(--accent); transition: color 0.3s; }
.nav__logo:hover .nav__logo-bracket { color: var(--accent-2); }

.nav__menu { display: flex; gap: 6px; }

.nav__link {
  position: relative;
  display: block;
  padding: 8px 14px;
  font-size: 0.94rem;
  color: var(--text-soft);
  border-radius: 999px;
  transition: color 0.3s, background 0.3s;
}
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav__link.is-active { color: var(--accent); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  z-index: 2;
}
.nav__toggle span {
  position: absolute;
  left: 12px;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.2s, top 0.35s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 15px; }
.nav__toggle span:nth-child(2) { top: 21px; }
.nav__toggle span:nth-child(3) { top: 27px; }
.nav__toggle.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- 5. HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 100px;
  overflow: hidden;
  isolation: isolate;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 85%);
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 80%);
}

.glow {
  position: absolute;
  z-index: -2;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}
.glow--green { width: 460px; height: 460px; background: rgba(var(--accent-rgb), 0.45); top: 8%; left: -140px; }
.glow--blue  { width: 520px; height: 520px; background: rgba(47, 184, 255, 0.4); bottom: -160px; right: -160px; animation-delay: -7s; }

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.06);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 26px;
}

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6);
  animation: ring 2s infinite;
}

.hero__title {
  font-size: clamp(2.6rem, 6.6vw, 5rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}

.hero__subtitle {
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.hero__role { color: var(--text); font-weight: 600; }
.caret { color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }

.hero__text {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 38px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero .reveal:nth-child(1) { --delay: 0ms; }
.hero .reveal:nth-child(2) { --delay: 90ms; }
.hero .reveal:nth-child(3) { --delay: 180ms; }
.hero .reveal:nth-child(4) { --delay: 270ms; }
.hero .reveal:nth-child(5) { --delay: 360ms; }
.hero .code-window.reveal { --delay: 300ms; }

/* Kod oynasi */
.code-window {
  position: relative;
  border-radius: var(--radius);
  background: rgba(13, 17, 23, 0.78);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), 0 0 80px -30px rgba(var(--accent-rgb), 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}
.code-window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(var(--accent-rgb), 0.5), transparent 40%, transparent 60%, rgba(47, 184, 255, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--red { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green { background: #28c840; }
.code-window__file {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.code-window__body {
  padding: 22px 22px 26px;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--text-soft);
  min-height: 430px;
  overflow-x: auto;
  white-space: pre;
}
.code-cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }

/* Sintaksis ranglari */
.t-tag { color: #ff7ab2; }
.t-key { color: #c792ea; }
.t-var { color: #7fdbff; }
.t-str { color: var(--accent); }
.t-cls { color: #ffcb6b; }
.t-fn  { color: #82aaff; }
.t-com { color: #5c6773; font-style: italic; }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.6;
  transition: opacity 0.3s;
}
.scroll-hint:hover { opacity: 1; }
.scroll-hint__mouse {
  display: block;
  width: 24px; height: 38px;
  border: 1.5px solid var(--text-soft);
  border-radius: 14px;
  position: relative;
}
.scroll-hint__mouse span {
  position: absolute;
  left: 50%; top: 7px;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--accent);
  animation: scrollDot 1.8s var(--ease) infinite;
}

/* ---------- BO‘LIMLAR ---------- */
.section { padding: 120px 0; position: relative; }
.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section__head { max-width: 680px; margin-bottom: 56px; }
.section__tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 14px;
}
.section__title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.section__lead {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.04rem;
}

/* ---------- MEN HAQIMDA ---------- */
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.about__text p {
  font-size: 1.1rem;
  color: var(--text-soft);
  margin-bottom: 22px;
}
.about__text p:first-child { font-size: 1.22rem; color: var(--text); }
.about__text strong { color: var(--text); font-weight: 600; }

.about__card { padding: 30px; }
.about__card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 22px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.about__card-head h3 { font-size: 1.2rem; letter-spacing: 0.06em; }
.about__card-head p { font-size: 0.9rem; color: var(--text-soft); }

.about__avatar {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 16px;
  background: var(--gradient);
  color: #04120a;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.5rem;
  box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.6);
}

.about__facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.94rem;
}
.about__facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.about__facts span { color: var(--muted); }
.about__facts b { font-weight: 600; text-align: right; font-family: var(--mono); font-size: 0.88rem; }

/* ---------- TEXNOLOGIYALAR ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin: -24px 0 36px; }

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tech-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px;
  transition: transform 0.45s var(--ease), border-color 0.4s, box-shadow 0.45s var(--ease), opacity 0.8s var(--ease);
}
.tech-card.is-visible:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: var(--shadow), 0 20px 50px -25px rgba(var(--accent-rgb), 0.5);
}
.tech-card--featured {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.09), rgba(255, 255, 255, 0.015) 60%);
}
.tech-card--featured::after {
  content: "Asosiy til";
  position: absolute;
  top: 22px; right: 22px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.tech-card__icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.45s var(--ease), color 0.3s;
}
.tech-card:hover .tech-card__icon { transform: rotate(-6deg) scale(1.06); }
.tech-card__icon--php   { color: #8f9dff; }
.tech-card__icon--mysql { color: #4fc3f7; }
.tech-card__icon--html  { color: #ff8a5c; }
.tech-card__icon--css   { color: #5aa9ff; }
.tech-card__icon--js    { color: #f7df1e; }
.tech-card__icon--git   { color: #f4795b; }

.tech-card__name { font-size: 1.25rem; font-weight: 600; }
.tech-card__desc { color: var(--muted); font-size: 0.94rem; flex: 1; }

/* ---------- LOYIHALAR ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -20px 0 36px;
}
.filter {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: all 0.3s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.4s, box-shadow 0.45s var(--ease), opacity 0.8s var(--ease);
}
.project-card.is-visible:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--accent-rgb), 0.28);
  box-shadow: var(--shadow), 0 25px 60px -30px rgba(var(--accent-rgb), 0.55);
}
.project-card.is-hidden { display: none; }

.project-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
.project-card__index {
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  transition: -webkit-text-stroke-color 0.4s;
}
.project-card:hover .project-card__index { -webkit-text-stroke-color: rgba(var(--accent-rgb), 0.7); }

.project-card__title { font-size: 1.4rem; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.project-card__summary { color: var(--muted); margin-bottom: 22px; flex: 1; }

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}
.project-card__stack li {
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.project-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 50px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.92rem;
}

/* ---------- MAQSADLAR ---------- */
.roadmap {
  position: relative;
  display: grid;
  gap: 18px;
  max-width: 820px;
}
.roadmap::before {
  content: "";
  position: absolute;
  left: 31px; top: 24px; bottom: 24px;
  width: 1px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
  opacity: 0.4;
}

.roadmap__item {
  position: relative;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 22px 26px 22px 0;
  border-radius: var(--radius);
  transition: background 0.4s, transform 0.4s var(--ease), opacity 0.8s var(--ease);
}
.roadmap__item.is-visible:hover { background: rgba(255, 255, 255, 0.025); transform: translateX(6px); }

.roadmap__num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  position: relative;
  z-index: 1;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.roadmap__item:hover .roadmap__num { border-color: var(--accent); box-shadow: 0 0 24px -4px rgba(var(--accent-rgb), 0.5); }

.roadmap__item h3 { font-size: 1.2rem; font-weight: 600; margin: 6px 0 6px; }
.roadmap__item p { color: var(--muted); }

.roadmap__item--final .roadmap__num {
  background: var(--gradient);
  color: #04120a;
  border-color: transparent;
  box-shadow: 0 0 30px -6px rgba(var(--accent-rgb), 0.7);
}
.roadmap__item--final h3 { color: var(--accent); }

/* ---------- ALOQA ---------- */
.contact {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.contact__links { display: grid; gap: 14px; }

.contact-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.4s var(--ease), border-color 0.3s, opacity 0.8s var(--ease);
}
a.contact-link.is-visible:hover { transform: translateX(6px); border-color: rgba(var(--accent-rgb), 0.35); }

.contact-link__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--accent);
  flex-shrink: 0;
}
.contact-link__icon svg { width: 22px; height: 22px; }
.contact-link__body { display: grid; flex: 1; min-width: 0; }
.contact-link__body b { font-weight: 600; }
.contact-link__body small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-link__arrow { color: var(--muted); transition: color 0.3s, transform 0.3s var(--ease); }
.contact-link:hover .contact-link__arrow { color: var(--accent); transform: translate(2px, -2px); }

.contact-link--empty { border-style: dashed; background: transparent; }
.contact-link--empty .contact-link__icon { color: var(--muted); }
.contact-link--empty .contact-link__body small { font-family: var(--font); font-style: italic; }

.contact__form { padding: 32px; display: grid; gap: 18px; }

.form-notice {
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(47, 184, 255, 0.07);
  border: 1px solid rgba(47, 184, 255, 0.25);
  color: var(--text-soft);
}
.form-notice b { color: var(--accent-2); }
.form-notice--warn { background: rgba(255, 200, 87, 0.07); border-color: rgba(255, 200, 87, 0.3); }
.form-notice--warn b { color: var(--warn); }
.form-notice[hidden] { display: none; }

.field { display: grid; gap: 8px; }
.field label { font-size: 0.88rem; font-weight: 500; color: var(--text-soft); }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: #55606e; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
  background: rgba(0, 0, 0, 0.45);
}
.field .is-invalid { border-color: rgba(255, 107, 107, 0.6); }
.field .is-invalid:focus { box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.12); border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 0.8rem; min-height: 0; }
.field__error:empty { display: none; }

.form-status { font-size: 0.9rem; text-align: center; min-height: 1.4em; }
.form-status:empty { display: none; }
.form-status--success { color: var(--accent); }
.form-status--error { color: var(--danger); }
.form-status--warn { color: var(--warn); }

/* ---------- 6. FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__code { font-family: var(--mono); color: var(--accent); opacity: 0.75; }

/* Yuqoriga tugmasi */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.4s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); box-shadow: var(--glow); transform: translateY(-3px); }

/* ---------- MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 8, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s;
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 36px;
  background: linear-gradient(160deg, #121922, #0c1016);
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease);
}

.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__dialog { opacity: 1; transform: none; }

.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.modal__close:hover { color: var(--text); border-color: var(--border-strong); transform: rotate(90deg); }

.modal__title { font-size: 1.7rem; margin: 18px 0 10px; letter-spacing: -0.02em; }
.modal__summary { color: var(--text-soft); margin-bottom: 26px; }
.modal__subtitle {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.modal__features { display: grid; gap: 10px; margin-bottom: 26px; }
.modal__features li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-soft); }
.modal__features svg { color: var(--accent); flex-shrink: 0; margin-top: 4px; }
.modal__note {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 12px 16px;
  border-left: 2px solid var(--warn);
  background: rgba(255, 200, 87, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
}
.modal__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  z-index: 400;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--text);
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 20px);
  transition: all 0.4s var(--ease);
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- ANIMATSIYALAR ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(260%); }
}
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, -30px); }
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ---------- 7. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__content { text-align: left; }
  .code-window { max-width: 620px; }
  .code-window__body { min-height: 0; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about__card { max-width: 520px; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }

  .nav__cta { display: none; }
  .nav__toggle { display: block; }

  .nav__menu {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: rgba(7, 9, 12, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav__menu.is-open { opacity: 1; visibility: visible; }

  .nav__menu li {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  }
  .nav__menu.is-open li { opacity: 1; transform: none; }
  .nav__menu.is-open li:nth-child(2) { transition-delay: 0.05s; }
  .nav__menu.is-open li:nth-child(3) { transition-delay: 0.1s; }
  .nav__menu.is-open li:nth-child(4) { transition-delay: 0.15s; }
  .nav__menu.is-open li:nth-child(5) { transition-delay: 0.2s; }

  .nav__link { font-size: 1.6rem; font-weight: 600; padding: 12px 24px; }
  .nav__link.is-active::after { bottom: 4px; }

  .section { padding: 90px 0; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { padding-inline: 16px; }

  .hero { padding-top: calc(var(--header-h) + 32px); padding-bottom: 90px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .code-window__body { font-size: 0.74rem; padding: 18px 16px; }

  .section { padding: 72px 0; }
  .section__head { margin-bottom: 40px; }

  .tech-grid { grid-template-columns: 1fr; }
  .tech-card, .project-card, .about__card, .contact__form { padding: 22px; }
  .project-card__actions .btn { flex: 1; }

  .roadmap::before { left: 23px; }
  .roadmap__item { gap: 16px; padding-right: 0; }
  .roadmap__num { width: 46px; height: 46px; font-size: 0.85rem; }
  .roadmap__item.is-visible:hover { transform: none; }

  .modal__dialog { padding: 28px 22px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .to-top { right: 16px; bottom: 16px; }
  .scroll-hint { display: none; }
}

/* Harakatni kamaytirish sozlamasi yoqilgan foydalanuvchilar uchun */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
