/* ═══ MIMI Theme — Main CSS ══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #F8F5F0; --white: #FFFFFF;
  --sage: #7A9E6E; --sage-light: #C8DBC0; --sage-dark: #4E7040;
  --coral: #D4785A; --coral-light: #F0C4B4; --blush: #EDD5C8;
  --ink: #1C1C1C; --muted: #8A8680; --border: #E8E2D8;
  --mint: #7ABCB0; --lavender: #A89AC5; --yellow: #E8C97A;
  --r: 16px; --nav-h: 64px;
}
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--ink); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ─── KEYFRAMES ──────────────────────────────────────────────────── */
@keyframes statSlideIn {
  from { opacity: 0; transform: translateX(-52px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes progressPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(212,120,90,0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(212,120,90,0); }
}

/* ─── NAV ──────────────────────────────────────────────────────────── */
.mimi-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(248,245,240,0.96);
  backdrop-filter: blur(28px) saturate(1.4);
  border-bottom: 1px solid rgba(232,226,216,0.8);
  padding: 0 40px; height: 72px;
  display: flex; align-items: center; gap: 24px;
  box-shadow: 0 1px 0 rgba(232,226,216,0.6), 0 4px 20px rgba(28,28,28,0.04);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; font-weight: 600; letter-spacing: 4px;
  color: var(--ink); text-decoration: none; flex-shrink: 0;
}
.nav-logo span { color: var(--coral); }

/* Category pills — visible by default as outlined buttons */
.nav-cats { display: flex; gap: 5px; list-style: none; flex: 1; justify-content: center; }
.nav-cats a {
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink);
  padding: 8px 18px; border-radius: 100px;
  border: 1.5px solid rgba(28,28,28,0.14);
  background: transparent;
  transition: all .3s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}
.nav-cats a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(28,28,28,0.2);
}
.nav-cats a.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.nav-cats a.nav-progress-link {
  background: var(--coral);
  border-color: var(--coral);
  color: white;
  font-weight: 700;
  animation: progressPulse 3s ease-in-out infinite;
}
.nav-cats a.nav-progress-link:hover {
  background: #bf5c3c;
  border-color: #bf5c3c;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(212,120,90,0.38);
}

.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.search-toggle {
  background: none;
  border: 1.5px solid rgba(28,28,28,0.14);
  border-radius: 50%;
  width: 38px; height: 38px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); transition: all .25s;
}
.search-toggle:hover {
  background: var(--ink); border-color: var(--ink); color: white;
  transform: scale(1.08);
}
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span { width: 22px; height: 1.5px; background: var(--ink); border-radius: 2px; display: block; transition: all .3s; }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; background: rgba(28,28,28,0.95);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-overlay form { display: flex; gap: 12px; width: 600px; max-width: 90vw; }
.search-overlay input {
  flex: 1; background: none; border: none; border-bottom: 2px solid rgba(255,255,255,0.3);
  color: white; font-family: 'Cormorant Garamond', serif; font-size: 32px;
  padding: 12px 0; outline: none; transition: border-color .2s;
}
.search-overlay input::placeholder { color: rgba(255,255,255,0.3); }
.search-overlay input:focus { border-bottom-color: var(--sage-light); }
.search-overlay button[type=submit] {
  background: var(--sage); color: var(--ink); border: none;
  padding: 12px 28px; border-radius: 100px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer;
}
.search-close {
  position: absolute; top: 24px; right: 32px;
  background: none; border: none; color: rgba(255,255,255,0.5);
  font-size: 24px; cursor: pointer; transition: color .2s;
}
.search-close:hover { color: white; }

