/* ============================================================
   site.css — Blog-specific styles for www.oldlane17.com
   Loaded AFTER main.css, topnav.css, footer.css.
   All colours come from CSS variables — no hard-coded hex
   outside the variable definitions below.
   ============================================================ */

/* ----------------------------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------------------------- */
:root {
  /* Four canonical colours (fixed by owner) */
  --bg-color:       #ffffff;
  --text-color:     #1a1a1a;
  --hover-color:    #182a69;
  --grey-accent:    #423B3A;

  /* Derived tokens */
  --footer-bg:      #02133e;    /* matches footer.css .footer-row-1 in light mode */
  --surface-color:  color-mix(in srgb, var(--bg-color) 92%, var(--text-color) 8%);
  --border-color:   color-mix(in srgb, var(--grey-accent) 30%, transparent 70%);
  --muted-color:    color-mix(in srgb, var(--text-color) 55%, transparent 45%);

  /* Layout measurements — updated from topnav.css analysis */
  /* topnav: top:10px; padding:10px 20px; logo:47px → bar height=67px, bar-bottom=77px */
  --topnav-offset:  10px;
  --topnav-height:  77px;   /* 10px top offset + 67px bar height */
  --subnav-height:  48px;

  /* highlight.js theme tokens — light */
  --hljs-bg:        #f4f4f4;
  --hljs-color:     #333;
  --hljs-keyword:   #182a69;
  --hljs-string:    #187240;
  --hljs-comment:   #777;
  --hljs-number:    #b85c00;
  --hljs-attr:      #0073a8;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg-color:       #02133e;
  --text-color:     #ffffff;
  --footer-bg:      var(--hover-color);  /* must stand out from #02133e page */
  --surface-color:  color-mix(in srgb, var(--bg-color) 88%, var(--text-color) 12%);
  --border-color:   color-mix(in srgb, var(--grey-accent) 40%, transparent 60%);
  --muted-color:    color-mix(in srgb, var(--text-color) 65%, transparent 35%);

  /* highlight.js theme tokens — dark */
  --hljs-bg:        #0d1f44;
  --hljs-color:     #e8eaf0;
  --hljs-keyword:   #7eb8f7;
  --hljs-string:    #7ecf9e;
  --hljs-comment:   #6a7fa3;
  --hljs-number:    #f4a361;
  --hljs-attr:      #64bde8;

  color-scheme: dark;
}

/* ----------------------------------------------------------
   2. BASE OVERRIDES (undo main.css hard-coded dark body)
   ---------------------------------------------------------- */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Font stack for code */
pre, code, kbd, samp {
  font-family: 'Roboto Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-size: 0.9em;
}

/* Override main.css global button (which uses hard-coded #182a69 background) */
button, .btn {
  background-color: var(--grey-accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}
button:hover, .btn:hover {
  background-color: var(--hover-color);
}

/* Icon-only button (theme toggle, search, arrows) — resets default padding */
.icon-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  padding: 7px 9px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-weight: normal;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover {
  background-color: var(--hover-color);
  border-color: var(--hover-color);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ----------------------------------------------------------
   3. LAYOUT OFFSETS (avoid content hidden under fixed bars)
   ---------------------------------------------------------- */
#header-placeholder {
  min-height: calc(var(--topnav-height) + var(--subnav-height));
}

.container {
  padding-top: calc(var(--topnav-height) + var(--subnav-height) + 32px);
  max-width: 860px;          /* comfortable reading width within 1000px container */
  line-height: 1.75;
}

/* ----------------------------------------------------------
   4. FOOTER VARIABLE OVERRIDE
   ---------------------------------------------------------- */
.footer-row-1 {
  background-color: var(--footer-bg);
}

/* ----------------------------------------------------------
   5. BLOG SUB-NAV
   ---------------------------------------------------------- */
.blog-subnav {
  position: fixed;
  top: var(--topnav-height);
  left: 0;
  right: 0;
  height: var(--subnav-height);
  z-index: 900;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  transition: top 0.3s ease, background-color 0.2s ease;
}

/* When the topnav hides (.nav-up), sub-bar slides up and stays visible */
.topnav.nav-up ~ #header-placeholder .blog-subnav,
.blog-subnav.nav-up-companion {
  top: 0;
}

/* Blog hamburger button (left of sub-bar) */
.blog-hamburger {
  flex-shrink: 0;
  position: relative;
}

/* Language strip wrapper (centre, flex:1) */
.lang-strip-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-width: 0;
}

