:root {
  --bg: #f6f5ef;
  --surface: #ffffff;
  --text: #1e2a24;
  --muted: #5c6b62;
  --line: #d8dbd4;
  --accent: #1f7a55;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #fdfcf8 0%, var(--bg) 62%);
  color: var(--text);
  line-height: 1.55;
}

/* Keep all images responsive by default */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Recipe thumbnails: always cropped to card ratio */
.recipe-card img,
.recipe-card-placeholder {
  width: 100%;
  height: 200px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Recipe post content images: centered and capped for better reading rhythm */
.single-content img,
.single-content picture img {
  width: auto;
  max-width: min(100%, 500px);
  height: auto;
  margin: 1rem auto;
  border-radius: 12px;
}

.single-content figure {
  margin: 1rem auto;
  max-width: min(100%, 720px);
}

.single-content figure img {
  margin: 0 auto;
}

.single-content figcaption {
  margin-top: 0.45rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
}

.header-inner {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.main-nav a,
a {
  color: var(--accent);
  text-decoration: none;
}

.main-nav a:hover,
a:hover {
  text-decoration: underline;
}

main {
  padding: 1.6rem 0 2.2rem;
}

.page-header h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 340px));
  gap: 1rem;
  justify-content: start;
}

.recipe-card {
  width: 100%;
  max-width: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(29, 47, 38, 0.08);
}

.recipe-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.recipe-card-placeholder {
  background: linear-gradient(130deg, #efe7cb, #d8ebda);
}

.recipe-card-body {
  padding: 0.95rem;
}

.recipe-card h2 {
  margin: 0;
  font-size: 1.08rem;
}

.recipe-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.recipe-meta {
  margin-top: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.term-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
}

.term-card h2 {
  margin: 0;
  font-size: 1rem;
}

.term-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.single-recipe {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem;
}

.single-header h1 {
  margin: 0;
}

.single-header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.single-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 1rem;
}

.taxonomies {
  margin-top: 1.2rem;
}

.taxonomies h2 {
  margin-bottom: 0.4rem;
  font-size: 1.02rem;
}

.taxonomies ul {
  margin: 0;
  padding-left: 1.1rem;
}

.paginator {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  align-items: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
