:root {
  --bg: #f6f1ea;
  --bg-alt: #ece4d8;
  --surface: #ffffff;
  --text: #1f1f1f;
  --muted: #5c564d;
  --line: #d9cfbf;
  --accent: #7b6142;
  --accent-dark: #624d34;
  --max-width: 1160px;
  --radius: 18px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Roboto", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

a:hover,
a:focus {
  border-bottom: 1px solid var(--accent-dark);
}

.container {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

.narrow {
  max-width: 680px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(246, 241, 234, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.96rem;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--accent-dark);
}

.hero {
  padding: 90px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: start;
}

.eyebrow,
.section-label,
.card-tag {
  display: inline-block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

h1,
h2,
h3,
h4 {
  font-family: "Merriweather", Georgia, serif;
  line-height: 1.25;
  margin-top: 0;
  color: var(--text);
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

p {
  margin-top: 0;
  margin-bottom: 18px;
  color: var(--muted);
}

.hero-text {
  font-size: 1.12rem;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-dark);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.panel-card,
.card,
.theme-box,
.cta-box,
.favorites-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-card {
  padding: 24px;
}

.panel-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.section {
  padding: 72px 0;
}

.alt-bg {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-intro {
  max-width: 60ch;
}

.card-grid,
.theme-grid {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.card-grid {
  grid-template-columns: repeat(3, 1fr);
}

.theme-grid {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  padding: 24px;
}

.card-tag {
  margin-bottom: 12px;
}

.card p {
  min-height: 110px;
}

.card a {
  color: var(--accent-dark);
  font-weight: 700;
}

.card a:hover,
.card a:focus {
  text-decoration: underline;
}

.view-all-wrap {
  margin-top: 28px;
  text-align: center;
}

.theme-box {
  padding: 24px;
}

.favorites-block {
  margin-top: 28px;
  padding: 28px;
}

.favorites-group + .favorites-group {
  margin-top: 28px;
}

.favorites-list {
  margin: 0;
  padding-left: 20px;
}

.favorites-list li {
  margin-bottom: 12px;
  color: var(--muted);
}

.favorites-list a {
  font-weight: 700;
}

.cta-box {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.cta-action {
  flex-shrink: 0;
}

.site-footer {
  padding: 48px 0 24px;
  background: #efe7db;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--accent-dark);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .hero-grid,
  .card-grid,
  .theme-grid,
  .footer-grid,
  .cta-box {
    grid-template-columns: 1fr;
  }

  .cta-box {
    display: block;
  }

  .cta-action {
    margin-top: 18px;
  }

  .card p {
    min-height: auto;
  }
}

@media (max-width: 700px) {
  .header-inner {
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .site-nav {
    justify-content: center;
    gap: 16px;
  }

  .hero {
    padding-top: 60px;
  }

  h1 {
    font-size: 2.4rem;
  }
}

.hero-image img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  object-fit: cover;
}

.essay-image {
  margin: 32px 0 18px;
}

.essay-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.image-caption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.6;
}

.essay-opening {
  font-size: 1.12rem;
  line-height: 1.85;
  color: #2f2a24;
}

.essay-body p {
  font-size: 1.05rem;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

.essay-body p {
  margin-bottom: 20px;
}

.essay-body p + p {
  margin-top: 0;
}

.essay-body-section {
  padding: 24px 0 80px;
}

.essay-body {
  padding: 42px 36px;
}

.essay-bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.text-link {
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.back-home-wrap {
  margin-top: 32px;
  text-align: center;
}

.center-link {
  text-align: center;
  margin-top: 24px;
}

.center-link a {
  font-size: 0.95rem;
}