.portfolio-main {
  .portfolio-section {
    position: relative;
    padding: 6rem 1.5rem;
    overflow: hidden;
    color: white;
  }

  .portfolio-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
  }

  .bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
      radial-gradient(circle at 20% 30%, rgba(66, 153, 225, 0.15) 0%, transparent 50%),
      radial-gradient(circle at 80% 70%, rgba(159, 122, 234, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 40% 80%, rgba(56, 178, 172, 0.08) 0%, transparent 50%);
    animation: particlesFloat 20s ease-in-out infinite;
  }


  .bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
      linear-gradient(90deg, rgba(66, 153, 225, 0.05) 1px, transparent 1px),
      linear-gradient(rgba(66, 153, 225, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
  }

  .portfolio-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
  }

  /* Header */
  .portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
  }

  .header-content {
    flex: 1;
    min-width: 300px;
  }

  .portfolio-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
  }

  .title-shine {
    background: linear-gradient(90deg,
        #2c5282 0%,
        #4299e1 25%,
        #63b3ed 50%,
        #4299e1 75%,
        #2c5282 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradientFlow 4s ease infinite;
    position: relative;
    display: inline-block;
  }

  .title-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent);
    animation: shine 3s infinite;
  }


  .portfolio-subtitle {
    font-size: 1.3rem;
    color: rgba(200, 220, 255, 0.8);
    max-width: 500px;
    line-height: 1.6;
  }

  .portfolio-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    text-align: center;
    min-width: 140px;
    transition: all 0.3s ease;
  }

  .stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(66, 153, 225, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  }

  .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #4299e1, #63b3ed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .stat-label {
    font-size: 1rem;
    color: rgba(200, 220, 255, 0.7);
    font-weight: 500;
  }

  /* Controls */
  .portfolio-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .category-filters {
    flex: 1;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .filter-scroll {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    min-width: max-content;
  }

  .filter-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: rgba(200, 220, 255, 0.9);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
  }

  .filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--btn-color, #4299e1);
    transform: translateY(-2px);
  }

  .filter-btn.active {
    background: rgba(66, 153, 225, 0.15);
    border-color: var(--btn-color, #4299e1);
    color: white;
    box-shadow:
      0 10px 20px rgba(0, 0, 0, 0.2),
      0 0 0 1px var(--btn-color, #4299e1),
      0 0 20px rgba(66, 153, 225, 0.3);
  }

  .filter-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
  }

  .filter-btn.active .filter-dot {
    transform: scale(1.2);
    box-shadow: 0 0 10px currentColor;
  }

  .view-controls {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.5rem;
  }

    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: rgba(200, 220, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .view-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
  }

  .view-btn.active {
    background: rgba(66, 153, 225, 0.2);
    color: #4299e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  /* Projects Container */
  .projects-container {
    margin-bottom: 5rem;
    position: relative;
    min-height: 500px;
  }

  .projects-container.animation-enter {
    animation: fadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }

  .projects-container.animation-exit {
    animation: fadeOut 0.3s ease forwards;
  }


  /* Grid View */
  .projects-container.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
  }

  /* Masonry View */
  .projects-container.view-masonry {
    columns: 3;
    column-gap: 2rem;
  }

  .projects-container.view-masonry .project-card {
    break-inside: avoid;
    margin-bottom: 2rem;
  }

  /* Project Card */
  .project-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    height: 100%;
  }

  .project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--project-color, #4299e1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
  }

  .project-card:hover {
    border-color: var(--project-color, #4299e1);
    box-shadow:
      0 25px 50px rgba(0, 0, 0, 0.4),
      0 0 0 1px var(--project-color, #4299e1),
      0 0 30px rgba(66, 153, 225, 0.3);
    transform: translateY(-10px);
  }

  .project-card:hover::before {
    opacity: 0.05;
  }

  .project-card.featured {
    border: 2px solid var(--project-color, #4299e1);
    box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.3),
      0 0 0 1px var(--project-color, #4299e1),
      inset 0 0 20px rgba(66, 153, 225, 0.1);
  }

  .project-card.featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%);
    animation: featuredShine 3s infinite;
  }


  .project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
  }

  .badge-year {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
  }

  .badge-featured {
    background: linear-gradient(135deg, #d69e2e, #ed8936);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: badgePulse 2s infinite;
  }


  .project-image {
    position: relative;
    height: 240px;
    overflow: hidden;
  }

  .project-image img {
    object-fit: cover;
    height: 100%;
    width: 100%;
  }

  .image-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(66, 153, 225, 0.1),
        rgba(30, 41, 59, 0.8));
  }

  .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(15, 23, 42, 0.8) 100%);
    z-index: 1;
  }

  .image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }

  .placeholder-content {
    text-align: center;
    padding: 2rem;
  }

  .placeholder-icon {
    color: rgba(66, 153, 225, 0.5);
    margin-bottom: 1rem;
  }

  .placeholder-text {
    color: rgba(200, 220, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
  }

  .project-content {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.5);
  }

  .project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  .project-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    flex: 1;
    margin-right: 1rem;
  }

  .project-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .rating-stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
  }

  .rating-value {
    font-size: 0.9rem;
    color: rgba(200, 220, 255, 0.8);
    font-weight: 600;
  }

  .project-description {
    color: rgba(200, 220, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .project-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(200, 220, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
  }

  .meta-item svg {
    color: var(--project-color, #4299e1);
  }

  .project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .feature-tag {
    background: rgba(66, 153, 225, 0.1);
    border: 1px solid rgba(66, 153, 225, 0.3);
    color: rgba(200, 220, 255, 0.9);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
  }

  .feature-tag:hover {
    background: rgba(66, 153, 225, 0.2);
    transform: translateY(-1px);
  }

  .project-actions {
    display: flex;
    gap: 0.75rem;
  }

  .btn-view,
  .btn-compare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
  }

  .btn-view {
    flex: 1;
    background: rgba(66, 153, 225, 0.2);
    color: #4299e1;
    border: 2px solid rgba(66, 153, 225, 0.3);
  }

  .btn-view:hover {
    background: rgba(66, 153, 225, 0.3);
    border-color: #4299e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(66, 153, 225, 0.2);
  }

  .btn-compare {
    width: auto;
    background: rgba(159, 122, 234, 0.2);
    color: #9f7aea;
    border: 2px solid rgba(159, 122, 234, 0.3);
  }

  .btn-compare:hover {
    background: rgba(159, 122, 234, 0.3);
    border-color: #9f7aea;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(159, 122, 234, 0.2);
  }

  /* Comparison Modal */

  /* Comparison Modal - Complete CSS with Revealing Effect */
  .comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
  }

  .comparison-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(10, 15, 30, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    width: 95%;
    max-width: 1300px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
      0 30px 60px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(66, 153, 225, 0.2),
      0 0 30px rgba(66, 153, 225, 0.2);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /* Header Styles */
  .comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
  }

  .comparison-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .comparison-title {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(90deg, #fff, #4299e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: -0.02em;
  }

  .image-counter {
    background: rgba(66, 153, 225, 0.15);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 30px;
    padding: 0.4rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4299e1;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(66, 153, 225, 0.2);
  }

  .btn-close {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: rgba(200, 220, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }

  .btn-close:hover {
    background: rgba(245, 101, 101, 0.15);
    color: #f56565;
    border-color: #f56565;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(245, 101, 101, 0.3);
  }

  /* Body Styles */
  .comparison-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  /* Navigation Styles */
  .comparison-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 60px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(200, 220, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }

  .nav-btn:hover:not(:disabled) {
    background: rgba(66, 153, 225, 0.2);
    border-color: #4299e1;
    color: white;
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(66, 153, 225, 0.4);
  }

  .nav-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
  }

  .nav-label {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Thumbnails Styles */
  .comparison-thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.75rem 0.5rem;
    margin: 0 -0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #4299e1 rgba(255, 255, 255, 0.1);
  }

  .comparison-thumbnails::-webkit-scrollbar {
    height: 6px;
  }

  .comparison-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
  }

  .comparison-thumbnails::-webkit-scrollbar-thumb {
    background: #4299e1;
    border-radius: 10px;
  }

  .comparison-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #63b3ed;
  }

  .thumbnail-btn {
    flex: 0 0 140px;
    height: 90px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    padding: 2px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .thumbnail-btn:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: rgba(66, 153, 225, 0.5);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
  }

  .thumbnail-btn.active {
    border-color: #4299e1;
    box-shadow:
      0 0 0 3px rgba(66, 153, 225, 0.3),
      0 8px 25px rgba(66, 153, 225, 0.4);
    transform: scale(1.05);
  }

  .thumbnail-before,
  .thumbnail-after {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;
  }

  .thumbnail-before {
    border-right: 2px solid rgba(255, 255, 255, 0.3);
  }

  .thumbnail-before img,
  .thumbnail-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }

  .thumbnail-btn:hover img {
    transform: scale(1.1);
  }

  .thumbnail-label {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
  }

  /* Main Comparison Slider - REVEALING EFFECT */
  .comparison-slider {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    border-radius: 24px;
    user-select: none;
    background: #0a0f1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.4),
      inset 0 1px 1px rgba(255, 255, 255, 0.1);
  }

  /* After image (full width, background) */
  .slider-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  /* Before image (revealed by clip-path) */
  .slider-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
    /* clip-path is set dynamically via style */
    transition: clip-path 0.05s linear;
  }

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

  /* Image overlays for better label visibility */
  .slider-before::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1), transparent 70%);
    pointer-events: none;
    z-index: 3;
  }

  .slider-after::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), transparent 70%);
    pointer-events: none;
    z-index: 3;
  }

  /* Labels */
  .slider-label {
    position: absolute;
    top: 24px;
    padding: 10px 24px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-weight: 700;
    font-size: 16px;
    border-radius: 40px;
    z-index: 10;
    backdrop-filter: blur(8px);
    border: 1px solid;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }

  .before-label {
    left: 24px;
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.9), rgba(229, 62, 62, 0.9));
    border-color: #fc8181;
    box-shadow: 0 4px 20px rgba(245, 101, 101, 0.3);
  }

  .after-label {
    right: 24px;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.9), rgba(56, 161, 105, 0.9));
    border-color: #68d391;
    box-shadow: 0 4px 20px rgba(72, 187, 120, 0.3);
  }

  /* Handle */
  .slider-handle {
    position: absolute;
    top: 0;
    width: 56px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 20;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .handle-icon {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a202c;
    box-shadow:
      0 4px 20px rgba(0, 0, 0, 0.4),
      0 0 0 2px #4299e1;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 22;
    border: 2px solid white;
  }

  .handle-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0.9));
    transform: translateX(-50%);
    box-shadow:
      0 0 15px rgba(255, 255, 255, 0.8),
      0 0 30px rgba(66, 153, 225, 0.4);
    z-index: 21;
  }

  .slider-handle:hover .handle-icon {
    transform: scale(1.15);
    background: #4299e1;
    color: white;
    box-shadow:
      0 6px 25px rgba(0, 0, 0, 0.5),
      0 0 0 3px white,
      0 0 30px #4299e1;
  }

  /* Active drag state */
  .slider-handle.dragging .handle-icon {
    transform: scale(1.2);
    background: #3182ce;
    color: white;
    box-shadow:
      0 8px 30px rgba(0, 0, 0, 0.6),
      0 0 0 4px white,
      0 0 40px #4299e1;
  }

  /* Footer Styles */
  .comparison-footer {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .footer-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 0.8rem 2rem;
    color: rgba(200, 220, 255, 0.9);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
  }

  .footer-btn:hover:not(:disabled) {
    background: rgba(66, 153, 225, 0.15);
    border-color: #4299e1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(66, 153, 225, 0.3);
  }

  .footer-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }

  /* Utility Classes */
  .slider-handle.dragging {
    cursor: col-resize;
  }

  .comparison-slider.dragging {
    cursor: col-resize;
  }

  /* Loading State */
  .comparison-slider.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .comparison-slider.loading::after {
    content: 'Завантаження...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 31;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 2rem;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* Responsive Design */
  @media (max-width: 1200px) {
    .comparison-slider {
      height: 500px;
    }

    .comparison-title {
      font-size: 1.8rem;
    }
  }

  @media (max-width: 900px) {
    .comparison-content {
      width: 98%;
      max-height: 95vh;
    }

    .comparison-body {
      padding: 1.5rem;
    }

    .comparison-slider {
      height: 450px;
    }

    .thumbnail-btn {
      flex: 0 0 120px;
      height: 80px;
    }

    .comparison-navigation {
      gap: 1.5rem;
    }

    .nav-btn {
      width: 40px;
      height: 40px;
    }
  }

  @media (max-width: 700px) {
    .comparison-header {
      padding: 1rem 1.5rem;
    }

    .comparison-title {
      font-size: 1.5rem;
    }

    .image-counter {
      font-size: 0.8rem;
      padding: 0.3rem 1rem;
    }

    .comparison-slider {
      height: 400px;
      border-radius: 20px;
    }

    .slider-label {
      font-size: 14px;
      padding: 8px 18px;
    }

    .before-label {
      left: 16px;
    }

    .after-label {
      right: 16px;
    }

    .handle-icon {
      width: 48px;
      height: 48px;
    }

    .handle-icon svg {
      width: 22px;
      height: 22px;
    }

    .comparison-footer {
      gap: 1rem;
    }

    .footer-btn {
      padding: 0.6rem 1.5rem;
      font-size: 0.85rem;
    }
  }

  @media (max-width: 500px) {
    .comparison-body {
      padding: 1rem;
      gap: 1rem;
    }

    .comparison-slider {
      height: 350px;
      border-radius: 16px;
    }

    .comparison-navigation {
      gap: 1rem;
      padding: 0.5rem 1rem;
    }

    .nav-label {
      font-size: 0.9rem;
      padding: 0.4rem 1rem;
    }

    .thumbnail-btn {
      flex: 0 0 100px;
      height: 70px;
    }

    .thumbnail-label {
      font-size: 0.55rem;
      padding: 1px 6px;
    }

    .slider-label {
      font-size: 12px;
      padding: 6px 14px;
    }

    .handle-icon {
      width: 40px;
      height: 40px;
    }

    .handle-icon svg {
      width: 20px;
      height: 20px;
    }

    .comparison-footer {
      flex-direction: column;
      align-items: center;
      gap: 0.75rem;
    }

    .footer-btn {
      width: 100%;
      max-width: 200px;
    }
  }

  @media (max-width: 380px) {
    .comparison-title-wrapper {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }

    .comparison-title {
      font-size: 1.3rem;
    }

    .comparison-slider {
      height: 300px;
    }

    .slider-label {
      font-size: 11px;
      padding: 5px 12px;
    }

    .handle-icon {
      width: 36px;
      height: 36px;
    }

    .nav-label {
      font-size: 0.8rem;
      padding: 0.3rem 0.8rem;
    }
  }

  /* Animations */
  @keyframes modalFadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  @keyframes modalSlideIn {
    from {
      opacity: 0;
      transform: translateY(50px) scale(0.95);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes handlePulse {

    0%,
    100% {
      box-shadow: 0 0 20px rgba(66, 153, 225, 0.5);
    }

    50% {
      box-shadow: 0 0 40px rgba(66, 153, 225, 0.8);
    }
  }

  /* Optional: Add transition for smooth image changes */
  .comparison-img {
    transition: opacity 0.2s ease;
  }

  .comparison-img.changing {
    opacity: 0.5;
  }

  /* Optional: Add subtle pattern overlay for better texture */
  .comparison-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
      repeating-linear-gradient(45deg,
        rgba(255, 255, 255, 0.02) 0px,
        rgba(255, 255, 255, 0.02) 2px,
        transparent 2px,
        transparent 8px);
    pointer-events: none;
    z-index: 5;
  }

  /* Optional: Focus styles for accessibility */
  .slider-handle:focus-visible {
    outline: none;
  }

  .slider-handle:focus-visible .handle-icon {
    box-shadow:
      0 0 0 3px #4299e1,
      0 0 0 6px rgba(66, 153, 225, 0.3);
  }

  .nav-btn:focus-visible,
  .footer-btn:focus-visible,
  .btn-close:focus-visible,
  .thumbnail-btn:focus-visible {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
  }

  /* Reviews Section */
  .reviews-section {
    margin-bottom: 5rem;
  }

  .reviews-header {
    text-align: center;
    margin-bottom: 3rem;
  }

  .reviews-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
  }

  .reviews-subtitle {
    font-size: 1.1rem;
    color: rgba(200, 220, 255, 0.8);
    max-width: 500px;
    margin: 0 auto;
  }

  .reviews-slider {
    overflow: hidden;
  }

  .slider-track {
    display: flex;
    gap: 2rem;
    animation: slide 30s linear infinite;
    width: max-content;
  }


  .review-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    min-width: 350px;
    transition: all 0.3s ease;
  }

  .review-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(66, 153, 225, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  }

  .review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .reviewer-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg,
        var(--avatar-color, #4299e1),
        color-mix(in srgb, var(--avatar-color, #4299e1) 70%, black 30%));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
  }

  .avatar-verified {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: #48bb78;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid rgba(15, 23, 42, 0.9);
  }

  .reviewer-info {
    flex: 1;
  }

  .reviewer-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
  }

  .reviewer-project {
    font-size: 0.9rem;
    color: rgba(200, 220, 255, 0.7);
  }

  .review-rating {
    display: flex;
    gap: 2px;
  }

  .review-content {
    margin-bottom: 1.5rem;
  }

  .review-text {
    color: rgba(200, 220, 255, 0.9);
    line-height: 1.6;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .review-date {
    color: rgba(200, 220, 255, 0.6);
    font-size: 0.85rem;
  }

  .review-actions {
    display: flex;
    gap: 0.5rem;
  }

  .btn-like,
  .btn-share {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(200, 220, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .btn-like:hover {
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
    border-color: #f56565;
  }

  .btn-share:hover {
    background: rgba(66, 153, 225, 0.2);
    color: #4299e1;
    border-color: #4299e1;
  }

  /* 3D CTA Section */
  .portfolio-cta {
    background: linear-gradient(135deg,
        rgba(66, 153, 225, 0.1),
        rgba(30, 41, 59, 0.8));
    border: 2px solid rgba(66, 153, 225, 0.2);
    border-radius: 32px;
    padding: 3rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    overflow: hidden;
  }

  .portfolio-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
      radial-gradient(circle at 30% 70%, rgba(66, 153, 225, 0.15) 0%, transparent 50%),
      radial-gradient(circle at 70% 30%, rgba(159, 122, 234, 0.1) 0%, transparent 50%);
    animation: ctaGlow 8s ease-in-out infinite;
  }


  .cta-3d {
    position: relative;
    z-index: 1;
    perspective: 1000px;
  }

  .scene-container {
    width: 100%;
    height: 300px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .scene-house {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 50px auto;
    transform-style: preserve-3d;
    transform: rotateX(-20deg);
  }

  .house-wall {
    position: absolute;
    background: linear-gradient(135deg, #4299e1, #2c5282);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow:
      inset 0 0 20px rgba(255, 255, 255, 0.1),
      0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .house-front {
    width: 200px;
    height: 150px;
    transform: translateZ(100px);
  }

  .house-back {
    width: 200px;
    height: 150px;
    transform: translateZ(-100px) rotateY(180deg);
  }

  .house-left {
    width: 200px;
    height: 150px;
    transform: translateX(-100px) rotateY(-90deg);
  }

  .house-right {
    width: 200px;
    height: 150px;
    transform: translateX(100px) rotateY(90deg);
  }

  .house-roof {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 120px solid transparent;
    border-right: 120px solid transparent;
    border-bottom: 100px solid #ed8936;
    transform: translateY(-100px) rotateX(90deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .house-window {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(200, 220, 255, 0.9);
    border: 3px solid #2c5282;
    border-radius: 8px;
    top: 60px;
    left: 80px;
    transform: translateZ(101px);
    animation: windowGlow 2s infinite;
  }


  .house-door {
    position: absolute;
    width: 50px;
    height: 80px;
    background: linear-gradient(135deg, #d69e2e, #b7791f);
    border: 3px solid #b7791f;
    border-radius: 8px 8px 0 0;
    bottom: 0;
    right: 60px;
    transform: translateZ(101px);
  }

  .scene-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  .scene-controls button {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(200, 220, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }

  .scene-controls button:hover {
    background: rgba(66, 153, 225, 0.3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }

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

  .cta-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .cta-subtitle {
    font-size: 1.2rem;
    color: rgba(200, 220, 255, 0.9);
    line-height: 1.6;
    max-width: 600px;
  }

  /* Project Modal */

  /* Project Modal Styles */
  .project-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .project-modal.visible {
    opacity: 1;
    visibility: visible;
  }

  .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .modal-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(10, 15, 30, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    width: 95%;
    max-width: 1400px;
    max-height: 95vh;
    box-shadow:
      0 40px 80px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(66, 153, 225, 0.2),
      0 0 40px rgba(66, 153, 225, 0.2);
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
  }

  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
  }

  .modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .modal-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    color: white;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff, #4299e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(66, 153, 225, 0.3);
  }

  .image-counter {
    background: rgba(66, 153, 225, 0.15);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 30px;
    padding: 0.3rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4299e1;
    white-space: nowrap;
  }

  .modal-close {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: rgba(200, 220, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
  }

  .modal-close:hover {
    background: rgba(245, 101, 101, 0.15);
    color: #f56565;
    border-color: #f56565;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(245, 101, 101, 0.3);
  }

  .modal-body {
    display: grid;
    grid-template-columns: minmax(300px, 1.2fr) minmax(280px, 0.8fr);
    gap: 2rem;
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
  }

  /* Gallery Styles - Fixed */
  .modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
    height: 100%;
  }
.gallery-main {
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

  .main-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
  }

  .main-image img {
    width: 100%;
    max-height: calc(90vh - 280px);
    object-fit: cover;
}
    /* Changed back to cover for better fill */
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .main-image:hover img {
    transform: scale(1.05);
  }


  .gallery-thumbs {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.75rem 0.5rem;
    margin: 0 -0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #4299e1 rgba(255, 255, 255, 0.1);
  }

  .gallery-thumbs::-webkit-scrollbar {
    height: 6px;
  }

  .gallery-thumbs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
  }

  .gallery-thumbs::-webkit-scrollbar-thumb {
    background: #4299e1;
    border-radius: 10px;
  }

  .gallery-thumbs::-webkit-scrollbar-thumb:hover {
    background: #63b3ed;
  }


  .thumb-item {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;

  }

  .thumb-item:hover {
    transform: translateY(-4px);
    border-color: #4299e1;
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.3),
      0 0 0 2px rgba(66, 153, 225, 0.3);
  }

  .thumb-item.active {
    border-color: #4299e1;
    box-shadow:
      0 0 0 3px rgba(66, 153, 225, 0.3),
      0 8px 20px rgba(66, 153, 225, 0.3);
  }

  .thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }

  .thumb-item:hover img {
    transform: scale(1.1);
  }

  .thumb-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .thumb-item:hover .thumb-overlay {
    opacity: 1;
  }

  /* Details Styles */
  .modal-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
  }

  .details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .detail-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(66, 153, 225, 0.1),
        transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .detail-item:hover {
    transform: translateY(-2px);
    border-color: rgba(66, 153, 225, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

  .detail-item:hover::before {
    opacity: 1;
  }

  .detail-label {
    font-size: 0.85rem;
    color: rgba(200, 220, 255, 0.7);
    margin-bottom: 0.4rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .detail-value {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 800;
    color: white;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    word-break: break-word;
  }

  .details-features {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.5rem;
    transition: all 0.3s ease;
  }

  .details-features:hover {
    border-color: rgba(66, 153, 225, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  }

  .features-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.25rem;
    position: relative;
    display: inline-block;
  }

  .features-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #4299e1, transparent);
    border-radius: 2px;
  }

  .features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(200, 220, 255, 0.9);
    font-weight: 500;
    padding: 0.4rem 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
  }

  .feature-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(5px);
  }

  .feature-item svg {
    color: #48bb78;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 2px 4px rgba(72, 187, 120, 0.3));
  }

  .details-description {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.5rem;
  }

  .details-description p {
    color: rgba(200, 220, 255, 0.95);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    font-weight: 400;
  }

  /* Category Badge */
  .category-badge {
    display: inline-block;
    background: rgba(66, 153, 225, 0.15);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 20px;
    padding: 0.25rem 1rem;
    font-size: 0.8rem;
    color: #4299e1;
    font-weight: 600;
    white-space: nowrap;
  }

  /* Responsive Breakpoints */

  @media (max-width: 1100px) {

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

    .gallery-main {
        width: 100%;
        height: 450px;
    }
    .details-grid {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  @media (max-width: 900px) {
    .modal-header {
      padding: 1.25rem 1.5rem;
    }


    .gallery-main {
      height: 400px;
    }

    .details-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .gallery-thumbs {
      grid-template-columns: repeat(4, 1fr);
      gap: 0.75rem;
    }
  }

  @media (max-width: 700px) {
    .modal-content {
      width: 98%;
      max-height: 95vh;
      border-radius: 24px;
    }

    .modal-header {
      padding: 1rem 1.25rem;
    }

    .modal-title-wrapper {
      gap: 0.5rem;
    }

    .image-counter {
      font-size: 0.8rem;
      padding: 0.2rem 0.8rem;
    }

    .modal-close {
      width: 40px;
      height: 40px;
    }

    .modal-body {
      padding: 1.25rem;
      gap: 1.25rem;
    }

    .gallery-main {
      height: 350px;
      border-radius: 20px;
    }

    .gallery-thumbs {
      grid-template-columns: repeat(4, 1fr);
      gap: 0.5rem;
    }

    .thumb-item {
      border-radius: 8px;
    }

    .thumb-overlay {
      font-size: 0.65rem;
      padding: 2px;
    }

    .details-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 0.75rem;
    }

    .detail-item {
      padding: 1rem;
      border-radius: 16px;
    }

    .detail-label {
      font-size: 0.8rem;
    }

    .detail-value {
      font-size: 1.2rem;
    }

    .details-features,
    .details-description {
      padding: 1.25rem;
      border-radius: 20px;
    }

    .features-title {
      font-size: 1.2rem;
      margin-bottom: 1rem;
    }

    .feature-item {
      font-size: 0.9rem;
    }
  }

  @media (max-width: 500px) {
    .modal-header {
      padding: 0.875rem 1rem;
    }

    .modal-title {
      font-size: 1.3rem;
    }

    .image-counter {
      font-size: 0.7rem;
      padding: 0.2rem 0.6rem;
    }

    .modal-close {
      width: 36px;
      height: 36px;
    }

    .modal-body {
      padding: 1rem;
    }

    .gallery-main {
      height: 280px;
      border-radius: 16px;
    }

    .gallery-thumbs {
      grid-template-columns: repeat(4, 1fr);
      gap: 0.4rem;
    }

    .thumb-item {
      border-width: 1px;
    }

    .details-grid {
      grid-template-columns: 1fr;
      gap: 0.75rem;
    }

    .detail-item {
      padding: 0.875rem;
      border-radius: 14px;
    }

    .detail-value {
      font-size: 1.1rem;
    }

    .details-features,
    .details-description {
      padding: 1rem;
      border-radius: 16px;
    }

    .feature-item {
      padding: 0.25rem 0.4rem;
      font-size: 0.85rem;
    }
  }

  @media (max-width: 380px) {
    .modal-title-wrapper {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.25rem;
    }

    .image-counter {
      margin-left: 0;
    }

    .modal-body {
      padding: 0.875rem;
    }

    .gallery-main {
      height: 220px;
    }

    .gallery-thumbs {
      grid-template-columns: repeat(4, 1fr);
      gap: 0.3rem;
    }

    .thumb-overlay {
      font-size: 0.55rem;
      padding: 1px;
    }

    .details-features,
    .details-description {
      padding: 0.875rem;
    }

    .feature-item {
      font-size: 0.8rem;
    }

    .feature-item svg {
      width: 16px;
      height: 16px;
    }
  }

  /* Loading State */
  .modal-content.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .modal-content.loading::after {
    content: 'Завантаження...';
    color: rgba(200, 220, 255, 0.8);
    font-size: 1.2rem;
    font-weight: 500;
  }

  /* Scrollbar Styling */
  .modal-body::-webkit-scrollbar {
    width: 8px;
  }

  .modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
  }

  .modal-body::-webkit-scrollbar-thumb {
    background: rgba(66, 153, 225, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
  }

  .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(66, 153, 225, 0.5);
  }

  /* Accessibility */
  .modal-close:focus-visible,
  .thumb-item:focus-visible {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
  }

  /* Print Styles */
  @media print {
    .project-modal {
      position: static;
      visibility: visible;
      opacity: 1;
    }

    .modal-overlay {
      display: none;
    }

    .modal-content {
      box-shadow: none;
      border: 1px solid #ccc;
    }

    .modal-close {
      display: none;
    }

    .gallery-thumbs {
      grid-template-columns: repeat(4, 1fr);
    }

    .thumb-item {
      border: 1px solid #ccc;
    }
  }

  /* Responsive Design */
  @media (max-width: 1200px) {
    .projects-container.view-masonry {
      columns: 2;
    }
  }


  @media (max-width: 900px) {
    .portfolio-header {
      flex-direction: column;
      align-items: flex-start;
    }

    .portfolio-stats {
      width: 100%;
      justify-content: space-between;
    }

    .portfolio-controls {
      flex-direction: column;
      align-items: flex-start;
    }

    .category-filters {
      width: 100%;
    }

    .projects-container.view-grid {
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .projects-container.view-masonry {
      columns: 1;
    }

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


    .gallery-main {
      min-height: 300px;
    }
  }

  @media (max-width: 600px) {
    .portfolio-section {
      padding: 4rem 1rem;
    }

    .portfolio-title {
      font-size: 2.5rem;
    }

    .stat-card {
      min-width: calc(33.333% - 1rem);
      padding: 1rem;
    }

    .stat-number {
      font-size: 2rem;
    }

    .projects-container.view-grid {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }

    .review-card {
      min-width: 300px;
    }

    .cta-title {
      font-size: 1.8rem;
    }

    .cta-subtitle {
      font-size: 1.1rem;
    }

    .scene-house {
      transform: scale(0.8) rotateX(-20deg);
    }

    .modal-content {
      width: 95%;
      margin: 1rem;
    }

    .modal-body {
      padding: 1.5rem;
    }

    .details-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 480px) {
    .portfolio-title {
      font-size: 2rem;
    }

    .stat-card {
      min-width: calc(50% - 0.75rem);
    }

    .filter-btn {
      padding: 0.6rem 1.2rem;
      font-size: 0.9rem;
    }

    .project-image {
      height: 200px;
    }

    .project-content {
      padding: 1.25rem;
    }

    .project-title {
      font-size: 1.2rem;
    }

    .btn-view,
    .btn-compare {
      padding: 0.6rem 1rem;
      font-size: 0.9rem;
    }

    .portfolio-cta {
      padding: 2rem 1.5rem;
    }
  }
}

@keyframes particlesFloat {

  0%,
  100% {
    transform: translate(0, 0);
  }

  33% {
    transform: translate(-20px, 20px);
  }

  66% {
    transform: translate(20px, -20px);
  }
}

@keyframes shine {
  0% {
    left: -100%;
  }

  100% {
    left: 200%;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

@keyframes featuredShine {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes badgePulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(214, 158, 46, 0.7);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(214, 158, 46, 0);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-350px * 4 - 2rem * 4));
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ctaGlow {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

@keyframes windowGlow {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }

  50% {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
  }
}
