:root {
  --color-bg: #fbfaf7;
  --color-surface: #ffffff;
  --color-text: #202020;
  --color-muted: #66625d;
  --color-border: #ded8cf;
  --color-accent: #9f2d20;
  --color-accent-dark: #742116;
  --color-footer: #191816;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --shadow-soft: 0 18px 45px rgba(32, 32, 32, 0.08);
  --radius: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(159, 45, 32, 0.08), rgba(159, 45, 32, 0) 280px),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
}

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

a {
  color: var(--color-accent);
  text-underline-offset: 0.18em;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 24px;
  top: 16px;
  z-index: 20;
  transform: translateY(-180%);
  background: var(--color-text);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: rgba(251, 250, 247, 0.94);
  border-bottom: 1px solid var(--color-border);
}

.main-nav {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.links,
.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 0.96rem;
  font-weight: 650;
  text-decoration: none;
}

.links a:hover,
.links a.active {
  background: rgba(159, 45, 32, 0.1);
  color: var(--color-accent-dark);
}

.site-main {
  width: min(780px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.site-main.listing-page {
  width: min(980px, calc(100% - 40px));
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  max-width: 900px;
}

h2 {
  margin: 42px 0 16px;
  font-size: 1.8rem;
}

h3 {
  margin: 32px 0 12px;
  font-size: 1.35rem;
}

p,
blockquote,
figure,
form,
table {
  margin: 0 0 22px;
}

blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 4px 0 4px 20px;
  color: var(--color-muted);
  font-style: italic;
}

figure {
  margin: 34px 0;
}

.featured-image {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.featured-image img {
  display: block;
  width: 100%;
}

figcaption {
  color: var(--color-muted);
  font-size: 0.95rem;
  text-align: center;
}

.post-meta {
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.lede {
  color: var(--color-muted);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.35;
}

.media-embed {
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  box-shadow: var(--shadow-soft);
}

.media-embed iframe,
p > iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

hr {
  width: 90px;
  margin: 42px 0;
  border: 0;
  border-top: 3px solid var(--color-accent);
}

.site-main > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 26px 0;
  list-style: none;
}

.site-main > ul li {
  min-height: 58px;
}

.site-main > ul a {
  display: flex;
  height: 100%;
  align-items: center;
  padding: 16px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(32, 32, 32, 0.04);
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
}

.site-main > ul a:hover {
  border-color: rgba(159, 45, 32, 0.45);
  color: var(--color-accent-dark);
  transform: translateY(-1px);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

form {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

label {
  display: grid;
  gap: 6px;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

input,
textarea,
button {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius);
  font: inherit;
}

input,
textarea {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  background: #fff;
  color: var(--color-text);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

button {
  border: 0;
  padding: 12px 18px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--color-accent-dark);
}

.site-footer {
  background: var(--color-footer);
  color: #d9d3ca;
  padding: 30px 0;
}

.site-footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: #f1c5bc;
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .main-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .links {
    justify-content: flex-start;
  }

  .links a {
    padding: 0 10px;
  }

  .site-main {
    width: min(100% - 28px, 780px);
    padding-top: 38px;
  }

  .site-footer-inner {
    width: min(100% - 28px, 1120px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
