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.75rem;
  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;
}



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




/* 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);
}







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




/* ========================= */
/* 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;
}



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


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

.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(var(--rgb-text), 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;
  border-bottom: 1px solid rgba(var(--rgb-text), 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;
  text-transform: uppercase;
}

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

.a-title {
  font-family: 'SF Pro Display', sans-serif;
  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);
}

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

@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;
  }

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

  /* 3. Re-align the action link */
  .a-action {
    justify-content: flex-start;
    text-align: left;
    margin-top: 0.5rem;
  }
}

/* ========================================== */
/* DARK MODE TEXTURE REPAIR                   */
/* ========================================== */

html[data-theme="dark"] body {
  /* We switch from 'multiply' to 'screen' or 'overlay' for dark surfaces */
  background-blend-mode: overlay;

  /* We dim the texture so it doesn't create that white 'vibrating' look */
  opacity: 1;
}

/* If the pattern is still too bright, we target the body background specifically */
html[data-theme="dark"] {
  background-image: linear-gradient(rgba(28, 28, 26, 0.97), rgba(28, 28, 26, 0.97)),
                    url("https://www.transparenttextures.com/patterns/p6.png");
}
