/* Custom Styles & Modern Enhancements for Amr Sameh Portfolio */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --bg-deep: #07090e;
  --bg-card: #0e131f;
  --border-glow: rgba(139, 92, 246, 0.25);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: #f1f5f9;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}

/* Ambient Background Glows */
.ambient-glow-1 {
  position: absolute;
  top: -5%;
  left: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-2 {
  position: absolute;
  top: 35%;
  right: -5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.13) 0%, rgba(59, 130, 246, 0.04) 50%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel-hover {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel-hover:hover {
  background: rgba(22, 33, 56, 0.75);
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(139, 92, 246, 0.2);
}

/* Video Player Frame with Animated Gradient Border */
.video-frame-glow {
  position: relative;
  border-radius: 1.25rem;
  padding: 2px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.6), rgba(6, 182, 212, 0.4), rgba(59, 130, 246, 0.3));
  box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.3);
}

/* Before & After Interactive Comparison Slider */
.comparison-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1rem;
  user-select: none;
  touch-action: none;
}

.comparison-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

.comparison-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  pointer-events: none;
}

.comparison-overlay .comparison-image {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.comparison-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #ffffff;
  transform: translateX(-50%);
  cursor: ew-resize;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.9), 0 0 10px rgba(139, 92, 246, 0.9);
  z-index: 20;
}

.comparison-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: #0f172a;
  border: 3px solid #38bdf8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), 0 0 12px rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  cursor: grab;
}

.comparison-button:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.08);
}

/* Subtle Animated Grid Pattern */
.bg-grid-pattern {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Pulse animation for live status badge */
@keyframes live-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
}

.animate-live {
  animation: live-pulse 2s infinite ease-in-out;
}

/* Filter Tab Active States */
.filter-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn.active {
  background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
  color: #ffffff !important;
  border-color: rgba(167, 139, 250, 0.6) !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4) !important;
}

/* Project Cards Fade Animation */
.project-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card.is-hidden {
  display: none !important;
}

/* Modal Dialog Styles */
#videoModal {
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
#videoModal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#videoModal:not(.hidden) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Glow button effect */
.btn-glow {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.7s ease;
}
.btn-glow:hover::after {
  transform: rotate(30deg) translateY(100%);
}

/* ─── Hero Showreel Play Button ─────────────────────────────────────────────── */

/* Outer glow ring pulse — slow, dreamy */
@keyframes ring-pulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Inner accent ring — slightly faster */
@keyframes ring-pulse-inner {
  0%   { transform: scale(1);   opacity: 0.40; }
  70%  { transform: scale(1.30); opacity: 0; }
  100% { transform: scale(1.30); opacity: 0; }
}

.showreel-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 70%);
  animation: ring-pulse 2.4s cubic-bezier(0.2, 0, 0.8, 1) infinite;
  pointer-events: none;
}

.showreel-ring-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.4), transparent 70%);
  animation: ring-pulse-inner 2.4s cubic-bezier(0.2, 0, 0.8, 1) 0.45s infinite;
  pointer-events: none;
}

/* Glassmorphism play button */
.showreel-play-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  border: 1.5px solid rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.25),
    0 8px 32px rgba(99, 102, 241, 0.35),
    0 0 60px rgba(6, 182, 212, 0.12);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease,
              background 0.35s ease;
  overflow: hidden;
}

/* Inner gradient fill */
.showreel-play-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.45) 0%,
    rgba(6, 182, 212, 0.35) 100%);
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

/* Shimmer sweep on hover */
.showreel-play-btn::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(
    60deg,
    transparent 35%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 65%
  );
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.65s ease;
}

.group:hover .showreel-play-btn {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.55),
    0 12px 48px rgba(99, 102, 241, 0.55),
    0 0 80px rgba(6, 182, 212, 0.22);
}

.group:hover .showreel-play-btn::after {
  transform: rotate(30deg) translateY(80%);
}

/* Scanline overlay for cinematic feel */
.showreel-scanlines {
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 3px
  );
  pointer-events: none;
}

/* Vignette edges */
.showreel-vignette {
  background: radial-gradient(ellipse at center,
    transparent 55%,
    rgba(7, 9, 14, 0.70) 100%);
  pointer-events: none;
}

/* Slide-up animation for the label pill */
@keyframes pill-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.showreel-label {
  animation: pill-rise 0.6s 0.2s both ease-out;
}
