/* ============================================================
   Monolog Documentation Site — Shared Stylesheet
   Font: Geologica (headings), Barlow (body), JetBrains Mono (code/data)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@400;500;600;700&family=Barlow:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ── */
:root {
  --accent:       #3d7ebf;
  --accent-dim:   rgba(61,126,191,0.12);
  --accent-hover: #3270a8;
  --header-bg:    #2a2d31;
  --header-sub:   #1e2023;
  --bg:           #edeef0;
  --bg-card:      #f7f8f9;
  --bg-white:     #ffffff;
  --text:         #22252a;
  --text-mid:     #4a4e55;
  --text-muted:   #767b84;
  --border:       #d0d3d8;
  --border-light: #e2e4e8;
  --rule:         #c5c8cd;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

/* ── Base ── */
body {
  font-family: 'Barlow', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── Utility ── */
.mono { font-family: 'JetBrains Mono', monospace; }
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,0.22);
}

.header-utility {
  background: var(--header-sub);
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-utility-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-utility span,
.header-utility a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color 0.15s;
}

.header-utility a:hover { color: rgba(255,255,255,0.7); }

.header-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  align-items: center;
  height: 62px;
  gap: 36px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg { width: 22px; height: 22px; }

.logo-wordmark {
  font-family: 'Geologica', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  line-height: 1;
}

.logo-wordmark sub {
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  vertical-align: baseline;
  margin-left: 3px;
  font-family: 'Barlow', sans-serif;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1;
}

.site-nav a {
  color: rgba(255,255,255,0.58);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 5px;
  transition: all 0.15s;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.site-nav a:hover { color: white; background: rgba(255,255,255,0.08); }
.site-nav a.active { color: white; background: rgba(61,126,191,0.28); }

.nav-end { margin-left: auto; flex-shrink: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0.2px;
  border: none;
}

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-ghost:hover { background: var(--accent-dim); }

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 36px 80px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 36px;
  align-items: start;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: 78px;
}

.sidebar-section { margin-bottom: 28px; }

.sidebar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
}

.sidebar a {
  display: block;
  text-decoration: none;
  color: var(--text-mid);
  font-size: 13.5px;
  font-weight: 400;
  padding: 5px 10px 5px 11px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all 0.12s;
}

.sidebar a:hover {
  color: var(--text);
  border-left-color: var(--rule);
  background: rgba(0,0,0,0.03);
}

.sidebar a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-dim);
  font-weight: 500;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content h2 {
  font-family: 'Geologica', sans-serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.3px;
  margin-top: 48px;
}

.content h2:first-child { margin-top: 0; }

.content h3 {
  font-family: 'Geologica', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 10px;
}

.content h4 {
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-mid);
  margin-top: 24px;
  margin-bottom: 8px;
}

.section-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 26px;
}

.section-rule .r1 { width: 32px; height: 2px; background: var(--accent); border-radius: 1px; }
.section-rule .r2 { width: 200px; height: 1px; background: var(--border); border-radius: 1px; }

.content p {
  font-size: 15px;
  line-height: 1.76;
  color: var(--text-mid);
  margin-bottom: 18px;
  max-width: 680px;
  font-weight: 300;
}

.content ul, .content ol {
  padding-left: 20px;
  margin-bottom: 18px;
  max-width: 680px;
}

.content li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-mid);
  font-weight: 300;
  margin-bottom: 4px;
}

/* ── Alert / callout ── */
.alert {
  display: flex;
  gap: 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 15px 20px;
  margin: 24px 0;
}

.alert-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.alert-body strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alert-body p {
  font-size: 13.5px;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.6;
  font-weight: 400;
  max-width: none;
}

/* ── Feature cards ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 30px 0;
}

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 22px 20px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
  transition: background 0.2s;
}

.feature-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.09); transform: translateY(-2px); }
.feature-card:hover::after { background: var(--accent); }

.feature-num {
  font-family: 'Geologica', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -1px;
}

.feature-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  font-weight: 300;
}

/* ── Data table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 13.5px;
  background: var(--bg-white);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.data-table thead tr { background: var(--header-bg); }

.data-table th {
  text-align: left;
  padding: 11px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.data-table td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-mid);
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(0,0,0,0.02); }
.data-table td:first-child { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--text); font-weight: 500; }

/* ── Tags ── */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-family: 'Barlow', sans-serif;
}

.tag-blue  { background: var(--accent-dim); color: var(--accent); }
.tag-new   { background: rgba(50,180,120,0.12); color: #2a9660; }
.tag-grey  { background: rgba(0,0,0,0.06); color: var(--text-muted); }
.tag-warn  { background: rgba(200,120,0,0.1); color: #a06000; }

/* ── Spec panel (right-side card) ── */
.spec-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.spec-panel-header {
  background: var(--header-bg);
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spec-panel-header span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.spec-panel-header .dots { display: flex; gap: 5px; }
.spec-panel-header .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15); }

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 22px;
  border-bottom: 1px solid var(--border-light);
  gap: 16px;
}

.spec-row:last-child { border-bottom: none; }
.spec-row-label { font-size: 12.5px; color: var(--text-muted); font-weight: 400; white-space: nowrap; }
.spec-row-value { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; color: var(--text); text-align: right; }

/* ── Placeholder block ── */
.placeholder {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 40px 32px;
  text-align: center;
  margin: 28px 0;
  color: var(--text-muted);
}

.placeholder-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.4; }
.placeholder h4 { font-family: 'Barlow', sans-serif; font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.placeholder p { font-size: 13px; color: var(--text-muted); font-weight: 300; max-width: 320px; margin: 0 auto; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--header-sub);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-logo {
  font-family: 'Geologica', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
}

.footer-inner p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.3px;
}

.footer-links { display: flex; gap: 22px; }

.footer-links a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

.footer-links a:hover { color: rgba(255,255,255,0.75); }
