/* ============================= */
/*         PORTFOLIO STYLES - Clean Card Design */
/* ============================= */

.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  padding: 40px;
  background: transparent;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: all 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.media-wrapper {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.media-wrapper img, .media-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Clean overlay - appears on hover */
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,0.7) 100%);
  display: flex;
  align-items: flex-end;
  padding: 25px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .project-overlay {
  opacity: 1;
}

.portfolio-item:hover .media-wrapper img {
  transform: scale(1.05);
}

.project-info {
  width: 100%;
}

.project-info h3 {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.project-info p {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  margin: 8px 0 0 0;
}

/* Placeholder for no image */
.portfolio-item .no-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 48px;
}

/* Responsive styles */
@media (max-width: 768px) {
  .portfolio-container {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }
  
  .media-wrapper {
    height: 200px;
  }
  
  .project-overlay {
    padding: 15px;
  }
  
  .project-info h3 {
    font-size: 1.1rem;
  }
  
  /* Mobile simplified portfolio cards - only show title and discover more */
  .project-info p,
  .project-stats {
    display: none;
  }
  
  .project-info {
    justify-content: flex-start;
    padding-top: 10px;
  }
  
  .project-info h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }
  
  .project-info > div:last-child {
    display: block !important;
    font-size: 0.85rem !important;
    margin-top: 0;
  }
}

/* ============================================
   PORTFOLIO SECTION SCROLLER STYLES
   ============================================ */

/**
 * Portfolio Scroller Navigation Container
 * Fixed/sticky navigation dots for quick section access
 */
.portfolio-scroller-nav {
  position: sticky;
  top: 80px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  margin: 20px auto 40px;
  max-width: fit-content;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255,255,255,0.1);
  pointer-events: auto;
}

/**
 * Scroller Navigation Title
 * Label for the navigation dots
 */
.scroller-title {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/**
 * Scroller Dots Container
 * Holds all navigation dots
 */
.scroller-dots {
  display: flex;
  gap: 8px;
}

/**
 * Individual Scroller Dot
 * Navigation button for each portfolio section
 */
.scroller-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  position: relative;
  pointer-events: auto;
}

.scroller-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.scroller-dot:hover {
  border-color: #fff;
  transform: scale(1.2);
}

.scroller-dot:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.scroller-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(108, 99, 255, 0.3);
}

/**
 * Section Indicator
 * Shows current position in portfolio
 */
.scroller-indicator {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/**
 * Scroll Progress Bar
 * Visual indicator of scroll position
 */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1000;
}

.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6c5ce7, #a29bfe);
  width: 0%;
  transition: width 0.1s ease;
}

/**
 * Keyboard Navigation Hint
 * Tooltip showing keyboard shortcuts
 */
.keyboard-hint {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.8);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.keyboard-hint.visible {
  opacity: 1;
}

.keyboard-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin: 0 2px;
  font-family: inherit;
}

/**
 * Responsive Adjustments
 * Mobile-friendly scroller styles
 */
@media (max-width: 768px) {
  .portfolio-scroller-nav {
    top: 70px;
    padding: 10px 15px;
    gap: 10px;
  }

  .scroller-title {
    display: none;
  }

  .scroller-dot {
    width: 10px;
    height: 10px;
  }

  .keyboard-hint {
    display: none;
  }
  
  .portfolio-container {
    padding: 20px;
    gap: 15px;
  }
  
  /* Fix text overflow on mobile */
  .portfolio-item, .portfolio-card, .portfolio-info, .portfolio-info h3, .portfolio-info p {
    max-width: 100%;
    overflow: visible;
    white-space: normal;
    word-break: break-word;
  }
}

/**
 * Smooth Scroll Behavior
 * Enhanced scrolling for portfolio sections
 */
html {
  scroll-behavior: smooth;
}

/**
 * Section Transition Animation
 * Fade in animation when scrolling
 */
.portfolio-item {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.portfolio-item.fade-out {
  opacity: 0.3;
  transform: translateY(20px);
}

.portfolio-item.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/**
 * CTA Box Styles
 * Call-to-action section at bottom
 */
.cta-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.1) 0%, transparent 60%);
  transform: rotate(45deg);
  transition: all 0.5s ease;
}

.cta-box:hover::before {
  transform: rotate(45deg) translate(20%, 20%);
}

.cta-box:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(108, 99, 255, 0.2);
}

.cta-box h3 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 20px;
  position: relative;
}

.cta-box .primary {
  display: inline-block;
  padding: 15px 40px;
  background: #6c5ce7;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.cta-box .primary:hover {
  background: #5b4cdb;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}

/**
 * Loading State
 * Skeleton loader for portfolio items
 */
.portfolio-item.loading {
  background: linear-gradient(90deg, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/**
 * Portfolio Item Entry Animation
 */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portfolio-item.animate-in {
  animation: slideUp 0.6s ease forwards;
}

/**
 * Glow effect for featured items
 */
.portfolio-item.featured::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, var(--accent, #6c63ff), var(--accent-2, #ffdd57), var(--accent, #6c63ff));
  z-index: -1;
  border-radius: inherit;
  animation: borderRotate 4s linear infinite;
  background-size: 400% 400%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item.featured:hover::after {
  opacity: 1;
}

@keyframes borderRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/**
 * Video play button overlay
 */
.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}

.video-play-overlay::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 18px solid var(--accent, #6c63ff);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

.portfolio-item:hover .video-play-overlay {
  transform: translate(-50%, -50%) scale(1);
}

.portfolio-item:hover .video-play-overlay:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
