/* Component-specific styles */

/* Table of Contents */
.toc {
  position: fixed;
  left: 2rem;
  top: 8rem;
  width: 180px;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  line-height: 1.6;
}

.toc-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc a {
  display: block;
  color: #999;
  text-decoration: none;
  padding: 0.3rem 0;
  transition: color 0.2s;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
}

.toc a:hover {
  color: #111;
  border-left-color: #ddd;
}

.toc a.active {
  color: #111;
  font-weight: 600;
  border-left-color: #333;
}

/* Sidenotes */
.sidenote {
  float: right;
  clear: right;
  margin-right: -50%;
  width: 45%;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #666;
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: "Crimson Pro", serif;
}

/* Sidenote numbers - wine red color */
.sidenote-number {
  font-size: 0.7rem;
  vertical-align: super;
  color: #8b2836; /* Wine red */
}

/* Sidenote counter in margin (Tufte CSS override) */
.sidenote:before,
.marginnote:before {
  color: #8b2836; /* Wine red */
}

/* Example boxes */
.example-box {
  background-color: rgba(0, 0, 0, 0.009);
  border-left: 2px solid rgba(0, 0, 0, 0.12);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 3px;
}

.example-box h4 {
  margin-top: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

/* Definition box */
.definition-box {
  background-color: rgba(0, 0, 0, 0.018);
  border-left: 3px solid rgba(0, 0, 0, 0.2);
  padding: 1.2em 1.5em;
  margin: 1.8rem 0;
  border-radius: 3px;
}

.definition-box h4 {
  margin-top: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  font-weight: 600;
  font-family: "Inter", sans-serif;
}

.definition-box p {
  margin-bottom: 0.8em;
}

.definition-box p:last-child {
  margin-bottom: 0;
}

/* Mermaid diagrams */
.mermaid {
  margin: 2rem 0;
  text-align: center;
}

/* Responsive: Hide TOC on small screens */
@media (max-width: 1200px) {
  .toc {
    display: none;
  }
}

/* Footer - consistent across all pages */
footer {
  margin-top: 0;
  padding-top: 1rem;
  border-top: 1.5px solid #d0d0d0;
  width: calc(27.5% + 200px);
}

footer p {
  font-size: 0.9rem;
  color: #666;
}

/* Links - subtle and professional */
a {
  text-decoration: none;
  color: #2c2c2c;
  border-bottom: 1px solid #e0e0e0;
}

/* Pipe separator for inline navigation */
.pipe-separator {
  color: #ccc;
  margin: 0 0.5rem;
}

/* GitHub and external icons */
.github-icon {
  width: 16px;
  height: 16px;
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.7;
}

/* Inline symbol for subtitles */
.symbol-inline {
  opacity: 0.4;
  font-size: 1.2rem;
  margin-left: 0.5em;
  color: #222;
  font-style: normal;
}

/* Blockquotes with left border */
blockquote {
  border-left: 6px solid #e8e8e8;
  padding-left: 1.5rem;
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
  color: #666;
}

blockquote p {
  margin-bottom: 0.5rem;
}

/* Table headers - left align to match table data */
table th {
  text-align: left;
}

/* Tables use tabular lining numerals for proper alignment */
table,
table td,
table th {
  font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-feature-settings: "tnum" 1, "lnum" 1;
  -moz-font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums lining-nums;
}

/* Symbol notation table - compact and readable */
section table tbody td {
  padding: 0.3rem 0.8rem 0.3rem 0;
  font-size: 1.15rem;
  line-height: 1.5;
  vertical-align: top;
}

section table tbody td:first-child {
  white-space: nowrap;
  padding-right: 1.5rem;
}

/* Code elements - distinct tech feel */
code {
  background-color: rgba(0, 0, 0, 0.04);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Symbol code styling */
code.symbol {
  background-color: rgba(139, 40, 54, 0.06);
  border: 1px solid rgba(139, 40, 54, 0.15);
  color: #6b1f2b;
  font-weight: 500;
}

/* Publication notes and links - replace inline styles */
.publication-note {
  font-style: italic;
  color: #666;
  margin-top: 1.5rem;
}

.github-note {
  font-style: italic;
  color: #666;
  margin: 1.5rem 0;
}

.pdf-link {
  color: #a64d4d;
  border-bottom-color: #a64d4d;
}

.doi-link {
  color: #05396b;
  border-bottom: none;
}

.separator-dash {
  margin: 0 0.5rem;
}

.section-spaced {
  margin-top: 3rem;
}

.plain-link {
  text-decoration: none;
  color: #111;
}
