/* SIAR System Architecture & Technical Wiki - Modern Aesthetic Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --base-font-size: 16px;
  --line-height: 1.7;
}

body {
  font-family: var(--font-family-base) !important;
  font-size: var(--base-font-size);
  line-height: var(--line-height);
  letter-spacing: -0.011em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

code, pre, kbd, samp {
  font-family: var(--font-family-mono) !important;
  font-size: 0.9em;
}

/* Sidebar Polish */
.sidebar {
  font-family: var(--font-family-base);
  font-size: 0.92rem;
  scrollbar-width: thin;
}

.sidebar .chapter li a {
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.15s ease-in-out;
  display: block;
  line-height: 1.4;
}

.sidebar .part-title {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.75;
}

/* Content Area Max Width and Padding */
.content main {
  max-width: 960px !important;
  margin: 0 auto;
  padding: 2rem 2.5rem 5rem 2.5rem;
}

@media only screen and (max-width: 768px) {
  .content main {
    padding: 1.25rem 1rem 3rem 1rem;
  }
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}

h1 {
  font-size: 2.2rem;
  margin-top: 1.5rem;
  margin-bottom: 1.2rem;
  border-bottom: 2px solid rgba(127, 127, 127, 0.15);
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 1.6rem;
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(127, 127, 127, 0.1);
  padding-bottom: 0.3rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

/* Blockquotes / Callout Alerts */
blockquote {
  border-left: 4px solid #3b82f6 !important;
  background: rgba(59, 130, 246, 0.06);
  padding: 0.8rem 1.2rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-style: normal;
}

blockquote p {
  margin: 0.4rem 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.94rem;
  border-radius: 8px;
  overflow: hidden;
}

table th {
  background: rgba(127, 127, 127, 0.12);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid rgba(127, 127, 127, 0.2);
}

table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(127, 127, 127, 0.08);
}

table tr:nth-child(even) {
  background: rgba(127, 127, 127, 0.03);
}

table tr:hover {
  background: rgba(127, 127, 127, 0.06);
}

/* Code Blocks */
pre {
  border-radius: 8px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(127, 127, 127, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

pre code {
  line-height: 1.5;
}

:not(pre) > code {
  background: rgba(127, 127, 127, 0.14);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

/* Keyboard badge */
kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--fg);
  background-color: rgba(127, 127, 127, 0.15);
  border: 1px solid rgba(127, 127, 127, 0.3);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(127, 127, 127, 0.25);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(127, 127, 127, 0.4);
}
