:root {
  color-scheme: light;
  --bg: #f4f4f4;
  --panel: #ffffff;
  --text: #333333;
  --muted: #6b7280;
  --primary: #2c3e50;
  --secondary: #34495e;
  --accent: #e74c3c;
  --accent-dark: #c0392b;
  --border: #e5e7eb;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

header {
  background: var(--primary);
  color: #ffffff;
  padding: 1.75rem 1.5rem;
  text-align: center;
}

header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

header p {
  margin: 0;
  color: #d1d5db;
  font-size: 1.05rem;
}

nav {
  background: var(--secondary);
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 1rem;
  flex-wrap: wrap;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

nav a:hover,
nav a.active {
  background: var(--accent);
  color: #ffffff;
}

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

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.panel,
.main-content,
.sidebar,
.hero-card,
.archive-hero,
.sidebar-widget,
.post-preview,
.archive-item,
.article-shell {
  background: var(--panel);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.main-content,
.sidebar,
.article-shell {
  padding: 1.75rem;
}

.hero-card,
.archive-hero {
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.hero-card h2,
.archive-hero h2,
.section-title,
.article-shell h1 {
  color: var(--primary);
  margin-top: 0;
}

.hero-card p:last-child,
.archive-hero p:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header p,
.eyebrow,
.post-meta,
.sidebar-note,
.article-meta {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-list,
.archive-list,
.topic-list,
.related-list,
.article-links {
  display: grid;
  gap: 1rem;
}

.post-preview,
.archive-item {
  padding: 1.4rem;
  border: 1px solid var(--border);
}

.post-preview h3,
.archive-item h3,
.sidebar-widget h3 {
  margin-top: 0;
  color: var(--primary);
}

.post-preview h3 a,
.archive-item h3 a,
.text-link,
.read-more,
.article-links a,
.related-list a {
  color: var(--primary);
  text-decoration: none;
}

.post-preview h3 a:hover,
.archive-item h3 a:hover,
.text-link:hover,
.read-more:hover,
.article-links a:hover,
.related-list a:hover {
  color: var(--accent);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  background: #ecf0f1;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.82rem;
}

.read-more,
.button-link,
.promo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.button-link,
.promo-link {
  background: var(--accent);
  color: #ffffff;
}

.button-link:hover,
.promo-link:hover {
  background: var(--accent-dark);
}

.read-more {
  padding: 0;
  min-height: auto;
  color: var(--accent);
}

.sidebar {
  display: grid;
  gap: 1rem;
}

.sidebar-widget {
  padding: 1.4rem;
}

.sidebar-widget h3 {
  margin-bottom: 0.75rem;
}

.sidebar-widget p:last-child,
.sidebar-widget ul:last-child {
  margin-bottom: 0;
}

.sidebar-widget ul,
.content-list,
.article-links {
  margin: 0;
  padding-left: 1.2rem;
}

.article-shell h1 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.article-shell h2 {
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-shell p {
  font-size: 1.04rem;
  color: #444444;
}

.article-meta {
  margin-bottom: 1.5rem;
}

.callout {
  border-left: 4px solid var(--accent);
  background: #fff7f5;
  padding: 1rem 1rem 1rem 1.1rem;
  border-radius: 10px;
  margin: 1.25rem 0;
}

.footer-note,
footer {
  text-align: center;
}

footer {
  margin-top: 2.5rem;
  padding: 1.8rem 1rem;
  background: var(--primary);
  color: #cbd5e1;
}

@media (max-width: 900px) {
  .page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }

  .main-content,
  .sidebar,
  .article-shell,
  .hero-card,
  .archive-hero,
  .sidebar-widget,
  .post-preview,
  .archive-item {
    padding: 1.15rem;
  }

  nav a {
    padding: 0.5rem 0.9rem;
  }
}
