/* ============================================
   Projects System Styles
   ============================================ */

/* --------------------------------------------
   Project Cards Grid
   -------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------
   Project Card
   -------------------------------------------- */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-primary);
  overflow: hidden;
  text-decoration: none;
}

.project-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--surface-secondary);
  position: relative;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.project-card-date {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--sec-fontfamily);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-inverted);
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.project-card-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 20px 0;
  gap: 24px;
}

.project-card-name {
  font-family: var(--main-fontfamily);
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 34px;
}

.project-card-name .slide-text {
  flex-shrink: 0;
  height: 34px;
  line-height: 34px;
  display: block;
  color: var(--text-primary);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card-name .slide-text {
  transform: translateY(-100%);
}

.project-card-name--accent {
  color: var(--text-accent2);
}

.project-card-arrow {
  width: 32px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-card-arrow img {
  width: 32px;
  height: 32px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card-arrow img {
  transform: translateY(-100%);
}

.project-card-application {
  display: inline-block;
  font-family: var(--sec-fontfamily);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-inverted);
  background: var(--surface-brand);
  padding: 4px 12px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --------------------------------------------
   Tag Filter System
   -------------------------------------------- */
.filter-section {
  margin-bottom: 32px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-btn {
  font-family: var(--sec-fontfamily);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 20px;
  border: 1px solid var(--border-secondary);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--border-primary);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--surface-brand);
  border-color: var(--surface-brand);
  color: var(--text-inverted);
}

/* --------------------------------------------
   Subpage top padding (clears fixed navbar)
   -------------------------------------------- */
.portfolio-section .featured-projects {
  padding-top: 130px;
}

/* --------------------------------------------
   Project Detail Page
   -------------------------------------------- */
.project-detail {
  padding: 130px 40px 80px;
  max-width: 1440px;
  margin: 0 auto;
}

.project-detail-header {
  margin-bottom: 48px;
}

.project-detail-title {
  font-family: var(--main-fontfamily);
  font-size: clamp(32px, 5vw, 68px);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -2.65px;
  line-height: 0.95;
  margin: 0 0 60px 0;
}

.project-detail-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.project-detail-year {
  font-family: var(--sec-fontfamily);
  font-size: 18px;
  color: var(--text-secondary);
}

.project-detail-application {
  display: inline-block;
  font-family: var(--sec-fontfamily);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-inverted);
  background: var(--surface-brand);
  padding: 6px 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-detail-tag {
  display: inline-block;
  font-family: var(--sec-fontfamily);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface-secondary);
  padding: 6px 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --------------------------------------------
   Project Gallery
   -------------------------------------------- */
.project-gallery {
  margin-bottom: 48px;
}

.gallery-main {
  width: 100%;
  height: 400px;
  background: var(--surface-secondary);
  margin-bottom: 16px;
  overflow: hidden;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
}

.gallery-thumb {
  width: 100px;
  height: 70px;
  background: var(--surface-secondary);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------
   Project Description & Specs
   -------------------------------------------- */
.project-info {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}

@media (max-width: 900px) {
  .project-info {
    grid-template-columns: 1fr;
  }
}

.project-description {
  font-family: var(--main-fontfamily);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.project-specs {
  background: var(--surface-secondary);
  padding: 24px;
}

.project-specs-title {
  font-family: var(--sec-fontfamily);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-specs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-specs-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.project-specs-item:last-child {
  border-bottom: none;
}

.project-specs-label {
  font-family: var(--sec-fontfamily);
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-specs-value {
  font-family: var(--main-fontfamily);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* --------------------------------------------
   Back Link
   -------------------------------------------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sec-fontfamily);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 32px;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--text-primary);
}

.back-link svg {
  width: 16px;
  height: 16px;
}