:root {
  --color-bg: #FFF8E6;
  --color-surface: #FFFFFF;
  --color-text: #2B1D12;
  --color-heading: #1A1A1A;
  --color-muted: #6B6B6B;
  --color-border: #F3E4BC;
  --color-green: #59AD40;
  --color-green-dark: #437933;
  --color-gold: #FFC72C;
  --color-amber: #E0A21A;

  --font-body: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap-width: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.65;
}

.wrap {
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--color-green-dark);
  text-decoration-color: var(--color-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover { color: var(--color-green); }

h1, h2, h3, h4 {
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.25;
}

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

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-heading);
  text-decoration: none;
  min-width: 0;
}

.site-brand__logo { display: block; flex-shrink: 0; }

.site-brand__text { display: flex; flex-direction: column; min-width: 0; }

.site-brand__title {
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: 0.02em;
}

.site-brand__tagline {
  font-size: 1.1rem;
  color: var(--color-muted);
  min-width: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--color-heading);
  text-decoration: none;
}

.site-nav a:hover { color: var(--color-green-dark); }

.site-nav__subscribe {
  background: var(--color-green);
  color: #fff !important;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}

.site-nav__subscribe:hover { background: var(--color-green-dark); }

/* ---------- Main / page ---------- */

.page-main { padding: 2.5rem 0 3rem; }

.page-title { font-size: 2rem; margin-bottom: 0; }

.page-subtitle { color: var(--color-muted); margin-top: 0; }

/* ---------- Subscribe banner ---------- */

.subscribe-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0 0 2.25rem;
}

.subscribe-row__left {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
}

.subscribe-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
}

.subscribe-row__logo {
  flex-shrink: 0;
  width: 260px;
  height: 260px;
}

.subscribe-banner p { margin: 0; min-width: 0; }

.btn {
  display: inline-block;
  background: var(--color-gold);
  color: var(--color-heading) !important;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { background: var(--color-amber); color: var(--color-heading) !important; }

/* ---------- Post list ---------- */

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

.post-list__item {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.post-list__item:first-child { padding-top: 0; }

.post-list__date {
  display: block;
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0.2rem;
}

.post-list__title { margin: 0 0 0.75rem; font-size: 1.8rem; }

.post-list__title a { text-decoration: none; color: var(--color-heading); }

.post-list__title a:hover { color: var(--color-green-dark); }

.post-list__permalink { margin: 1.25rem 0 0; font-size: 0.9rem; }

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

.post__header { margin-bottom: 1.5rem; }

.post__title { font-size: 2.1rem; margin-bottom: 0.3rem; }

.post__meta { color: var(--color-muted); font-size: 0.9rem; margin: 0; }

.post__content h2 { clear: both; margin-top: 2rem; }

.post__content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  cursor: zoom-in;
}

.post__content figcaption {
  font-size: 0.85rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 0.4rem;
}

/* Float an image so text wraps around it: add {: .float-right } or
   {: .float-left } after a markdown image. Stacks full-width on mobile. */
.post__content img.float-right,
.post__content img.float-left {
  max-width: 45%;
}

.post__content img.float-right {
  float: right;
  margin: 0.3rem 0 1rem 1.5rem;
}

.post__content img.float-left {
  float: left;
  margin: 0.3rem 1.5rem 1rem 0;
}

/* A row/grid of photos: wrap markdown images in
   <div class="photo-grid" markdown="1"> ... </div>, with a blank line
   between each image so they land in separate grid cells. */
.post__content .photo-grid {
  clear: both;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.post__content .photo-grid p { margin: 0; }

.post__content .photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.post__back { margin-top: 2.5rem; }

/* ---------- Lightbox ---------- */

.lightbox {
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
}

.lightbox::backdrop {
  background: rgba(26, 26, 26, 0.85);
}

.lightbox__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--color-surface);
  border-radius: 12px;
  overflow: hidden;
}

.lightbox__img {
  display: block;
  max-width: min(92vw, 1100px);
  max-height: 78vh;
  width: auto;
  height: auto;
}

.lightbox__caption {
  padding: 0.85rem 1.2rem;
  font-size: 0.95rem;
  color: var(--color-text);
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: none;
  background: rgba(26, 26, 26, 0.6);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__close:hover { background: rgba(26, 26, 26, 0.85); }

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

.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
}

.site-footer__inner {
  padding: 1.75rem 1.25rem 2.5rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer__inner p { margin: 0.3rem 0; }

.site-footer a { color: var(--color-muted); }

.site-footer a:hover { color: var(--color-green-dark); }

/* ---------- Small screens ---------- */

@media (max-width: 540px) {
  .site-header__inner { justify-content: center; text-align: center; }
  .site-brand { flex-direction: column; text-align: center; max-width: 100%; }
  .subscribe-row { flex-direction: column-reverse; align-items: center; }
  .subscribe-row__left { align-items: center; text-align: center; width: 100%; }
  .subscribe-banner { flex-direction: column; align-items: flex-start; width: 100%; }
  .subscribe-row__logo { width: 150px; height: 150px; }

  .post__content img.float-right,
  .post__content img.float-left {
    float: none;
    max-width: 100%;
    margin: 0.3rem 0 1rem;
  }
}
