:root {
  /*
   * SMMG Research light-theme palette
   *
   * Header:  #16181D
   * Primary: #272C35
   * Body:    #FFFFFF
   * Text:    #262626
   * Blue:    #1754CF
   */

  --navy: #272c35;
  --navy-2: #16181d;

  --blue: #1754cf;
  --blue-light: #093eaa;

  --ink: #262626;
  --muted: #737373;

  --line: #e0e0e0;
  --soft: #f5f5f5;
  --paper: #ffffff;

  --hero-text: #f5f5f5;

  --max: 1220px;
}

[data-theme="dark"] {
  /*
   * SMMG dark-theme palette
   */

  --navy: #1a1d23;
  --navy-2: #111317;

  --blue: #306ee8;
  --blue-light: #306ee8;

  --ink: #f0f0f0;
  --muted: #999999;

  --line: #303541;
  --soft: #2b303b;
  --paper: #111317;

  --hero-text: #f5f5f5;
}


/* =========================================================
   Base
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);

  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.72;

  transition:
    background .2s ease,
    color .2s ease;
}

a {
  color: var(--blue);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--blue-light);
}


/* =========================================================
   Accessibility
   ========================================================= */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  padding: 8px 12px;

  color: #262626;
  background: #ffffff;

  border: 1px solid #e0e0e0;
}


/* =========================================================
   Hero
   ========================================================= */

/*
 * The SMMG site uses:
 *
 *   top/header area  -> #16181D
 *   main hero        -> #272C35
 *
 * Our project page doesn't have a separate navbar element,
 * so reproduce that hierarchy inside the hero itself.
 */

.hero {
  color: var(--hero-text);

  background:
    linear-gradient(
      to bottom,
      var(--navy-2) 0,
      var(--navy-2) 92px,
      var(--navy) 92px,
      var(--navy) 100%
    );

  border-top: 0;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;

  padding: 30px 42px 64px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 32px;

  gap: 24px;
}

.hero-mark {
  color: #aeb5c1;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
}

.theme-toggle {
  appearance: none;

  border: 1px solid #303541;
  border-radius: 999px;

  padding: 7px 12px;

  color: #dfe3ea;
  background: transparent;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 12px;

  cursor: pointer;

  transition:
    border-color .2s ease,
    color .2s ease;
}

.theme-toggle:hover {
  border-color: #66738a;
}

.theme-icon {
  margin-right: 6px;
}

.hero-content {
  max-width: 930px;

  padding-top: 68px;
}

.project-type {
  margin: 0 0 15px;

  color: #306ee8;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;

  color: #f5f5f5;

  font-size: clamp(48px, 6vw, 76px);
  font-weight: 500;

  letter-spacing: -.045em;
  line-height: 1.02;
}

.hero-dek {
  max-width: 850px;

  margin: 22px 0 27px;

  color: #b9c0ca;

  font-size: 21px;
  line-height: 1.5;
}

.hero-links {
  display: flex;
  align-items: center;

  gap: 16px;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 14px;
  font-weight: 650;
}

.hero-links a {
  color: #306ee8;
  text-decoration: none;
}

.hero-links a:hover {
  color: #ffffff;
}

.hero-separator {
  color: #737373;
}


/* =========================================================
   Main Layout
   ========================================================= */

.layout {
  max-width: var(--max);
  margin: 0 auto;

  padding: 58px 42px 100px;

  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);

  gap: 72px;
}

.sidebar {
  align-self: start;

  position: sticky;
  top: 24px;
}

.smmg-logo {
  display: block;

  width: 168px;

  background: #ffffff;

  border: 1px solid var(--line);
}

.smmg-logo img {
  display: block;

  width: 100%;
  height: auto;
}

