/*
Theme Name: The Chronicle
Author: WordPress Expert Designer
Description: A sophisticated, editorial-style WordPress theme focused on typography and white space.
Version: 4.0
*/

:root {
  --bg-body: #f9f8f6; /* Cream Paper */
  --bg-header: #f9f8f6;
  --text-main: #1a1a1a;
  --text-muted: #555555;
  --accent-color: #c44d34; /* Burnt Orange / Clay */
  --border-color: #1a1a1a;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Source Sans Pro', sans-serif;
  --container-width: 1320px;
  --header-height: 120px;
}

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

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: grayscale(20%); /* Slight desaturation for vintage look */
  transition: filter 0.3s ease;
}

img:hover {
  filter: grayscale(0%);
}

ul { list-style: none; }

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

h1 { font-size: 4.5rem; letter-spacing: -1px; }
h2 { font-size: 3rem; letter-spacing: -0.5px; }
h3 { font-size: 2rem; }

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

.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }

/* Header - Editorial Style */
.site-header {
  padding: 2rem 0;
  background: var(--bg-header);
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.header-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-main);
  line-height: 1;
  border-bottom: 1px solid transparent;
}

.site-tagline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 2rem;
}

/* Navigation - Centered Split */
.main-navigation ul {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.main-navigation a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.main-navigation a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -15px;
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.3s ease;
}

.main-navigation a:hover::before {
  opacity: 1;
}

/* Hero Section - Minimal */
.hero-section {
  padding: 6rem 0 4rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.hero-desc {
  font-size: 1.4rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* Editorial Grid */
.posts-grid-wrapper {
  border-top: 1px solid var(--border-color);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* borders handled via children for consistent grid lines */
}

.post-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

.post-card:nth-child(3n) {
  border-right: none; /* Remove right border on last column */
}

.post-card:hover {
  background: #fff;
}

.post-thumbnail {
  margin-bottom: 1.5rem;
  overflow: hidden;
  aspect-ratio: 4/3;
}

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

.post-meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.post-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.post-excerpt {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.read-more-link {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border-color);
  align-self: flex-start;
  padding-bottom: 2px;
}

.read-more-link:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}

.pagination .page-numbers {
  padding: 2rem;
  border-right: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  min-width: 80px;
  text-align: center;
}

.pagination .page-numbers:first-child {
  border-left: 1px solid var(--border-color);
}

.pagination .current {
  background: var(--text-main);
  color: #fff;
}

/* Single Post */
.single-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.single-header {
  text-align: center;
  margin-bottom: 3rem;
}

.single-category {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
  display: block;
}

.single-title {
  font-size: 3.5rem;
  line-height: 1.1;
}

.single-date {
  margin-top: 1.5rem;
  display: block;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-heading);
}

.single-image {
  margin: 0 -100px 3rem; /* Breakout image */
  max-width: calc(100% + 200px);
  width: calc(100% + 200px);
}

.entry-content p {
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
}

.entry-content p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  float: left;
  line-height: 0.8;
  margin-right: 0.5rem;
  font-weight: 700;
}

.entry-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 2rem;
  margin: 3rem 0;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-style: italic;
  color: var(--text-main);
}

/* Footer */
.site-footer {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  background: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-column h4 {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.footer-menu li {
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.footer-menu a {
  font-weight: 600;
}

.footer-branding {
  text-align: center;
  grid-column: span 3;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.footer-branding .logo-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
}

/* 404 */
.error-404-content {
  text-align: center;
  padding: 8rem 0;
}

.big-404 {
  font-size: 10rem;
  font-weight: 900;
  font-family: var(--font-heading);
  line-height: 1;
  color: var(--text-muted);
  opacity: 0.2;
}

/* Responsive */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card:nth-child(2n) { border-right: none; }
  .post-card:nth-child(3n) { border-right: 1px solid var(--border-color); }
}

@media (max-width: 768px) {
  .site-header { padding: 1rem 0; }
  .header-layout { gap: 1rem; }
  .site-logo { font-size: 2rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card { border-right: none; padding: 1.5rem; }
  .single-image { margin: 0 0 2rem; max-width: 100%; width: 100%; }
  .hero-title { font-size: 3rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .pagination .page-numbers { padding: 1rem; min-width: 50px; }
  h1 { font-size: 2.5rem; }
}
