/* RESET & GENERAL */
html, body {
  background: #FAF7F2;
  font-family: 'Urbanist', sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* HEADER */
#header {
  align-items: center;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: center;
  left: 0;
  padding: 10px 20px;
  position: fixed;
  right: 0;
  top: 0;
  width: calc(100% - 40px); 
  z-index: 10;
}

#header-img {
  width: 300px; 
  max-width: 100%;
  height: auto;
}

.site-title {
  font-size: 1.8rem;
  margin: 0;
  font-weight: normal;
}

/* NAV MENU */
.nav-menu ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-menu ul li a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  font-size: 1rem;
  white-space: nowrap;
}

.nav-menu ul li a:hover {
  color: #663300;
}

/* DROPDOWN MENU */
.dropdown {
  position: relative;
}

.dropbtn {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu ul .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #FAF7F2;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
  border-radius: 6px;
  padding: 10px 0;
  z-index: 100;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.nav-menu ul .dropdown-content {
  flex-wrap: nowrap;
}

.nav-menu ul .dropdown:hover .dropdown-content {
  display: flex; 
}

.dropdown-content li a {
  font-weight: normal;
  padding: 5px 15px;
  display: block;
}

/* LOGO */
#logo-container {
  position: fixed;
  top: 125px;
  bottom: 50px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

#logo-container img {
  max-width: 60vw;
  max-height: 100%; 
  width: auto;
  object-fit: contain;
}

/* ABOUT MODAL OVERLAY */
#about-overlay {
  position: fixed;
  inset: 0; 
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* ABOUT - Box  */
#about-box {
  background: #FAF7F2;
  color: #1f1f1f;
  width: 60vw;
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
  border-radius: 8px;
  position: relative;
}

/* ABOUT - Content Layout */
.about-content {
  display: flex;
  align-items: center; 
  gap: 25px;
  margin-top: 15px;
}

#about-img {
  width: 450px;
  max-width: 100%;
  height: auto;
  flex-shrink: 0;
}

/* ABOUT - Close button*/
#about-box #close-about {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* FOOTER */
#footer {
  background: transparent;
  bottom: 0;
  color: #000000;
  padding: 8px 0;
  position: fixed;
  width: 100%;
  z-index: 10;
}

.footer-content {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
}

.footer-content a {
  color: #000000;
  font-size: 24px;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-content a:hover {
  color: #663300;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  #header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }

  #logo-container img {
    max-width: 50vw;
  }

  .site-title {
    font-size: 1.5rem;
  }

  #about-box {
    width: 80vw;
    max-height: 70vh;
  }

  .dropdown-content {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    background-color: transparent;
    box-shadow: none;
    padding: 10px 0 0 0;
  }
}

#project-overlay {
  position: fixed;
  inset: 0; 
  background: rgba(0, 0, 0, 0.4); 
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#project-box {
  background: #FAF7F2; 
  color: #1f1f1f;
  width: 80vw;
  max-width: 1000px;
  max-height: 85vh;
  padding: 20px 40px;
  border-radius: 8px;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
}

#close-project {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

#project-title {
  margin-top: 10px;
  margin-bottom: 20px;
  font-weight: 300;
}

#project-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  overflow-y: auto; 
  padding-right: 10px; 
  flex-grow: 1; 
}

#project-image-grid img {
  border-radius: 4px;
  height: 100%;
  max-height: 75%; 
  max-width: 100%; 
  object-fit: contain;
  width: 100%;
}

/* --- LAYOUT FOR 1 OR 2 IMAGES --- */
#project-image-grid.few-images {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

#project-image-grid.few-images img {
  width: auto; 
  max-width: 100%;      
  max-height: 60vh; 
  object-fit: contain;
}

#project-image-grid::-webkit-scrollbar {
  width: 8px;
}
#project-image-grid::-webkit-scrollbar-track {
  background: transparent; 
}
#project-image-grid::-webkit-scrollbar-thumb {
  background: #ddd; 
  border-radius: 4px;
}
#project-image-grid::-webkit-scrollbar-thumb:hover {
  background: #aaa; 
}

@media (max-width: 768px) {
  #project-box {
    width: 90vw;
    padding: 20px;
  }
  #project-image-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* LIGHTBOX OVERLAY */
#lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85); /* Darker background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000; /* Sits on top of the project modal */
}

#lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#close-lightbox {
  position: absolute;
  top: 15px;
  right: 25px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

#close-lightbox:hover {
  color: #ccc;
}

#project-image-grid img {
  cursor: zoom-in; 
}