/* =========================================
   Variables
   ========================================= */
:root {
  /* Colors */
  --clr-bg-fallback: #263b4d;
  --clr-text-dark: #1c1c1c;
  --clr-text-light: #151515;
  --clr-white: #ffffff;
  --clr-accent: #333333; /* Good for hover states */

  /* Typography */
  --ff-logo: "Smythe", system-ui, sans-serif;
  --ff-nav: "Roboto", sans-serif;
  --ff-body: "Source Sans 3", sans-serif;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--clr-white);
  color: var(--clr-text-dark);
}

/* Add this to keep your site centered on large screens */
.container {
  min-height: 100vh;
}

/* =========================================
   Navigation
   ========================================= */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5em 1em;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 30px;
  height: 30px;
}

.logo h1 {
  font-size: 1.1rem;
  font-family: var(--ff-logo);
  font-weight: bold;
}

nav ul {
  display: flex;
  gap: 15px; /* Increased slightly for better tap targets on mobile */
  list-style: none;
}

nav ul li a {
  font-size: 0.85rem;
  font-family: var(--ff-nav);
  text-decoration: none;
  color: var(--clr-text-dark);
  font-weight: 700;
  transition: color 0.2s ease; /* Smooth fade effect */
}

/* Fixed Layout Shift: Don't change sizes on hover */
nav ul li a:hover {
  text-decoration: underline;
  color: var(--clr-accent);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
  min-height: 80vh; /* Changed from height to min-height */
  padding: 2em 1em; /* Adjusted horizontal padding to match grid */
  gap: 1em;
  align-items: center;
}

.hero h2 {
  font-size: 8vw; /* Slightly larger base for small phones */
  font-family: var(--ff-nav);
  line-height: 1.2;
  color: var(--clr-text-dark);
}

.hero h3 {
  font-size: 1rem;
}

.hero p {
  font-size: 1rem;
  font-family: var(--ff-body);
  color: var(--clr-text-light);
  max-width: 600px;
  line-height: 1.5; /* Better readability */
}

.hero img {
  width: 100%;
  aspect-ratio: 2 / 1; /* Same as 4/2, just cleaner math */
  object-fit: cover;
  border-radius: 5px;
  margin-top: 1em; /* Add some breathing room above the image */
}

/* =========================================
   Article Sections (Start/End)
   ========================================= */
.start,
.end {
  display: flex;
  flex-direction: column;
  gap: 1em; /* Replaced space-around with gap for predictable spacing */
  padding: 2em 1em;
}

/* =========================================
   Main Content (Cards)
   ========================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2em;
  padding: 3em 1em;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  background-color: var(--clr-white);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}

.card-date {
  font-family: var(--ff-nav);
  font-size: 0.75rem;
  color: #777;
  text-transform: uppercase;
  margin-top: 0.5em;
}

.card-title {
  font-family: var(--ff-nav);
  font-size: 1.25rem;
  color: var(--clr-text-dark);
  font-weight: bold;
}

.card-excerpt {
  font-family: var(--ff-body);
  font-size: 0.95rem;
  color: #444;
  line-height: 1.4;
}

/* =========================================
   Footer
   ========================================= */
footer {
  text-align: center;
  padding: 2em 1em;
  font-family: var(--ff-body);
  font-size: 0.8rem;
  color: #777;
  background-color: #202020;
}

footer p a {
  color: var(--clr-white);
  text-decoration: none;
  font-weight: bold;
}

/* =========================================
   Media Queries
   ========================================= */
/* Tablet & Desktop Constraints */
@media (min-width: 768px) {
  .hero h2 {
    font-size: 2.5rem; /* Stop text from growing infinitely */
  }
}

@media (min-width: 375px) {
  nav ul {
    gap: 20px;
  }
}
