/* Projects Page Specific Styles */

/* Override global font */
* {
  font-family: 'JetBrains Mono', 'Courier New', monospace !important;
}

body {
  font-family: 'JetBrains Mono', 'Courier New', monospace !important;
  background: #ebeefd !important;
  overflow-x: hidden;
}

/* Ensure scrollbar is always visible to prevent layout shift */
html {
  overflow-y: scroll !important;
}

.background-canvas {
  display: none !important;
}

/* Top Navigation */
.top-nav-projects {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border-bottom: none;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.top-nav-projects.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.top-nav-projects .nav-container {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.top-nav-projects .nav-link {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: 300;
  color: #2a2a2a;
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.top-nav-projects .nav-link:visited {
  color: #2a2a2a;
  text-decoration: none;
}

.top-nav-projects .nav-link:hover {
  color: #000000;
  text-decoration: none;
}

/* Page Notice */
.page-notice {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: none;
}

.page-notice p {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  font-weight: 300;
  color: #2a2a2a;
  line-height: 1.5;
  margin: 0;
}

.notice-link {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: #000000;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.notice-link:hover {
  color: #3a3a3a;
}

/* Projects Gallery */
.projects-gallery {
  min-height: 100vh;
  padding: 5rem 2rem 3rem 2rem;
  position: relative;
  z-index: 1;
}

.projects-gallery .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

/* Gallery Grid - Datasheet Layout */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 0;
  border: 1px solid #000000;
}

/* Project Card - Datasheet Box Style */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #ffffff;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  text-decoration: none;
  transition: background-color 0.2s ease;
  overflow: hidden;
}

.project-card:hover {
  background-color: #f8f8f8;
}

/* Ensure visited links don't change color */
.project-card:visited .project-title {
  color: #000000 !important;
}

.project-card:visited .project-date {
  color: #555555 !important;
}

.project-card:visited .project-keywords {
  color: #3a3a3a !important;
}

/* Project Image Wrapper */
.project-image-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 0;
  border-bottom: 1px solid #000000;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.2) contrast(1.1);
}

/* Project Info */
.project-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem;
  background: #ffffff;
}

.project-title {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #000000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.project-date {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid #000000;
  padding-top: 0.4rem;
}

.project-keywords {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.6rem;
  font-weight: 400;
  color: #333333;
  line-height: 1.4;
  margin-top: 0.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .projects-gallery {
    padding: 5rem 1.5rem 3rem 1.5rem;
  }

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

  .project-image-wrapper {
    height: 180px;
  }

  .project-info {
    padding: 0.85rem;
  }

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

  .project-date {
    font-size: 0.6rem;
  }

  .project-keywords {
    font-size: 0.55rem;
  }
}

@media (max-width: 480px) {
  .projects-gallery {
    padding: 5rem 1rem 3rem 1rem;
  }

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

  .project-image-wrapper {
    height: 200px;
  }

  .project-info {
    padding: 0.85rem;
  }

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

  .project-date {
    font-size: 0.6rem;
  }

  .project-keywords {
    font-size: 0.55rem;
  }
}
