/* Enhanced Portfolio Page with Purple Hues - REDESIGNED */
:root {
  --primary-purple: #5b21b6;
  --accent-purple: #8b5cf6;
  --light-purple: #a78bfa;
  --primary-purple-faint: rgba(91, 33, 182, 0.15);
  --accent-purple-faint: rgba(139, 92, 246, 0.1);
  --white: #ffffff;
  --white-faint: rgba(255, 255, 255, 0.98);
  --warm-gray-900: #1f2937;
  --warm-gray-700: #374151;
  --warm-gray-600: #4b5563;
  --warm-gray-100: #f3f4f6;
  --gradient-vibrant: linear-gradient(135deg, var(--white-faint) 0%, var(--primary-purple-faint) 70%, var(--accent-purple-faint) 100%);
  --gradient-cool: linear-gradient(45deg, var(--primary-purple) 0%, var(--accent-purple) 100%);
  --shadow-vibrant: 0 10px 30px rgba(91, 33, 182, 0.15);
  --shadow-glow-vibrant: 0 0 40px rgba(91, 33, 182, 0.25);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 50px rgba(91, 33, 182, 0.2);
  --transition-vibrant: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-smooth: 0.3s ease-in-out;
  --transition-fast: 0.2s ease-in-out;
  --radius-xl: 20px;
  --radius-md: 12px;
  --radius-sharp: 3px;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Playfair Display', serif;
}

body {
  font-family: var(--font-primary);
  line-height: 1.9;
  color: var(--warm-gray-900);
  background: var(--white);
  overflow-x: hidden;
  font-size: clamp(16px, 1.7vw, 19px);
}

.page-content {
  position: relative;
  z-index: 1;
}

/* Hero Section */
.page-hero {
  position: relative;
  padding: 9rem 0 7rem;
  text-align: center;
  background: var(--gradient-vibrant);
  overflow: hidden;
  z-index: 1;
}

.page-hero-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.5rem);
  color: var(--warm-gray-900);
  margin-bottom: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: slideInUp 0.8s ease-out;
}

.gradient-text-cool {
  background: var(--gradient-cool);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-hero-subtitle {
  font-family: var(--font-primary);
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  color: var(--warm-gray-700);
  max-width: 800px;
  margin: 0 auto;
  line-height: 2;
  opacity: 0.9;
}

.title-underline {
  width: 150px;
  height: 6px;
  background: var(--accent-purple);
  margin: 2rem auto 0;
  border-radius: var(--radius-sharp);
  box-shadow: var(--shadow-vibrant);
}

/* Portfolio Section with Modern Clean Design */
.portfolio {
  padding: 6rem 0 9rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  position: relative;
  z-index: 2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.5vw, 3.2rem);
  color: var(--warm-gray-900);
  margin-bottom: 1rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.section-subtitle {
  font-family: var(--font-primary);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--warm-gray-700);
  max-width: 700px;
  margin: 0 auto 4rem;
  line-height: 1.9;
  text-align: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  margin-top: 2rem;
}

/* Modern Portfolio Items - Clean and Professional */
.portfolio-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  height: auto;
  min-height: 300px;
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.portfolio-image-wrapper {
  position: relative;
  width: 100%;
  padding: 20px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
}

.portfolio-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  /* NO ZOOM - images stay normal */
}

/* Clean Title Section */
.portfolio-title-bar {
  padding: 20px;
  background: var(--white);
  border-top: 1px solid #f0f0f0;
}

.portfolio-title {
  font-family: var(--font-primary);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 600;
  color: var(--warm-gray-900);
  text-align: center;
  line-height: 1.4;
  margin: 0;
}

/* Remove the ugly overlay completely */
.portfolio-overlay {
  display: none;
}

.portfolio-description {
  display: none;
}

/* Enhanced Feature Tags - Hidden for clean design */
.portfolio-features {
  display: none;
}

.feature-tag {
  display: none;
}

/* Portfolio Button - Hidden for clean design */
.portfolio-btn {
  display: none;
}

/* Remove Filter Section Completely */
.filter-section {
  display: none;
}

