/* ─────────────────────────────────────────────
   VARIABLES & RESET
───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Alegreya+SC:wght@400;700&family=Alegreya:ital,wght@0,400;0,500;0,700;1,400;1,500&family=Alegreya+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&display=swap');

:root {
  --green:       #275D43;
  --green-dark:  #1a3f2e;
  --green-light: #e8f0ec;
  --brown:       #E09964;
  --ink:         #2a2a2a;
  --ink-muted:   #6b6b6b;
  --border:      #dde5e0;
  --mist:        #FAFAF2;
  --white:       #ffffff;

  --font-serif:  'Alegreya', Georgia, serif;
  --font-sans:   'Alegreya Sans', system-ui, sans-serif;

  --max-w:       740px;
  --max-w-home:  1100px;
  --side-pad:    clamp(1.25rem, 5vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── HEADER ─── */

.site-header {
  color: var(--green);
  padding: 0 var(--side-pad);
  position: sticky;
  top: 0;
  z-index: 100;
  background: (250, 250, 242, .786);
}

.header-inner {
  max-width: var(--max-w-home);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.site-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: oblique;
  font-weight: 700;
  color: var(--green);
}

.site-name a { color: inherit; }
.site-name a:hover { text-decoration: none; opacity: .85; }

.header-nav { display: flex; align-items: center; gap: 1.5rem; }

.header-nav a {
  color: var(--green);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .02em;
}

.header-nav a:hover { color: #fff; text-decoration: none; }

/* ─── LAYOUT ─── */

#main {
  max-width: var(--max-w-home);
  margin: 0 auto;
  padding: 2.5rem var(--side-pad) 4rem;
  min-height: 60vh;
}

/* Single post pages stay narrow for readability */
.post-page {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ─── HOME TWO-COLUMN LAYOUT ─── */

.home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

.home-main { min-width: 0; }

.home-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ─── SIDEBAR: DICTIONARY ENTRY ─── */

.sidebar-dict {
  background: var(--mist);
}

.dict-headword {
  display: flex;
  align-items: baseline;
 }

.dict-term {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: -.01em;
}

.dict-pos {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-style: italic;
  color: var(--ink-muted);
  font-weight: 400;
  white-space: nowrap;
}

.dict-body {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.dict-def,
.dict-note {
  font-family: var(--font-sans);
  font-size: .84rem;
  line-height: 1.7;
  color: var(--ink-muted);
}

/* ─── SIDEBAR: TAGS ─── */

.sidebar-tags {
  background: var(--mist);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.4rem 1.25rem;
}

.sidebar-heading {
  font-family: var(--font-sans);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-muted);
  margin-bottom: .75rem;
}

.sidebar-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

/* ─── CONTROLS (sort, above article list) ─── */

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.active-filter {
  font-size: .82rem;
  color: var(--ink-muted);
}

.active-filter strong { color: var(--green); }

.active-filter button {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: .78rem;
  color: var(--ink-muted);
  cursor: pointer;
  margin-left: .35rem;
  padding: .1rem .35rem;
  border-radius: 4px;
  transition: background .15s, color .15s;
}

.active-filter button:hover {
  background: var(--border);
  color: var(--ink);
}

.filter-label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.tag-pill {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  padding: .25rem .75rem;
  border-radius: 999px;
  border: 1.5px solid var(--green);
  background: transparent;
  color: var(--green);
  cursor: pointer;
  transition: background .15s, color .15s;
  line-height: 1.5;
}

.tag-pill:hover, .tag-pill.active { background: var(--green); color: #fff; }

.sort-controls { display: flex; align-items: center; gap: .5rem; }

#sort-select {
  font-family: var(--font-sans);
  font-size: .85rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: .25rem .6rem;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  outline: none;
}

#sort-select:focus { border-color: var(--green); }

/* ─── POST CARDS ─── */

.posts-grid { display: flex; flex-direction: column; gap: 1.5rem; }

.post-card {
  background: var(--mist);
}

.post-card:hover {
  box-shadow: 0 4px 20px rgba(39,93,67,.1);
  transform: translateY(-2px);
}

.post-card.featured { border-left: 2px solid var(--green); }

.post-card-inner { padding: 1.5rem 1.75rem; }

.post-meta { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }

.post-meta time { font-size: .8rem; font-weight: 500; color: var(--ink-muted); }

.featured-badge {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--green);
  background: var(--green-light);
  padding: .15rem .55rem;
  border-radius: 999px;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .5rem;
}

.post-title a { color: var(--ink); }
.post-title a:hover { color: var(--green); text-decoration: none; }

