/* ==========================================================
   Umidjon — Premium Portfolio
   Apple-inspired glassmorphism, dark luxury theme
   ========================================================== */

:root{
  --bg: #050816;
  --accent: #00E5FF;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --border: rgba(255, 255, 255, 0.12);
  --shadow-color: rgba(0, 0, 0, 0.55);

  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;

  --ease-out-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img{ max-width: 100%; display: block; }

.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 1000;
}
.skip-link:focus{ left: 16px; top: 16px; }

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

/* ==========================================================
   Ambient background scene
   ========================================================== */

.scene{
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
}

.aurora{
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
  will-change: transform;
}

.aurora--one{
  top: -20%;
  left: -15%;
  background: radial-gradient(circle at 30% 30%, rgba(0, 229, 255, 0.38), transparent 65%);
  animation: driftOne 26s ease-in-out infinite alternate;
}

.aurora--two{
  bottom: -25%;
  right: -15%;
  width: 55vmax;
  height: 55vmax;
  background: radial-gradient(circle at 60% 60%, rgba(124, 77, 255, 0.32), transparent 65%);
  animation: driftTwo 30s ease-in-out infinite alternate;
}

.aurora--three{
  top: 30%;
  left: 40%;
  width: 40vmax;
  height: 40vmax;
  background: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.18), transparent 70%);
  animation: driftThree 34s ease-in-out infinite alternate;
}

.aurora--four{
  top: 5%;
  right: 5%;
  width: 42vmax;
  height: 42vmax;
  background: radial-gradient(circle at 40% 40%, rgba(255, 77, 141, 0.22), transparent 68%);
  animation: driftFour 30s ease-in-out infinite alternate;
}

.aurora--five{
  bottom: 0%;
  left: 10%;
  width: 38vmax;
  height: 38vmax;
  background: radial-gradient(circle at 50% 50%, rgba(53, 214, 138, 0.18), transparent 70%);
  animation: driftFive 24s ease-in-out infinite alternate;
}

@keyframes driftOne{
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(10vw, 12vh) scale(1.12); }
}
@keyframes driftTwo{
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-9vw, -10vh) scale(1.08); }
}
@keyframes driftThree{
  0%   { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-42%, -58%) scale(1.16); }
}
@keyframes driftFour{
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-8vw, 9vh) scale(1.1); }
}
@keyframes driftFive{
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(7vw, -8vh) scale(1.14); }
}

.particles{
  position: absolute;
  inset: 0;
}

