/* ============================================================================
   Public blog theme — editorial redesign.
   Warm paper background, Inter for UI/headings, Lora for reading, IBM Plex Mono
   for code. Accent + detailing follow the "Blog Redesign" design doc.
   (Admin uses Bootstrap via _Layout; this file styles only the public site.)
   ========================================================================== */

:root {
  --bg: #fefefc;                /* warm paper */
  --surface: #f6f6f3;           /* insets: tl;dr, subscribe box */
  --text: #141412;             /* headings / near-black ink */
  --body: #242422;             /* long-form body copy */
  --body-soft: #33332f;        /* excerpts, secondary prose */
  --muted: #7a7a75;
  --faint: #8a8a85;
  --hair: #c7c7c2;             /* separators between inline meta */
  --border: #ececea;
  --accent: #3257c5;            /* fallback for browsers without oklch */
  --accent: oklch(52% 0.14 255);
  --accent-weak: #eef0f6;
  --code-bg: #161513;           /* warm dark */
  --code-text: #e7e5df;
  --inline-code-bg: #f2f2ef;
  --inline-code: #a83a2c;
  --chip-bg: #f3f3f1;
  --chip-text: #5a5a55;
  --cat-bg: #eef0f6;
  --maxw: 720px;
  --feedw: 860px;
  --headerw: 1100px;

  --serif: "Lora", Georgia, Cambria, "Times New Roman", Times, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #cfe0ff; }

a { color: var(--accent); }

/* ---- Header ---------------------------------------------------------------*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(254, 254, 252, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  position: relative;
  max-width: var(--headerw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
}
.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }

.search { display: flex; align-items: center; margin-left: auto; }
.search input {
  font-family: var(--sans);
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f5f5f3;
  width: 200px;
  max-width: 46vw;
  outline: none;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.search input:focus { background: #fff; border-color: #cfcfcf; }
.search button { display: none; }   /* submit on Enter; keeps the bar clean */

/* ---- Layout ---------------------------------------------------------------*/
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
/* Home/listing feed: a comfortable editorial column, wider than a post but
   narrower than the full header width. */
.container--feed { max-width: var(--feedw); }
/* Legacy wide alias kept for any listing that still asks for it. */
.container--wide { max-width: var(--headerw); }
main { padding: 3.5rem 0 5rem; }

/* ---- Cookie consent banner ------------------------------------------------*/
.cookie-banner {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 40;
  max-width: var(--headerw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: #1c1c1a;
  color: #f3f3f1;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  font-family: var(--sans);
}
.cookie-banner__text { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.cookie-banner__text a { color: #b9cbff; text-decoration: underline; }
.cookie-banner__accept {
  flex: 0 0 auto;
  font-family: var(--sans); font-weight: 600; font-size: 0.9rem;
  cursor: pointer;
  padding: 0.55rem 1.4rem;
  border: none; border-radius: 999px;
  background: #fff; color: #1c1c1a;
}
.cookie-banner__accept:hover { background: #e9e9e7; }
@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page-title { font-size: 2.1rem; letter-spacing: -0.03em; margin: 0 0 0.5rem; }
.page-subtitle { font-family: var(--sans); color: var(--muted); font-size: 1rem; margin: 0 0 3rem; }
.empty { color: var(--muted); font-family: var(--sans); }

/* Small uppercase eyebrow used above titles (e.g. "Latest", a post's category). */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

/* ---- Post list ------------------------------------------------------------*/
.post-card { padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.post-card:last-of-type { border-bottom: none; }
.post-card__title { font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1.3; margin: 0 0 0.5rem; }
.post-card__title a { color: var(--text); text-decoration: none; }
.post-card__title a:hover { color: var(--accent); }
.post-card__meta { font-family: var(--sans); font-size: 0.82rem; color: var(--faint); margin: 0 0 0.85rem; }
.post-card__meta .dot { color: var(--hair); }
.post-card__excerpt { margin: 0 0 1rem; color: var(--body-soft); font-size: 1.08rem; line-height: 1.65; }

/* Featured (latest) post at the top of the feed — larger, with a "Latest" eyebrow. */
.post-card--featured { padding-bottom: 3rem; margin-bottom: 3rem; }
.post-card--featured .post-card__title { font-size: 2rem; letter-spacing: -0.02em; line-height: 1.2; }
.post-card--featured .post-card__excerpt { font-size: 1.15rem; }

/* ---- Single post ----------------------------------------------------------*/
.post__header { margin-bottom: 2.2rem; }
.post__title { font-size: 3rem; line-height: 1.08; margin: 0 0 1.3rem; letter-spacing: -0.025em; }
.post__meta { font-family: var(--sans); color: var(--faint); font-size: 0.9rem; }
.post__meta .dot { color: var(--hair); }

/* Author row under the title: monogram avatar + name + date. */
.byline { display: flex; align-items: center; gap: 0.75rem; font-family: var(--sans); }
.byline__avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-weak); color: var(--accent);
  font-weight: 700; font-size: 0.95rem; letter-spacing: -0.02em;
}
.byline__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.byline__name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.byline__name a { color: inherit; text-decoration: none; }
.byline__name a:hover { text-decoration: underline; }
.byline__meta { font-size: 0.8rem; color: var(--faint); }
.byline__meta .dot { color: var(--hair); }

/* Rendered markdown */
.prose { font-size: 1.18rem; line-height: 1.8; color: var(--body); }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.6rem; }
.prose h2 { font-size: 1.6rem; margin: 2.8rem 0 1rem; scroll-margin-top: 5.5rem; }
.prose h3 { font-size: 1.32rem; margin: 2.3rem 0 0.8rem; scroll-margin-top: 5.5rem; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: #c2c2c2; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.prose ul, .prose ol { margin: 0 0 1.6rem; padding-left: 1.4rem; }
.prose li { margin: 0.45rem 0; }
.prose blockquote {
  margin: 2.2rem 0;
  padding: 0.2rem 0 0.2rem 1.5rem;
  border-left: 3px solid var(--text);
  color: var(--text);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.55;
}
.prose img { max-width: 100%; height: auto; display: block; margin: 2.2rem auto; border-radius: 10px; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 3rem auto; width: 40%; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; font-family: var(--sans); margin: 0 0 1.8rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.prose th { background: #f6f6f3; }

/* ---- Code (the technical focus) ------------------------------------------*/
.prose :not(pre) > code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--inline-code-bg);
  padding: 0.15em 0.4em;
  border-radius: 5px;
  color: var(--inline-code);
}
.prose pre {
  font-family: var(--mono);
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 0.92rem;
  line-height: 1.65;
  padding: 1.2rem 1.4rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 0 0 1.8rem;
  -webkit-font-smoothing: auto;
}
.prose pre code { font-family: inherit; background: none; padding: 0; font-size: 1em; color: inherit; }
/* highlight.js sets .hljs background; keep it consistent with the fallback */
.prose pre code.hljs { background: transparent; padding: 0; }

/* ---- Tags / footer of a post ---------------------------------------------*/
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; font-family: var(--sans); }
.tag {
  font-size: 0.78rem;
  color: var(--chip-text);
  background: var(--chip-bg);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.tag:hover { background: var(--accent-weak); color: var(--accent); }
.tag--cat { background: var(--cat-bg); }
.post__footer { margin-top: 2.8rem; padding-top: 1.6rem; border-top: 1px solid var(--border); }

/* ---- Pager ----------------------------------------------------------------*/
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 2.5rem; font-family: var(--sans); font-size: 0.9rem; }
.pager a, .pager span { padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text); }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager span.disabled { color: var(--faint); border-color: transparent; }
.pager .pager__status { border: none; color: var(--muted); }

/* ---- Footer ---------------------------------------------------------------*/
.site-footer { border-top: 1px solid var(--border); font-family: var(--sans); }
.site-footer__inner {
  max-width: var(--headerw);
  margin: 0 auto;
  padding: 1.6rem 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--faint);
  font-size: 0.85rem;
}
.site-footer a { color: var(--faint); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---- Primary nav (Home / Categories ▾ / Tags ▾) --------------------------*/
.nav { display: flex; align-items: center; flex: 1; gap: 1.5rem; margin-left: 2rem; font-family: var(--sans); font-size: 0.92rem; }
.nav__link { color: var(--text); text-decoration: none; font-weight: 500; cursor: pointer; white-space: nowrap; }
.nav__link:hover { color: var(--accent); }
.nav__item { position: relative; outline: none; }
.nav__menu {
  position: absolute; top: 100%; left: 0; margin-top: 0.4rem;
  min-width: 210px; max-height: 360px; overflow: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1); padding: 0.4rem; display: none; z-index: 30;
}
.nav__item:hover .nav__menu, .nav__item:focus-within .nav__menu { display: block; }
.nav__menu a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.4rem 0.6rem; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 0.9rem; }
.nav__menu a:hover { background: var(--accent-weak); color: var(--accent); }
.nav__count { color: var(--faint); font-size: 0.78rem; }
.nav__empty { display: block; padding: 0.4rem 0.6rem; color: var(--faint); font-size: 0.85rem; }

