/* ============================================================
   IBRAHIM ELSHISHTAWY — FUTURISTIC 3D PORTFOLIO
   Reusable UI Components (components.css)
   ============================================================ */

/* ── CUSTOM CURSOR ──────────────────────────────────────── */
.custom-cursor {
  width: 28px;
  height: 28px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  mix-blend-mode: difference;
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
}

body.cursor-hover .custom-cursor {
  width: 58px;
  height: 58px;
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.04);
}

body.cursor-hover .custom-cursor-dot {
  background: var(--secondary);
  box-shadow: 0 0 14px var(--secondary);
}

/* ── GLASSMORPHISM CARDS ────────────────────────────────── */
.glass-panel {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition:
    border-color 0.4s var(--ease-spring),
    box-shadow   0.4s var(--ease-spring),
    transform    0.4s var(--ease-spring);
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
}

.glass-panel:hover {
  border-color: rgba(139, 92, 246, 0.18);
  box-shadow: 0 20px 50px rgba(139, 92, 246, 0.1), var(--shadow-card);
}

/* ── ICON BOXES ─────────────────────────────────────────── */
.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.icon-box-purple {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.icon-box-cyan {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: #22d3ee;
}

.icon-box-pink {
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

/* ── TYPOGRAPHY GLOWS ───────────────────────────────────── */
.text-glow { text-shadow: 0 0 30px rgba(255, 255, 255, 0.08); }

.gradient-text-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── 3D PROFILE FRAME ───────────────────────────────────── */
.profile-frame-container {
  position: relative;
  border-radius: 24px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(6, 182, 212, 0.18));
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.18), 0 0 80px rgba(6, 182, 212, 0.06);
  transition: box-shadow 0.5s ease;
  overflow: hidden;
}

.profile-frame-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, var(--primary) 25%, transparent 50%, var(--secondary) 75%, transparent 100%);
  animation: rotateSweep 8s linear infinite;
  z-index: 1;
}

.profile-frame-inner {
  position: relative;
  z-index: 2;
  border-radius: 18px;
  background: #090815;
  overflow: hidden;
}

@keyframes rotateSweep { to { transform: rotate(360deg); } }

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s var(--ease-spring), filter 0.6s ease;
  filter: saturate(1.1) brightness(0.95);
}

.profile-frame-container:hover .profile-img {
  transform: scale(1.04);
  filter: saturate(1.25) brightness(1.05);
}

.hero-avatar-tilt { transform-style: preserve-3d; perspective: 1000px; }
.hero-avatar-tilt .profile-img { transform: translateZ(25px); }
.hero-avatar-tilt .hologram-tag {
  transform: translateZ(60px) scale(0.96);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.floating-badge-3d-1 {
  position: absolute;
  top: 10%;
  left: -28px;
  transform: translateZ(80px);
  z-index: 30;
}

.floating-badge-3d-2 {
  position: absolute;
  bottom: 25%;
  right: -28px;
  transform: translateZ(90px);
  z-index: 30;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.magnetic-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.btn-glowing {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.btn-glowing:hover {
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.65);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text-1);
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.07);
}

.btn-sweep { overflow: hidden; }
.btn-sweep::after {
  content: '';
  position: absolute;
  top: 0;
  left: -55%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.75s ease;
}
.btn-sweep:hover::after { left: 125%; }

/* ── SOCIAL PILLS ───────────────────────────────────────── */
.social-pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--text-2);
  transition: all 0.3s var(--ease-spring);
}

.social-pill:hover {
  color: #fff;
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25);
}

.social-pill-lg {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--text-2);
  transition: all 0.3s var(--ease-spring);
}

.social-pill-lg:hover {
  color: #fff;
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

/* ── CYBER BADGES ───────────────────────────────────────── */
.cyber-badge {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.22);
  color: #a78bfa;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cyber-badge-cyan {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.22);
  color: #22d3ee;
}

/* ── GLASS TAGS ─────────────────────────────────────────── */
.glass-tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

.glass-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-2);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
}

.glass-tag:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

/* ── GLOW DOTS ──────────────────────────────────────────── */
.glow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.glow-dot-green {
  background: #10b981;
  box-shadow: 0 0 8px #10b981, 0 0 16px rgba(16, 185, 129, 0.4);
  animation: glowPulseGreen 1.5s ease-in-out infinite alternate;
}

/* ── METRIC TILES ───────────────────────────────────────── */
.metric-tile {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s ease;
}

.metric-tile::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 0 0 0 0;
  transition: width 0.5s ease;
}

.metric-tile:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(139, 92, 246, 0.15);
  transform: translateY(-3px);
}

.metric-tile:hover::after { width: 100%; }

.metric-number {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
}

/* ── 3D iPHONE MOCKUP ───────────────────────────────────── */
.iphone-mockup {
  position: relative;
  width: 245px;
  height: 500px;
  border-radius: 42px;
  border: 5px solid rgba(255, 255, 255, 0.14);
  background: #010107;
  box-shadow:
    0 30px 70px -15px rgba(0, 0, 0, 0.85),
    inset 0 0 14px rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 8px;
  overflow: hidden;
  transition: transform 0.6s var(--ease-spring), border-color 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.iphone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 22px;
  background: rgba(0, 0, 0, 0.85);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 10;
}

.iphone-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.8s var(--ease-spring);
}

.project-card:hover .iphone-mockup {
  border-color: var(--primary);
  box-shadow:
    0 30px 70px -15px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(139, 92, 246, 0.2),
    inset 0 0 14px rgba(255, 255, 255, 0.06);
}

.project-card:hover .iphone-img { transform: scale(1.05); }

.tilt-container { perspective: 1100px; }

/* Accessibility focus-visible */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .iphone-mockup { width: 210px; height: 430px; border-radius: 36px; }
  .iphone-screen { border-radius: 28px; }
  .floating-badge-3d-1 { left: -14px; font-size: 0.65rem; padding: 4px 10px; }
  .floating-badge-3d-2 { right: -14px; font-size: 0.65rem; padding: 4px 10px; }
}

@media (max-width: 480px) {
  .iphone-mockup { width: 185px; height: 380px; }
}
