/* ==========================================================================
   Aradnj (@aradnj) — Bio Hub & Personal Brand Platform
   High-Performance Cyber Obsidian Glass • Zero-Jank Mobile Rendering
   Native Hardware-Accelerated Gradients • Multi-Device Responsive
   ========================================================================== */

:root {
  /* Ultra-Fast Native Font Stack (0ms Blocking on iOS & Android) */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Plus Jakarta Sans", "Segoe UI", Roboto, sans-serif;
  --font-farsi: "Vazirmatn", -apple-system, BlinkMacSystemFont, Tahoma, sans-serif;

  /* Color Palette — Studio Portrait Rim Lights */
  --bg-dark: #07080c;
  --card-glass: rgba(14, 18, 28, 0.78);
  --card-glass-hover: rgba(22, 28, 44, 0.92);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(255, 255, 255, 0.22);

  /* Dual Rim Neon Accents */
  --neon-cyan: #00f5d4;
  --neon-cyan-glow: rgba(0, 245, 212, 0.35);
  --neon-blue: #00d2ff;
  --neon-coral: #ff2a5f;
  --neon-coral-glow: rgba(255, 42, 95, 0.35);

  /* Text Colors */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Layout */
  --radius-card: 18px;
  --radius-pill: 9999px;
  --radius-btn: 12px;
  --transition-fast: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
}

/* Zero-Cost Hardware-Accelerated Ambient Background (No Heavy CSS Blur Filters) */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(ellipse 65% 50% at 10% 0%, rgba(0, 245, 212, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 65% 50% at 90% 15%, rgba(255, 42, 95, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(0, 210, 255, 0.08) 0%, transparent 80%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 14px 48px;
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main Hub Container */
.hub-container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 auto;
}

/* Top Action Header */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 2px;
}

/* Language Switcher Pill */
.lang-switch {
  display: inline-flex;
  background: rgba(18, 22, 34, 0.85);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  padding: 2px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.25), rgba(255, 42, 95, 0.25));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Top Action Buttons */
.top-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(18, 22, 34, 0.85);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-fast);
}

.icon-btn:hover, .icon-btn:active {
  color: #fff;
  border-color: rgba(0, 245, 212, 0.5);
  transform: scale(1.05);
}

/* Profile Hero */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 8px 12px 4px;
}

/* Avatar Frame */
.avatar-container {
  position: relative;
  width: 120px;
  height: 120px;
}

.avatar-aura {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg at 50% 50%,
    var(--neon-cyan) 0deg,
    rgba(0, 210, 255, 0.2) 90deg,
    var(--neon-coral) 180deg,
    rgba(224, 36, 195, 0.2) 270deg,
    var(--neon-cyan) 360deg
  );
  filter: blur(8px);
  opacity: 0.75;
}

.avatar-ring {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, transparent 40%, transparent 60%, var(--neon-coral) 100%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background-color: #07080c;
}

/* Status Indicator Dot */
.status-indicator {
  position: absolute;
  bottom: 3px;
  right: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #07080c;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Profile Info & Name */
.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
}

.name-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.profile-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1.2;
}

.verified-badge {
  display: inline-flex;
  color: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

/* Handle Pill */
.handle-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.handle-pill:hover, .handle-pill:active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 245, 212, 0.4);
  color: #fff;
}

.handle-at {
  color: var(--neon-cyan);
}

.handle-copy-icon {
  opacity: 0.6;
  margin-left: 2px;
}

.profile-bio {
  font-size: 0.92rem;
  color: #cbd5e1;
  max-width: 420px;
  line-height: 1.5;
}

/* Meta Pills */
.meta-pills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
}

.pulse-clock {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
}

/* Quick Social Bar */
.social-quick-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 2px 0 4px;
}

.social-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--card-glass);
  border: 1px solid var(--card-border);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  transition: var(--transition-fast);
}

