/* Portfolio Page Styles - Matching Homepage Design */

.portfolio-main {
  max-width: 1920px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: #000000;
}

.portfolio-hero {
  background-color: transparent;
  text-align: center;
  padding: 6rem 2rem 4rem;
  margin-bottom: 6rem;
}

.portfolio-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 400;
  font-size: 80px;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.portfolio-subtitle {
  font-family: "Archivo", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #cccccc;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Filter Section */
.filters {
  max-width: 1300px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.filter-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid #333333;
  background: transparent;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Archivo", sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.filter-btn:hover {
  background-color: #ff5c00;
  border-color: #ff5c00;
  color: #ffffff;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: transparent;
  color: #ff5c00;
  border-color: #ff5c00;
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-container label {
  font-family: "Archivo", sans-serif;
  font-size: 14px;
  color: #cccccc;
  font-weight: 500;
}

.sort-select {
  padding: 0.75rem 1rem;
  border: 1px solid #333333;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  font-family: "Archivo", sans-serif;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.3s ease;
}

.sort-select:hover,
.sort-select:focus {
  border-color: #ff5c00;
  outline: none;
}

/* Loading States */
.loading {
  text-align: center;
  padding: 6rem 2rem;
  color: #ffffff;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid #333333;
  border-top: 3px solid #ff5c00;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 2rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  font-family: "Archivo", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #cccccc;
}

.error {
  text-align: center;
  padding: 6rem 2rem;
  color: #ffffff;
}

.error p {
  font-family: "Archivo", sans-serif;
  font-size: 18px;
  margin-bottom: 2rem;
  color: #ff5c5c;
}

.retry-btn {
  padding: 1rem 2rem;
  background: #ff5c00;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Archivo", sans-serif;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background: #e54d00;
  transform: translateY(-2px);
}

.no-results {
  text-align: center;
  padding: 6rem 2rem;
  color: #cccccc;
}

.no-results p {
  font-family: "Archivo", sans-serif;
  font-size: 20px;
  font-weight: 400;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  max-width: 1300px;
  margin: 0 auto 6rem;
  padding: 0 2rem;
  justify-items: center;
}

.project-card {
  background: #111111;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #222222;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  max-width: 380px;
}

.project-card:hover {
  transform: translateY(-8px);
  background-color: #1a1a1a;
  border-color: #444444;
  box-shadow: 0 20px 40px rgba(255, 92, 0, 0.1);
  text-decoration: none;
  color: inherit;
}

.project-thumbnail {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #222222;
  transition: all 0.3s ease;
}

.project-card:hover .project-thumbnail {
  transform: scale(1.05);
}

.project-content {
  padding: 2rem;
}

.project-category {
  display: inline-block;
  background: #222222;
  color: #ff5c00;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-family: "Archivo", sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.project-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #ffffff;
  line-height: 1.3;
}

.project-description {
  color: #cccccc;
  font-family: "Archivo", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Archivo", sans-serif;
  font-size: 13px;
}

.project-platform {
  background: #ff5c00;
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

/* Ensure text is always readable on platform buttons */
.project-platform[style*="background-color"] {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Special handling for lighter colors that need dark text */
.project-platform[style*="#ffffff"],
.project-platform[style*="#f"],
.project-platform[style*="rgb(255"],
.project-platform[style*="hsl(0, 0%, 100%"],
.project-platform.light-bg {
  color: #333333 !important;
  text-shadow: none;
}

.project-date {
  color: #888888;
  font-style: italic;
  font-weight: 400;
}

/* Back Link */
.back-link {
  color: #ffffff;
  text-decoration: none;
  font-family: "Archivo", sans-serif;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link:hover {
  color: #ff5c00;
  text-decoration: none;
  transform: translateX(-3px);
}

.back-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.back-link:hover .back-icon {
  transform: translateX(-3px);
}

/* Email link styling for portfolio page */
.header .email {
  color: #ffffff;
}

.header .email:hover {
  color: #ff5c00;
}

/* Header adjustments for portfolio page */
.header {
  background-color: transparent;
  border-bottom: 1px solid #333333;
}

/* Footer */
.portfolio-footer {
  text-align: center;
  padding: 4rem 2rem;
  background-color: transparent;
  border-top: 1px solid #333333;
  margin-top: 6rem;
  color: #cccccc;
}

.portfolio-footer p {
  font-family: "Archivo", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #888888;
}

/* Responsive Design */
@media (max-width: 1200px) and (min-width: 993px) {
  .portfolio-title {
    font-size: 70px;
  }
  
  .portfolio-hero {
    padding: 5.5rem 2rem 4rem;
    margin-bottom: 5rem;
  }
  
  .filters {
    max-width: 1100px;
  }
  
  .sort-container {
    justify-content: center;
    text-align: center;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    max-width: 1100px;
    gap: 2.25rem;
  }
  
  .project-card {
    max-width: 365px;
  }
}

@media (max-width: 992px) and (min-width: 769px) {
  .portfolio-title {
    font-size: 58px;
  }
  
  .portfolio-hero {
    padding: 4.5rem 2rem 3.5rem;
    margin-bottom: 4rem;
  }
  
  .filters {
    max-width: 900px;
    padding: 0 2rem;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  
  .filter-container {
    justify-content: center;
  }
  
  .sort-container {
    justify-content: center;
    text-align: center;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    max-width: 900px;
    gap: 2rem;
    padding: 0 2rem;
  }
  
  .project-card {
    max-width: 340px;
  }
  
  .project-thumbnail {
    height: 190px;
  }
  
  .project-content {
    padding: 1.5rem;
  }
  
  .project-title {
    font-size: 21px;
  }
  
  .project-description {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .portfolio-title {
    font-size: 48px;
  }
  
  .filters {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  
  .filter-container {
    justify-content: center;
  }
  
  .sort-container {
    justify-content: center;
    text-align: center;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }
  
  .project-card {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
  }
  
  .portfolio-main {
    padding: 0;
  }
  
  .portfolio-hero {
    padding: 4rem 1rem 3rem;
    margin-bottom: 3rem;
  }
}

@media (max-width: 480px) {
  .filter-btn {
    font-size: 12px;
    padding: 0.6rem 1.2rem;
  }
  
  .portfolio-hero {
    margin-bottom: 2rem;
    padding: 3rem 1rem 2rem;
  }
  
  .portfolio-title {
    font-size: 36px;
  }
  
  .portfolio-subtitle {
    font-size: 16px;
  }
  
  .sort-container {
    justify-content: center;
    text-align: center;
  }
  
  .project-content {
    padding: 1.5rem;
  }
  
  .projects-grid {
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .project-card {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }
  
  .project-title {
    font-size: 20px;
  }
  
  .project-description {
    font-size: 14px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

/* Extra small devices */
@media (max-width: 320px) {
  .project-card {
    max-width: 300px;
  }
  
  .portfolio-title {
    font-size: 28px;
  }
  
  .filter-btn {
    font-size: 11px;
    padding: 0.5rem 1rem;
  }
  
  .sort-container {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .sort-select {
    width: 100%;
    max-width: 200px;
  }
}
