/* kamronmedia.uz: the styles shared by the main page and the project pages */
  :root, [data-theme="light"] {
    --bg: #fbfbfc;
    --bg-soft: #f3f3f6;
    --card: #ffffff;
    --text: #0b0b0f;
    --muted: #6b6b76;
    --faint: #9c9ca8;
    --line: #e6e6ec;
    --accent: #5b5bd6;
    --accent-soft: rgba(91, 91, 214, 0.1);
    --accent-text: #4747c2;
    --success: #16855a;
    --shadow: 0 1px 2px rgba(16, 16, 24, 0.04), 0 8px 24px rgba(16, 16, 24, 0.06);
    --logo-filter: none;
    --shadow-border: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px 0 rgba(0, 0, 0, 0.04);
    --shadow-border-hover: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --img-outline: rgba(0, 0, 0, 0.1);
  }
  :root {
    --text-xs: .75rem;
    --text-sm: .8125rem;
    --text-md: .875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
  }
  [data-theme="dark"] {
    --bg: #09090b;
    --bg-soft: #111114;
    --card: #131316;
    --text: #f4f4f6;
    --muted: #a1a1ad;
    --faint: #6e6e7a;
    --line: #26262d;
    --accent: #7c7cf0;
    --accent-soft: rgba(124, 124, 240, 0.14);
    --accent-text: #a5a5ff;
    --success: #3fcf8e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    --logo-filter: invert(1);
    --shadow-border: 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-border-hover: 0 0 0 1px rgba(255, 255, 255, 0.14);
    --img-outline: rgba(255, 255, 255, 0.1);
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
  body {
    background: var(--bg); color: var(--text);
    /* The device's own font: San Francisco on Apple, Segoe UI on Windows, Roboto on Android */
    font-family: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 100%; line-height: 1.5; -webkit-font-smoothing: antialiased; font-optical-sizing: auto;
    overflow-x: hidden;
  }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
  /* No double-tap zoom delay, no text selection on a long press */
  button, a, [role="button"] { touch-action: manipulation; }
  button, .seg button, .chip { -webkit-user-select: none; user-select: none; }
  img { display: block; max-width: 100%; }
  .wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
  @media (max-width: 640px) { .wrap { padding: 0 16px; } }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

  /* Header */
  .hdr { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
  /* Scroll edge: where page content meets the header, a fade instead of a 1px line */
  .hdr::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none; opacity: 0; transition: opacity .2s; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 70%, transparent), transparent); }
  .hdr.stuck::after { opacity: 1; }
  .hdr-in { height: 64px; display: flex; align-items: center; gap: 24px; }
  .logo { flex-shrink: 0; }
  .logo img { height: 34px; width: auto; filter: var(--logo-filter); }
  .nav { display: flex; gap: 4px; margin-left: 12px; }
  .nav a { padding: 8px 12px; border-radius: 8px; font-size: var(--text-md); font-weight: 500; color: var(--muted); transition: color .15s, background .15s; }
  @media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--text); background: var(--bg-soft); } }
  .nav a:active { background: var(--bg-soft); }
  .hdr-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
  .seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; }
  .seg button { padding: 5px 10px; border-radius: 7px; font-size: var(--text-xs); font-weight: 600; color: var(--muted); letter-spacing: .02em; transition: background .15s, color .15s; }
  .seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
  .icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); transition: color .15s, background .15s; }
  @media (hover: hover) and (pointer: fine) { .icon-btn:hover { color: var(--text); background: var(--bg-soft); } }
  .icon-btn svg { width: 17px; height: 17px; }
  /* Both icons stay drawn and cross-fade; the sun sits over the moon */
  #theme { position: relative; }
  #theme .sun { position: absolute; top: 50%; left: 50%; margin: -8.5px 0 0 -8.5px; }
  #theme .moon, [data-theme="dark"] #theme .sun { opacity: 1; transform: none; filter: none; }
  #theme .sun, [data-theme="dark"] #theme .moon { opacity: 0; transform: scale(.25); filter: blur(4px); }
  #theme svg { transition: opacity .3s cubic-bezier(0.2,0,0,1), transform .3s cubic-bezier(0.2,0,0,1), filter .3s cubic-bezier(0.2,0,0,1); }
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 11px; font-size: var(--text-base); font-weight: 600; transition: transform .2s cubic-bezier(.2,.8,.2,1), background .15s, box-shadow .15s, color .15s, filter .15s; white-space: nowrap; }
  /* Pressed: the button gives way at once, on the press itself */
  .btn:active, .icon-btn:active, .seg button:active, .open:active { transform: scale(0.97); transition-duration: 80ms; }
  .btn svg { width: 17px; height: 17px; }
  .btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px -6px var(--accent); }
  @media (hover: hover) and (pointer: fine) { .btn-primary:hover { filter: brightness(1.08); } }
  .btn-ghost { box-shadow: var(--shadow-border); background: var(--card); }
  @media (hover: hover) and (pointer: fine) { .btn-ghost:hover { box-shadow: var(--shadow-border-hover); } }
  .btn-sm { height: 36px; padding: 0 14px; font-size: var(--text-md); border-radius: 10px; }
  @media (max-width: 860px) { .nav { display: none; } }
  @media (max-width: 520px) { .hdr-in { gap: 10px; } .hdr .btn-sm { display: none; } .seg button { padding: 5px 8px; } }

  /* Hero */
  .hero { position: relative; padding: 72px 0 56px; overflow: hidden; }
  .hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 620px; background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; }
  .hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
  .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: var(--text-sm); font-weight: 500; color: var(--muted); }
  .pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 20%, transparent); }
  h1 { text-wrap: balance; margin: 0 0 1.25rem; font-size: clamp(2.3rem, 5.4vw, 4rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
  h1 .grad { background: linear-gradient(100deg, var(--accent) 10%, #c06cf0 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .hero-sub { text-wrap: pretty; font-size: clamp(var(--text-base), 1.6vw, var(--text-lg)); color: var(--muted); max-width: 540px; }
  .hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
  .hero-trust { margin-top: 22px; font-size: var(--text-sm); color: var(--faint); display: flex; align-items: center; gap: 8px; }
  .hero-trust svg { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; }

  .net { background: var(--card); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-border), var(--shadow); }
  .net-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .net-t { font-size: var(--text-sm); font-weight: 600; color: var(--muted); }
  .net-live { font-size: var(--text-xs); font-weight: 600; color: var(--success); display: inline-flex; align-items: center; gap: 6px; }
  .net-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.8s infinite; }
  @keyframes pulse { 50% { opacity: .35; } }
  .net-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
  .net-row:first-of-type { border-top: 0; }
  .ava { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: var(--text-md); font-weight: 700; color: var(--accent-text); background: var(--accent-soft); object-fit: cover; }
  .net-name { font-size: var(--text-md); font-weight: 600; line-height: 1.2; }
  .net-bar { margin-top: 6px; height: 4px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
  .net-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #c06cf0); }
  .net-reach { font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
  .net-f { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 14px; border-top: 1px dashed var(--line); }
  .net-f span { font-size: var(--text-sm); color: var(--muted); }
  .net-f b { font-size: var(--text-md); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  @media (max-width: 920px) { .hero { padding-top: 48px; } .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

  /* Stats */
  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-bottom: 24px; }
  .stat { background: var(--card); box-shadow: var(--shadow-border); border-radius: 16px; padding: 22px 20px; }
  .stat-n { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1; font-variant-numeric: tabular-nums; }
  .stat-l { margin-top: 8px; font-size: var(--text-sm); color: var(--muted); }
  @media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

  /* Ticker */
  .ticker { border-block: 1px solid var(--line); overflow: hidden; padding: 14px 0; margin: 40px 0 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
  .tick { display: flex; gap: 40px; width: max-content; animation: tick 40s linear infinite; }
  .tick span { font-size: var(--text-sm); font-weight: 600; letter-spacing: .04em; color: var(--faint); white-space: nowrap; }
  @keyframes tick { to { transform: translateX(-50%); } }

  /* Sections */
  section.sec { padding: 96px 0; }
  /* A menu link stops the section below the sticky header, not under it */
  section.sec { scroll-margin-top: 16px; }
  #projects, #contact { scroll-margin-top: 72px; }
  .eyebrow { font-size: var(--text-sm); font-weight: 600; color: var(--accent-text); letter-spacing: .01em; }
  h2 { text-wrap: balance; margin-top: 0.625rem; font-size: clamp(1.9rem, 3.8vw, 2.9rem); line-height: 1.1; letter-spacing: -0.025em; font-weight: 800; }
  h2 .soft { color: var(--faint); }
  .lead { text-wrap: pretty; margin-top: 16px; color: var(--muted); font-size: var(--text-lg); max-width: 560px; }
  @media (max-width: 640px) { section.sec { padding: 64px 0; } }

  /* About */
  .about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
  .feats { margin-top: 32px; display: grid; gap: 12px; }
  .feat { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 18px; background: var(--card); box-shadow: var(--shadow-border); border-radius: 16px; }
  .feat-i { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
  .feat-i svg { width: 21px; height: 21px; }
  .feat h3 { font-size: var(--text-base); font-weight: 700; letter-spacing: -0.01em; }
  .feat p { text-wrap: pretty; margin-top: 4px; font-size: var(--text-md); color: var(--muted); }
  .founder { background: var(--card); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-border), var(--shadow); position: sticky; top: 88px; }
  .f-top { display: flex; align-items: center; gap: 14px; }
  .f-ava { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: var(--text-lg); color: #fff; background: linear-gradient(135deg, var(--accent), #c06cf0); }
  .f-eyebrow { font-size: var(--text-xs); font-weight: 600; color: var(--accent-text); }
  .f-name { font-size: var(--text-lg); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
  .f-role { font-size: var(--text-sm); color: var(--muted); }
  .f-q { text-wrap: pretty; margin-top: 20px; font-size: var(--text-md); color: var(--muted); white-space: pre-line; }
  .f-link { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-md); font-weight: 600; color: var(--accent-text); }
  .f-link svg { width: 17px; height: 17px; }
  @media (max-width: 920px) { .about { grid-template-columns: 1fr; } .founder { position: static; } }

  /* Projects */
  .pr-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
  .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .card { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--card); box-shadow: var(--shadow-border); border-radius: 20px; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow 150ms ease-out; }
  @media (hover: hover) and (pointer: fine) { .card:hover { box-shadow: var(--shadow-border-hover), var(--shadow); } }
  .card:has(.open:active) { transform: scale(0.99); transition-duration: 80ms; }
  .card-top { display: flex; align-items: center; gap: 14px; }
  .card-ico { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; object-fit: cover; background: var(--bg-soft); }
  .card-ico.letter { display: grid; place-items: center; font-size: var(--text-xl); font-weight: 800; color: var(--accent-text); background: var(--accent-soft); }
  /* A faint inner edge keeps a light or dark logo from bleeding into the surface */
  img.card-ico, img.ava { outline: 1px solid var(--img-outline); outline-offset: -1px; }
  .card-t { min-width: 0; }
  .card-n { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
  .card-h { font-size: var(--text-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card-d { text-wrap: pretty; font-size: var(--text-md); color: var(--muted); white-space: pre-line; flex: 1; }
  .card-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding-top: 14px; border-top: 1px solid var(--line); }
  .opens { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; }
  .card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--muted); }
  .chip { font-size: var(--text-xs); font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
  .star { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--text); }
  .star svg { width: 13px; height: 13px; color: #f5a524; }
  .open { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-md); font-weight: 600; color: var(--accent-text); white-space: nowrap; }
  .open svg { width: 15px; height: 15px; }
  .empty { padding: 40px 0; text-align: center; color: var(--muted); }
  @media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

  /* Contact */
  .contact { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; padding: 40px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow-border), var(--shadow); }
  .c-list { display: grid; gap: 4px; align-content: start; }
  .c-item { padding: 14px 0; border-top: 1px solid var(--line); }
  .c-item:first-child { border-top: 0; }
  .c-l { font-size: var(--text-xs); font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
  .c-v { margin-top: 4px; font-size: var(--text-base); font-weight: 600; }
  .c-v.big { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.02em; color: var(--accent-text); }
  @media (max-width: 860px) { .contact { grid-template-columns: 1fr; padding: 24px; } }

  footer { padding: 32px 0 40px; border-top: 1px solid var(--line); margin-top: 32px; }
  .foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; font-size: var(--text-sm); color: var(--faint); }
  /* The logo is 600×196: only the height is set, the width follows */
  .foot img { height: 32px; width: auto; filter: var(--logo-filter); }

  /* Reveal on scroll, only when scripts run and motion is welcome */
  @media (prefers-reduced-motion: no-preference) {
    .js .rv { opacity: 0; transform: translateY(12px); transition: opacity .5s cubic-bezier(.2,.8,.2,1), transform .5s cubic-bezier(.2,.8,.2,1); }
    .js .rv.in { opacity: 1; transform: none; }
    /* The hero arrives in reading order, then the panel beside it */
    .hero-grid > div > .rv:nth-child(2) { transition-delay: 100ms; }
    .hero-grid > div > .rv:nth-child(3) { transition-delay: 200ms; }
    .hero-grid > div > .rv:nth-child(4) { transition-delay: 300ms; }
    .hero-grid > .net.rv { transition-delay: 200ms; }
  }
  /* Reduced motion: no sliding, a short cross-fade instead */
  @media (prefers-reduced-motion: reduce) {
    .tick { animation: none; } html { scroll-behavior: auto; }
    .js .rv { opacity: 0; transition: opacity .2s ease; } .js .rv.in { opacity: 1; }
    .btn:active, .icon-btn:active, .seg button:active, .open:active, .card:has(.open:active) { transform: none; }
    .net-live i { animation: none; }
    [data-theme] #theme svg.moon, [data-theme] #theme svg.sun { transform: none; filter: none; }
  }
  /* Less transparency: a solid header */
  @media (prefers-reduced-transparency: reduce) { .hdr { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }
  /* More contrast: firmer lines and text */
  @media (prefers-contrast: more) {
    :root, [data-theme] { --line: color-mix(in srgb, var(--text) 35%, transparent); --muted: color-mix(in srgb, var(--text) 80%, transparent); --faint: color-mix(in srgb, var(--text) 65%, transparent);
      --shadow-border: 0 0 0 1px color-mix(in srgb, var(--text) 45%, transparent); --shadow-border-hover: 0 0 0 1.5px color-mix(in srgb, var(--text) 60%, transparent); }
    .hdr { background: var(--bg); }
  }

  /* Cards open the project's page from their top */
  a.card-top { color: inherit; border-radius: 12px; }
  @media (hover: hover) and (pointer: fine) { a.card-top:hover .card-n { color: var(--accent-text); } }
  .open.more { color: var(--muted); }

  /* ── Project page ─────────────────────────────────────────────── */
  .pp { padding: 40px 0 72px; }
  .crumb { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--muted); margin-bottom: 28px; }
  .crumb svg { width: 16px; height: 16px; }
  @media (hover: hover) and (pointer: fine) { .crumb:hover { color: var(--text); } }
  .pp-head { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
  .pp-ico { width: 112px; height: 112px; border-radius: 26px; object-fit: cover; background: var(--bg-soft); }
  img.pp-ico { outline: 1px solid var(--img-outline); outline-offset: -1px; }
  .pp-ico.letter { display: grid; place-items: center; font-size: 2.75rem; font-weight: 800; color: var(--accent-text); background: var(--accent-soft); }
  .pp h1 { margin: 0; font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
  .pp-handle { margin-top: 6px; color: var(--muted); font-size: var(--text-base); }
  .pp-meta { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--text-sm); color: var(--muted); }
  .pp-lead { margin-top: 28px; font-size: clamp(1.0625rem, 1.8vw, 1.25rem); color: var(--text); max-width: 720px; text-wrap: pretty; }
  .pp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
  .pp-body { margin-top: 32px; max-width: 680px; color: var(--muted); font-size: 0.9375rem; line-height: 1.65; }
  .pp-body p + p { margin-top: 1em; }
  .pp-body p { text-wrap: pretty; }
  .shots { margin-top: 48px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; overscroll-behavior-x: contain; }
  .shots img { flex: 0 0 auto; height: 460px; width: auto; max-width: 80vw; border-radius: 22px; scroll-snap-align: start; outline: 1px solid var(--img-outline); outline-offset: -1px; background: var(--bg-soft); }
  .pp-more { margin-top: 72px; }
  .pp-more h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 24px; }
  @media (max-width: 640px) {
    .pp { padding-top: 24px; }
    .pp-head { grid-template-columns: 1fr; gap: 16px; }
    .pp-ico { width: 88px; height: 88px; border-radius: 22px; }
    .shots img { height: 380px; }
    .pp-cta .btn { flex: 1 1 auto; }
  }
