:root {
  color-scheme: light;
  --header-height: 64px;
  /* Obsidian default theme colors (light) */
  --background-primary: #ffffff;
  --background-primary-alt: #f5f6f8;
  --background-secondary: #f2f3f5;
  --background-secondary-alt: #e3e5e8;
  --background-modifier-border: #ddd;
  --background-modifier-form-field: #fff;
  --background-modifier-form-field-highlighted: #fff;
  --background-modifier-box-shadow: rgba(0, 0, 0, 0.1);
  --background-modifier-success: #A4E7C3;
  --background-modifier-error: #990000;
  --background-modifier-error-hover: #bb0000;
  --background-modifier-cover: rgba(0, 0, 0, 0.8);
  --text-accent: #705dcf;
  --text-accent-hover: #7a6ae6;
  --text-normal: #2e3338;
  --text-muted: #888888;
  --text-faint: #999999;
  --text-error: #800000;
  --text-error-hover: #990000;
  --text-highlight-bg: rgba(255, 255, 0, 0.4);
  --text-highlight-bg-active: rgba(255, 128, 0, 0.4);
  --text-selection: rgba(204, 230, 255, 0.99);
  --text-on-accent: #f2f2f2;
  --interactive-normal: #f2f3f5;
  --interactive-hover: #e9e9e9;
  --interactive-accent: #7b6cd9;
  --interactive-accent-hover: #8273e6;
  --interactive-success: #197300;
  --scrollbar-active-thumb-bg: rgba(0, 0, 0, 0.2);
  --scrollbar-bg: rgba(0, 0, 0, 0.05);
  --scrollbar-thumb-bg: rgba(0, 0, 0, 0.1);
  --highlight-mix-blend-mode: darken;
  --interactive-accent-rgb: 123, 108, 217;
  --text-muted-rgb: 136, 136, 136;
  --background-modifier-error-rgb: 230, 135, 135;

  /* Project aliases mapped to Obsidian tokens */
  --bg: var(--background-primary);
  --ink: var(--text-normal);
  --muted: var(--text-muted);
  --link: var(--text-accent);
  --card: var(--background-secondary);
  --border: var(--background-modifier-border);
  --accent: var(--interactive-accent);
  --radius: 12px;
}

.theme-dark {
  color-scheme: dark;
  --background-primary: #202020;
  --background-primary-alt: #1a1a1a;
  --background-secondary: #161616;
  --background-secondary-alt: #000000;
  --background-modifier-border: #333;
  --background-modifier-form-field: rgba(0, 0, 0, 0.3);
  --background-modifier-form-field-highlighted: rgba(0, 0, 0, 0.22);
  --background-modifier-box-shadow: rgba(0, 0, 0, 0.3);
  --background-modifier-success: #197300;
  --background-modifier-error: #3d0000;
  --background-modifier-error-hover: #470000;
  --background-modifier-cover: rgba(0, 0, 0, 0.8);
  --text-accent: #7f6df2;
  --text-accent-hover: #8875ff;
  --text-normal: #dcddde;
  --text-muted: #999;
  --text-faint: #666;
  --text-error: #ff3333;
  --text-error-hover: #990000;
  --text-highlight-bg: rgba(255, 255, 0, 0.4);
  --text-highlight-bg-active: rgba(255, 128, 0, 0.4);
  --text-selection: rgba(23, 48, 77, 0.99);
  --text-on-accent: #dcddde;
  --interactive-normal: #2a2a2a;
  --interactive-hover: #303030;
  --interactive-accent: #483699;
  --interactive-accent-hover: #4d3ca6;
  --interactive-success: #197300;
  --scrollbar-active-thumb-bg: rgba(255, 255, 255, 0.2);
  --scrollbar-bg: rgba(255, 255, 255, 0.05);
  --scrollbar-thumb-bg: rgba(255, 255, 255, 0.1);
  --highlight-mix-blend-mode: lighten;
  --background-modifier-error-rgb: 61, 0, 0;
  --text-muted-rgb: 153, 153, 153;
  --interactive-accent-rgb: 72, 54, 153;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  font-size: 16px;
}

button {
  font-family: inherit;
}

a { color: inherit; text-decoration: none; }

a:hover { text-decoration: underline; }

.container { width: min(900px, 92vw); margin: 0 auto; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--ink);
}

.breadcrumbs-current {
  color: var(--ink);
}

.breadcrumbs-sep {
  opacity: 0.7;
}

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  z-index: 1200;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}

.logo { font-family: "Nunito Sans", "Segoe UI", sans-serif; font-size: 1rem; }

.nav { display: flex; gap: 16px; font-size: 0.95rem; }