/* ─── HERO ────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1fr 1fr;
  height: calc(100vh - var(--nav-h)); max-height: 700px; overflow: hidden;
}
.hero-featured {
  position: relative; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 52px 52px 52px;
  text-decoration: none; color: inherit; overflow: hidden;
  background: linear-gradient(145deg, #D4785A10, #7A9E6E15);
  transition: transform .4s;
}
.hero-featured:hover { transform: scale(1.01); }
.hero-bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.18; transition: opacity .4s; }
.hero-featured:hover .hero-bg-img { opacity: 0.26; }
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; color: white; font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px; margin-bottom: 20px;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 50px; line-height: 1.1; font-weight: 400; color: var(--ink); margin-bottom: 14px;
}
.hero-meta { font-size: 13px; color: var(--muted); display: flex; gap: 18px; margin-bottom: 16px; }
.hero-excerpt { font-size: 15px; line-height: 1.7; color: #555; max-width: 400px; margin-bottom: 28px; }
.hero-read-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: white; padding: 12px 28px; border-radius: 100px;
  font-size: 13px; font-weight: 500; transition: all .25s;
}
.hero-featured:hover .hero-read-btn { background: var(--coral); }
.hero-sidebar { display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.hero-side-item {
  flex: 1; display: flex; align-items: center; gap: 0;
  padding: 24px 28px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--border); transition: background .2s;
}
.hero-side-item:last-child { border-bottom: none; }
.hero-side-item:hover { background: white; }
.side-img { width: 80px; height: 80px; border-radius: 10px; flex-shrink: 0; overflow: hidden; background: var(--border); }
.side-img img { width: 100%; height: 100%; object-fit: cover; }
.side-info { padding-left: 18px; }
.side-badge { font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 5px; }
.side-title { font-family: 'Cormorant Garamond', serif; font-size: 18px; line-height: 1.3; margin-bottom: 5px; }
.side-meta { font-size: 11px; color: var(--muted); }

/* ─── SECTION HEADER + FILTER ────────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 48px 40px 20px; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: 34px; font-weight: 400; }
.section-title span { color: var(--coral); font-style: italic; }
.filter-row { display: flex; gap: 8px; padding: 0 40px 28px; flex-wrap: wrap; }
.filter-btn {
  background: var(--white); border: 1.5px solid var(--border); border-radius: 100px;
  padding: 7px 18px; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all .2s; color: var(--muted);
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.active { background: var(--ink); color: white; border-color: var(--ink); }

/* ─── POSTS GRID ─────────────────────────────────────────────────── */
.posts-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.posts-grid .recipe-card:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.posts-grid .recipe-card:nth-child(6) { grid-column: span 2; }
.recipe-card { background: var(--white); overflow: hidden; transition: all .3s; position: relative; }
.recipe-card:hover { z-index: 2; box-shadow: 0 20px 60px rgba(0,0,0,0.12); }
.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.card-img { width: 100%; padding-top: 66%; position: relative; overflow: hidden; background: var(--border); flex-shrink: 0; }
.posts-grid .recipe-card:nth-child(1) .card-img { padding-top: 55%; }
.posts-grid .recipe-card:nth-child(6) .card-img { padding-top: 44%; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.25,.46,.45,.94); }
.recipe-card:hover .card-img img { transform: scale(1.05); }
.card-cat-badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: white; border-radius: 100px; padding: 4px 12px;
  font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  display: flex; align-items: center; gap: 5px;
}
.cat-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cat-color, #8A8680); }
.card-save {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 30px; height: 30px; border-radius: 50%; background: white;
  border: none; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  opacity: 0; transition: opacity .2s;
}
.recipe-card:hover .card-save { opacity: 1; }
.card-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.posts-grid .recipe-card:nth-child(1) .card-body { padding: 26px 30px 30px; }
.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px; line-height: 1.3; font-weight: 400; margin-bottom: 7px;
  transition: color .2s;
}
.posts-grid .recipe-card:nth-child(1) .card-title { font-size: 28px; }
.recipe-card:hover .card-title { color: var(--coral); }
.card-desc {
  font-size: 13px; line-height: 1.6; color: var(--muted); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
}
.card-meta { display: flex; gap: 10px; }
.card-calories { background: var(--sage-light); color: var(--sage-dark); padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 500; }
.recipe-card.filtered-out { opacity: 0.15; pointer-events: none; }

