/* Modern Reset & Variables */
:root {
  --color-primary: #16a34a;
  --color-primary-hover: #15803d;
  --color-bg: #f9fafb;
  --color-card-bg: #ffffff;
  --color-text-main: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 0.5rem;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-main);
  margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; letter-spacing: -0.025em; }
h2 { font-size: 1.875rem; letter-spacing: -0.025em; }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1.25rem; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-hover);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  background-color: var(--color-card-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header p {
  margin: 0;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text-main);
}

.header a {
  color: inherit;
}

.nav .list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0; /* Override default list margin */
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

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

/* Main Content */
.main {
  flex: 1;
  padding: 3rem 0;
}

.content {
  max-width: 800px;
  margin: 0 auto;
}

.article {
  margin-bottom: 3rem;
}

.article h1 {
  margin-bottom: 0.5rem;
}

/* Lists & Grid */
.list {
  list-style: none;
  padding: 0;
}

.list--posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.item--post {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.item--post:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.item--post a {
  display: block;
  padding: 1.25rem;
  color: var(--color-text-main);
  font-weight: 500;
  height: 100%;
  display: flex;
  align-items: center;
}

.item--post.bold a {
    font-weight: 700;
}

/* State/City Specifics */
.state-abbr {
  color: var(--color-text-muted);
  font-weight: normal;
  margin-left: 0.25rem;
}

/* Footer */
.footer {
  background-color: var(--color-card-bg);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: auto;
  color: var(--color-text-muted);
  text-align: center;
  font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .header .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .list--posts {
    grid-template-columns: 1fr;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
}

/* Utility/Legacy Support */
hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

.typeset p {
  margin-bottom: 1.25rem;
}

.typeset ul, .typeset ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

/* Tagline styling hack if it was a p tag in PHP */
.article > p:first-of-type {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}
