:root {
  --bg: #fafafa;
  --fg: #111;
  --muted: #777;
  --muted-light: #999;
  --accent: #ca2017;
  --border: #eaeaea;
  --code-bg: #eee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 1.6em 0 0.6em;
}

/* ---------- Header ---------- */

.site-header {
  background: #fff;
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.banner-link {
  text-decoration: none;
  color: inherit;
}

.site-title {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--fg);
}

.site-tagline {
  margin: 0.4rem 0 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
}

/* ---------- Layout ---------- */

.site-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  gap: 3.5rem;
  align-items: flex-start;
}

.content {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 780px) {
  .site-wrap {
    flex-direction: column;
    padding: 1.75rem 1.25rem 2.5rem;
    gap: 2.5rem;
  }
}

/* ---------- Sidebar / widgets ---------- */

.sidebar {
  flex: 0 0 280px;
  width: 280px;
}

@media (max-width: 780px) {
  .sidebar {
    width: 100%;
    flex: none;
  }
}

.widget {
  margin-bottom: 2.25rem;
}

.widget-title {
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  font-family: 'Lato', Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin: 0 0 1rem;
  padding-bottom: 3px;
  text-transform: uppercase;
}

.widget p {
  margin: 0 0 0.8em;
  font-size: 0.95rem;
  color: #333;
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li {
  font-family: 'Lato', Helvetica, sans-serif;
  font-size: 0.9rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  color: #333;
}

.widget li:last-child {
  border-bottom: none;
}

.widget li a {
  color: #333;
  text-decoration: none;
}

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

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
}

.copyright {
  margin: 0;
  color: var(--muted-light);
  font-family: 'Lato', Helvetica, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* ---------- Post meta ---------- */

.post-meta {
  font-family: 'Lato', Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted-light);
  margin: 0.6em 0 1.4em;
}

.post-meta a {
  color: var(--muted-light);
  text-decoration: none;
}

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

.post-meta .cat a {
  color: var(--accent);
}

/* ---------- Featured images ---------- */

.featured-image {
  margin: 0 0 1.75rem;
}

.featured-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
}

/* ---------- Post list (homepage / archives) ---------- */

.post-summary {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.post-summary:last-child {
  border-bottom: none;
}

.post-summary h2 {
  margin-top: 0;
  font-size: 1.9rem;
}

.post-summary h2 a {
  color: var(--fg);
  text-decoration: none;
}

.post-summary h2 a:hover {
  color: var(--accent);
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  border: 1px solid var(--fg);
  padding: 0.6em 1.5em;
  font-family: 'Lato', Helvetica, sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
}

.read-more:hover {
  background: var(--fg);
  color: #fff;
}

/* ---------- Single post ---------- */

.post-header h1 {
  margin-top: 0;
  font-size: 2.4rem;
}

.post-content {
  font-size: 1rem;
}

.post-content p,
.post-content ul,
.post-content ol {
  margin: 0 0 1.3em;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.post-content figure {
  margin: 1.8em 0;
}

.post-content figcaption {
  margin-top: 0.5em;
  font-family: 'Lato', Helvetica, sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: 'Lato', Helvetica, sans-serif;
  font-size: 0.9rem;
}

.post-content code {
  background: var(--code-bg);
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: Menlo, Monaco, monospace;
}

.post-content pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
}

.post-content pre code {
  background: none;
  padding: 0;
}

/* ---------- Page (About, etc.) ---------- */

.page h1 {
  margin-top: 0;
}
