/* Color scheme derived from site name hash */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #60a5fa;
  --text: #1a1a2e;
  --text-light: #666;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --header-bg: #1a1a2e;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-alt);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Header */
header {
  background: var(--header-bg);
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: white;
}

.logo span {
  color: var(--primary-light);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: white;
  font-weight: 500;
  transition: color 0.3s;
}

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

/* Main container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Hero section */
.hero {
  position: relative;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  padding: 3rem 2rem;
  color: white;
}

.hero-category {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.hero-excerpt {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-top: 1rem;
}

/* Content layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.article-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.article-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.article-card-content {
  padding: 1.5rem;
}

.category-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-card h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.article-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-section {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.sidebar-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

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

.trending-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--bg-alt);
  display: flex;
  gap: 1rem;
}

.trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-light);
  flex-shrink: 0;
}

.trending-item a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
  transition: color 0.3s;
}

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

/* Category page */
.category-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.category-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.category-header p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Article page */
.article-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.article-header h1 {
  font-size: 2.5rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-weight: 800;
}

.article-header .category-badge {
  margin-bottom: 1.5rem;
}

.article-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.article-image {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 3rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.article-image img {
  width: 100%;
  height: auto;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.article-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.article-content p:last-child {
  margin-bottom: 0;
}

/* Related articles */
.related-articles {
  max-width: 900px;
  margin: 3rem auto;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.related-articles h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.back-link {
  display: inline-block;
  margin: 2rem 0;
  color: var(--primary);
  font-weight: 600;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--primary-dark);
}

/* Footer */
footer {
  background: var(--header-bg);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-light);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255,255,255,0.8);
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    height: 400px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

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

  .article-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  nav ul {
    gap: 1rem;
  }

  nav a {
    font-size: 0.9rem;
  }

  .article-header h1 {
    font-size: 2rem;
  }

  .article-content {
    padding: 2rem 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-header h1 {
    font-size: 2rem;
  }
}
