/* ═══════════════════════════════════════════════════════════
   THE NEST SCHOOL — BLOG DESIGN SYSTEM
   Minimalist editorial style (Jules Acree inspired)
   Fonts: Cormorant Garant (serif) + Inter (sans)
═══════════════════════════════════════════════════════════ */

:root {
  --white:      #FFFFFF;
  --off-white:  #F9F8F6;
  --ink:        #111111;
  --charcoal:   #333333;
  --muted:      #888888;
  --teal:       #0D524F;
  --teal-light: #E8F0EF;
  --gold:       #C49A22;
  --border:     #E8E4DD;

  --ff-serif: 'Cormorant Garant', Georgia, serif;
  --ff-sans:  'Inter', system-ui, sans-serif;

  --px: clamp(20px, 5vw, 80px);
  --container: 1200px;
  --post-width: 720px;
  --radius: 4px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

/* ── NAVIGATION ── */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249,248,246,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.blog-nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--px);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}
.blog-nav__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  flex-shrink: 0;
}
.blog-nav__nest {
  font-family: var(--ff-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.02em;
}
.blog-nav__label {
  font-family: var(--ff-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-nav__links {
  display: flex;
  gap: 28px;
  flex: 1;
}
.blog-nav__links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.blog-nav__links a:hover { color: var(--teal); }
.blog-nav__cta {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--teal);
  padding: 7px 16px;
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.blog-nav__cta:hover { background: var(--teal); color: var(--white); }
.blog-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.blog-nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.2s;
}
.blog-nav__mobile {
  display: none;
  flex-direction: column;
  padding: 20px var(--px) 24px;
  border-top: 1px solid var(--border);
  background: var(--off-white);
  gap: 16px;
}
.blog-nav__mobile.open { display: flex; }
.blog-nav__mobile a { font-size: 15px; font-weight: 500; color: var(--charcoal); }
.blog-nav__cta-mobile {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal) !important;
  margin-top: 8px;
}

/* ── HERO FEATURED POST ── */
.blog-hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px var(--px) 0;
}
.blog-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  min-height: 460px;
}
.blog-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-hero__inner:hover .blog-hero__img { transform: scale(1.02); }
.blog-hero__img-wrap { overflow: hidden; }
.blog-hero__body {
  padding: 52px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}
.blog-hero__featured-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.blog-hero__cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}
.blog-hero__title {
  font-family: var(--ff-serif);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 20px;
}
.blog-hero__title a:hover { color: var(--teal); }
.blog-hero__excerpt {
  font-size: 15px;
  color: var(--charcoal);
  line-height: 1.8;
  margin-bottom: 28px;
}
.blog-hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
}
.blog-hero__meta-dot { width: 3px; height: 3px; background: var(--muted); border-radius: 50%; }
.blog-hero__read {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.15s;
}
.blog-hero__read:hover { gap: 10px; }

/* ── CATEGORY FILTER ── */
.blog-filter {
  max-width: var(--container);
  margin: 48px auto 0;
  padding: 0 var(--px);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.blog-filter__pill {
  font-family: var(--ff-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.15s;
}
.blog-filter__pill:hover,
.blog-filter__pill.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

/* ── POST GRID ── */
.blog-grid {
  max-width: var(--container);
  margin: 40px auto 0;
  padding: 0 var(--px) 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  transition: opacity 0.2s;
}
.blog-card.hidden { display: none; }
.blog-card__img-wrap {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 16/10;
  background: var(--teal-light);
  margin-bottom: 20px;
}
.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card__img { transform: scale(1.04); }
.blog-card__cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}
.blog-card__title {
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 12px;
  transition: color 0.15s;
}
.blog-card:hover .blog-card__title { color: var(--teal); }
.blog-card__excerpt {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.75;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
}
.blog-card__meta-dot { width: 2px; height: 2px; background: var(--muted); border-radius: 50%; }

/* ── SINGLE POST ── */
.post-header {
  max-width: var(--post-width);
  margin: 56px auto 0;
  padding: 0 var(--px);
  text-align: center;
}
.post-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  transition: color 0.15s;
  text-align: left;
  width: 100%;
}
.post-header__back:hover { color: var(--teal); }
.post-header__cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}
.post-header__title {
  font-family: var(--ff-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 24px;
}
.post-header__meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.post-header__meta-dot { width: 3px; height: 3px; background: var(--muted); border-radius: 50%; }

.post-hero-img {
  max-width: var(--container);
  margin: 40px auto 0;
  padding: 0 var(--px);
}
.post-hero-img img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 6px;
}

/* ── POST BODY ── */
.post-body {
  max-width: var(--post-width);
  margin: 56px auto 0;
  padding: 0 var(--px);
}
.post-body p {
  font-size: 18px;
  line-height: 1.9;
  color: var(--charcoal);
  margin-bottom: 28px;
}
.post-body h2 {
  font-family: var(--ff-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin: 52px 0 20px;
  line-height: 1.2;
}
.post-body h3 {
  font-family: var(--ff-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 36px 0 12px;
  letter-spacing: 0.02em;
}
.post-body ul, .post-body ol {
  padding-left: 24px;
  margin-bottom: 28px;
}
.post-body li {
  font-size: 18px;
  line-height: 1.8;
  color: var(--charcoal);
  margin-bottom: 8px;
}
.post-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 0 16px 28px;
  margin: 36px 0;
  font-family: var(--ff-serif);
  font-size: 22px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.55;
}
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

/* ── POST CTA STRIP ── */
.post-cta {
  background: var(--teal);
  margin: 72px 0 0;
  padding: 56px var(--px);
  text-align: center;
}
.post-cta__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}
.post-cta__title {
  font-family: var(--ff-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.2;
}
.post-cta__sub {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
}
.btn-white {
  display: inline-block;
  background: var(--white);
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}
.btn-white:hover { background: var(--off-white); }

/* ── RELATED POSTS ── */
.post-related {
  max-width: var(--container);
  margin: 72px auto 80px;
  padding: 0 var(--px);
}
.post-related__heading {
  font-family: var(--ff-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.post-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* ── BLOG FOOTER ── */
.blog-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 56px var(--px) 0;
}
.blog-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.blog-footer__name {
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.blog-footer__tagline { font-size: 13px; line-height: 1.8; }
.blog-footer__section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.blog-footer__links { display: flex; flex-direction: column; gap: 10px; }
.blog-footer__links a { font-size: 13px; transition: color 0.15s; }
.blog-footer__links a:hover { color: var(--white); }
.blog-footer__bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 0 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* ── EMPTY STATE (no posts match filter) ── */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 0;
  color: var(--muted);
  font-size: 15px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .post-related__grid { grid-template-columns: repeat(2, 1fr); }
  .blog-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .blog-hero__inner { grid-template-columns: 1fr; min-height: auto; }
  .blog-hero__img-wrap { height: 280px; }
  .blog-hero__body { padding: 36px 32px; }
  .blog-nav__links { display: none; }
  .blog-nav__cta { display: none; }
  .blog-nav__toggle { display: flex; }
}

@media (max-width: 620px) {
  .blog-grid { grid-template-columns: 1fr; gap: 32px; }
  .post-related__grid { grid-template-columns: 1fr; }
  .blog-footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .post-header { padding: 0 20px; }
  .post-body { padding: 0 20px; }
}