.post-excerpt {
  color: var(--ink-muted);
  font-size: .975rem;
  margin-bottom: 1rem;
  line-height: 1.65;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-tags { display: flex; flex-wrap: wrap; gap: .4rem; }

.post-tag {
  font-size: .72rem;
  font-weight: 500;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
  letter-spacing: .02em;
}

.post-tag.clickable { cursor: pointer; transition: background .15s; }
.post-tag.clickable:hover { background: var(--green); color: #fff; }

.read-more { font-size: .85rem; font-weight: 600; color: var(--green); white-space: nowrap; }

.no-posts { color: var(--ink-muted); padding: 1rem 0; }

.no-posts button {
  background: none; border: none; color: var(--green);
  font-weight: 600; cursor: pointer; text-decoration: underline;
  font-family: inherit; font-size: inherit;
}

/* ─── SINGLE POST ─── */

.post-page { padding-top: 1.5rem; }

.back-link {
  display: inline-block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 2rem;
}

.post-full .post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-full .post-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  margin: .5rem 0 1rem;
  color: var(--ink);
}

.post-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink);
}

.post-body p { margin-bottom: 1.35em; }

.post-body h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2em 0 .6em;
  color: var(--green-dark);
}

.post-body h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.75em 0 .5em;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-muted);
}

.post-body a {
  color: var(--green);
  border-bottom: 1px solid var(--green-light);
  transition: border-color .15s;
}

.post-body a:hover { border-color: var(--green); text-decoration: none; }

.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.35em; }
.post-body li { margin-bottom: .35em; }

.post-body blockquote {
  border-left: 3px solid var(--green);
  margin: 1.75em 0;
  padding: .5rem 1.25rem;
  color: var(--ink-muted);
  font-style: italic;
  background: var(--green-light);
  border-radius: 0 6px 6px 0;
}

.post-body img { max-width: 100%; border-radius: 8px; margin: 1.5em 0; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }

.post-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ─── FOOTER ─── */

.site-footer {
  background: var(--green-dark);
  color: #fff;
  padding: 2rem var(--side-pad) 0;
  margin-top: 4rem;
  text-align: left;
}

.footer-inner {
  max-width: var(--max-w-home);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding-bottom: 1.25rem;
}

.footer-about .footer-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .4rem;
}

.footer-sc {
  font-variant: small-caps;
  font-feature-settings: "smcp";
  font-size: .88em;
  letter-spacing: .04em;
  color: rgba(255,255,255,.65);
  font-weight: 400;
}

