/* --- Global --- */
html, body {
  background-color: #000;
  color: #fff;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* --- Header (same as index.html) --- */
header {
  position: fixed;
  top: 0.7rem;
  left: 0.7rem;
  display: flex;
  justify-content: left;
  align-items: center;
  z-index: 2;
  transform: none; /* Ensure it doesn’t shift horizontally */
}

.logo {
  max-width: 25px;
  height: auto;
}

/* --- Title (year) --- */
.page-title {
  text-align: center;
  margin-top: 4rem;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* --- Projects Grid (responsive) --- */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 2000px;
  margin: 1rem auto;
  padding: 1rem;

  /* Center the grid content regardless of how many items */
  justify-content: center;
  align-content: start;
}

/* --- Desktop (large screens): 6–9 columns depending on width --- */
@media (min-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 240px));
  }
}

/* --- Tablet (landscape & portrait): 3–6 columns --- */
@media (min-width: 768px) and (max-width: 1199px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 200px));
  }
}

/* --- Phone horizontal (landscape): 2–3 columns --- */
@media (max-width: 767px) and (orientation: landscape) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 180px));
  }
}

/* --- Phone vertical (portrait): 1 column --- */
@media (max-width: 767px) and (orientation: portrait) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Project Box --- */
.project-box {
  position: relative;
  width: 240px; /* fixed width for consistent size */
  aspect-ratio: 4 / 2.5;
  overflow: hidden;
}

/* Adjust size for tablet */
@media (max-width: 1199px) {
  .project-box {
    width: 200px;
    aspect-ratio: 4 / 2.5;
  }
}

/* Adjust size for phone */
@media (max-width: 767px) {
  .project-box {
    width: 100%;
    aspect-ratio: 1 / 0.6;
  }
}

/* --- Project Images --- */
.project-box img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.4s ease;
}

.project-box:hover img {
  filter: brightness(1.2); /* brighter on hover */
}

/* --- Footer --- */
footer {
  position: fixed;
  bottom: 0rem;
  right: 0.5rem;
  width: 100%;
  text-align: right;
  font-weight: 300;
  font-size: 0.7rem;
  opacity: 0.8;
  z-index: 2;
}

/* --- Animation --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
