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: scroll; 
  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 & Hero             */
/* ========================= */

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

.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); }




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




/* ========================= */
/* Filters                   */
/* ========================= */

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem; 
  margin-bottom: 1rem; /* CHANGED: Was 4rem, now matches design.css */
  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; 
  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); 
}



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




/* ========================= */
/* Article Grid List         */
/* ========================= */

.article-list {
  display: flex;
  flex-direction: column;

}

.article-row {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 2rem;
  padding: 2rem 0; /* CHANGED: Was 3rem 0, now matches design.css */
  border-bottom: 1px solid rgba(26, 26, 26, 0.2);
  text-decoration: none;
  color: var(--text-color);
  transition: opacity 0.4s ease; 
}


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

.article-list .article-row:hover {
  opacity: 1;
}

/* The left metadata column */
.a-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-family: 'iA Writer Duospace', monospace;
}

.a-num {
  font-size: 0.9rem;
  opacity: 0.5;
}

.a-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 0.05em;
  margin-bottom: -1rem;
}

/* The center content column */
.a-core {
  display: flex;
  flex-direction: column;
  gap: -0.1rem;
}

.a-title {
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
  margin-bottom: -0.1rem;
}

.article-row:hover .a-title {
  color: var(--accent-color);
}

.a-excerpt {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.7;
  max-width: 600px;
}

/* The right action column */
.a-action {
  font-family: 'iA Writer Duospace', monospace;
  font-size: 0.85rem;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  opacity: 0.5;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.article-row:hover .a-action {
  opacity: 1;
  color: var(--accent-color);
}

.a-action .arrow {
  display: inline-block;
  margin-left: 0.3rem;
  transition: transform 0.3s cubic-bezier(0.45, 0, 0.55, 1);
}

.article-row:hover .arrow {
  transform: translate(3px, -3px); /* Kinetic nudge */
}




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



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

@media (max-width: 800px) {


  /* 2. Scale down the massive article titles slightly for phones */
  .a-title {
    font-size: 1.8rem;
  }

  /* 3. Re-align the 'Read on Medium' link */
  /* By default it was pinned to the right (flex-end). On mobile, it looks better on the left. */
  .a-action {
    justify-content: flex-start;
    text-align: left;
    margin-top: 0.5rem;
  }
}

@media (max-width: 800px) {
  /* 1. Collapse the 3-column grid into a vertical stack */
  .article-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem 0; /* CHANGED: Was 2.5rem 0 */
  }
  /* ... rest of the mobile CSS remains exactly the same ... */



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



