* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  background: #0b0d14;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* Fon: suzib yuradigan rangli nurlar */
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .85; animation: drift 14s ease-in-out infinite; }
.g1 { width: 60vmax; height: 60vmax; max-width: 640px; max-height: 640px; background: #2ad1c9; top: -20%; left: -20%; }
.g2 { width: 55vmax; height: 55vmax; max-width: 600px; max-height: 600px; background: #6d5cff; top: 30%; right: -25%; animation-delay: -5s; }
.g3 { width: 50vmax; height: 50vmax; max-width: 560px; max-height: 560px; background: #ff6fb5; bottom: -25%; left: -15%; animation-delay: -9s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) } 50% { transform: translate(4vw, -5vh) } }

.page {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px; margin: 0 auto;
  padding: max(48px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  min-height: 100dvh; display: flex; flex-direction: column;
}

/* Profil */
.profile { display: flex; align-items: center; gap: 16px; }
.avatar {
  flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-family: Fraunces, serif; font-size: 28px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.45);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.name { font-family: Roboto, sans-serif; font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.bio { font-size: 14px; opacity: .78; margin-top: 4px; }

/* Bento grid */
.bento {
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 128px;
  gap: 12px; margin-top: 28px;
}
.tile {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 16px; border-radius: 24px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  font-size: 15px; font-weight: 500;
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s ease, background-color .25s ease;
  will-change: transform;
}
/* Kursor ortidan yuradigan yorug'lik aksi */
.tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(255,255,255,.28), transparent 60%);
  opacity: 0; transition: opacity .25s ease;
}
.tile:hover::after { opacity: 1; }
.tile:active { transform: perspective(700px) scale(.97); }
.tile:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.tile i { font-size: 28px; }
.label { display: flex; flex-direction: column; gap: 2px; }
.label small { font-size: 12px; font-weight: 400; opacity: .7; }

.wide { grid-column: span 2; }
.tall { grid-row: span 2; }

.featured { background: linear-gradient(120deg, rgba(255,255,255,.95), rgba(255,255,255,.78)); color: #121428; }
.featured .label { position: relative; z-index: 1; }

/* "Onlayn" belgisi */
.status {
  position: absolute; top: 14px; left: 16px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 8px; border-radius: 20px;
  background: rgba(18, 20, 40, .07); font-size: 11px; font-weight: 500; color: #2a2d45;
}
.dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e;
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping { to { transform: scale(2.8); opacity: 0; } }

/* 3D ikonkalar: bitta kanvas butun ekran ustida, har bir .icon-3d joyiga chiziladi (scene3d.js) */
.bg-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.icon-3d { position: absolute; top: 8px; right: 8px; width: 68px; height: 68px; pointer-events: none; }
.tall .icon-3d { top: 14px; right: 50%; translate: 50% 0; width: 116px; height: 116px; }
.featured .icon-3d { top: 0; bottom: 0; right: 4px; width: 36%; height: auto; }
.featured .label { max-width: 64%; }
.tile { justify-content: flex-end; }

/* Ijtimoiy tarmoqlar va qolgan tugmalar orasidagi chiziq */
.divider {
  display: flex; align-items: center; gap: 14px; margin: 24px 8px;
  font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; opacity: .85;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; }
.divider::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,.5)); }
.divider::after { background: linear-gradient(90deg, rgba(255,255,255,.5), transparent); }
.bento-more { margin-top: 0; }

/* Pastdagi telefon tugmasi */
.call {
  display: flex; align-items: center; gap: 14px;
  margin-top: 12px; padding: 10px 20px 10px 10px; border-radius: 40px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  transition: transform .2s ease, background-color .2s ease;
}
.call:hover { background: rgba(255,255,255,.18); }
.call:active { transform: scale(.98); }
.call:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.call-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: #22c55e; font-size: 22px;
}
.call-text { flex: 1; display: flex; flex-direction: column; font-size: 15px; font-weight: 500; }
.call-text small { font-size: 12px; font-weight: 400; opacity: .75; }
.call > .ti { font-size: 18px; opacity: .7; }

/* Kompyuterda 4 ustun */
@media (min-width: 900px) {
  .page { max-width: 860px; padding-top: 72px; }
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 16px; }
  .featured { grid-row: span 2; }
  .bento-more { grid-template-columns: repeat(2, 1fr); }
  .call { margin-top: 16px; }
  .icon-3d { width: 96px; height: 96px; top: 10px; right: 10px; }
  .tall .icon-3d { width: 170px; height: 170px; top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .glow, .dot::after { animation: none; }
  .tile { transition: none; }
}
