/* assets/css/style.css */

/* === Font Faces === */
@font-face {
  font-family: 'Operator Mono';
  src: url('../fonts/OperatorMono-Book.woff2') format('woff2'),
       url('../fonts/OperatorMono-Book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Operator Mono';
  src: url('../fonts/OperatorMono-BookItalic.woff2') format('woff2'),
       url('../fonts/OperatorMono-BookItalic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Operator Mono';
  src: url('../fonts/OperatorMono-Medium.woff2') format('woff2'),
       url('../fonts/OperatorMono-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* === CSS Custom Properties: Dark (default) === */
:root {
  --bg: #1a1209;
  --surface: #2e2218;
  --border: #3d2e1f;
  --text-primary: #e8d5c4;
  --text-secondary: #8b7355;
  --text-muted: #6b5744;
  --accent: #c4753b;
  --accent-hover: #d4854b;
  --code-bg: #2c1810;
  --code-header-bg: #2e2218;
  --card-shadow: rgba(0, 0, 0, 0.2);
  --featured-gradient-start: #2e2218;
  --featured-gradient-end: #1a1209;
}

/* === Light Mode === */
[data-theme="light"] {
  --bg: #fdf6ee;
  --surface: #f5ebe0;
  --border: #ecdcc8;
  --text-primary: #2c1810;
  --text-secondary: #6b5744;
  --text-muted: #a0896e;
  --accent: #c4753b;
  --accent-hover: #b5652b;
  --code-bg: #2c1810;
  --code-header-bg: #3d3228;
  --card-shadow: rgba(120, 80, 40, 0.08);
  --featured-gradient-start: #2c1810;
  --featured-gradient-end: #1a1209;
}

/* Light mode code blocks toggled to latte */
[data-theme="light"] .code-block[data-code-theme="latte"] {
  --code-bg: #f5ebe0;
  --code-header-bg: #ecdcc8;
}

/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.3;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

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

/* === Nav === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
}
.nav-logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 20px; font-size: 14px; }
.nav-links a { color: var(--text-secondary); font-weight: 500; }
.nav-links a:hover { color: var(--text-primary); }
.nav-links .rss-link { color: var(--accent); }

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 4px; flex-direction: column; gap: 5px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Theme toggle */
.theme-toggle {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; font-size: 16px; color: var(--text-muted);
}
.theme-toggle-track {
  width: 40px; height: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  position: relative;
  transition: background 0.3s;
}
.theme-toggle-thumb {
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute; top: 1px; left: 1px;
  transition: transform 0.3s;
}
[data-theme="light"] .theme-toggle-thumb { transform: translateX(18px); }

/* === Category Tabs === */
.category-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.cat-tab {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 8px;
  cursor: pointer; border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary);
  transition: all 0.2s;
}
.cat-tab:hover { border-color: var(--accent); color: var(--accent); }
.cat-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* === Featured Post === */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 32px;
  text-decoration: none;
  box-shadow: 0 4px 16px var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.featured-post:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px var(--card-shadow);
  color: inherit;
}
.featured-img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  background: var(--surface);
}
.featured-img--placeholder {
  background: linear-gradient(135deg, var(--accent), var(--surface));
}
.featured-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.featured-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
}
.featured-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
}

/* === Post Grid === */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.post-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--card-shadow);
  color: inherit;
}
.post-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--surface);
}
.post-card-img--placeholder {
  background: linear-gradient(135deg, var(--accent), var(--surface));
}
.post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.post-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 8px;
}
.post-card-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-tags {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-top: 10px;
}

/* === Content Container === */
.content-wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px; }
.content-wrap--wide { max-width: 960px; }