/* Fade masks */
.lang-strip-wrapper::before,
.lang-strip-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  z-index: 1;
}
.lang-strip-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-color), transparent);
}
.lang-strip-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-color), transparent);
}

/* Scroll arrow buttons */
.lang-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  font-weight: bold;
}
.lang-arrow-left  { left: 2px; }
.lang-arrow-right { right: 2px; }
.lang-arrow[hidden], .lang-arrow.hidden { display: none !important; }
.lang-arrow:hover  { background: var(--hover-color); color: #fff; border-color: var(--hover-color); }

/* The scrollable strip itself */
.lang-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 0 36px; /* room for arrow buttons */
  align-items: center;
  -webkit-overflow-scrolling: touch;
  cursor: default;
  user-select: none;
}
.lang-strip::-webkit-scrollbar { display: none; }
.lang-strip.is-dragging { cursor: grabbing; }

/* Language chips */
.lang-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--grey-accent);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  scroll-snap-align: start;
  transition: background 0.2s ease;
  border: none;
  flex-shrink: 0;
}
.lang-chip:hover {
  background: var(--hover-color);
  color: #fff;
}
.lang-chip[aria-current="page"] {
  background: var(--hover-color);
  color: #fff;
}

/* Sub-nav right icons */
.subnav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ----------------------------------------------------------
   6. BLOG MENU DRAWER (hamburger / blog navigation)
   ---------------------------------------------------------- */
#blogMenu {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1800;    /* below #mySidenav (2000) if it opens from chess side */
  top: 0;
  left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--hover-color);
  transition: width 0.35s ease;
  padding-top: 60px;
  box-shadow: 4px 0 15px rgba(0,0,0,0.45);
  border-radius: 0 24px 24px 0;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
}
#blogMenu::-webkit-scrollbar { display: none; }
#blogMenu.open { width: 260px; }

.blog-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  font-weight: bold;
}

.blog-menu-content { flex: 1; }

.blog-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.blog-menu-nav a {
  color: #f1f1f1;
  text-decoration: none;
  padding: 10px 10px 10px 28px;
  font-size: 1.1rem;
  font-family: var(--main-font);
  border-radius: 10px;
  margin: 2px 8px;
  display: block;
  transition: background 0.2s ease;
}
.blog-menu-nav a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.blog-menu-nav a[aria-current="page"] {
  background: rgba(255,255,255,0.2);
  font-weight: bold;
}

#blog-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1700;
  background: rgba(0,0,0,0.4);
}
#blog-menu-overlay.open { display: block; }

/* ----------------------------------------------------------
   7. SEARCH OVERLAY
   ---------------------------------------------------------- */
#search-dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 600px;
  width: calc(100% - 32px);
  background: var(--surface-color);
  color: var(--text-color);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
  position: fixed;
  top: 15vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
}
#search-dialog::backdrop {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
}
.search-inner { padding: 20px; }
.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.search-input-row svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: var(--muted-color);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  color: var(--text-color);
  outline: none;
  font-family: var(--main-font);
}
#search-input::placeholder { color: var(--muted-color); }
#search-close-btn {
  background: none;
  border: none;
  color: var(--muted-color);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: normal;
}
#search-close-btn:hover { background: var(--border-color); }

#search-status {
  font-size: 0.8rem;
  color: var(--muted-color);
  margin-bottom: 8px;
  min-height: 1.2em;
}
#search-results {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 60vh;
  overflow-y: auto;
}
.search-result-item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-color);
  transition: background 0.15s ease;
}
.search-result-item:hover,
.search-result-item.focused {
  background: var(--surface-color);
  outline: 2px solid var(--hover-color);
}
.search-result-title {
  font-weight: 600;
  font-size: 1rem;
}
.search-result-meta {
  font-size: 0.78rem;
  color: var(--muted-color);
  margin-top: 2px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.search-result-excerpt {
  font-size: 0.82rem;
  color: var(--muted-color);
  margin-top: 4px;
}
mark {
  background: color-mix(in srgb, var(--hover-color) 25%, transparent);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* ----------------------------------------------------------
   8. POST CARDS (home & list pages)
   ---------------------------------------------------------- */
.posts-grid {
  display: grid;
  gap: 24px;
}

.post-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text-color);
  display: block;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.post-card:hover {
  border-color: var(--hover-color);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.post-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.post-card-date {
  font-size: 0.8rem;
  color: var(--muted-color);
}
.post-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.35;
}
.post-card-desc {
  font-size: 0.9rem;
  color: var(--muted-color);
  line-height: 1.6;
}
.post-card-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ----------------------------------------------------------
   9. LANGUAGE CHIPS (in cards, meta lines, etc.)
   ---------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--grey-accent);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.chip:hover { background: var(--hover-color); }