/* Hamburger toggle — hidden on desktop, shown below the nav breakpoint. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 38px;
  padding: 9px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle__bar { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.dot { color: var(--hair); margin: 0 0.35rem; }

/* ---- Post page: article + sidebar grid -----------------------------------*/
.post-shell { max-width: var(--headerw); margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 4.5rem; align-items: start; }
.post-main { min-width: 0; }

.sidebar { font-family: var(--sans); }
.sidebar__sticky { position: sticky; top: 5.5rem; }
.sidebar__section + .sidebar__section { margin-top: 2.2rem; padding-top: 2.2rem; border-top: 1px solid var(--border); }
/* A hidden section must not impose the inter-section separator on the next one. */
.sidebar__section[hidden] + .sidebar__section { margin-top: 0; padding-top: 0; border-top: none; }

/* "On this page" table of contents */
.toc { display: flex; flex-direction: column; gap: 0.65rem; }
.toc__link {
  text-decoration: none; font-size: 0.9rem; line-height: 1.4;
  color: var(--muted); padding-left: 0.8rem; border-left: 2px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}
.toc__link:hover { color: var(--text); }
.toc__link--h3 { padding-left: 1.6rem; font-size: 0.86rem; }
.toc__link.is-active { color: var(--text); font-weight: 600; border-left-color: var(--accent); }

