/* ==========================================================================
   Base & Global Styles (Mobile First)
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Unbounded";
  font-style: normal;
}

body {
  background-color: #ffffff;
}

/* ==========================================================================
   Typography (Mobile First)
   ========================================================================== */
a {
  font-family: "Unbounded";
  font-style: italic;
  font-weight: 400;
  font-size: 14px; /* Increased for better mobile readability */
  text-decoration: none;
  z-index: 10;
  color: black;
}

h1 {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 600;
  font-size: 50px;
  line-height: 50px;
  text-decoration: none;
  text-align:left;
  color: black;
  hyphens: auto;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

h2 {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 600;
  font-size: 30px;
  text-decoration: none;
  text-align:left;
  color: black;
  hyphens: auto;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

h3 {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  text-decoration: none;
  text-align:left;
  color: black;
  hyphens: auto;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

p {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 400;
  font-size: 14px; /* Increased for better mobile readability */
  text-decoration: none;
  text-align:left;
  color: black;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  white-space: normal;
}

dt {
  font-weight: 400;
  font-size: 14px; /* Increased for better mobile readability */
  color: black;
}

dd {
  font-weight: 400;
  font-size: 14px; /* Increased for better mobile readability */
  color: black;
  margin-left: 0;
  margin-bottom: 10px;
}

/* ==========================================================================
   Header & Navigation (Mobile First)
   ========================================================================== */
.navMenuBox {
  visibility: visible;
  position: fixed;
  height: 60px;
  width:100%;
  background-color: white;
  border-bottom-style: solid;
  border-width: 1px;
  border-color: black;
  z-index:1000;
}

/* Override italic style for header links */
.navMenuBox a {
  font-style: normal;
}

/* Mobile Hamburger Menu */
.navMenuSqu {
  cursor: pointer;
  float: right;
  height: 60px;
  width: 60px;
  border-bottom-style: solid;
  border-left-style: solid;
  border-width: 1px;
  border-color: black;
}

.navMenuBurger {
  cursor: pointer;
  margin-top: 30%;
  display: flex;
  justify-content: center;
  align-items: center;
  color:black;
  z-index: 1000;
}

/* Desktop Menu (hidden on mobile) */
.navMenuTextBox {
  width: 50%;
  height: 100%;
  padding: 20px;
  z-index: 1000;
}

.navMenuText {
  display: none;
}

.navMenuText a {
  color:black;
  font-size: 24px;
  padding: 15px;
  text-decoration: none;
  transition: color 0.3s;
}

.navMenuLinks {
  padding-left: 20px;
}

/* Fullscreen Mobile Menu */
.navMenuFull {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: white;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
  z-index: 1000;
}

.navMenuFull a {
  font-size: 24px;
  margin: 20px 0;
  text-decoration: none;
  color: black;
}

.navMenuFull.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Grid & Cards (Mobile First)
   ========================================================================== */
.cards {
  max-width: 100%;
  display: grid;
  gap: 10px;
  padding: 10px;
  padding-top: 80px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.cardImage {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.cardImage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
  
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: black;
  display: block;
  opacity: 0; /* Hidden on mobile/tablet by default */
  text-align: center;
  padding: 15px;
  z-index:10;
  transition: opacity 0.4s ease-in-out;
}

.empty {
  display: none;
}

.wide, .narrow {
  border-radius: 16px;
  height: 700px;
}
  
.intro {
  min-height: 250px;
  padding-left: 5px;
  padding-right: 5px;
  padding-bottom: 30px;
}

.notes {
  border-radius: 0;
  overflow: visible;
  padding: 5px;
}

.low {
  width: 100%;
  height: 100%;
  display: block;
  justify-content: center;
  align-items: left;
}

.backBtn {
  all: unset;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

.projectText {
  padding-top: 30px; /* Add spacing for mobile and tablet */
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  height: 50px;
  width: 100%;
  background-color: white;
  border-top-style: solid;
  border-width: 1px;
  border-color: black;
}

/* ==========================================================================
   Tablet Styles (min-width: 600px)
   ========================================================================== */
@media (min-width: 600px) {
  /* --- Typography --- */
  h1 { font-size: 60px; 
        line-height: 60px;}
  h2 { font-size: 40px; }
  h3 { font-size: 24px; }
  p { font-size: 15px; } /* Step up for tablet */
  a { font-size: 15px; }
  dt { font-size: 15px; }
  dd { font-size: 15px; }

  /* --- Navigation --- */
  .navMenuSqu {
    display: none;
  }

  .navMenuTextBox {
    width: 100%;
  }

  .navMenuText {
    display: inline;
    float: right;
  }

  .navMenuText a {
    font-size: 16px;
  }

  /* --- Grid & Cards --- */
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .overlay {
    padding: 15px;
  }
  
  .wide {
    grid-column: 1 / 5;
    height: 500px;
  }
  
  .intro {
    grid-column: 1 / 5;
    min-height: 350px;
  }

  .left {
    grid-column: 1 / 3;
    height: 500px;
  }

  .right {
    grid-column: 3 / 5;
    height: 500px;
  }

  .low {
    grid-column: 1 / 5;
  }
  
  .archive {
    grid-column: 1 / 5;
  }
}

/* ==========================================================================
   Desktop Styles (min-width: 900px)
   ========================================================================== */
@media (min-width: 900px) {
  /* --- Typography --- */
  h1 { font-size: 100px;
        line-height: 100px; }
  h2 { font-size: 80px; }
  h3 { font-size: 32px; }
  p { font-size: 16px; } /* Standard desktop size */
  a { font-size: 16px; }
  dt { font-size: 16px; }
  dd { font-size: 16px; }

  .projectText {
    padding-top: 75px;
    width: 75%;
  }

  /* --- Navigation --- */
  .navMenuLinks {
    padding-left: 100px;
  }

  /* --- Grid & Cards --- */
  .cards {
    grid-template-columns: repeat(5, 1fr);
  }

  .empty {
    display: block;
  }
  
  .wide {
    grid-column: 2 / 6;
    height: 700px;
  }
  
  .intro {
    grid-column: 2 / 6;
    min-height: 600px;
    padding-top: 160px;
    padding-bottom: 100px;
  }

  .left {
    grid-column: 2 / 4;
    height: 700px;
  }

  .right {
    grid-column: 4 / 6;
    height: 700px;
  }

  .notes {
    height: 700px;
    padding-top: 180px;
  }

  .low {
    grid-column: 2 / 6;
  }
  
  .lowText {
    padding-top:30px;
  }

  /* --- Card Hover Effects --- */
  .project-card .cardImage img {
    transition: transform 0.4s ease-in-out, filter 0.4s ease-in-out;
  }

  .project-card .overlay {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 20px;
  }

  .project-card .overlay h2,
  .project-card .overlay h3 {
    transform: translateX(-100%);
    transition: transform 0.5s ease-in-out;
  }

  .project-card:hover .cardImage img {
    transform: scale(1.1);
    filter: blur(0.5px);
  }

  .project-card:hover .overlay {
    opacity: 1;
  }

  .project-card:hover .overlay h2,
  .project-card:hover .overlay h3 {
    transform: translateX(0);
  }
  
  /* --- Footer --- */
  footer {
    height: 60px;
  }
}