/* ─── PROGRESS BANNER ────────────────────────────────────────────── */
.progress-banner {
  margin: 48px 40px; background: linear-gradient(135deg, var(--ink) 0%, #2D3A2A 100%);
  border-radius: 24px; padding: 40px 48px;
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; color: white; overflow: hidden; position: relative;
  transition: transform .3s;
}
.progress-banner:hover { transform: translateY(-2px); }
.progress-banner::before { content: ''; position: absolute; top: -40px; right: -40px; width: 240px; height: 240px; border-radius: 50%; background: var(--sage); opacity: 0.12; }
.pb-label { font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--sage-light); margin-bottom: 10px; }
.pb-title { font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 300; line-height: 1.1; margin-bottom: 6px; }
.pb-title strong { color: var(--sage-light); }
.pb-sub { font-size: 13px; color: rgba(255,255,255,0.55); }
.pb-stats { display: flex; gap: 36px; position: relative; z-index: 1; }
.pb-stat { text-align: center; }
.pb-stat-num { font-family: 'Cormorant Garamond', serif; font-size: 40px; font-weight: 300; line-height: 1; }
.pb-stat-num span { font-size: 18px; }
.pb-stat-label { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 3px; }
.pb-stat-delta { font-size: 12px; color: var(--sage-light); margin-top: 2px; }
.pb-ring { position: relative; width: 110px; height: 110px; z-index: 1; }
.pb-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pb-ring-pct { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 300; color: white; }
.pb-ring-text { font-size: 8px; color: rgba(255,255,255,0.45); letter-spacing: 1px; }
.pb-cta { background: var(--sage); color: var(--ink); padding: 12px 24px; border-radius: 100px; font-size: 13px; font-weight: 600; white-space: nowrap; transition: all .25s; position: relative; z-index: 1; }
.progress-banner:hover .pb-cta { background: white; }

/* ─── RECIPE SINGLE ──────────────────────────────────────────────── */
.recipe-hero { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 65vh; max-height: 640px; overflow: hidden; }
.recipe-hero-img { position: relative; overflow: hidden; background: var(--border); }
.recipe-hero-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 7s; }
.recipe-hero-img:hover img { transform: scale(1.04); }
.recipe-hero-info { background: white; padding: 56px 52px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--border); }
.recipe-cat { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.recipe-cat-dot { width: 8px; height: 8px; border-radius: 50%; }
.recipe-title { font-family: 'Cormorant Garamond', serif; font-size: 40px; line-height: 1.1; font-weight: 400; margin-bottom: 18px; }
.recipe-desc { font-size: 15px; line-height: 1.8; color: #666; margin-bottom: 28px; border-left: 3px solid var(--sage-light); padding-left: 16px; }
.recipe-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 28px; }
.stat-card { background: var(--bg); border-radius: 12px; padding: 14px 12px; text-align: center; }
.stat-icon { font-size: 18px; margin-bottom: 4px; }
.stat-val { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 400; }
.stat-label { font-size: 10px; color: var(--muted); margin-top: 2px; }
.recipe-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary { background: var(--ink); color: white; padding: 12px 24px; border-radius: 100px; font-size: 13px; font-weight: 500; font-family: 'Inter', sans-serif; border: none; cursor: pointer; transition: all .2s; }
.btn-primary:hover { background: var(--sage-dark); }
.btn-outline { background: none; border: 1.5px solid var(--border); color: var(--muted); padding: 12px 18px; border-radius: 100px; font-size: 13px; font-family: 'Inter', sans-serif; cursor: pointer; text-decoration: none; transition: all .2s; }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }

