/* ==========================================================================
   NOTES — Blog-style Prose & KaTeX (Reversed Light Mint & White Design System)
   ========================================================================== */

/* ── Note Page Wrapper ──────────────────── */
.note-page {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Breadcrumb ─────────────────────────── */
.note-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--dim);
  margin-bottom: 40px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.note-breadcrumb a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: var(--transition);
}

.note-breadcrumb a:hover {
  color: var(--acc);
  border-bottom-color: var(--acc);
}

.breadcrumb-sep {
  color: var(--line-strong);
  font-weight: 400;
  font-size: 10px;
}

/* ── Note Header ────────────────────────── */
.note-header {
  position: relative;
  margin-bottom: 48px;
  padding: 0 0 32px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  overflow: visible;
}

.note-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: #2f5f9e;
}

.note-category-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--ink);
  background: var(--dim-light);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

.note-header h1 {
  font-family: var(--font-sans);
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 750;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  text-wrap: balance;
}

/* ── Table of Contents ──────────────────── */
.note-toc {
  margin-bottom: 48px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.toc-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
  padding-bottom: 0;
  border: none;
}

.toc-items {
  counter-reset: toc-counter;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-item {
  display: block;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--dim);
  text-decoration: none;
  padding: 4px 0;
  transition: var(--transition), transform 200ms ease;
  line-height: 1.6;
}

.toc-item:hover {
  color: var(--acc);
  text-decoration: underline;
  text-underline-offset: 3px;
  transform: translateX(3px);
}

.toc-item.toc-h2 {
  counter-increment: toc-counter;
  padding-left: 0;
}

.toc-item.toc-h2::before {
  content: counter(toc-counter) ". ";
}

.toc-item.toc-h3 {
  padding-left: 24px;
  color: var(--dim);
}

.toc-item.toc-h3::before {
  content: "• ";
  margin-right: 6px;
}

/* ── Note Content (Blog Prose) ──────────── */
.note-content {
  max-width: 900px;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

/* ── Headings inside Notes ──────────────── */
.note-content h1 {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 750;
  margin: 56px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.note-content h2 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 650;
  margin: 48px 0 16px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.note-content h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  margin: 40px 0 14px;
  line-height: 1.35;
  color: var(--ink);
}

.note-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 32px 0 12px;
  line-height: 1.4;
  font-family: var(--font-mono);
  color: var(--dim);
}

.note-content h5 {
  font-size: 12px;
  font-weight: 600;
  margin: 28px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  color: var(--dim);
}

.note-content h6 {
  font-size: 11px;
  font-weight: 600;
  margin: 24px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  color: var(--ink-dark);
}

/* Remove top margin on first heading */
.note-content > h1:first-child,
.note-content > h2:first-child,
.note-content > h3:first-child {
  margin-top: 0;
}

/* ── Paragraphs & Inline elements ────────── */
.note-content p {
  margin-bottom: 24px;
  max-width: 100%;
}

.note-content strong {
  font-weight: 600;
  color: var(--ink);
}

.note-content a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--ink);
  transition: var(--transition);
}

.note-content a:hover {
  color: var(--acc);
  border-bottom-color: var(--acc);
}

/* ── Lists ──────────────────────────────── */
.note-content ul,
.note-content ol {
  margin: 24px 0;
  padding-left: 24px;
}

.note-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.note-content li::marker {
  color: var(--acc);
}

/* ── Blockquotes ────────────────────────── */
.note-content blockquote {
  margin: 32px 0;
  padding: 20px 28px;
  border-left: 3px solid #2f5f9e;
  background: rgba(47, 95, 158, 0.04);
  color: var(--dim);
  font-size: 15px;
  line-height: 1.75;
  border-radius: 0 12px 12px 0;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-left-color: #2f5f9e;
  box-shadow: 0 4px 15px rgba(10, 20, 34, 0.01);
}

.note-content blockquote p {
  margin-bottom: 12px;
}

.note-content blockquote p:last-child {
  margin-bottom: 0;
}

/* ── Code Blocks ────────────────────────── */
.note-content pre {
  margin: 32px 0;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.3);
  overflow-x: auto;
  border: 1px solid var(--line-strong);
}