.chip.chip-tag {
  background: color-mix(in srgb, var(--grey-accent) 50%, transparent);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.chip.chip-tag:hover { background: var(--hover-color); color: #fff; border-color: var(--hover-color); }

/* ----------------------------------------------------------
   10. POST PAGE
   ---------------------------------------------------------- */
.post-hero {
  margin-bottom: 32px;
}
.post-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 12px 0 16px;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted-color);
  margin-bottom: 16px;
}
.post-cover {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 24px;
  object-fit: cover;
  max-height: 420px;
}

/* Prose styles */
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  margin: 2em 0 0.6em;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-color);
  scroll-margin-top: calc(var(--topnav-height) + var(--subnav-height) + 16px);
}
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.2rem; }

.post-content p { margin: 0 0 1.2em; }
.post-content ul, .post-content ol { margin: 0 0 1.2em 1.4em; }
.post-content li { margin-bottom: 0.4em; }

.post-content a { color: var(--hover-color); }
:root[data-theme="dark"] .post-content a { color: #7eb8f7; }
.post-content a:hover { text-decoration: underline; }

.post-content blockquote {
  border-left: 4px solid var(--hover-color);
  margin: 1.5em 0;
  padding: 12px 16px;
  background: var(--surface-color);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted-color);
}

/* Table wrapper (scrollable on mobile) */
.table-wrapper { overflow-x: auto; margin: 1.5em 0; }
.post-content table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
.post-content th, .post-content td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}
.post-content th {
  background: var(--surface-color);
  font-weight: 600;
}

/* ----------------------------------------------------------
   11. CODE BLOCKS
   ---------------------------------------------------------- */