/* Recipe body */
.recipe-body { display: grid; grid-template-columns: 280px 1fr 260px; gap: 0; max-width: 1240px; margin: 0 auto; padding: 52px 40px; }
.recipe-ingredients { padding-right: 36px; border-right: 1px solid var(--border); }
.ing-header { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 400; margin-bottom: 6px; }
.ing-portions-ctrl { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; background: var(--bg); border-radius: 100px; padding: 5px; width: fit-content; }
.por-btn { width: 26px; height: 26px; border-radius: 50%; border: none; background: white; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,0.1); transition: all .2s; }
.por-btn:hover { background: var(--ink); color: white; }
.por-num { font-size: 13px; font-weight: 500; padding: 0 6px; min-width: 20px; text-align: center; }
.por-label { font-size: 12px; color: var(--muted); padding-right: 6px; }
.ing-group { margin-bottom: 20px; }
.ing-group-title { font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--sage); margin-bottom: 10px; }
.ing-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.ing-item:last-child { border-bottom: none; }
.ing-check { width: 17px; height: 17px; border-radius: 4px; border: 1.5px solid var(--border); flex-shrink: 0; margin-top: 1px; transition: all .2s; display: flex; align-items: center; justify-content: center; font-size: 11px; color: white; }
.ing-item.checked .ing-check { background: var(--sage); border-color: var(--sage); }
.ing-item.checked .ing-check::after { content: '✓'; }
.ing-item.checked .ing-name, .ing-item.checked .ing-amount { color: var(--muted); text-decoration: line-through; }
.ing-name { font-size: 13px; margin-bottom: 2px; }
.ing-amount { font-size: 12px; color: var(--muted); }
.recipe-notes { background: var(--bg); border-radius: 12px; padding: 16px; margin-top: 20px; }
.notes-title { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--sage); margin-bottom: 8px; }
.notes-text { font-size: 13px; line-height: 1.7; color: #666; }

/* Steps */
.recipe-steps-wrap { padding: 0 40px; position: relative; }
.steps-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.steps-title { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 400; }
.steps-mode-btn { background: var(--bg); border: none; border-radius: 100px; padding: 7px 16px; font-size: 12px; font-family: 'Inter', sans-serif; cursor: pointer; color: var(--muted); transition: all .2s; }
.steps-mode-btn:hover { background: var(--ink); color: white; }
.recipe-step { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: all .3s; }
.recipe-step:last-of-type { border-bottom: none; }
.step-num { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: 'Cormorant Garamond', serif; font-size: 17px; color: var(--muted); transition: all .3s; cursor: pointer; }
.recipe-step.active .step-num { background: var(--sage); border-color: var(--sage); color: white; transform: scale(1.1); }
.recipe-step.done .step-num { background: var(--ink); border-color: var(--ink); color: white; }
.recipe-step.done .step-num span { display: none; }
.recipe-step.done .step-num::after { content: '✓'; font-size: 13px; }
.step-body { flex: 1; padding-top: 3px; }
.step-title { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.step-text { font-size: 13px; line-height: 1.8; color: #555; }
.step-tip { background: var(--sage-light); border-radius: 8px; padding: 10px 14px; margin-top: 12px; font-size: 12px; color: var(--sage-dark); }
.step-img { width: 100px; height: 76px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--border); }
.step-img img { width: 100%; height: 100%; object-fit: cover; }
.step-progress { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--ink); color: white; padding: 12px 24px; border-radius: 100px; display: flex; align-items: center; gap: 14px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); font-size: 13px; z-index: 300; opacity: 0; pointer-events: none; transition: opacity .3s; white-space: nowrap; }
.step-progress.visible { opacity: 1; pointer-events: all; }
.step-progress-bar { width: 80px; height: 3px; background: rgba(255,255,255,0.2); border-radius: 2px; overflow: hidden; }
.step-progress-fill { height: 100%; background: var(--sage-light); transition: width .4s; width: 0; }
.step-next-btn { background: var(--sage); color: var(--ink); border: none; border-radius: 100px; padding: 7px 16px; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s; }
.step-next-btn:hover { background: white; }

