/* Custom CSS Variables for Premium Aesthetics */
:root {
  --bg-color: #08080c;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-bg-hover: rgba(255, 255, 255, 0.07);
  
  /* Brand Accent Gradients */
  --cyan-glow: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --orange-glow: linear-gradient(135deg, #ff8c00 0%, #ff007f 100%);
  --purple-glow: linear-gradient(135deg, #b000ff 0%, #7b00ff 100%);
  
  --shadow-color: rgba(0, 0, 0, 0.4);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

/* Lock scrolling completely for iOS / Mobile Viewports */
html, body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  touch-action: none; /* Disables double-tap zoom & panning entirely on body */
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

/* Decorative Background Glows */
.bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

.bg-glow-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #7b00ff 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.bg-glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #00f2fe 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
}

/* Container & Glassmorphism Design */
.container {
  width: 100%;
  max-width: 500px;
  max-height: calc(100dvh - 2rem);
  background: rgba(13, 13, 20, 0.6);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 32px;
  padding: 2.25rem 2rem 1.75rem;
  box-shadow: 0 24px 60px var(--shadow-color);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto; /* Fallback internal scroll if container height exceeded */
  scrollbar-width: none;
  touch-action: pan-y; /* Allow internal scrolling if content overflows */
}

.container::-webkit-scrollbar {
  display: none;
}

/* Profile Section Styling */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
  width: 100%;
}

.avatar-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 1rem;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.05);
  z-index: 2;
  position: relative;
  background-color: #0b0b10;
}

.avatar-ring {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f2fe, #7b00ff);
  opacity: 0.8;
  z-index: 1;
  animation: pulseGlow 4s infinite linear;
}

.name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 320px;
}

/* Links Section Styling */
.links-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

/* Individual Link Card - Futuristic Design */
.link-card {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 1rem 1.15rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.link-card:hover {
  transform: translateY(-3px);
  background: var(--card-bg-hover);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.link-card:hover::before {
  opacity: 1;
}

/* Left Icon Wrappers with Neon Glows */
.card-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 0.85rem;
  position: relative;
}

.card-icon-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  filter: blur(8px);
  opacity: 0.4;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.link-card:hover .card-icon-wrapper::after {
  opacity: 0.8;
}

.cyan {
  background: var(--cyan-glow);
}
.cyan::after { background: var(--cyan-glow); }

.orange {
  background: var(--orange-glow);
}
.orange::after { background: var(--orange-glow); }

.purple {
  background: var(--purple-glow);
}
.purple::after { background: var(--purple-glow); }

.card-icon {
  width: 18px;
  height: 18px;
  color: var(--text-primary);
}

/* Card Typography */
.card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Right Arrow Icon styling */
.arrow-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  color: var(--text-primary);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(0);
}

.link-card:hover .arrow-icon {
  opacity: 0.9;
  transform: translateX(3px);
}

.arrow-icon svg {
  width: 14px;
  height: 14px;
}

/* Footer Styling */
.footer {
  text-align: center;
  width: 100%;
}

.copyright {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.05em;
}

/* Keyframes Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Mobile Rules */
@media (max-width: 480px) {
  body {
    padding: 0.5rem;
  }
  
  .container {
    padding: 1.5rem 1.15rem 1rem;
    border-radius: 24px;
    max-height: calc(100dvh - 1rem);
  }
  
  .avatar-wrapper {
    width: 72px;
    height: 72px;
    margin-bottom: 0.75rem;
  }
  
  .profile {
    margin-bottom: 1.25rem;
  }
  
  .name {
    font-size: 1.35rem;
  }
  
  .bio {
    font-size: 0.78rem;
    max-width: 280px;
  }
  
  .links-section {
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }
  
  .link-card {
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
  }
  
  .card-icon-wrapper {
    width: 36px;
    height: 36px;
    margin-right: 0.75rem;
    border-radius: 8px;
  }
  
  .card-icon {
    width: 15px;
    height: 15px;
  }
  
  .card-title {
    font-size: 0.9rem;
  }
  
  .card-desc {
    font-size: 0.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Extra Short Height Screen Optimization (e.g. In-App Browsers, iPhone SE) */
@media (max-height: 720px) {
  .container {
    padding: 1.15rem 1.15rem 0.85rem;
    border-radius: 20px;
  }
  
  .avatar-wrapper {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
  }
  
  .profile {
    margin-bottom: 0.85rem;
  }
  
  .name {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
  }
  
  .bio {
    font-size: 0.75rem;
  }
  
  .links-section {
    gap: 0.6rem;
    margin-bottom: 0.85rem;
  }
  
  .link-card {
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
  }
  
  .card-icon-wrapper {
    width: 32px;
    height: 32px;
    margin-right: 0.6rem;
  }
  
  .card-icon {
    width: 14px;
    height: 14px;
  }
  
  .card-title {
    font-size: 0.85rem;
  }
  
  .card-desc {
    font-size: 0.68rem;
  }
  
  .copyright {
    font-size: 0.65rem;
  }
}