/* Floating "On this page" control — fixed bottom-left, opens the TOC panel. */
.toc-fab { position: fixed; left: 1.25rem; bottom: 1.25rem; z-index: 50; font-family: var(--sans); }
.toc-fab__btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--text); color: #fff; border: none; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, background 0.15s;
}
.toc-fab__btn:hover { transform: translateY(-1px); }
.toc-fab__btn[aria-expanded="true"] { background: var(--accent); }
.toc-fab__panel {
  position: absolute; left: 0; bottom: calc(100% + 0.6rem);
  width: 264px; max-height: 60vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16); padding: 1rem 1.1rem;
}
.toc-fab__title {
  font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); margin-bottom: 0.8rem;
}
.sidebar__title { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin: 0 0 1rem; }
.sidebar__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sidebar__tags .tag { font-size: 0.78rem; }
.tag__count { color: var(--faint); font-size: 0.72rem; margin-left: 0.15rem; }
.sidebar__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.sidebar__list li { position: relative; }
.sidebar__list a { display: block; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.92rem; line-height: 1.35; }
.sidebar__list a:hover { color: var(--accent); }
.sidebar__date { display: block; color: var(--faint); font-size: 0.76rem; margin-top: 0.2rem; }
.sidebar__list li.is-current a { color: var(--accent); }

/* Sidebar author card */
.sidebar__author { display: flex; gap: 0.85rem; align-items: flex-start; }
.sidebar__author-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-weak); color: var(--accent); font-weight: 700;
}
.sidebar__author-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar__author-name { font-weight: 600; font-size: 0.92rem; color: var(--text); margin-bottom: 0.2rem; }
.sidebar__author-name a { color: inherit; text-decoration: none; }
.sidebar__author-name a:hover { text-decoration: underline; }
.sidebar__author-bio { font-size: 0.84rem; line-height: 1.5; color: var(--muted); }

/* Subscribe box (sidebar + inline) */
.subscribe__note { font-size: 0.84rem; line-height: 1.5; color: var(--muted); margin: 0 0 0.9rem; }
.subscribe__form { display: flex; flex-direction: column; gap: 0.55rem; }
.subscribe__input {
  font-family: var(--sans); font-size: 0.88rem; padding: 0.55rem 0.75rem;
  border: 1px solid var(--border); border-radius: 6px; background: #fafaf8; outline: none; color: var(--text);
}
.subscribe__input:focus { background: #fff; border-color: #cfcfcf; }
.subscribe__btn {
  font-family: var(--sans); font-weight: 600; font-size: 0.88rem; cursor: pointer;
  padding: 0.55rem 0.9rem; border: none; border-radius: 6px; background: var(--accent); color: #fff;
}
.subscribe__btn:hover { filter: brightness(1.06); }
.subscribe__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.subscribe__msg { font-size: 0.82rem; line-height: 1.45; color: var(--accent); margin: 0 0 0.6rem; }

/* ---- Prev / next ----------------------------------------------------------*/
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.8rem; padding-top: 1.6rem; border-top: 1px solid var(--border); font-family: var(--sans); }
.post-nav__cell--right { text-align: right; }
.post-nav__link { display: inline-flex; flex-direction: column; gap: 0.25rem; text-decoration: none; color: var(--text); max-width: 100%; }
.post-nav__link--right { align-items: flex-end; }
.post-nav__link:hover .post-nav__title { color: var(--accent); }
.post-nav__dir { font-size: 0.78rem; color: var(--faint); }
.post-nav__title { font-weight: 600; line-height: 1.3; }