.code-block {
  position: relative;
  margin: 1.5em 0;
}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--hljs-bg);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 6px 12px;
}
.code-block-lang {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.copy-btn {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--grey-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.copy-btn:hover { background: var(--hover-color); }
.copy-btn.copied { background: #187240; }

.code-block pre {
  background: var(--hljs-bg);
  color: var(--hljs-color);
  border: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}
.code-block pre code { background: none; color: inherit; padding: 0; }

/* highlight.js token colours driven by CSS variables */
.hljs-keyword, .hljs-selector-tag  { color: var(--hljs-keyword); font-weight: bold; }
.hljs-string, .hljs-attribute      { color: var(--hljs-string); }
.hljs-comment, .hljs-quote         { color: var(--hljs-comment); font-style: italic; }
.hljs-number, .hljs-literal        { color: var(--hljs-number); }
.hljs-attr, .hljs-selector-attr    { color: var(--hljs-attr); }
.hljs-built_in, .hljs-class .hljs-title { color: var(--hljs-keyword); }

/* Inline code */
.post-content :not(pre) > code {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.85em;
}

/* ----------------------------------------------------------
   12. HEADING ANCHORS
   ---------------------------------------------------------- */
.header-anchor {
  opacity: 0;
  text-decoration: none;
  margin-left: 6px;
  font-size: 0.85em;
  transition: opacity 0.2s;
}
.post-content h2:hover .header-anchor,
.post-content h3:hover .header-anchor,
.post-content h4:hover .header-anchor {
  opacity: 1;
}

/* ----------------------------------------------------------
   13. PAGINATION
   ---------------------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 24px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 7px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  transition: background 0.2s, border-color 0.2s;
}
.pagination a:hover { background: var(--surface-color); border-color: var(--hover-color); }
.pagination .current { background: var(--hover-color); color: #fff; border-color: var(--hover-color); }
.pagination .disabled { opacity: 0.45; pointer-events: none; }

/* ----------------------------------------------------------
   14. PREV/NEXT NAVIGATION
   ---------------------------------------------------------- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}
.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--text-color);
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.2s;
}
.post-nav-item:hover { border-color: var(--hover-color); }
.post-nav-item.next { text-align: right; }
.post-nav-label { font-size: 0.78rem; color: var(--muted-color); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.post-nav-title { font-weight: 600; font-size: 0.95rem; line-height: 1.35; }

/* ----------------------------------------------------------
   15. LANGUAGE / TAG LISTING PAGES
   ---------------------------------------------------------- */
.lang-listing {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.lang-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lang-card:hover {
  border-color: var(--hover-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.lang-card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.lang-card-count { font-size: 0.82rem; color: var(--muted-color); }

/* ----------------------------------------------------------
   16. ARCHIVE PAGE
   ---------------------------------------------------------- */
.archive-year {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}
.archive-month {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted-color);
  margin: 18px 0 8px;
}
.archive-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.archive-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
}
.archive-list li:last-child { border-bottom: none; }
.archive-date { font-size: 0.8rem; color: var(--muted-color); white-space: nowrap; }
.archive-list a { color: var(--text-color); text-decoration: none; font-weight: 500; }
.archive-list a:hover { color: var(--hover-color); text-decoration: underline; }

/* ----------------------------------------------------------
   17. STATIC PAGES
   ---------------------------------------------------------- */
.page-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 24px; }
.page-content h2 { font-size: 1.4rem; font-weight: 700; margin: 2em 0 0.6em; }
.page-content p  { margin: 0 0 1.2em; }
.page-content a  { color: var(--hover-color); }
:root[data-theme="dark"] .page-content a { color: #7eb8f7; }
.page-content ul, .page-content ol { margin: 0 0 1.2em 1.4em; }

/* ----------------------------------------------------------
   18. HOME PAGE STATIC LANGUAGE LIST (for no-JS users)
   ---------------------------------------------------------- */
.noscript-lang-list {
  display: none;
}
noscript .noscript-lang-list {
  display: block;
  margin: 24px 0;
}
.static-lang-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

/* ----------------------------------------------------------
   19. READING TIME & POST INFO LINE
   ---------------------------------------------------------- */
.reading-time { font-size: 0.8rem; color: var(--muted-color); }

/* ----------------------------------------------------------
   20. PAGE TITLE / SECTION HEADERS
   ---------------------------------------------------------- */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}
.page-header h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 6px; }
.page-header p  { color: var(--muted-color); font-size: 1rem; }

/* ----------------------------------------------------------
   21. ACCESSIBILITY: FOCUS VISIBLE
   ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--hover-color);
  outline-offset: 2px;
}
:root[data-theme="dark"] :focus-visible {
  outline-color: #7eb8f7;
}

/* ----------------------------------------------------------
   22. LINKS
   ---------------------------------------------------------- */
a { color: var(--hover-color); }
:root[data-theme="dark"] a { color: #7eb8f7; }

/* Nav links (chips, pagination) override to avoid blue on dark bg */
.chip, .lang-chip, .post-nav-item, .post-card, .archive-list a,
.blog-menu-nav a, .lang-card { color: var(--text-color); }

/* ----------------------------------------------------------
   23. SELF-HOSTED ROBOTO FONT
   ---------------------------------------------------------- */
@font-face {
  font-family: 'Roboto';
  src: url('/assets/fonts/roboto-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/assets/fonts/roboto-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/assets/fonts/roboto-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ----------------------------------------------------------
   24. PREFERS-REDUCED-MOTION
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ----------------------------------------------------------
   25. PRINT STYLES
   ---------------------------------------------------------- */
@media print {
  #header-placeholder,
  .blog-subnav,
  #footer-placeholder,
  #blogMenu,
  #blog-menu-overlay,
  #search-dialog,
  .pagination,
  .post-nav {
    display: none !important;
  }
  .container { padding-top: 0 !important; max-width: 100%; }
  body { background: #fff !important; color: #000 !important; }
}

/* ----------------------------------------------------------
   26. MOBILE RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .lang-listing { grid-template-columns: 1fr 1fr; }
  .post-card { padding: 16px; }
  .code-block pre { font-size: 0.82rem; }
}