.social-icon-btn:hover, .social-icon-btn:active {
  transform: translateY(-2px);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.social-icon-btn.instagram:hover {
  color: #fff;
  border-color: rgba(225, 48, 108, 0.5);
}

.social-icon-btn.telegram:hover {
  color: #29b6f6;
  border-color: rgba(41, 182, 246, 0.5);
}

.social-icon-btn.youtube:hover {
  color: #ff334b;
  border-color: rgba(255, 51, 75, 0.5);
}

.social-icon-btn.github:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Links Section */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Bento Link Card */
.link-card {
  position: relative;
  display: block;
  text-decoration: none;
  background: var(--card-glass);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.link-card:hover, .link-card:active {
  background: var(--card-glass-hover);
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Card Inner Content */
.card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

/* Icon Box */
.card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ig-icon-box {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: #fff;
}

.tg-icon-box {
  background: linear-gradient(135deg, #0088cc, #00c6ff);
  color: #fff;
}

.yt-icon-box {
  background: linear-gradient(135deg, #e50914, #ff3366);
  color: #fff;
}

.gh-icon-box {
  background: linear-gradient(135deg, #24292e, #111418);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

.dm-icon-box {
  background: linear-gradient(135deg, var(--neon-coral), #b91c1c);
  color: #fff;
}

/* Card Text Column */
.card-text {
  flex: 1;
  min-width: 0; /* Prevents overflow */
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Card Badge Row — Above Title, In Flow! (NEVER COLLIDES!) */
.card-badge-row {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  line-height: 1.2;
}

.gradient-ig-badge {
  background: rgba(225, 48, 108, 0.2);
  color: #ff758c;
  border: 1px solid rgba(225, 48, 108, 0.35);
}

.badge-cyan {
  background: rgba(0, 245, 212, 0.15);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 245, 212, 0.3);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-gh {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.badge-coral {
  background: rgba(255, 42, 95, 0.18);
  color: #ff5e83;
  border: 1px solid rgba(255, 42, 95, 0.35);
}

/* Card Typography */
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  word-break: break-word;
}

.card-subtitle {
  font-size: 0.79rem;
  color: #94a3b8;
  line-height: 1.35;
  word-break: break-word;
}

/* Card Arrow */
.card-arrow {
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.link-card:hover .card-arrow {
  color: #fff;
  transform: translateX(3px);
}

/* Contact Card Action Pill */
.card-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(255, 42, 95, 0.25), rgba(255, 42, 95, 0.15));
  border: 1px solid rgba(255, 42, 95, 0.4);
  color: #ff5e83;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  margin-left: 4px;
}

.link-card:hover .card-action-pill {
  background: var(--neon-coral);
  color: #fff;
}

/* Featured Glow */
.featured-glow {
  border-color: rgba(225, 48, 108, 0.35);
}

.featured-glow:hover {
  border-color: rgba(225, 48, 108, 0.6);
  box-shadow: 0 8px 28px rgba(225, 48, 108, 0.3);
}

/* Footer */
.hub-footer {
  text-align: center;
  padding: 16px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-copy a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
}

.footer-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.72rem;
  color: #64748b;
  flex-wrap: wrap;
}

.f-dot {
  opacity: 0.4;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(14, 18, 28, 0.95);
  border: 1px solid rgba(0, 245, 212, 0.4);
  color: #fff;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* RTL Support (Farsi) */
html[dir="rtl"] {
  font-family: var(--font-farsi);
}

html[dir="rtl"] .card-arrow svg {
  transform: rotate(180deg);
}

html[dir="rtl"] .link-card:hover .card-arrow {
  transform: translateX(-3px);
}

html[dir="rtl"] .handle-copy-icon {
  margin-left: 0;
  margin-right: 2px;
}

html[dir="rtl"] .card-action-pill {
  margin-left: 0;
  margin-right: 4px;
}

/* iPhone / Mobile Tuning */
@media (max-width: 420px) {
  body {
    padding: 14px 10px 40px;
  }

  .profile-name {
    font-size: 1.45rem;
  }

  .link-card {
    padding: 12px 14px;
  }

  .card-icon-box {
    width: 40px;
    height: 40px;
  }

  .card-title {
    font-size: 0.94rem;
  }

  .card-subtitle {
    font-size: 0.75rem;
  }
}
