/*
 * =============================================================================
 *
 *      _                     ____                 _
 *     / \   _ __ _   _  __ _ / ___|_ __ __ _ _ __ | |__
 *    / _ \ | '__| | | |/ _` | |  _| '__/ _` | '_ \| '_ \
 *   / ___ \| |  | |_| | (_| | |_| | | | (_| | |_) | | | |
 *  /_/   \_\_|   \__, |\__,_|\____|_|  \__,_| .__/|_| |_|
 *               |___/                     |_|
 *
 *          Graph & DAG visualization, analysis and simulation.
 *
 * -----------------------------------------------------------------------------
 *  Copyright (c) 2026 Ali Mohammadi Ruzbahani
 *  SPDX-License-Identifier: MIT
 *
 *  https://ruzbahani.com/aryagraph
 * =============================================================================
 */

/* ---------------------------------------------------------------- brand */
html[data-theme="light"] {
  --ag-navy: #152b4d;
  --ag-blue: #1450e0;
  --ag-teal: #0a9d97;
  --ag-orange: #e8791c;
  --ag-surface: #ffffff;
  --ag-soft: #f4f6fb;
  --ag-line: rgba(21, 43, 77, 0.12);
  --pst-color-primary: #1450e0;
  --pst-color-secondary: #d9690f;
  --pst-color-accent: #0a9d97;
  --pst-color-link: #1450e0;
  --pst-color-link-hover: #0d3aa8;
  --pst-color-inline-code: #b8520a;
}

html[data-theme="dark"] {
  --ag-navy: #c8d5f0;
  --ag-blue: #6f97ff;
  --ag-teal: #35c9c1;
  --ag-orange: #ffa55c;
  --ag-surface: #14171f;
  --ag-soft: #1b1f2a;
  --ag-line: rgba(200, 213, 240, 0.14);
  --pst-color-primary: #6f97ff;
  --pst-color-secondary: #ffa55c;
  --pst-color-accent: #35c9c1;
  --pst-color-link: #8aabff;
  --pst-color-link-hover: #b3c8ff;
  --pst-color-inline-code: #ffb27a;
}

.navbar-brand .title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ag-footer-note {
  margin: 0;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------- landing */
/* the landing page keeps its H1 for accessibility and search, the hero shows the headline */
section#aryagraph > h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ag-headline {
  font-size: 2.3rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  color: var(--ag-navy);
}

.ag-closing {
  text-align: center;
  margin: 3rem 0 1rem;
  color: var(--pst-color-text-muted);
}

.ag-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem 0 1.5rem;
}

.ag-hero-logo {
  display: inline-block;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.25rem;
}

.ag-hero-logo img {
  display: block;
  width: min(360px, 100%);
  height: auto;
}

.ag-hero h1 {
  font-size: 2.35rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  color: var(--ag-navy);
}

.ag-hero .ag-lede {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--pst-color-text-muted);
  margin-bottom: 1.4rem;
}

.ag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.ag-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none !important;
  border: 1px solid var(--ag-line);
}

.ag-btn-primary {
  background: var(--ag-blue);
  border-color: var(--ag-blue);
  color: #ffffff !important;
}

html[data-theme="dark"] .ag-btn-primary {
  color: #0b1020 !important;
}

.ag-btn-secondary {
  background: var(--ag-surface);
  color: var(--pst-color-text-base) !important;
}

.ag-install {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  font-family: var(--pst-font-family-monospace);
  font-size: 0.84rem;
  background: var(--ag-soft);
  border: 1px solid var(--ag-line);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
}

.ag-hero-figure img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--ag-line);
  background: #ffffff;
}

.ag-section-title {
  text-align: center;
  margin: 3rem 0 0.4rem;
}

.ag-section-lede {
  text-align: center;
  color: var(--pst-color-text-muted);
  max-width: 720px;
  margin: 0 auto 1.6rem;
}

.ag-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0 0.5rem;
}

.ag-stat {
  background: var(--ag-soft);
  border: 1px solid var(--ag-line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.ag-stat b {
  display: block;
  font-size: 1.5rem;
  color: var(--ag-navy);
  letter-spacing: -0.01em;
}

.ag-stat span {
  font-size: 0.88rem;
  color: var(--pst-color-text-muted);
}

@media (max-width: 900px) {
  .ag-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .ag-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The theme dims every image in dark mode; AryaGraph figures are charts on a light
   surface and read better at full contrast inside their frames. */
html[data-theme="dark"] .bd-content img {
  filter: none;
}

/* ---------------------------------------------------------------- cards & figures */
.sd-card {
  border-radius: 12px !important;
  border-color: var(--ag-line) !important;
}

.sd-card .sd-card-title {
  font-weight: 650;
}

.ag-card-img img,
.sd-card-img-top {
  background: #ffffff;
}

figure img,
.ag-figure img {
  border-radius: 10px;
  border: 1px solid var(--ag-line);
  background: #ffffff;
}

/* interactive AryaGraph pages embedded in the docs */
.ag-embed {
  display: block;
  width: 100%;
  border: 1px solid var(--ag-line);
  border-radius: 12px;
  background: #f9f9f7;
  margin: 0.8rem 0 0.4rem;
}

.ag-embed-note {
  font-size: 0.85rem;
  color: var(--pst-color-text-muted);
  margin-bottom: 1.2rem;
}

/* small print used under figures and tables */
.ag-caption {
  font-size: 0.88rem;
  color: var(--pst-color-text-muted);
}