.note-content pre code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  letter-spacing: 0;
}

/* Inline code */
.note-content .inline-code,
.note-content code.inline-code,
.note-content :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--ink);
  word-break: break-word;
}

/* ── Tables ─────────────────────────────── */
.note-content .table-wrapper {
  margin: 32px 0;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--tile);
  box-shadow: 0 4px 20px rgba(10, 20, 34, 0.02);
}

.note-content table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 13.5px;
}

.note-content thead {
  background: var(--dim-light);
}

.note-content th {
  text-align: left;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
}

.note-content td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  line-height: 1.6;
}

.note-content tbody tr:last-child td {
  border-bottom: none;
}

.note-content tbody tr:hover {
  background: rgba(47, 95, 158, 0.04);
}

/* ── Horizontal Rules ───────────────────── */
.note-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong) 0%, rgba(47, 95, 158, 0.2) 50%, var(--line-strong) 100%);
  margin: 48px auto;
  max-width: 120px;
}

/* ── Images & Figures ──────────────────── */
.note-content figure {
  margin: 40px 0;
  text-align: center;
}

.note-content figure img {
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--tile);
  padding: 12px;
  box-shadow: 0 4px 20px rgba(10, 20, 34, 0.02);
}

.note-content figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--dim);
  font-family: var(--font-sans);
  font-style: normal;
  line-height: 1.5;
}

/* ── Math / KaTeX ───────────────────────── */
.note-content .math-display {
  display: block;
  margin: 28px 0;
  padding: 20px;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  text-align: center;
  box-shadow: 0 4px 20px rgba(10, 20, 34, 0.02);
}

.note-content .math-inline {
  padding: 0 2px;
  color: var(--ink);
}

/* KaTeX font harmonization */
.note-content .katex {
  font-size: 1em;
  color: var(--ink);
}

.note-content .math-display .katex {
  font-size: 1.05em;
}

.note-content .math-display .katex-display {
  margin: 0;
}

.note-content .math-display::-webkit-scrollbar {
  height: 4px;
  width: 0px;
}

.note-content .math-display::-webkit-scrollbar-thumb {
  background: rgba(16, 45, 92, 0.15);
  border-radius: 2px;
}

/* ── Bottom Navigation ──────────────────── */
.note-nav-bottom {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  gap: 24px;
}

.note-nav-bottom a {
  font-family: var(--font-sans);
  text-decoration: none;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--tile);
  transition: var(--transition);
  max-width: 48%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 4px 20px rgba(10, 20, 34, 0.02);
}

.note-nav-bottom a.nav-next {
  align-items: flex-end;
  text-align: right;
}

.note-nav-bottom a:hover {
  border-color: rgba(47, 95, 158, 0.3);
  background: rgba(47, 95, 158, 0.03);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(10, 20, 34, 0.06);
}

.note-nav-bottom .nav-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--dim);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  font-weight: 500;
  font-family: var(--font-mono);
}

.note-nav-bottom .nav-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s ease;
}

.note-nav-bottom a:hover .nav-title {
  color: #2f5f9e;
}

/* ==========================================================================
   NOTES INDEX (Landing Page Accordion Lists)
   ========================================================================== */
.notes-category {
  margin-bottom: 24px;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(10, 20, 34, 0.02);
}

.notes-category:hover {
  border-color: var(--acc-glow);
  box-shadow: 0 24px 52px rgba(10, 20, 34, 0.06);
}

.notes-category-header {
  display: flex;
  align-items: center;
  padding: 24px 32px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
  transition: var(--transition);
}

.notes-category-header:hover {
  background: var(--dim-light);
}

.notes-category-header h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.notes-category-count {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink);
  background: var(--dim-light);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  margin-left: 16px;
}

.notes-category-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--dim);
  font-family: var(--font-sans);
  margin-bottom: 24px;
  max-width: 800px;
}

.notes-category-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, padding 0.5s ease;
  padding: 0 32px;
  pointer-events: none;
}

