html, body {
  width: 100%;
  min-height: 100vh;
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-y: auto; 
  overflow-x: hidden;
}


/* Premium Static Paper Texture */
body {
  background-image: url("https://www.transparenttextures.com/patterns/p6.png");
  background-repeat: repeat;
  background-attachment: fixed;
  background-blend-mode: multiply;
}



/* =========================================================================== */



/* ========================= */
/* Navbar Menu Toggle        */
/* ========================= */

.menu-btn {
  font-family: 'iA Writer Duospace', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-color);
  background: transparent;
  border: none;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
  opacity: 0.8;
  padding: 0; /* Resets default button padding */
}

.menu-btn:hover {
  color: var(--accent-color);
  opacity: 1;
}



/* =========================================================================== */




/* ========================= */
/* Full-Screen Index Overlay */
/* ========================= */

.index-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* Premium paper background */
  background-color: var(--bg-color);
  background-image: url("https://www.transparenttextures.com/patterns/p6.png");
  background-repeat: repeat;
  background-attachment: fixed;
  background-blend-mode: multiply;
  
  /* Sits just underneath the z-index: 1000 navbar */
  z-index: 999; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--global-padding);
  
  /* Slides up and hides by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.45, 0, 0.55, 1), visibility 0.4s;
}

/* The Active State when toggled */
.index-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.overlay-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.overlay-label {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  display: block;
}



/* =========================================================================== */




/* ========================= */
/* Massive Typographic Links */
/* ========================= */

.massive-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.giant-link {
  font-family: 'SF Pro Display', sans-serif;
  font-size: clamp(3.5rem, 8vw, 8rem); 
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text-color);
  text-decoration: none;
  /* Smoothed out to exactly match your Writing page hover timings */
  transition: opacity 0.4s ease, color 0.4s ease;
  width: max-content;
}

/* Focus Hover Effect (Smooth Fade, No Movement) */
.massive-nav:hover .giant-link {
  opacity: 0.3; /* Gently dims the un-hovered links */
}

.massive-nav .giant-link:hover {
  opacity: 1;
  color: var(--accent-color);
  /* The jarring transform: translateX has been removed */
}

/* Overlay Utility Footer */
.overlay-footer {
  margin-top: 5rem;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(26, 26, 26, 0.2);
  padding-top: 2rem;
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.9rem;
}

.overlay-footer a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.overlay-footer a:hover {
  color: var(--accent-color);
}




/* =========================================================================== */




/* ========================= */
/* Layout System             */
/* ========================= */

.content {
  padding: 8rem var(--global-padding) 6rem var(--global-padding);
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

.view-section {
  display: none; 
  width: 100%;
}

.view-section.active {
  display: block;
}



/* =========================================================================== */




/* ========================= */
/* View 1: The Index List    */
/* ========================= */

/* Massive Hero Header */
.page-hero {
  font-size: clamp(3.5rem, 12vw, 12rem); 
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text-color);
  margin: 0 0 2rem 0; 
}

.mono-kicker {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-color); 
  letter-spacing: 0.15em;
}

.mono-intro {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.8;
}

.accent-mark {
  color: var(--accent-color);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem; 
  margin-bottom: 1rem;
  font-family: 'iA Writer Duospace', monospace;
}

.filter-buttons button {
  font-family: inherit; 
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(26, 26, 26, 0.2); 
  color: var(--text-color);
  padding: 0 0 0.3rem 0; 
  font-size: 0.95rem; 
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-buttons button:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.filter-buttons button.active {
  font-weight: 700;
  color: var(--accent-color);
  border-bottom-color: rgba(200, 90, 50, 0.3); 
}

.filter-buttons button.active:hover {
  border-bottom-color: var(--accent-color);
}

.project-list {
  display: flex;
  flex-direction: column;
}

.project-row {
  display: flex;
  align-items: baseline;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  font-family: 'iA Writer Duospace', monospace;
}

/* Focus Hover Effect */
.project-list:hover .project-row {
  opacity: 0.3;
}

.project-list .project-row:hover {
  opacity: 1;
  color: var(--accent-color);
  padding-left: 0; /* Strictly aligned to the grid */
}

.p-title {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 2.5rem;
  font-weight: 600;
  flex-grow: 1;
  letter-spacing: -0.02em;
}

.p-tag {
  font-size: 0.8rem;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}



/* =========================================================================== */




/* ========================= */
/* View 2: Project Detail    */
/* ========================= */

.back-link {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.9rem;
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  margin-bottom: 3rem;
  display: inline-flex;
  transition: opacity 0.3s ease;
}

.back-link:hover { opacity: 0.7; }

.project-content {
  display: none;
  max-width: 900px;
  margin: 0 auto;
}

.project-content.active {
  display: block;
}

/* Brutalist Images */
.project-content img {
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
  border-radius: 0; 
}

/* THIS is the only sans-serif text allowed */
.project-heading {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.project-metadata {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
  padding-bottom: 1rem;
}

/* Force paragraph text to monospace */
.project-brief {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 1rem; /* Slightly smaller to balance the wider monospace characters */
  line-height: 1.6;
  margin-bottom: 3rem;
}

.project-brief p { margin-bottom: 0.8rem; }

/* Force ALL subheaders to be uppercase monospace metadata */
.project-content h3 {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text-color);
  opacity: 0.5; 
}

/* Spec Sheet Grid */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 4rem 0;
  padding: 2rem 0;
  border-top: 1px solid rgba(26, 26, 26, 0.2);
  border-bottom: 1px solid rgba(26, 26, 26, 0.2);
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.project-grid1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 4rem 0;
  padding: 2rem 0;

  border-bottom: 1px solid rgba(26, 26, 26, 0.2);
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.clean-list {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 3rem;
  padding-left: 1rem;
}

figure { margin: 4rem 0; text-align: center; }
figcaption {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: -1rem;
  text-align: left;
}

.project-links a {
  font-family: 'iA Writer Duospace', monospace;
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-color);
  padding-bottom: 0.2rem;
  font-weight: 700;
}




/* =========================================================================== */




/* ========================= */
/* Mobile Adjustments        */
/* ========================= */

@media (max-width: 800px) {
  /* 1. Force the Flexbox to stack vertically instead of horizontally */
  .project-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.8rem !important; /* Adds a clean gap between the title and the tag */
    padding: 2rem 0; 
  }

  /* 2. Scale down the massive typography slightly so it doesn't wrap awkwardly */
  .p-title {
    font-size: 1.6rem;
    line-height: 1.2;
  }
  
  .p-tag {
    margin-top: 0.2rem;
  }
}





/* ========================= */
/* Special CSS      */
/* ========================= */


.artifact-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 1.5rem;
      margin: 1.5rem 0;
    }
    
    .artifact-card {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

       .artifact-img {
      width: 100%;
      height: auto; /* This tells the browser to respect the image's natural height */
      border: 1px solid rgba(26, 26, 26, 0.15);
      
      /* REMOVED: aspect-ratio, object-fit, filter, and transition */
    }

.artifact-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 1.5rem;
      margin: 1.5rem 0;
    }
    
    .artifact-card {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    
.artifact-caption {
      font-family: 'iA Writer Duospace', monospace;
      font-size: 0.75rem;
      color: var(--text-color);
      opacity: 0.6;
      line-height: 1.4;
    }
