/* Why We Struggle - Minimal, Readable Stylesheet */

/* Inter - optimized for screen readability */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --bg-color: #fafafa;
  --text-color: #333;
  --text-muted: #666;
  --link-color: #2563eb;
  --link-hover: #1d4ed8;
  --border-color: #e5e5e5;
  --max-width: 680px;
}

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

html {
  font-size: 18px;
  line-height: 1.7;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 0 1.5rem;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 0;
}

/* Header */
header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-title a {
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--text-color);
  flex-shrink: 0;
}

.tagline {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
}

/* Navigation */
nav {
  margin-top: 1rem;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-right: 1.5rem;
  font-size: 0.9rem;
}

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

/* Main Content */
main {
  min-height: 60vh;
}

/* Category Section on Homepage */
.category-section {
  margin-bottom: 2.5rem;
}

.category-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.category-title a {
  color: inherit;
  text-decoration: none;
}

.category-title a:hover {
  color: var(--link-color);
}

.post-list {
  list-style: none;
}

.post-list li {
  margin-bottom: 0.5rem;
}

.post-list a {
  color: var(--link-color);
  text-decoration: none;
}

.post-list a:hover {
  text-decoration: underline;
}

/* Category Page */
.category-intro {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.posts-feed {
  margin-top: 2rem;
}

.post-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.post-item:first-child {
  padding-top: 0;
}

.post-item h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.post-item h3 a {
  color: var(--text-color);
  text-decoration: none;
}

.post-item h3 a:hover {
  color: var(--link-color);
}

.post-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Article Page */
article h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

article p {
  margin-bottom: 1.25rem;
}

article h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Ad Slots */
.ad-slot {
  background-color: #f0f0f0;
  border: 1px dashed #ccc;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Related Posts */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-posts h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Pagination */
.pagination {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.pagination a {
  color: var(--link-color);
  text-decoration: none;
  margin-right: 1rem;
}

.pagination a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-right: 1.5rem;
}

.footer-links a:hover {
  color: var(--text-color);
}

.related-sites {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.related-sites a {
  color: var(--text-muted);
  text-decoration: none;
}

.related-sites a:hover {
  color: var(--text-color);
}

.copyright {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Static Pages (About, Contact, etc.) */
.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.page-content p {
  margin-bottom: 1.25rem;
}

.page-content h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.page-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.page-content li {
  margin-bottom: 0.5rem;
}

/* Utility */
.text-muted {
  color: var(--text-muted);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */

@media (max-width: 600px) {
  /* Base adjustments */
  html {
    font-size: 16px;
  }

  body {
    padding: 0 1rem;
  }

  .container {
    padding: 1.5rem 0;
  }

  /* Header */
  header {
    padding: 2rem 0 1.5rem;
    margin-bottom: 1.5rem;
  }

  .site-title {
    font-size: 1.35rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  /* Navigation - wrap on mobile */
  nav {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  nav a {
    margin-right: 0;
    padding: 0.25rem 0;
    font-size: 0.85rem;
  }

  /* Article titles */
  article h1 {
    font-size: 1.5rem;
    line-height: 1.35;
  }

  article h2 {
    font-size: 1.1rem;
  }

  /* Category sections */
  .category-section {
    margin-bottom: 2rem;
  }

  .category-title {
    font-size: 1rem;
  }

  /* Post items - better touch targets */
  .post-list li {
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
  }

  .post-item {
    padding: 1rem 0;
  }

  .post-item h3 {
    font-size: 1rem;
  }

  .post-excerpt {
    font-size: 0.9rem;
  }

  /* Ad slots */
  .ad-slot {
    padding: 1.5rem 1rem;
    margin: 1.5rem 0;
  }

  /* Footer - stack links */
  footer {
    padding: 1.5rem 0;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .footer-links a {
    margin-right: 0;
  }

  .related-sites {
    margin-top: 1rem;
    gap: 0.5rem 1rem;
  }

  .copyright {
    margin-top: 1rem;
    padding-top: 0.75rem;
  }

  /* Page content */
  .page-title {
    font-size: 1.35rem;
  }

  .page-content h2 {
    font-size: 1.05rem;
  }

  .page-content ul {
    margin-left: 1.25rem;
  }
}

/* Touch-friendly improvements for all mobile devices */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  nav a,
  .post-list a,
  .footer-links a,
  .related-sites a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .post-item h3 a {
    display: block;
    padding: 0.25rem 0;
  }
}

/* Tablet adjustments */
@media (min-width: 601px) and (max-width: 768px) {
  html {
    font-size: 17px;
  }

  body {
    padding: 0 1.25rem;
  }
}