/* Nutrition */
.recipe-nutrition { padding-left: 36px; border-left: 1px solid var(--border); }
.nut-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 400; margin-bottom: 20px; }
.nut-big { background: linear-gradient(135deg, var(--ink), #2D3A2A); border-radius: 18px; padding: 24px 20px; margin-bottom: 16px; color: white; }
.nut-cal { font-family: 'Cormorant Garamond', serif; font-size: 52px; font-weight: 300; line-height: 1; }
.nut-cal span { font-size: 18px; color: rgba(255,255,255,0.6); }
.nut-cal-label { font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: 1px; margin-top: 3px; }
.nut-macros { display: flex; gap: 10px; margin-top: 18px; }
.macro { flex: 1; text-align: center; }
.macro-bar { height: 40px; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; font-size: 11px; font-weight: 600; color: var(--ink); position: relative; overflow: hidden; background: rgba(255,255,255,0.08); }
.macro-bar::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: var(--h, 60%); background: var(--c, #7ABCB0); opacity: 0.7; border-radius: 6px; }
.macro-bar span, .macro-bar { position: relative; }
.macro-label { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 5px; }
.nut-rows { margin-bottom: 16px; }
.nut-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.nut-row:last-child { border-bottom: none; }
.nut-row span:first-child { color: var(--muted); }
.nut-row span:last-child { font-weight: 500; }
.recipe-badges, .recipe-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.recipe-badge { background: var(--sage-light); color: var(--sage-dark); padding: 4px 12px; border-radius: 100px; font-size: 11px; font-weight: 500; }
.recipe-tag { background: var(--bg); border: 1px solid var(--border); padding: 4px 12px; border-radius: 100px; font-size: 11px; color: var(--muted); text-decoration: none; transition: all .2s; }
.recipe-tag:hover { border-color: var(--ink); color: var(--ink); }

/* Gallery */
.recipe-gallery { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); margin: 0 40px 48px; border-radius: 16px; overflow: hidden; }
.gallery-item { aspect-ratio: 1; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.06); }

/* Related */
.related-section { padding: 52px 40px; border-top: 1px solid var(--border); }
.related-title { font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 400; margin-bottom: 28px; }
.related-title span { color: var(--coral); font-style: italic; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.related-card { text-decoration: none; color: inherit; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: all .25s; }
.related-card:hover { box-shadow: 0 12px 36px rgba(0,0,0,0.1); transform: translateY(-3px); }
.related-card-img { height: 160px; overflow: hidden; }
.related-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.related-card:hover .related-card-img img { transform: scale(1.05); }
.related-card-body { padding: 16px 18px 18px; }
.related-cat { font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--sage); margin-bottom: 6px; }
.related-card-title { font-family: 'Cormorant Garamond', serif; font-size: 18px; line-height: 1.3; margin-bottom: 7px; }
.related-card-meta { font-size: 12px; color: var(--muted); }

/* ─── PROGRESS PAGE ──────────────────────────────────────────────── */
body.prog-dark { background: #0E0F0D; color: #F0EDE8; }
.prog-header { padding: 60px 40px 52px; display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.08); animation: fadeUp 0.5s ease both; }
.prog-chart-section { display: grid; grid-template-columns: 1fr 300px; border-bottom: 1px solid rgba(255,255,255,0.08); animation: fadeUp 0.6s ease 0.55s both; }
.prog-label { font-size: 10px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--sage); margin-bottom: 14px; }
.prog-title { font-family: 'Cormorant Garamond', serif; font-size: 56px; font-weight: 300; line-height: 1; color: #F0EDE8; margin-bottom: 10px; }
.prog-title strong { color: var(--sage-light); font-weight: 300; }
.prog-subtitle { font-size: 14px; color: rgba(240,237,232,0.5); line-height: 1.6; }
.btn-add-entry { background: var(--sage); color: var(--ink); border: none; border-radius: 100px; padding: 12px 28px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; flex-shrink: 0; }
.btn-add-entry:hover { background: var(--sage-light); }
.prog-stats-row { display: grid; grid-template-columns: repeat(5,1fr); border-bottom: 1px solid rgba(255,255,255,0.08); }
.prog-big-stat {
  padding: 40px 28px;
  border-right: 1px solid rgba(255,255,255,0.08);
  opacity: 0;
  animation: statSlideIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.prog-big-stat:last-child { border-right: none; }
.prog-big-stat:nth-child(1) { animation-delay: .05s; }
.prog-big-stat:nth-child(2) { animation-delay: .18s; }
.prog-big-stat:nth-child(3) { animation-delay: .31s; }
.prog-big-stat:nth-child(4) { animation-delay: .44s; }
.prog-big-stat:nth-child(5) { animation-delay: .57s; }
.pbs-label { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: rgba(240,237,232,0.5); margin-bottom: 12px; font-weight: 500; }
.pbs-value { font-family: 'Cormorant Garamond', serif; font-size: 52px; font-weight: 300; line-height: 1; color: #F0EDE8; }
.pbs-value sup { font-size: 20px; vertical-align: super; color: rgba(240,237,232,0.6); }
.pbs-value.green { color: var(--sage-light); }
.pbs-value.accent { color: var(--sage-light); }
.pbs-value.lavender { color: var(--lavender); }
.pbs-delta { margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--sage); }
.pbs-delta.muted { color: rgba(240,237,232,0.4); }
.prog-chart-wrap { padding: 36px 40px; border-right: 1px solid rgba(255,255,255,0.08); }
.chart-title { font-family: 'Cormorant Garamond', serif; font-size: 26px; color: #F0EDE8; margin-bottom: 4px; }
.chart-sub { font-size: 12px; color: rgba(240,237,232,0.4); margin-bottom: 20px; }
.chart-tabs { display: flex; gap: 4px; margin-bottom: 24px; }
.chart-tab { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); border-radius: 100px; padding: 6px 16px; font-size: 12px; color: rgba(240,237,232,0.5); cursor: pointer; font-family: 'Inter', sans-serif; transition: all .2s; }
.chart-tab.active { background: var(--sage); color: #0E0F0D; border-color: var(--sage); }
canvas#weightChart { width: 100% !important; }
.prog-measurements { padding: 36px 28px; }
.meas-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: #F0EDE8; margin-bottom: 20px; }
.meas-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.meas-item:last-child { border-bottom: none; }
.meas-name { font-size: 13px; color: rgba(240,237,232,0.5); }
.meas-vals { text-align: right; }
.meas-current { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 300; color: #F0EDE8; }
.meas-current sup { font-size: 12px; }
.meas-start { font-size: 10px; color: rgba(240,237,232,0.35); margin-top: 2px; }
.meas-change { font-size: 12px; color: var(--sage); font-weight: 500; }
.meas-change.pos { color: var(--coral); }
.prog-log-section { padding: 40px; }
.log-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.log-header h2 { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 400; color: #F0EDE8; }
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.log-table thead th { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(240,237,232,0.4); padding: 10px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); font-weight: 500; }
.log-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.06); transition: background .15s; }
.log-table tbody tr:hover { background: rgba(255,255,255,0.04); }
.log-table td { padding: 14px 14px; vertical-align: middle; }
.td-date { color: rgba(240,237,232,0.5); }
.td-weight { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 300; color: #F0EDE8; }
.td-delta { font-size: 12px; font-weight: 500; }
.td-delta.down { color: var(--sage); }
.td-delta.up { color: var(--coral); }
.td-delta.same { color: rgba(240,237,232,0.4); }
.td-mood { font-size: 18px; }
.td-note { font-size: 12px; color: rgba(240,237,232,0.45); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .3s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box { background: #181A16; border: 1px solid rgba(255,255,255,0.1); border-radius: 22px; padding: 36px; width: 380px; transform: translateY(16px); transition: transform .3s; }
.modal-overlay.open .modal-box { transform: none; }
.modal-box h3 { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 400; color: #F0EDE8; margin-bottom: 24px; }
.modal-field { margin-bottom: 18px; }
.modal-field label { display: block; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: rgba(240,237,232,0.45); margin-bottom: 7px; }
.modal-field input { width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 11px 14px; color: #F0EDE8; font-family: 'Inter', sans-serif; font-size: 14px; outline: none; transition: border-color .2s; }
.modal-field input:focus { border-color: var(--sage); }
.mood-picker { display: flex; gap: 8px; }
.mood-btn { font-size: 22px; cursor: pointer; border: 2px solid transparent; border-radius: 8px; padding: 6px 10px; background: rgba(255,255,255,0.06); transition: all .2s; }
.mood-btn.selected { border-color: var(--sage); background: rgba(122,158,110,0.15); }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.btn-modal-save { flex: 1; background: var(--sage); color: var(--ink); border: none; border-radius: 100px; padding: 12px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; }
.btn-modal-save:hover { background: var(--sage-light); }
.btn-modal-cancel { background: none; border: 1px solid rgba(255,255,255,0.1); color: rgba(240,237,232,0.5); border-radius: 100px; padding: 12px 20px; font-family: 'Inter', sans-serif; font-size: 12px; cursor: pointer; transition: all .2s; }
.btn-modal-cancel:hover { border-color: #F0EDE8; color: #F0EDE8; }

/* Archive header */
.archive-header { padding: 48px 40px 32px; border-bottom: 1px solid var(--border); }
.archive-header h1 { font-family: 'Cormorant Garamond', serif; font-size: 48px; font-weight: 400; }
.archive-header p { font-size: 15px; color: var(--muted); margin-top: 8px; }
.no-posts { padding: 80px 40px; text-align: center; grid-column: 1/-1; }
.no-posts a { color: var(--coral); }
.pagination-wrap { padding: 40px; display: flex; justify-content: center; }
.page-numbers { padding: 8px 14px; border: 1px solid var(--border); border-radius: 100px; margin: 0 3px; text-decoration: none; font-size: 13px; color: var(--muted); transition: all .2s; }
.page-numbers.current, .page-numbers:hover { background: var(--ink); color: white; border-color: var(--ink); }

/* ─── FOOTER ─────────────────────────────────────────────────────── */
.mimi-footer {
  background: #111310;
  color: white;
  margin-top: 80px;
  position: relative;
}

/* Gradient accent line at the very top */
.footer-topline {
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--sage-dark) 15%,
    var(--sage) 35%,
    var(--sage-light) 50%,
    var(--coral) 70%,
    transparent 100%
  );
}

/* ── Footer hero band: big brand across full width ── */
.footer-hero {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 60px 60px 0;
  display: flex; align-items: flex-end; gap: 48px;
}
.footer-hero-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 110px; font-weight: 300; letter-spacing: 20px;
  line-height: 0.85; color: white;
  opacity: 0.9;
  flex-shrink: 0;
}
.footer-hero-logo span { color: var(--coral); }
.footer-hero-right {
  padding-bottom: 18px; flex: 1;
}
.footer-hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-style: italic; font-weight: 300;
  color: rgba(255,255,255,0.45); line-height: 1.5;
  max-width: 480px;
}
.footer-hero-rule {
  width: 48px; height: 1px;
  background: var(--sage); margin: 18px 0;
}
.footer-hero-socials { display: flex; gap: 20px; }
.social-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.35); text-decoration: none;
  padding-bottom: 3px;
  transition: color .3s;
}
.social-link::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; width: 0; height: 1px;
  background: var(--sage-light);
  transition: width .4s cubic-bezier(0.22,1,0.36,1);
}
.social-link:hover { color: var(--sage-light); }
.social-link:hover::after { width: 100%; }

/* ── Main grid ── */
.footer-main {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 0;
  padding: 0 60px;
}
.footer-col {
  padding: 48px 40px 48px 0;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.footer-col:last-child {
  padding-right: 0; border-right: none; padding-left: 40px;
}
.footer-col h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px; font-weight: 400; letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sage-light);
  margin-bottom: 24px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 13px; }
