/* =========================================================
   AICPP GitHub Pages
   ========================================================= */

:root {
  --sidebar-width: 260px;
  --content-width: 900px;
  --border-color: #e5e7eb;
  --text-color: #24292f;
  --muted-color: #6e7781;
  --link-color: #0969da;
  --sidebar-background: #f6f8fa;
  --code-background: #f6f8fa;
}


/* ---------------------------------------------------------
   Global
   --------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;

  color: var(--text-color);
  background: white;
  line-height: 1.6;
}


/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */

.site-wrapper {
  display: flex;
  min-height: 100vh;
}


/* ---------------------------------------------------------
   Sidebar
   --------------------------------------------------------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;

  width: var(--sidebar-width);
  height: 100vh;

  padding: 32px 24px;

  background: var(--sidebar-background);
  border-right: 1px solid var(--border-color);

  display: flex;
  flex-direction: column;

  overflow-y: auto;
}


.sidebar-header {
  margin-bottom: 36px;
}


.site-title {
  font-size: 1.8rem;
  font-weight: 700;

  color: var(--text-color);
  text-decoration: none;
}


.site-description {
  margin-top: 6px;

  color: var(--muted-color);

  font-size: 0.85rem;
  line-height: 1.4;
}


/* ---------------------------------------------------------
   Navigation
   --------------------------------------------------------- */

.navigation {
  display: flex;
  flex-direction: column;
  gap: 28px;
}


.nav-section {
  display: flex;
  flex-direction: column;
}


.nav-heading {
  margin-bottom: 8px;

  font-size: 0.72rem;
  font-weight: 700;

  letter-spacing: 0.08em;

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


.navigation a {
  display: block;

  padding: 5px 8px;

  margin-left: -8px;

  border-radius: 6px;

  color: var(--text-color);

  text-decoration: none;

  font-size: 0.92rem;
}


.navigation a:hover {
  color: var(--link-color);
  background: #eaeef2;
}


/* ---------------------------------------------------------
   Sidebar footer
   --------------------------------------------------------- */

.sidebar-footer {
  margin-top: auto;

  padding-top: 24px;

  border-top: 1px solid var(--border-color);
}


.sidebar-footer a {
  color: var(--link-color);
  text-decoration: none;

  font-size: 0.9rem;
}


/* ---------------------------------------------------------
   Main content
   --------------------------------------------------------- */

.content {
  margin-left: var(--sidebar-width);

  width: calc(100% - var(--sidebar-width));

  padding: 56px 64px;

  max-width: calc(
    var(--sidebar-width) + var(--content-width) + 128px
  );
}


.content article {
  max-width: var(--content-width);
}


/* ---------------------------------------------------------
   Headers
   --------------------------------------------------------- */

.page-header {
  margin-bottom: 32px;

  padding-bottom: 20px;

  border-bottom: 1px solid var(--border-color);
}


h1,
h2,
h3,
h4 {
  line-height: 1.25;
}


h1 {
  font-size: 2.3rem;
}


h2 {
  margin-top: 42px;

  font-size: 1.65rem;
}


h3 {
  margin-top: 30px;

  font-size: 1.25rem;
}


/* ---------------------------------------------------------
   Links
   --------------------------------------------------------- */

.content a {
  color: var(--link-color);
}


/* ---------------------------------------------------------
   Images
   --------------------------------------------------------- */

.content img {
  display: block;

  max-width: 100%;
  height: auto;

  margin: 24px auto;
}


/* ---------------------------------------------------------
   Code
   --------------------------------------------------------- */

code {
  padding: 0.15em 0.3em;

  border-radius: 4px;

  background: var(--code-background);

  font-size: 0.9em;
}


pre {
  padding: 18px;

  overflow-x: auto;

  border-radius: 8px;

  background: var(--code-background);

  line-height: 1.5;
}


pre code {
  padding: 0;

  background: transparent;
}


/* ---------------------------------------------------------
   Tables
   --------------------------------------------------------- */

table {
  width: 100%;

  border-collapse: collapse;

  margin: 24px 0;
}


th,
td {
  padding: 9px 12px;

  border: 1px solid var(--border-color);

  text-align: left;
}


th {
  background: var(--sidebar-background);
}


/* ---------------------------------------------------------
   Blockquotes
   --------------------------------------------------------- */

blockquote {
  margin: 24px 0;

  padding: 8px 20px;

  border-left: 4px solid var(--border-color);

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


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 800px) {

  .site-wrapper {
    display: block;
  }

  .sidebar {
    position: relative;

    width: 100%;
    height: auto;

    padding: 20px 24px;

    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .sidebar-header {
    margin-bottom: 20px;
  }

  .navigation {
    flex-direction: row;

    flex-wrap: wrap;

    gap: 18px 32px;
  }

  .nav-section {
    min-width: 140px;
  }

  .sidebar-footer {
    margin-top: 24px;
  }

  .content {
    margin-left: 0;

    width: 100%;

    padding: 36px 24px;
  }

  h1 {
    font-size: 1.9rem;
  }
}