.filter-tabs {
  display: none;
}

.filter-btn {
  display: none;
}

/* Results Counter */
.results-counter {
  text-align: center;
  margin-top: 3rem;
  font-family: var(--font-primary);
  font-size: 1.1rem;
  color: var(--warm-gray-600);
  font-weight: 500;
}

#resultsCount {
  font-weight: 700;
  color: var(--primary-purple);
  font-size: 1.3rem;
}

/* Enhanced Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  position: relative;
  background: var(--white);
  margin: 3% auto;
  padding: 0;
  border-radius: var(--radius-xl);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-glow-vibrant);
  animation: slideInUp 0.4s ease-out;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  font-weight: bold;
  color: var(--warm-gray-600);
  cursor: pointer;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transition: all var(--transition-fast);
}

.close-modal:hover {
  color: var(--primary-purple);
  background: var(--white);
  transform: rotate(90deg);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 500px;
}

.modal-image-section {
  background: var(--warm-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  overflow: auto;
  max-height: 90vh;
}

.modal-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.modal-image.zoomed {
  cursor: zoom-out;
  transform: scale(1.5);
  max-height: none;
}

.modal-info-section {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  color: var(--warm-gray-900);
  margin-bottom: 2rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.modal-description {
  display: none;
}

.modal-features {
  display: none;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.modal-btn {
  padding: 1rem 2.5rem;
  border: none;
  border-radius: var(--radius-xl);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  min-width: 200px;
  background: var(--gradient-cool);
  color: var(--white);
  box-shadow: var(--shadow-vibrant);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Animations */
@keyframes slideInUp {
  from { 
    opacity: 0; 
    transform: translateY(40px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
  }
  to { 
    opacity: 1; 
  }
}

.page-hero,
.portfolio {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-hero {
    padding: 7rem 0 5rem;
  }

  .page-hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
  }

  .page-hero-subtitle {
    font-size: clamp(1.1rem, 1.8vw, 1.2rem);
  }

  .portfolio {
    padding: 4rem 0 6rem;
  }

  .section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
  }

  .section-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    margin-bottom: 3rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
  }

  .portfolio-item {
    min-height: 280px;
  }

  .portfolio-image-wrapper {
    min-height: 280px;
    padding: 15px;
  }

  .portfolio-image {
    max-height: 300px;
  }

  .portfolio-title-bar {
    padding: 15px;
  }

  .portfolio-title {
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  }

  .modal-content {
    margin: 10% auto;
    width: 95%;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-image-section {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1.5rem;
  }

  .modal-image {
    max-height: 250px;
  }

  .modal-info-section {
    padding: 2rem 1.5rem;
  }

  .modal-title {
    font-size: clamp(1.5rem, 2.5vw, 1.8rem);
    margin-bottom: 1rem;
  }

  .modal-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .page-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
  }

  .page-hero-subtitle {
    font-size: clamp(1rem, 1.6vw, 1.1rem);
  }

  .container {
    padding: 0 1rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .portfolio-item {
    min-height: 250px;
  }

  .portfolio-image-wrapper {
    min-height: 180px;
    padding: 12px;
  }

  .portfolio-image {
    max-height: 160px;
  }

  .portfolio-title-bar {
    padding: 12px;
  }

  .portfolio-title {
    font-size: clamp(0.85rem, 1.2vw, 1rem);
  }

  .modal-content {
    margin: 5% auto;
  }

  .modal-info-section {
    padding: 1.5rem 1rem;
  }

  .close-modal {
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 380px) {
  .portfolio-item {
    min-height: 220px;
  }

  .portfolio-image-wrapper {
    min-height: 160px;
    padding: 10px;
  }

  .portfolio-image {
    max-height: 140px;
  }

  .portfolio-title {
    font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  }
}

@media (min-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus states for better accessibility */
.portfolio-item:focus,
.modal-btn:focus {
  outline: 3px solid var(--accent-purple);
  outline-offset: 2px;
}

.close-modal:focus {
  outline: 2px solid var(--accent-purple);
  outline-offset: 1px;
}