/* 1. Global Resets & Modern Typography */
:root {
  --primary-color: #2c3e50; /* Deep Slate */
  --accent-color: #3498db;  /* Soft Blue */
  --bg-color: #f8f9fa;
  --text-color: #333;
  --header-font: 'Helvetica Neue', Arial, sans-serif;
}

body {
  margin: 0;
  font-family: var(--header-font);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* 2. Grid Container */
#site-container {
  display: grid;
  grid-template-areas:
    "header"
    "sidebar"
    "main"
    "footer";
  grid-template-columns: 1fr;
  min-height: 100vh;
}

/* 3. Header Styling */

header {
  grid-area: header;
  background: black;
  color: white;
  border-bottom: 2px solid var(--primary-color);
  padding: 1rem 2rem;

  /* Create a 3-column grid for the header content */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; /* Vertically center everything */
}

/* Position the Navigation in the first column */
header nav {
  justify-self: start;
}

/* Position the Branding in the second (middle) column */
.branding {
  grid-column: 2;
  text-align: center; /* Centers the text inside the div */
}

/* Ensure Nav links stack vertically */
header nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

header h1 {
  margin: 0;
  color: white;
  font-size: 2rem;
  letter-spacing: 1px;
}

header img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

#tagline {
  font-size: 1.1rem;
  font-weight: 300;
  color: #cccccc;
}

/* 4. Main Content Area */
main {
  grid-area: main;
  padding: 2rem;
  background: white;
}

/* 5. Sidebar Styling */
#sidebar {
  grid-area: sidebar;
  padding: 2rem;
  background: #eee;
}

/* 6. Footer Styling */
footer {
  grid-area: footer;
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1rem;
}

/* 7. Responsive Desktop Layout */
@media (min-width: 900px) {
  #site-container {
    grid-template-areas:
      "header header"
      "sidebar main"
      "footer footer";
    grid-template-columns: 1fr 3fr; /* sidebar takes 25%, Main content takes 75% */
  }

  main {
    border-right: 1px solid #eee;
  }
}

/* Target only links inside the <main> tag */
main a {
  color: red;
  text-decoration: none;
}

/* Define what happens when you hover over a link */
main a:hover {
  color: DarkRed;          /* A slightly darker shade on hover */
}

/* Style for visited links so they don't turn purple */
main a:visited {
  color: red;
}

/* 8. Navigation Improvements */
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

nav a:hover {
  color: var(--accent-color);
}