.footer-col a {
  position: relative;
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px; font-weight: 300;
  color: rgba(255,255,255,0.45);
  text-decoration: none; padding-bottom: 2px;
  transition: color .25s;
  display: inline-block;
}
.footer-col a::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; width: 0; height: 1px;
  background: var(--coral);
  transition: width .38s cubic-bezier(0.22,1,0.36,1);
}
.footer-col a:hover { color: white; }
.footer-col a:hover::after { width: 100%; }

/* Search box (last column) */
.footer-search-box {}
.footer-search-box h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px; font-weight: 400; letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sage-light);
  margin-bottom: 24px;
}
.footer-search-desc {
  font-size: 13px; color: rgba(255,255,255,0.3);
  line-height: 1.7; margin-bottom: 20px;
}
.footer-search-wrap {
  display: flex;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
  background: rgba(255,255,255,0.04);
}
.footer-search-wrap:focus-within {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122,158,110,0.15);
}
.footer-search-input {
  flex: 1; background: none; border: none;
  padding: 14px 20px; color: white;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px; outline: none;
}
.footer-search-input::placeholder {
  color: rgba(255,255,255,0.22);
  font-style: italic;
}
.footer-search-btn {
  background: var(--sage); border: none;
  padding: 0 22px; color: var(--ink);
  font-size: 20px; cursor: pointer;
  transition: background .2s, transform .2s;
  display: flex; align-items: center; justify-content: center;
}
.footer-search-btn:hover {
  background: var(--sage-light);
  transform: scale(1.05);
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 24px 60px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,0.2);
}
.footer-bottom-copy {
  font-size: 11px; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.18);
}
.footer-bottom-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px; font-style: italic;
  color: rgba(255,255,255,0.25);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; max-height: none; }
  .hero-sidebar { display: none; }
  .posts-grid { grid-template-columns: repeat(2,1fr); }
  .posts-grid .recipe-card:nth-child(1) { grid-column: span 2; }
  .posts-grid .recipe-card:nth-child(6) { grid-column: span 1; }
  .recipe-hero { grid-template-columns: 1fr; max-height: none; }
  .recipe-body { grid-template-columns: 1fr; padding: 32px 20px; }
  .recipe-ingredients { padding-right: 0; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 32px; margin-bottom: 32px; }
  .recipe-steps-wrap { padding: 0; }
  .recipe-nutrition { padding-left: 0; border-left: none; border-top: 1px solid var(--border); padding-top: 32px; margin-top: 32px; }
  .footer-hero { padding: 40px 32px 0; }
  .footer-hero-logo { font-size: 72px; letter-spacing: 12px; }
  .footer-main { grid-template-columns: 1fr 1fr; padding: 0 32px; }
  .footer-col { padding: 36px 24px 36px 0; }
  .footer-col:last-child { padding-left: 24px; }
  .footer-bottom { padding: 18px 32px; }
  .nav-cats { display: none; }
  .nav-burger { display: flex; }
  .prog-stats-row { grid-template-columns: repeat(3,1fr); }
  .prog-chart-section { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mimi-nav { padding: 0 16px; }
  .hero-featured { padding: 28px; }
  .hero-title { font-size: 32px; }
  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid .recipe-card:nth-child(1), .posts-grid .recipe-card:nth-child(6) { grid-column: span 1; }
  .section-header, .filter-row { padding-left: 16px; padding-right: 16px; }
  .progress-banner { flex-direction: column; gap: 24px; text-align: center; margin: 24px 16px; padding: 28px 24px; }
  .pb-stats { justify-content: center; }
  .prog-header { flex-direction: column; align-items: flex-start; gap: 20px; padding: 36px 16px; }
  .prog-title { font-size: 36px; }
  .prog-stats-row { grid-template-columns: repeat(2,1fr); }
  .footer-hero { padding: 28px 20px 0; flex-direction: column; gap: 24px; align-items: flex-start; }
  .footer-hero-logo { font-size: 52px; letter-spacing: 8px; }
  .footer-hero-tagline { font-size: 17px; }
  .footer-main { grid-template-columns: 1fr; padding: 0 20px; }
  .footer-col { padding: 28px 0; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .footer-col:last-child { padding-left: 0; border-bottom: none; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; padding: 16px 20px; }
  .related-grid { grid-template-columns: 1fr; }
}
