
/* ==========================================================================
   1. COLOR PALETTE DEFINITION (Change values here to change your whole site)
   ========================================================================== */
:root {
  --primary-color: #1b1c0f;      /* Dark slate blue for headers/navigation */
  --accent-color: #3498db;       /* Vibrant blue for links, active states, and buttons */
  -text-Primary: #E2E8F0;       /* Soft gray for clean, subtle borders */
 --bg-color: #1b1c0f;           /* Clean white background for main readability */
  --text-color: #94A3B8;         /* High-contrast near-black for mobile-friendly reading */
  --sidebar-bg: #161D26;         /* Light gray background to separate the aside content */
  --border-color: #c2c5ad;
    }

/* ==========================================================================
   2. GLOBAL STYLES & RESET
   ========================================================================== */
* {
  box-sizing: border-box;        /* Ensures padding doesn't break layout widths */
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;               /* Ideal font size for reading on phone screens */
}

/* Mobile-friendly flexible images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   3. SHARED HEADER & NAVIGATION
   ========================================================================== */
header {
  background-color: var(--primary-color);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;              /* Meets Google's mobile touch target size */
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
}

nav a:hover, nav a:focus {
  color: var(--accent-color);
}

.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* Points to a small, looping image of grain/noise texture */
  opacity: 0.05; /* Keeps it extremely subtle so text is still readable */
  pointer-events: none; /* Crucial: allows users to click through the overlay to tap links */
  z-index: 9999; /* Keeps the texture on top of all other elements */
}


/* ==========================================================================
   4. DESKTOP LAYOUT (Flexbox Structure)
   ========================================================================== */
.container {
  display: flex;
  flex-direction: row;           /* Side-by-side on computers */
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  gap: 30px;                     /* Gap between main content and aside sidebar */
}

main {
  flex: 3;                       /* Content takes up 3/4 of the width */
}

aside {
  flex: 1;                       /* Sidebar takes up 1/4 of the width */
  background-color: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  align-self: flex-start;        /* Prevents the sidebar from stretching infinitely */
}

/* ==========================================================================
   5. MOBILE-RESPONSIVE MEDIA QUERY
   ========================================================================== */
@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;      /* Stacks content vertically on tablet/phone */
    gap: 20px;
    padding: 0 15px;
  }

  nav {
    flex-direction: column;      /* Stack menu links vertically on phone */
    gap: 10px;
    text-align: center;
  }

  main, aside {
    width: 100%;                 /* Forces full-width stretching on phones */
  }
  .poetry-headline {
    color: #E2E8F0 !important; /* Forces this specific color to win */
  }
}