.footer-about p { font-size: .85rem; line-height: 1.65; color: #fff; margin-bottom: .3rem; }
.footer-about a { color: var(--brown); text-decoration: underline; }
.footer-about a:hover { color: #fff; }
.footer-disclaimer { font-size: .75rem !important; color: rgba(255,255,255,.65) !important; font-style: italic; }

.footer-subscribe-heading {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brown);
  margin-bottom: .5rem;
}

.footer-subscribe > p {
  font-size: .85rem;
  color: #fff;
  margin-bottom: .75rem;
  line-height: 1.5;
}

/* MailerLite embed sits on green — override its background */
.footer-subscribe .ml-embedded { --ml-bg: transparent; }

/* ─── MAILERLITE OVERRIDES: footer (dark green bg) ─── */

.footer-subscribe .ml-embedded *,
.footer-subscribe .ml-embedded *::before,
.footer-subscribe .ml-embedded *::after { box-sizing: border-box !important; font-family: var(--font-sans) !important; }

.footer-subscribe .ml-embedded .ml-form-embedWrapper,
.footer-subscribe .ml-embedded .ml-form-embedBody,
.footer-subscribe .ml-embedded .ml-form-align-center { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; border-radius: 0 !important; }

.footer-subscribe .ml-embedded .ml-form-embedContent,
.footer-subscribe .ml-embedded .ml-form-embedContent h4,
.footer-subscribe .ml-embedded .ml-form-embedContent p { display: none !important; }

.footer-subscribe .ml-embedded .ml-form-formContent { display: flex !important; gap: .5rem !important; flex-wrap: wrap !important; padding: 0 !important; }
.footer-subscribe .ml-embedded .ml-field-group { flex: 1 !important; min-width: 160px !important; margin: 0 !important; }

.footer-subscribe .ml-embedded input[type="email"] {
  width: 100% !important; padding: .55rem .85rem !important;
  border-radius: 6px !important; border: 1.5px solid rgba(255,255,255,.25) !important;
  background: rgba(255,255,255,.1) !important; color: #fff !important;
  font-size: .875rem !important; height: auto !important;
  box-shadow: none !important; outline: none !important; line-height: 1.4 !important;
}
.footer-subscribe .ml-embedded input[type="email"]::placeholder { color: rgba(255,255,255,.4) !important; }
.footer-subscribe .ml-embedded input[type="email"]:focus { border-color: rgba(255,255,255,.65) !important; }

.footer-subscribe .ml-embedded .ml-form-embedSubmit,
.footer-subscribe .ml-embedded .ml-form-embedSubmit div { padding: 0 !important; margin: 0 !important; background: transparent !important; }
.footer-subscribe .ml-embedded .ml-form-embedSubmit button,
.footer-subscribe .ml-embedded input[type="submit"] {
  padding: .55rem 1.1rem !important; border-radius: 6px !important;
  border: none !important; background: #E09964 !important;
  color: #fff !important; font-size: .875rem !important;
  font-weight: 700 !important; cursor: pointer !important;
  white-space: nowrap !important; height: auto !important;
  box-shadow: none !important; line-height: 1.4 !important;
  transition: background .15s !important;
}
.footer-subscribe .ml-embedded .ml-form-embedSubmit button:hover { background: #c8844e !important; }

.footer-subscribe .ml-embedded .ml-form-successBody { background: transparent !important; border: none !important; padding: 0 !important; }
.footer-subscribe .ml-embedded .ml-form-successContent h4,
.footer-subscribe .ml-embedded .ml-form-successContent p { display: block !important; color: #fff !important; font-size: .875rem !important; background: transparent !important; }

.footer-subscribe .ml-embedded .ml-form-checkboxRow,
.footer-subscribe .ml-embedded .ml-form-recaptcha { font-size: .7rem !important; color: rgba(255,255,255,.4) !important; margin-top: .4rem !important; }
.footer-subscribe .ml-embedded .ml-form-checkboxRow a { color: rgba(255,255,255,.55) !important; }

.footer-credits {
  font-size: .72rem;
  color: rgba(255,255,255,.45);
  padding: .75rem 0;
  border-top: 1px solid rgba(255,255,255,.15);
}

.footer-credits a { color: rgba(255,255,255,.55); text-decoration: underline; }
.footer-credits a:hover { color: #fff; }

@media (max-width: 680px) {
  .footer-cols { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ─── ARTICLE FOOTER ─── */

.article-footer {
  margin-top: 3.5rem;
  border-top: 2px solid var(--green);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-footer-heading {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--green);
  margin-bottom: 1.25rem;
}

/* Related posts */

.article-footer-related {
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.related-card {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  text-decoration: none;
}

.related-card:hover {
  border-color: var(--green);
  box-shadow: 0 3px 12px rgba(39,93,67,.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.related-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .5rem;
}

.related-card-title {
  font-family: var(--font-serif);
  font-size: .975rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: .35rem;
}

.related-card-date {
  font-size: .75rem;
  color: var(--ink-muted);
}

.related-empty {
  color: var(--ink-muted);
  font-style: italic;
  font-size: .9rem;
  margin-bottom: 1rem;
}

.related-tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* Subscribe block */

.article-footer-subscribe {
  padding: 2.25rem 0 0;
}

.subscribe-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  background: var(--green-light);
  border-radius: 10px;
  padding: 1.75rem 2rem;
}

.subscribe-block-text p {
  font-size: .9375rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.subscribe-block-form .subscribe-form {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.subscribe-block-form .subscribe-form input[type="email"] {
  flex: 1;
  min-width: 180px;
  padding: .6rem .85rem;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .9rem;
  outline: none;
}

.subscribe-block-form .subscribe-form input[type="email"]:focus {
  border-color: var(--green);
}

.subscribe-block-form .subscribe-form button {
  padding: .6rem 1.1rem;
  border-radius: 6px;
  border: none;
  background: var(--green);
  color: #fff;
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}

.subscribe-block-form .subscribe-form button:hover {
  background: var(--green-dark);
}

.subscribe-note {
  font-size: .75rem;
  color: var(--ink-muted);
  margin-top: .5rem;
}

@media (max-width: 580px) {
  .subscribe-block {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.5rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── MISC ─── */

.post-loading, .not-found {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--ink-muted);
  font-style: italic;
}

.not-found a { display: block; margin-top: 1rem; font-style: normal; font-weight: 600; }

/* ─── RESPONSIVE ─── */

/* Collapse sidebar below main on tablet */
@media (max-width: 860px) {
  .home-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* Single column on mobile */
@media (max-width: 580px) {
  .home-sidebar {
    grid-template-columns: 1fr;
  }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .controls { flex-direction: column; }
  .post-card-inner { padding: 1.25rem; }
}

/* ---- OY ----*/
.small-caps {
  font-family: 'Alegreya SC', sans-serif;
  font-weight: normal;
  font-variant: small-caps; /* standard CSS property */
  font-feature-settings: "smcp"; /* low-level OpenType control */  
}