.home-button {
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.home-button:hover { text-decoration: none; background: #eee; }

.search-button,
.search-link {
  border: 1px solid var(--border);
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
}

.search-link { display: inline-block; }

.search-button:hover,
.search-link:hover {
  opacity: 1;
  background: #eee;
  color: var(--ink);
}

.search-trigger { display: flex; align-items: center; gap: 8px; }

.search-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1300;
}

.search-modal.is-open { display: block; }

.search-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }

.search-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, 92vw);
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  z-index: 2;
}

.search-form { display: flex; gap: 10px; align-items: center; }

.search-form button[type="submit"] {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

.search-form button[type="submit"]:hover {
  background: #eee;
}

.search-form input {
  flex: 1;
  padding: 10px 12px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.search-results { margin-top: 16px; }

.search-results ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.search-results li {
  margin: 0;
}

.search-item-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
}

.search-item-card:hover {
  text-decoration: none;
  background: var(--card);
}

.search-item-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}

.search-item-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.search-item-title {
  font-weight: 700;
  line-height: 1.25;
}

.search-item-snippet {
  font-size: 0.92rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero {
  padding: 50px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.hero > * {
  margin-top: 0;
  margin-bottom: 0;
}

.hero img {
  width: 70px;
  border-radius: 50%;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
}

.deck { color: var(--muted); max-width: 520px; }

.hero-links {
  margin-top: 8px;
  justify-content: center;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

.card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.blog {
  margin-top: 40px;
}

.blog-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.blog-header {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 700px;
}

.hub-meta h3 {
  margin: 0 0 0.5em;
}

.hub-meta .muted {
  margin: 0;
}

.hub-meta {
  margin: 2em 0;
  max-width: 700px;
}

.blog-header h2 {
  margin: 2em 0 1em 0;
}

.hub-pill {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}

.hub-pill.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.hub-pill:hover {
  background: #eee;
}

.hub-pill.is-active:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  padding: 0;
  overflow: hidden;
}

.blog-link {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: inherit;
  text-decoration: none;
}

.blog-link:hover { text-decoration: none; }

.blog-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.blog-body {
  padding: 16px 18px 20px;
}

.blog-body h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.blog-body p {
  margin-bottom: 0;
}

.blog-card.is-hidden {
  display: none;
}

@media (max-width: 720px) {
  .blog-image {
    height: 160px;
  }

  .blog-body {
    padding: 14px 16px 18px;
  }
}

.grid-favorites {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .grid-favorites {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .grid-favorites {
    grid-template-columns: 1fr;
  }
}

.favorite-card {
  padding: 0;
  overflow: hidden;
}

.favorite-link {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: inherit;
  text-decoration: none;
}

.favorite-link:hover { text-decoration: none; }

.favorite-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.favorite-body {
  padding: 16px 18px 20px;
}

.favorite-body h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

@media (max-width: 720px) {
  .favorite-body {
    padding: 14px 16px 18px;
  }

  .favorite-image {
    height: 160px;
  }
}

.callout {
  margin: 32px 0 80px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
}

.prose blockquote,
.prose .callout {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--ink);
  background: var(--card);
}

.prose blockquote {
  border: none;
  border-left: 4px solid var(--text-accent);
  background: rgba(var(--interactive-accent-rgb), 0.1);
  color: var(--ink);
}

.prose blockquote > p {
  margin: 0;
}

.prose .callout-title {
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.prose .callout-content > :first-child {
  margin-top: 0;
}

.prose .callout-content > :last-child {
  margin-bottom: 0;
}

.prose .callout[data-callout="note"],
.prose .callout.note {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.prose .callout[data-callout="tip"],
.prose .callout.tip {
  border-left-color: #16a34a;
  background: #ecfdf5;
}

.prose .callout[data-callout="warning"],
.prose .callout.warning {
  border-left-color: #d97706;
  background: #fff7ed;
}

.prose .callout[data-callout="important"],
.prose .callout.important {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.prose a[role="doc-noteref"],
.prose sup a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  padding: 2px 6px;
  margin-left: 2px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  line-height: 1;
  text-decoration: none;
}

.prose a[role="doc-noteref"]:hover,
.prose sup a:hover {
  background: var(--card);
  text-decoration: none;
}

.prose .footnotes {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.prose .footnotes ol {
  padding-left: 20px;
  margin: 12px 0 0;
}

.prose .footnotes li {
  margin-bottom: 8px;
}

.prose .footnotes a[role="doc-backlink"] {
  text-decoration: none;
  margin-left: 6px;
}

.page { padding: 10px 0; max-width: 900px; margin: 0 auto; }
.page h1 { line-height: 1.4; }
.page .deck { line-height: 1.7; }

.prose { line-height: 1.7; }
.prose p { font-size: 16px; }
.prose p { white-space: pre-line; }
.prose ul,
.prose ol,
.prose li { font-size: 16px; }
.prose ul { padding-inline-start: 2em; }
.prose h4 { margin: 1em 0; }
.prose a {
  font-weight: 600;
  color: var(--link);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
}

.prose th,
.prose td {
  border: 1px solid var(--background-modifier-border);
  padding: 0.55em 0.75em;
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  background: rgba(var(--interactive-accent-rgb), 0.08);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--background-modifier-border);
  margin: 2em 0;
}

.prose a.is-external::after {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.1em;
  vertical-align: -0.2em;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5 11L11 5M6 5h5v5' stroke='black' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5 11L11 5M6 5h5v5' stroke='black' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.footer-built a.is-external::after {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.1em;
  vertical-align: -0.2em;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5 11L11 5M6 5h5v5' stroke='black' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5 11L11 5M6 5h5v5' stroke='black' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.prose img {
  max-width: 100%;
  height: auto;
}

.home-prose {
  max-width: 900px;
  padding: 10px 0;
  text-align: left;
}

.home-prose p {
  font-size: 16px;
}

.home-prose h1 {
  font-size: 1.5em;
  line-height: 1.4;
}

.home-prose h2 {
  margin-top: 50px;
}

.hub-prose h1 {
  font-size: 1.5em;
}

.home-prose img {
  display: block;
  width: 50px;
  max-width: 50px;
  height: auto;
  border-radius: 50%;
  border: 1px solid var(--background-modifier-border);
}

.home-prose > :first-child img {
  width: 100px;
  max-width: 100px;
  border-radius: 100%;
  border: 0;
}

.hub-prose img {
  display: block;
  width: 50px;
  max-width: 50px;
  height: auto;
  border-radius: 50%;
  border: 1px solid var(--background-modifier-border);
}

.hub-prose > :first-child img {
  width: 100px;
  max-width: 100px;
  border: 0;
}

.meta-row { display: flex; gap: 16px; align-items: center; margin-bottom: 2em; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tag { background: var(--card); padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; }

.section { margin-top: 28px; }

.page .section {
  margin-top: 50px;
}

.page .section .blog-grid {
  grid-template-columns: 1fr;
}

.page .section .blog-image {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.muted { color: var(--muted); }

.site-footer { padding: 0 0 40px; }

.footer-separator {
  border: 0;
  border-top: 1px solid var(--background-modifier-border);
  margin: 0 0 28px;
}

.footer-inner { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.footer-inner { justify-content: flex-start; }
.footer-prose { width: 100%; }
.footer-prose h2 { margin-top: 0; }
.footer-prose p,
.footer-prose li { font-size: 16px; }
.footer-prose ul { margin: 0.6em 0 0; padding-left: 20px; }
.footer-prose a { color: var(--link); }

@media (max-width: 720px) {
  .footer-inner {
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .header-inner { flex-direction: row; align-items: center; }
  .nav { flex-wrap: wrap; }
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-social {
  gap: 8px;
}

.header-social .footer-telegram,
.header-social .footer-github,
.header-social .footer-vcru {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
}

@media (max-width: 820px) {
  .breadcrumbs {
    margin-top: 16px;
    font-size: 0.85rem;
  }

  .header-social {
    display: none !important;
  }
}



.icon-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  font-family: inherit;
}

.icon {
  font-size: 1rem;
}

.icon-button:hover {
  background: #eee;
}

.icon-button svg,
.icon-button span {
  display: block;
  line-height: 1;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.is-open .icon-open {
  display: none;
}

.nav-toggle.is-open .icon-close {
  display: block;
}

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-height);
  height: calc(100% - var(--header-height));
  height: calc(100dvh - var(--header-height));
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;
  opacity: 0;
  transition: opacity 200ms ease;
}

.mobile-nav-inner {
  position: absolute;
  inset: 0;
  background: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  z-index: 2;
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.mobile-nav.is-open .mobile-nav-backdrop {
  opacity: 1;
}

.mobile-nav.is-open .mobile-nav-inner {
  transform: translateX(0);
}

.mobile-nav-links,
.mobile-nav-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  font-size: 1.05rem;
}

.mobile-nav-footer {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 12px;
}

.mobile-nav-footer .footer-telegram,
.mobile-nav-footer .footer-github,
.mobile-nav-footer .footer-vcru {
  width: 48px;
  height: 48px;
}

.mobile-nav-footer .footer-telegram img,
.mobile-nav-footer .footer-github svg,
.mobile-nav-footer .footer-vcru svg {
  width: 30px;
  height: 30px;
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .nav { display: none; }
}

@media (min-width: 821px) {
  .nav-toggle {
    display: none;
  }
}


.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
}

.footer-telegram img {
  display: block;
}

.footer-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
}


.footer-vcru {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
}