.particle{
  position: absolute;
  border-radius: 50%;
  background: var(--particle-color, #ffffff);
  box-shadow:
    0 0 8px 2px var(--particle-color, rgba(255,255,255,0.6)),
    0 0 16px 4px color-mix(in srgb, var(--particle-color, #fff) 55%, transparent);
  will-change: transform, opacity;
  animation-name: floatParticle, twinkle;
  animation-timing-function: ease-in-out, ease-in-out;
  animation-iteration-count: infinite, infinite;
}

.particle--drift{
  animation-name: floatParticleDrift, twinkle;
}

@keyframes floatParticle{
  0%   { transform: translateY(0) translateX(0) scale(0.5); opacity: 0; }
  8%   { opacity: var(--particle-opacity, 0.6); transform: translateY(-8px) translateX(3px) scale(1); }
  50%  { transform: translateY(-52px) translateX(14px) scale(1.1); }
  92%  { opacity: var(--particle-opacity, 0.6); }
  100% { transform: translateY(-115px) translateX(-10px) scale(0.6); opacity: 0; }
}

@keyframes floatParticleDrift{
  0%   { transform: translate(0, 0) scale(0.5); opacity: 0; }
  8%   { opacity: var(--particle-opacity, 0.6); }
  30%  { transform: translate(18px, -30px) scale(1); }
  60%  { transform: translate(-14px, -70px) scale(1.15); }
  92%  { opacity: var(--particle-opacity, 0.6); }
  100% { transform: translate(10px, -130px) scale(0.55); opacity: 0; }
}

@keyframes twinkle{
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.6); }
}

.vignette{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.grain{
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================
   Layout
   ========================================================== */

.stage{
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

/* ==========================================================
   Glass card
   ========================================================== */

.card{
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 48px 36px 36px;
  border-radius: 28px;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow:
    0 30px 80px -20px var(--shadow-color),
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  text-align: center;
  transform-style: preserve-3d;
  will-change: transform;
  animation:
    cardIntro 1s var(--ease-out-smooth) both,
    cardFloat 7s ease-in-out 1s infinite;
}

/* iOS 26 "liquid glass" — real-time refraction of whatever drifts behind
   the card, via an SVG displacement filter. Only applied where supported;
   the blur+saturate fallback above still looks great everywhere else. */
@supports (backdrop-filter: url(#liquid-glass-filter)) or (-webkit-backdrop-filter: url(#liquid-glass-filter)){
  .card{
    backdrop-filter: url(#liquid-glass-filter) blur(22px) saturate(200%) brightness(1.05);
    -webkit-backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  }
}

.card__sheen{
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 35%);
  pointer-events: none;
}

@keyframes cardIntro{
  from{ opacity: 0; transform: translateY(28px) scale(0.97); }
  to  { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardFloat{
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ==========================================================
   Avatar
   ========================================================== */

.avatar-wrap{
  position: relative;
  width: 128px;
  height: 128px;
  margin: 0 auto 28px;
  animation: fadeUp 0.9s var(--ease-out-smooth) 0.15s both, avatarFloat 6s ease-in-out 1s infinite;
}

@keyframes avatarFloat{
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.avatar-glow{
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.45), transparent 70%);
  filter: blur(18px);
  z-index: 0;
}

.avatar{
  position: relative;
  z-index: 1;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.9);
  outline: 1px solid var(--border);
  outline-offset: 6px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
  background: #0a1120;
}

/* Small floating badge images orbiting the avatar */
.orbit-badge{
  position: absolute;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 3px;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.55);
  display: block;
  animation: fadeUp 0.7s var(--ease-out-smooth) both, orbitFloat 5.5s ease-in-out infinite;
  transition: transform 0.25s var(--ease-out-smooth), box-shadow 0.25s var(--ease-out-smooth);
}

.orbit-badge img{
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

a.orbit-badge:hover{
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 14px 28px -8px rgba(0, 229, 255, 0.35);
}

.orbit-badge--1{ top: -8px;    right: -12px; animation-delay: 0.55s, 0s; }
.orbit-badge--2{ bottom: -6px; right: -18px; animation-delay: 0.65s, 0.8s; width: 32px; height: 32px; }
.orbit-badge--3{ bottom: -14px; left: -16px; animation-delay: 0.75s, 1.6s; }
.orbit-badge--4{ top: -4px;    left: -20px; animation-delay: 0.85s, 2.4s; width: 30px; height: 30px; }

@keyframes orbitFloat{
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}

/* ==========================================================
   Name + bio
   ========================================================== */

.name{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 42px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--text-primary);
  animation: fadeUp 0.9s var(--ease-out-smooth) 0.25s both;
}

.bio{
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 320px;
  margin: 0 auto 32px;
  font-weight: 400;
  animation: fadeUp 0.9s var(--ease-out-smooth) 0.35s both;
}

@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(14px); }
  to  { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   Buttons
   ========================================================== */

.buttons{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  animation: fadeUp 0.9s var(--ease-out-smooth) 0.45s both;
}

.buttons--primary{ margin-bottom: 14px; }
.buttons--social{ margin-bottom: 8px; }

.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid var(--border);
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.25s var(--ease-out-smooth),
              box-shadow 0.25s var(--ease-out-smooth),
              background 0.25s var(--ease-out-smooth),
              border-color 0.25s var(--ease-out-smooth);
}

.btn--primary{
  width: 100%;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 16px;
  box-shadow: 0 10px 30px -10px rgba(0, 229, 255, 0.25);
}

.btn--primary:hover{
  transform: translateY(-3px);
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 16px 36px -8px rgba(0, 229, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
}

.btn--primary:active{
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.1s;
}

.btn--primary .btn__icon{ color: var(--accent); display: inline-flex; }

.btn--social{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  color: var(--text-secondary);
}

.btn--social:hover{
  transform: translateY(-2px);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn--social:active{
  transform: translateY(0) scale(0.94);
  transition-duration: 0.1s;
}

/* ==========================================================
   Divider + visitor counter
   ========================================================== */

.divider{
  height: 1px;
  margin: 28px 0 20px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.visitors{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: fadeUp 0.9s var(--ease-out-smooth) 0.55s both;
}

.visitors__label{
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.7;
}

.visitors__count{
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 480px){
  .card{
    padding: 40px 24px 28px;
    border-radius: 24px;
  }
  .name{ font-size: 30px; }
  .bio{ font-size: 15px; }
  .orbit-badge{ width: 32px; height: 32px; }
  .orbit-badge--2{ width: 26px; height: 26px; }
  .orbit-badge--4{ width: 24px; height: 24px; }
  .orbit-badge--1{ top: -4px; right: -6px; }
  .orbit-badge--2{ bottom: -2px; right: -10px; }
  .orbit-badge--3{ bottom: -8px; left: -8px; }
  .orbit-badge--4{ top: 0; left: -10px; }
}

@media (min-width: 900px){
  .card{ max-width: 460px; }
}

/* ==========================================================
   Reduced motion
   ========================================================== */

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .card, .avatar-wrap, .name, .bio, .buttons, .visitors,
  .aurora, .particle, .orbit-badge{
    animation: none !important;
    transition: none !important;
  }
  .card{ opacity: 1; transform: none; }
}