/* ==========================================================
   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);

  --card-blur: 10px;
  --card-bg-alpha: 0.05;
  --bio-color: #ffffff;
  --sub-bio-color: #b8c4d9;
  --badge-glow-color: #00E5FF;

  --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);
}

.scene__bg-image{
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
  animation: bgImageDrift 60s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes bgImageDrift{
  0%   { transform: scale(1.04) translate(0, 0); }
  100% { transform: scale(1.1) translate(-1.5%, -1.5%); }
}

.scene__bg-tint{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 22, 0.72), rgba(5, 8, 22, 0.86));
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 74%, transparent),
    color-mix(in srgb, var(--bg) 88%, transparent));
}

.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: rgba(255, 255, 255, var(--card-bg-alpha));
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--card-blur)) saturate(220%);
  -webkit-backdrop-filter: blur(var(--card-blur)) saturate(220%);
  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;
}

/* Soft colorful aura bleeding out from behind the card — makes the thin
   glass read as "glowing from behind" rather than just a flat panel. */
.card::after{
  content: '';
  position: absolute;
  inset: -6px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--badge-glow-color));
  filter: blur(42px);
  opacity: 0.32;
  animation: cardGlowPulse 6.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cardGlowPulse{
  0%, 100% { opacity: 0.26; transform: scale(1); }
  50%      { opacity: 0.46; transform: scale(1.035); }
}

/* 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(var(--card-blur)) saturate(240%) brightness(1.08);
    -webkit-backdrop-filter: blur(var(--card-blur)) saturate(240%) brightness(1.08);
  }
}

.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: 44px;
  height: 44px;
  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{
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Glow ring sitting just behind each badge */
.orbit-badge__glow{
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  z-index: 0;
  filter: blur(9px);
  pointer-events: none;
}

.orbit-badge--preset .orbit-badge__glow{
  background: radial-gradient(circle, var(--badge-glow-color) 0%, transparent 72%);
  opacity: 0.85;
  animation: badgeGlowPulse 3.2s ease-in-out infinite;
}

.orbit-badge--rgb .orbit-badge__glow{
  background: conic-gradient(from 0deg,
    #ff4d8d, #ffb020, #ffd54f, #35d68a, #26c6da,
    #00e5ff, #4d7cff, #7c4dff, #e040fb, #ff4d8d);
  opacity: 0.95;
  animation: badgeGlowSpin 4s linear infinite;
}

@keyframes badgeGlowPulse{
  0%, 100% { opacity: 0.6; transform: scale(0.94); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

@keyframes badgeGlowSpin{
  from{ transform: rotate(0deg); }
  to  { transform: rotate(360deg); }
}

a.orbit-badge:hover{
  transform: scale(1.14) translateY(-2px);
}
a.orbit-badge:hover .orbit-badge__glow{
  filter: blur(12px);
}

.orbit-badge--1{ top: -9px;    right: -13px; animation-delay: 0.55s, 0s; }
.orbit-badge--2{ bottom: -7px; right: -20px; animation-delay: 0.65s, 0.8s; width: 35px; height: 35px; }
.orbit-badge--3{ bottom: -15px; left: -17px; animation-delay: 0.75s, 1.6s; }
.orbit-badge--4{ top: -4px;    left: -22px; animation-delay: 0.85s, 2.4s; width: 33px; height: 33px; }

@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;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.status-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  animation: statusPop 0.5s var(--ease-out-smooth) 0.9s both;
}
.status-icon--online{ color: #35d68a; }
.status-icon--busy{ color: #ff5470; }
.status-icon--away{ color: #ffb020; }

@keyframes statusPop{
  from{ opacity: 0; transform: scale(0.4); }
  to  { opacity: 1; transform: scale(1); }
}

.bio{
  font-size: 16px;
  line-height: 1.6;
  color: var(--bio-color);
  max-width: 320px;
  margin: 0 auto 10px;
  font-weight: 500;
  min-height: 1.6em;
  animation: fadeUp 0.6s var(--ease-out-smooth) 0.35s both;
}

.bio.is-typing::after{
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: currentColor;
  animation: caretBlink 0.9s steps(1) infinite;
}

@keyframes caretBlink{
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.sub-bio{
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--sub-bio-color);
  max-width: 320px;
  margin: 0 auto 32px;
  font-weight: 400;
  animation: fadeUp 0.9s var(--ease-out-smooth) 0.42s both;
}

.bio:last-of-type{ margin-bottom: 32px; }

@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: 35px; height: 35px; }
  .orbit-badge--2{ width: 29px; height: 29px; }
  .orbit-badge--4{ width: 26px; height: 26px; }
  .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; }
  .sub-bio{ font-size: 13.5px; }
}

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

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

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .card, .card::after, .avatar-wrap, .name, .bio, .sub-bio, .buttons, .visitors,
  .aurora, .particle, .orbit-badge, .orbit-badge__glow, .status-icon, .scene__bg-image{
    animation: none !important;
    transition: none !important;
  }
  .bio.is-typing::after{ display: none; }
  .card{ opacity: 1; transform: none; }
}