/* ---- Code copy button -----------------------------------------------------*/
.prose pre { position: relative; }
.copy-btn {
  position: absolute; top: 0.5rem; right: 0.5rem;
  font-family: var(--sans); font-size: 0.72rem; color: #c9d1d9;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px; padding: 0.2rem 0.55rem; cursor: pointer; opacity: 0; transition: opacity 0.15s, background 0.15s;
}
.prose pre:hover .copy-btn, .copy-btn:focus { opacity: 1; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.18); }

.site-footer__links a { margin: 0 0.15rem; }

/* ---- Work page: intro, experience timeline, project cards -----------------*/
.work-intro { font-family: var(--serif); font-size: 1.2rem; color: var(--body-soft); line-height: 1.6; margin: 0.5rem 0 0; }
.work-section { margin-top: 3.5rem; }
.work-section__title { font-size: 1.5rem; margin: 0 0 1.5rem; }

.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 0.4rem; bottom: 0.4rem; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -1.75rem; top: 0.45rem;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 3px var(--bg);
}
.role__title { font-size: 1.2rem; margin: 0 0 0.2rem; }
.role__meta { font-family: var(--sans); font-size: 0.88rem; color: var(--muted); margin: 0 0 0.6rem; }
.role__summary { font-family: var(--sans); font-size: 0.98rem; color: var(--body-soft); margin: 0 0 0.6rem; line-height: 1.6; }
.role__highlights { font-family: var(--sans); font-size: 0.95rem; color: var(--body-soft); margin: 0; padding-left: 1.2rem; }
.role__highlights li { margin: 0.3rem 0; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.project-card { border: 1px solid var(--border); border-radius: 12px; padding: 1.15rem 1.2rem; transition: box-shadow 0.15s, transform 0.15s; background: #fff; }
.project-card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07); transform: translateY(-2px); }
.project-card__name { font-size: 1.1rem; margin: 0 0 0.4rem; }
.project-card__name a { color: var(--text); text-decoration: none; }
.project-card__name a:hover { color: var(--accent); }
.project-card__desc { font-family: var(--sans); font-size: 0.92rem; color: var(--body-soft); line-height: 1.55; margin: 0 0 0.8rem; }
.project-card__tech { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip { font-family: var(--sans); font-size: 0.72rem; color: var(--chip-text); background: var(--chip-bg); border-radius: 999px; padding: 0.2rem 0.55rem; }

/* ---- Responsive -----------------------------------------------------------*/
@media (max-width: 900px) {
  .post-shell { grid-template-columns: 1fr; gap: 0; }
  .sidebar { display: none; }
}

/* Collapse the primary nav into a hamburger-toggled panel. */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.5rem 1rem 1rem;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
  }
  .nav.is-open { display: flex; }

  .nav > .nav__link,
  .nav__item > .nav__link { display: block; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--border); }

  /* Categories: expand the list inline instead of relying on a hover dropdown. */
  .nav__item { position: static; width: 100%; }
  .nav__menu {
    position: static; display: block; margin: 0 0 0.25rem;
    min-width: 0; max-height: none; overflow: visible;
    border: none; border-radius: 0; box-shadow: none; padding: 0.25rem 0 0.5rem 0.75rem;
  }

  .search { display: flex; width: 100%; margin: 0.75rem 0 0; }
  .search input { width: 100%; max-width: none; }
}

@media (max-width: 640px) {
  body { font-size: 18px; }
  .post__title { font-size: 2.1rem; }
  .post-card--featured .post-card__title { font-size: 1.7rem; }
  .prose { font-size: 1.12rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__cell--right, .post-nav__link--right { text-align: left; align-items: flex-start; }
}