/* === Single Post === */
.post-badges { display: flex; gap: 8px; margin-bottom: 14px; }
.badge {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px;
}
.badge-primary { background: var(--accent); color: #fff; }
.badge-secondary { background: var(--surface); color: var(--accent); }

.post-header .post-title {
  font-size: 34px; font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.post-byline {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 28px;
}
.post-byline .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 12px;
}
.post-byline .avatar img { border-radius: 100%; }
.post-byline .author-name { font-weight: 600; color: var(--text-secondary); }

.post-featured-image {
  width: 100%; border-radius: 14px;
  margin-bottom: 36px;
  box-shadow: 0 4px 20px var(--card-shadow);
}

/* === Article Body === */
.article-body { font-size: 16px; line-height: 1.85; color: var(--text-primary); }
.article-body p { margin-bottom: 18px; }
.article-body h2 { font-size: 24px; font-weight: 700; margin: 36px 0 14px; }
.article-body h3 { font-size: 20px; font-weight: 600; margin: 28px 0 12px; }
.article-body strong { color: var(--text-primary); }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 6px; }
.article-body pre { line-height: 1.15; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px; margin: 24px 0;
  background: var(--surface); border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--text-secondary);
}
.article-body blockquote > *:last-child { margin-bottom: 0; }
.article-body img {
  border-radius: 10px;
  margin: 24px 0;
}
.article-body a { color: var(--accent); text-decoration: underline; }

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  overflow-x: auto;
  display: block;
}
.article-body thead {
  background: var(--surface);
}
.article-body th, .article-body td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.article-body th {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.article-body td {
  color: var(--text-primary);
}
.article-body tbody tr:nth-child(even) {
  background: var(--surface);
}
.article-body tbody tr:hover {
  background: var(--surface);
}

/* Inline code */
.article-body code:not(pre code) {
  font-family: 'Operator Mono', monospace;
  background: var(--code-bg);
  color: #e8a87c;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
[data-theme="light"] .article-body code:not(pre code) {
  background: var(--surface);
  color: #b5532e;
  border: 1px solid var(--border);
}

/* === Code Blocks === */
.code-block {
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px var(--card-shadow);
}
.code-block .code-header {
  background: var(--code-header-bg);
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-dot-red { background: #e85d4a; }
.code-dot-yellow { background: #d4a843; }
.code-dot-green { background: #5a7a2e; }
.code-header-right { display: flex; align-items: center; gap: 12px; }
.code-lang {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted);
}
.code-copy-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 12px;
  padding: 2px 6px; border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.code-copy-btn:hover { color: var(--accent); background: rgba(196, 117, 59, 0.1); }
.code-theme-toggle {
  background: none; border: 1px solid var(--text-muted); cursor: pointer;
  color: var(--text-muted); font-size: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}
[data-theme="light"] .code-theme-toggle { display: flex; }

.code-block pre {
  background: var(--code-bg);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0;
  transition: background 0.3s;
}
.code-block pre code {
  font-family: 'Operator Mono', monospace;
  font-size: 14px;
  line-height: 1.15;
  color: #e8d5c4;
}

/* === Tags Section === */
.tags-section {
  border-top: 1px solid var(--border);
  padding: 24px 0; margin-top: 24px;
}
.tags-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); margin-bottom: 12px;
}
.tags-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  font-size: 12px; color: var(--text-secondary);
  background: var(--surface); padding: 5px 12px;
  border-radius: 6px; font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.tag-pill:hover { background: var(--accent); color: #fff; }

/* === Continue the Discussion === */
.discussion-section {
  border-top: 1px solid var(--border);
  padding: 24px 0; margin-top: 24px;
}
.discussion-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); margin-bottom: 12px;
}
.discussion-links { display: flex; flex-wrap: wrap; gap: 10px; }
.discussion-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; padding: 8px 16px;
  border-radius: 8px; color: #fff;
  transition: opacity 0.2s, transform 0.2s;
  text-decoration: none;
}
.discussion-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.discussion-linkedin { background: #0A66C2; }
.discussion-twitter { background: #000; }
.discussion-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.discussion-facebook { background: #1877F2; }
.discussion-threads { background: #000; }
.discussion-bluesky { background: #0085FF; }

/* === Author Bio === */
.author-bio {
  background: var(--surface);
  border-radius: 14px; padding: 22px;
  display: flex; gap: 18px; align-items: center;
  margin: 32px 0; border: 1px solid var(--border);
}
.author-bio .avatar-lg {
  width: 56px; height: 56px;
  border-radius: 50%; flex-shrink: 0;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 18px;
}
.author-bio .avatar-lg img {
  border-radius: 100%;
}
.author-bio .author-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px; font-weight: 700; color: var(--text-primary);
}
.author-bio .author-desc {
  font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.5;
}

/* === Related Posts === */
.related-section {
  background: var(--surface);
  padding: 44px 24px;
}
.related-inner { max-width: 720px; margin: 0 auto; }
.related-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px; font-weight: 800;
  color: var(--text-primary); margin-bottom: 6px;
}
.related-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card {
  background: var(--bg);
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px var(--card-shadow); }
.related-card .card-img { height: 100px; background: var(--surface); object-fit: cover; width: 100%; }
.related-card .card-body { padding: 14px; }
.related-card .card-cat {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--accent); margin-bottom: 5px;
}
.related-card .card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 700;
  color: var(--text-primary); line-height: 1.4;
}
.related-card .card-date { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* === Prev/Next === */
.prev-next {
  display: flex; justify-content: space-between;
  max-width: 720px; margin: 0 auto; padding: 24px;
}
.prev-next a {
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  text-decoration: none;
}
.prev-next a:hover { color: var(--accent); }
.prev-next .link-title { color: var(--text-primary); font-weight: 600; }

/* === Pagination === */
.pagination {
  display: flex; justify-content: center; gap: 8px;
  padding: 32px 0;
}
.pagination a, .pagination span {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination--mobile { display: none; }
.pagination-select {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  appearance: auto;
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 32px; text-align: center;
  font-size: 12px; color: var(--text-muted);
}

/* === Tags Index Page === */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tags-cloud .tag-pill { font-size: 14px; padding: 8px 16px; }
.tags-cloud .tag-count { font-size: 11px; color: var(--text-muted); margin-left: 4px; }

/* === Search === */
.search-heading {
  font-size: 28px; font-weight: 800;
  margin-bottom: 20px;
}
.search-box { margin-bottom: 28px; }
.search-input {
  width: 100%;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  padding: 14px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }
.search-empty {
  text-align: center;
  padding: 48px 0;
  font-size: 15px;
  color: var(--text-muted);
}

/* === 404 === */
.error-page {
  text-align: center; padding: 80px 24px;
}
.error-page h1 { font-size: 72px; color: var(--accent); margin-bottom: 12px; }
.error-page p { font-size: 18px; color: var(--text-secondary); }

/* === Flyout — Support & Socials === */
.flyout {
  position: fixed;
  right: 0; top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  align-items: center;
}
.flyout-tab {
  width: 44px; height: 44px;
  border-radius: 12px 0 0 12px;
  background: var(--accent);
  color: #fff;
  border: none; cursor: pointer;
  font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: -2px 2px 12px rgba(0,0,0,0.2);
  transition: background 0.2s, transform 0.2s;
  position: relative; z-index: 2;
}
.flyout-tab:hover { background: var(--accent-hover); }
.flyout-tab-icon {
  display: inline-block;
  transition: transform 0.3s;
}
.flyout.open .flyout-tab-icon {
  transform: rotate(360deg) scale(1.15);
}
.flyout-panel {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%) translateX(100%);
  opacity: 0;
  pointer-events: none;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px 0 0 14px;
  box-shadow: -4px 4px 24px rgba(0,0,0,0.25);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  min-width: 220px;
}
.flyout.open .flyout-panel {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
  right: 0;
}
/* hide the tab when panel is open so panel hugs the edge */
.flyout.open .flyout-tab {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.flyout-card {
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s;
}
.flyout-card:hover { transform: translateX(-3px); }
.flyout-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: #fff;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
}
.flyout-pizza .flyout-link {
  background: linear-gradient(135deg, #ff813f, #ff5f1f);
}
.flyout-yt .flyout-link {
  background: linear-gradient(135deg, #ff0000, #cc0000);
}
.flyout-li .flyout-link {
  background: linear-gradient(135deg, #0A66C2, #004182);
}
.flyout-bmc-logo { flex-shrink: 0; }
.flyout-icon { width: 24px; height: 24px; flex-shrink: 0; }
.flyout-card-title {
  font-size: 13px; font-weight: 700;
  line-height: 1.2;
}
.flyout-card-sub {
  font-size: 10px; font-weight: 500;
  opacity: 0.8; margin-top: 2px;
}

/* Staggered entrance for cards */
.flyout.open .flyout-card {
  animation: flyoutSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.flyout.open .flyout-card:nth-child(1) { animation-delay: 0.05s; }
.flyout.open .flyout-card:nth-child(2) { animation-delay: 0.12s; }
.flyout.open .flyout-card:nth-child(3) { animation-delay: 0.19s; }
@keyframes flyoutSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav {
    padding: 14px 16px;
    flex-wrap: wrap;
  }
  .nav-hamburger { display: flex; }
  .nav-right {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: 14px;
  }
  .nav-right.open { display: flex; }
  .nav-links {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child { border-bottom: none; }
  .theme-toggle {
    padding: 12px 0 4px;
    justify-content: center;
  }

  /* Hamburger animation when open */
  .nav-hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .nav-hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .content-wrap { padding: 32px 16px; }
  .post-header .post-title { font-size: 26px; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-img { min-height: 180px; }
  .pagination--desktop { display: none; }
  .pagination--mobile { display: flex; }
  .post-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .prev-next { flex-direction: column; gap: 12px; }

  /* Flyout — mobile: FAB at bottom-right, expands upward */
  .flyout {
    top: auto; bottom: 20px; right: 16px;
    transform: none;
    flex-direction: column-reverse;
    align-items: flex-end;
  }
  .flyout-tab {
    width: 52px; height: 52px;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }
  .flyout.open .flyout-tab {
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: var(--text-muted);
  }
  .flyout.open .flyout-tab-icon {
    transform: rotate(45deg);
    font-size: 24px;
  }
  /* override the × look */
  .flyout.open .flyout-tab-icon::after {
    content: '\00d7';
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .flyout.open .flyout-tab-icon { font-size: 0; }
  .flyout.open .flyout-tab-icon::after { font-size: 24px; }
  .flyout-panel {
    position: relative;
    top: auto; right: auto;
    transform: translateY(20px);
    border-radius: 14px;
    margin-bottom: 10px;
    min-width: 200px;
  }
  .flyout.open .flyout-panel {
    transform: translateY(0);
  }
}