.side-rule {
  width: 100%;

  margin: 25px 0;

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

.side-label {
  margin-bottom: 5px;

  color: var(--muted);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.side-title {
  color: var(--ink);

  font-size: 22px;
  line-height: 1.25;
}

.side-copy {
  margin: 10px 0 0;

  color: var(--muted);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 13px;
  line-height: 1.55;
}

.content {
  min-width: 0;
}


/* =========================================================
   Sections
   ========================================================= */

.section {
  padding: 0 0 58px;
  margin: 0 0 58px;

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

.section:first-child {
  padding-top: 0;
}

h2 {
  margin: 0 0 22px;

  color: var(--ink);

  font-size: 34px;
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.25;
}

h3 {
  margin: 38px 0 13px;

  color: var(--ink);

  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
}

p {
  margin: 0 0 18px;
}

.section-note,
.table-note {
  color: var(--muted);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 14px;
  line-height: 1.6;
}


/* =========================================================
   Architecture
   ========================================================= */

.architecture {
  margin: 24px 0 22px;

  padding: 20px 18px;

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

  background: var(--soft);
}

.architecture img {
  display: block;

  width: 100%;
  height: auto;
}


/* =========================================================
   Section Heading
   ========================================================= */

.section-heading {
  display: flex;

  justify-content: space-between;
  align-items: end;

  gap: 35px;
}

.section-kicker {
  margin: 0 0 5px;

  color: var(--blue);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}


/* =========================================================
   Performance
   ========================================================= */

.metric-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 14px;

  margin: 28px 0 30px;
}

.metric-card {
  padding: 22px 22px 20px;

  border-top: 3px solid var(--blue);

  background: var(--soft);
}

.metric-value {
  color: var(--ink);

  font-size: 36px;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.metric-unit {
  margin-top: 4px;

  color: var(--muted);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.metric-detail {
  margin-top: 12px;

  color: var(--muted);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 13px;
}


/* =========================================================
   Tables
   ========================================================= */

table {
  width: 100%;

  margin: 20px 0 13px;

  border-collapse: collapse;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 14px;
}

th,
td {
  padding: 10px 12px;

  border-bottom: 1px solid var(--line);

  text-align: left;
  vertical-align: top;
}

th {
  width: 32%;

  color: var(--ink);

  font-weight: 650;
}

thead th {
  background: var(--soft);
}


/* =========================================================
   Reconstruction Paths
   ========================================================= */

.path-grid,
.related-grid {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 15px;
}

.path-grid article {
  padding: 22px;

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

  background: var(--soft);
}

.path-label {
  margin-bottom: 8px;

  color: var(--blue);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 12px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.path-grid p {
  margin: 0;
}


/* =========================================================
   Blockquote
   ========================================================= */

blockquote {
  margin: 28px 0;

  padding: 17px 20px;

  border-left: 3px solid var(--blue);

  background: var(--soft);

  color: var(--muted);
}


/* =========================================================
   Code
   ========================================================= */

code {
  padding: .12em .35em;

  border: 1px solid var(--line);
  border-radius: 3px;

  background: var(--soft);

  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;

  font-size: .87em;
}

pre {
  overflow-x: auto;

  margin: 20px 0 28px;

  padding: 18px 20px;

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

  background: var(--soft);

  color: var(--ink);

  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;

  font-size: 13px;
  line-height: 1.6;
}

pre code {
  padding: 0;

  border: 0;

  background: transparent;
}


/* =========================================================
   Architecture List
   ========================================================= */

.architecture-list > div {
  display: grid;

  grid-template-columns: 210px 1fr;

  gap: 24px;

  padding: 15px 0;

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

.architecture-list > div:last-child {
  border-bottom: 1px solid var(--line);
}

.architecture-list span {
  color: var(--muted);
}


/* =========================================================
   Pipeline
   ========================================================= */

.pipeline {
  display: grid;

  grid-template-columns:
    1fr
    auto
    1.2fr
    auto
    1.2fr
    auto
    2fr;

  align-items: center;

  gap: 12px;

  margin-top: 30px;

  padding: 22px;

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

  background: var(--soft);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 13px;
  font-weight: 650;

  text-align: center;
}

.pipeline span {
  color: var(--blue);

  font-size: 21px;
}

.pipeline-wide {
  line-height: 1.45;
}


/* =========================================================
   Related Infrastructure
   ========================================================= */

.related-grid > div {
  padding-top: 3px;
}

.related-grid h3 {
  margin-top: 0;
  margin-bottom: 8px;
}


/* =========================================================
   Footer
   ========================================================= */

.footer {
  padding:
    28px
    max(42px, calc((100vw - var(--max)) / 2 + 42px));

  color: #999999;

  background: var(--navy-2);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 12px;
}

.footer strong {
  color: #f0f0f0;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 900px) {
  .layout {
    display: block;

    padding-left: 26px;
    padding-right: 26px;
  }

  .sidebar {
    position: static;

    margin-bottom: 46px;
  }

  .smmg-logo {
    width: 160px;
  }

  .section-heading {
    display: block;
  }

  .section-heading .section-note {
    margin-top: -8px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .pipeline {
    grid-template-columns: 1fr;
  }

  .pipeline span {
    transform: rotate(90deg);
  }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 620px) {
  .hero-inner {
    padding: 25px 22px 48px;
  }

  .hero-top {
    align-items: flex-start;
  }

  .hero-mark {
    max-width: 230px;
    line-height: 1.5;
  }

  .hero-content {
    padding-top: 48px;
  }

  h1 {
    font-size: 47px;
  }

  .hero-dek {
    font-size: 18px;
  }

  .hero-links {
    flex-wrap: wrap;
  }

  .layout {
    padding: 42px 22px 70px;
  }

  h2 {
    font-size: 30px;
  }

  .path-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .architecture-list > div {
    display: block;
  }

  .architecture-list span {
    display: block;
    margin-top: 5px;
  }

  table {
    font-size: 13px;
  }

  th,
  td {
    padding: 9px 8px;
  }
}
