/* oliver-Inspired Portfolio Styles */
.oliver-portfolio {
  background: #f7f7f7;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 0 4rem 0;
}

.oliver-portfolio-card {
  max-width: 1100px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 166, 81, 0.2);
  padding: 3.5rem 2.5rem 3rem 2.5rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.oliver-portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.oliver-portfolio-title {
  font-family: 'Georgia', serif;
  font-size: 2.7rem;
  font-weight: bold;
  color: var(--primary-color);
  letter-spacing: -0.03em;
}

.oliver-portfolio-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.7rem;
  font-size: 1.1rem;
  font-family: 'Segoe UI', 'Liberation Sans', Arial, sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
  text-decoration: none;
  display: inline-block;
}
.oliver-portfolio-btn:hover {
  background: #fff;
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
}

.oliver-portfolio-controls {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 2.2rem;
  align-items: center;
}

.oliver-portfolio-search {
  flex: 1;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  border: 1.5px solid var(--primary-color);
  background: #f7f7f7;
  color: #222;
  font-size: 1.1rem;
  font-family: 'Segoe UI', 'Liberation Sans', Arial, sans-serif;
}

.view-toggle-buttons {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  padding: 0.6rem 0.9rem;
  font-size: 1.1rem;
  line-height: 1;
  border: 1.5px solid transparent; /* Reserve space for border on hover */
}

.view-btn.active-view {
  background: var(--primary-color);
  color: #fff;
}

.view-btn:not(.active-view) {
  background: #f0f0f0;
  color: #333;
}

.view-btn:not(.active-view):hover {
  background: #e0e0e0;
  border-color: var(--primary-color);
}

/* Loading animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
  padding-bottom: 6rem;
}

.portfolio-item {
  background: #fff;
  color: #222;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 166, 81, 0.15);
  padding: 1.2rem 1rem 1.5rem 1rem;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  text-align: left;
  word-break: break-word;
  animation: fadeIn 0.3s ease-out;
}

.portfolio-item:hover {
  box-shadow: 0 4px 16px rgba(0, 166, 81, 0.2);
  transform: translateY(-4px) scale(1.03);
  z-index: 2;
}

.portfolio-item img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.portfolio-item img[loading] {
  opacity: 0.7;
}

.portfolio-item img:not([loading]) {
  opacity: 1;
}

.portfolio-item h3 {
  font-family: 'Georgia', serif;
  color: var(--primary-color);
  font-size: 1.25rem;
  margin: 0.5rem 0 0.3rem 0;
}

.portfolio-item p {
  color: #222;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

/* Enlarged image overlay */
.portfolio-enlarged-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(13,17,23,0.95);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
  overflow-y: auto;
  padding: 1rem;
  box-sizing: border-box;
}

.portfolio-enlarged-content {
  padding: 2rem;
  max-width: 600px;
  width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 166, 81, 0.25);
  text-align: center;
  background: #fff;
  border-radius: 12px;
  position: relative;
  animation: fadeIn 0.3s ease-out;
  margin: auto;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.portfolio-enlarged-content img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: opacity 0.3s ease;
  object-fit: contain;
}

.portfolio-enlarged-content h2 {
  font-family: 'Georgia', serif;
  color: var(--primary-color);
  font-size: 2rem;
  margin: 0.5rem 0 0.7rem 0;
}

.portfolio-enlarged-content p {
  color: #222;
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
}

.portfolio-enlarged-close {
  position: sticky;
  top: 0;
  right: 2rem;
  font-size: 2rem;
  color: var(--primary-color);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
  float: right;
  margin-bottom: 1rem;
  z-index: 10;
}

.portfolio-enlarged-close:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Carousel styles */
.portfolio-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  position: relative;
}

.carousel-image {
  max-width: 400px;
  max-height: 350px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 166, 81, 0.15);
  margin-bottom: 1rem;
  transition: opacity 0.3s ease;
}

.carousel-info {
  padding: 1rem;
  margin-top: 1rem;
  width: 100%;
  max-width: 400px;
  text-align: left;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 166, 81, 0.15);
  animation: fadeIn 0.3s ease-out;
}

.carousel-info h2 {
  font-family: 'Georgia', serif;
  color: var(--primary-color);
  font-size: 1.3rem;
  margin: 0.5rem 0 0.7rem 0;
}

.carousel-info p {
  color: #222;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: var(--primary-color);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  user-select: none;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.carousel-arrow:hover {
  background: var(--primary-color);
  color: #fff;
}

.carousel-arrow.left {
  left: 1rem;
}

.carousel-arrow.right {
  right: 1rem;
}

@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .oliver-portfolio-card {
    padding: 2.5rem 1.5rem;
  }
  .oliver-portfolio {
    padding: 5rem 1rem 3rem 1rem;
  }
}
@media (max-width: 600px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .carousel-image, .carousel-info {
    padding: 0 1rem;
  }
  .oliver-portfolio-card {
    padding: 2rem 1rem;
    width: 96vw;
    max-width: 96vw;
    box-sizing: border-box;
  }
  .oliver-portfolio {
    padding: 4.5rem 0.5rem 2rem 0.5rem;
  }
  .oliver-portfolio-title {
    font-size: 2.2rem;
  }
  .oliver-portfolio-controls {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .oliver-portfolio-search {
    width: 100%;
    box-sizing: border-box;
  }
  .view-toggle-buttons {
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
  }
  
  /* Mobile modal improvements */
  .portfolio-enlarged-overlay {
    padding: 0.5rem;
  }
  
  .portfolio-enlarged-content {
    padding: 1.5rem;
    width: 95vw;
    max-height: calc(100vh - 1rem);
  }
  
  .portfolio-enlarged-content img {
    max-height: 50vh;
  }
  
  .portfolio-enlarged-content h2 {
    font-size: 1.5rem;
  }
  
  .portfolio-enlarged-content p {
    font-size: 1rem;
  }
  
  .portfolio-enlarged-close {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
}

.sample-portfolio, .portfolio-sample, .portfolio .card {
  background: #f7f7f7;
  color: var(--primary-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px #FFC50033;
  padding: 1.5rem;
  margin-top: 2rem;
}

.portfolio-paging {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  margin: 1.5em 0 0.5em 0;
  width: 100%;
  grid-column: 1 / -1;
}