.notes-category-content:not(.collapsed) {
  max-height: 2000px;
  opacity: 1;
  pointer-events: auto;
  padding: 12px 32px 32px 32px;
  border-top: 1px solid var(--line);
}

.notes-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.notes-category-toggle {
  font-size: 11px;
  color: var(--dim);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: auto;
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  background: var(--dim-light);
  border: 1px solid var(--line);
}

.notes-category-header.collapsed .notes-category-toggle {
  transform: rotate(-90deg);
}

.note-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--dim-light);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: var(--transition);
}

.note-link:hover {
  background: var(--tile);
  border-color: var(--ink);
}

.note-link-title {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.note-link-arrow {
  font-size: 11px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 650;
  white-space: nowrap;
  opacity: 0.6;
  transition: var(--transition);
}

.note-link:hover .note-link-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* ── Home page mini-notes ───────────────── */
.mini-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  gap: 16px;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(10, 20, 34, 0.02);
}

.mini-note:hover {
  border-color: var(--acc-glow);
  box-shadow: 0 20px 48px rgba(10, 20, 34, 0.06);
  transform: translateY(-2px);
}

.mini-note-title {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.mini-note-cat {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.8;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .note-header {
    padding: 32px 0 24px;
  }

  .note-header h1 {
    font-size: 28px;
  }

  .note-toc {
    padding: 20px;
  }

  .note-content {
    font-size: 15px;
    line-height: 1.75;
  }

  .note-content h1 {
    font-size: 24px;
    margin-top: 40px;
  }

  .note-content h2 {
    font-size: 20px;
    margin-top: 36px;
  }

  .note-content h3 {
    font-size: 17px;
    margin-top: 30px;
  }

  .note-content pre {
    padding: 20px;
    border-radius: 10px;
  }

  .note-content .math-display {
    padding: 12px;
    margin: 20px 0;
  }

  .note-nav-bottom {
    flex-direction: column;
    gap: 16px;
    margin-top: 60px;
  }

  .note-nav-bottom a {
    max-width: 100%;
  }

  .notes-category-header {
    padding: 20px 24px;
  }

  .notes-category-content:not(.collapsed) {
    padding: 8px 24px 24px 24px;
  }

  .notes-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .note-link {
    padding: 16px 18px;
  }
}

/* Dark mint redesign overrides */
.note-header,
.note-content blockquote,
.note-content table,
.notes-category,
.note-link {
  box-shadow: none;
}

.note-header {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.notes-category {
  background: linear-gradient(180deg, rgba(126, 247, 201, 0.055), rgba(255, 255, 255, 0.018));
  border-color: var(--line);
  border-radius: 8px;
}

.note-category-tag {
  display: none;
}

.note-content {
  color: var(--text);
}

.note-content p,
.note-content li,
.note-content figcaption {
  color: #c9d3de;
}

.note-content code,
.note-content pre {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line);
}

.note-content pre {
  color: var(--text);
}

.note-content img {
  border-radius: 8px;
  border: 1px solid var(--line);
}

.note-content .math-display,
.note-content .katex-display {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.notes-index {
  display: grid;
  gap: 14px;
}

.notes-category-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.notes-category-header span {
  display: grid;
  gap: 6px;
}

.notes-category-header strong {
  font-size: 19px;
  font-weight: 650;
}

.notes-category-header em {
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.notes-category-header i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mint);
  font-style: normal;
  transition: transform 220ms var(--ease), background 220ms var(--ease), color 220ms var(--ease);
}

.notes-category-header:not(.collapsed) i {
  background: var(--mint);
  color: #0a1424;
  transform: rotate(45deg);
}

.notes-category-content {
  padding: 0 22px 22px;
}

.notes-category-desc {
  margin: 0 0 16px;
  color: var(--muted);
}

.notes-list {
  display: grid;
  gap: 10px;
}

.note-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.note-link-title {
  font-size: 16px;
  font-weight: 560;
}

/* Final notes index override: keep the landing page readable and index-like. */
.notes-index {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.notes-category {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.notes-category:hover {
  border-color: var(--line);
  box-shadow: none;
}

.notes-category-header {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  background: transparent;
  color: var(--text);
}

.notes-category-header:hover {
  background: transparent;
}

.notes-category-header span {
  display: grid;
  gap: 8px;
}

.notes-category-header strong {
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
}

.notes-category-header em {
  max-width: 760px;
  color: var(--muted) !important;
  font-family: var(--font-sans) !important;
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.notes-category-header b {
  padding: 6px 10px;
  border: 1px solid rgba(10, 20, 34, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

.notes-category-header i {
  display: block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--mint-deep);
  font-style: normal;
  line-height: 1;
  transform: none;
}

.notes-category-header:not(.collapsed) i {
  background: transparent;
  color: var(--mint-deep);
  transform: rotate(45deg);
}

.notes-category-content,
.notes-category-content:not(.collapsed) {
  max-height: none;
  opacity: 1;
  padding: 0 0 22px;
  border-top: 0;
  overflow: visible;
  pointer-events: auto;
}

.notes-category-content.collapsed {
  display: none;
}

.notes-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  border-top: none;
  padding-top: 8px;
}

.note-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(10, 20, 34, 0.08);
  border-left: 3px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
  box-shadow: none;
  transition: all 220ms ease;
}

.note-link:hover {
  background: rgba(205, 222, 247, 0.22);
  border-left-color: #2f5f9e;
  border-color: rgba(47, 95, 158, 0.2);
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(16, 45, 92, 0.06);
}

.note-link-title {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
  transition: color 200ms ease;
}

.note-link:hover .note-link-title {
  color: #2f5f9e;
}

.note-link-arrow {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  opacity: 0.5;
  white-space: nowrap;
  transition: all 200ms ease;
}

.note-link:hover .note-link-arrow {
  opacity: 1;
  color: #2f5f9e;
  transform: translateX(3px);
}

@media (max-width: 680px) {
  .notes-category-header {
    grid-template-columns: 1fr;
  }
}


/* ===== note readability overhaul ===== */
body{
 color:#101d30 !important;
}

.note-content,
.note-content p,
.note-content li,
.note-content ul,
.note-content ol{
 color:#1e3350 !important;
 opacity:1 !important;
}

.note-content p{
 font-size:1.12rem !important;
 line-height:1.95 !important;
}

.note-content h1,
.note-content h2,
.note-content h3{
 color:#0a1420 !important;
}

/* remove all equation boxes */
.note-content .math-display,
.note-content .katex-display,
.katex-display{
 background:none !important;
 border:none !important;
 box-shadow:none !important;
 outline:none !important;
 padding:0 !important;
 margin:2rem 0 !important;
 overflow-y:hidden !important;
 overflow-x:auto !important;
}

.note-content .math-inline{
 background:none !important;
 border:none !important;
 padding:0 !important;
}

.katex,
.katex *{
 color:#0a1422 !important;
 opacity:1 !important;
}

mjx-container{
  color:#0a1422 !important;
}

/* ── Reading progress bar ─────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #2f5f9e, #5b8fd9);
  z-index: 9999;
  transition: width 50ms linear;
  border-radius: 0 1px 1px 0;
}

/* ── Scroll to top button ─────────────── */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(10, 20, 34, 0.12);
  background: rgba(231, 240, 251, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #0a1422;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 300ms ease, transform 300ms ease, background 200ms ease;
  pointer-events: none;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(16, 45, 92, 0.08);
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top-btn:hover {
  background: rgba(47, 95, 158, 0.1);
  border-color: rgba(47, 95, 158, 0.3);
}

/* ── Heading anchor highlight on scroll ── */
.note-content h2,
.note-content h3 {
  scroll-margin-top: 80px;
}

/* ── Selection color ─────────────────── */
.note-content ::selection {
  background: rgba(47, 95, 158, 0.15);
  color: inherit;
}

/* ── Image hover zoom ─────────────────── */
.note-content img {
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.note-content img:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 32px rgba(16, 45, 92, 0.08);
}

/* ── Inline code polish ───────────────── */
.note-content :not(pre) > code {
  transition: background 200ms ease;
}

.note-content :not(pre) > code:hover {
  background: rgba(47, 95, 158, 0.06);
}
