:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #8f8f8f;
  --green: #0cb346;
  --panel: #111111;
  --border: #2a2a2a;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
  font-family: "Source Code Pro", monospace;
  font-weight: 300;
}

body:not(.home) main {
  width: min(860px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 80px;
}

.home {
  height: 100vh;
  overflow: hidden;
}

.home main {
  width: auto;
  max-width: none;
  height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* =========================
   Top Heading
   ========================= */

.top-line {
  padding-top: 32px;
  padding-right: 24px;
  padding-left: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.ck-heading {
  margin: 0;
  font-family: "Kumbh Sans", sans-serif;
  font-size: 96px;
  font-weight: 600;
  line-height: 1;
}

.ck-subheading {
  max-width: 500px;
  text-align: right;
  font-family: "Source Code Pro", monospace;
  font-size: 15px;
  line-height: 1.5;
  padding-top: 32px;
  padding-right: 24px;
}

.ck-subheading p {
  margin: 0;
}

/* =========================
   Typography
   ========================= */

h1,
h2,
h3 {
  color: var(--text);
  font-family: "Kumbh Sans", sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1;
}

h1 {
  font-size: 48px;
  margin: 0 0 18px;
}

h2 {
  font-size: 28px;
  margin: 38px 0 14px;
}

h3 {
  font-size: 22px;
  margin: 30px 0 12px;
}

p {
  max-width: 860px;
  margin: 0 0 16px;
  line-height: 1.65;
}

li {
  line-height: 1.65;
}

/* =========================
   Links
   ========================= */

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

a:hover {
  color: var(--green);
}

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

.home-grid {
  display: grid;
  grid-template-columns: 500px 1fr;
  column-gap: 96px;
  align-items: start;
  padding-left: 24px;
  padding-right: 24px;
  margin-top: 48px;
}

/* =========================
   Notes Section
   ========================= */

.notes-section {
  width: 500px;
}

.content-list {
  width: 100%;
}

.content-row {
  display: grid;
  grid-template-columns: auto 20px 100px;
  column-gap: 10px;
  align-items: baseline;
  width: 500px;
  padding: 6px 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.content-title {
  text-align: left;
}

.content-dash {
  text-align: center;
}

.content-date {
  text-align: right;
  font-size: 14px;
}

.content-row:hover {
  color: var(--green);
  text-decoration: none;
  border-bottom-color: var(--green);
}

.content-row:hover .content-title,
.content-row:hover .content-dash,
.content-row:hover .content-date {
  color: var(--green);
}

/* =========================
   Right Side Links
   ========================= */

.home-links {
  padding-top: 40px;
  justify-self: end;
  text-align: right;
}

.home-links a {
  display: block;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  margin-bottom: 8px;
  font-size: 20px;
  width: fit-content;
  margin-left: auto;
  padding: 0;
}

.home-links a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* =========================
   Post Layout
   ========================= */

nav {
  display: flex;
  gap: 18px;
  margin-bottom: 48px;
}

nav a {
  color: var(--text);
  border-bottom: 1px solid transparent;
}

nav a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

article {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  color: var(--text);
}

article p,
article li,
article span,
article label {
  color: var(--text);
}

article a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

article a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

article mjx-container {
  color: var(--text);
}

.empty-state {
  color: var(--muted);
  font-size: 14px;
}

code,
pre {
  font-family: "Source Code Pro", monospace;
}

pre {
  overflow-x: auto;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
}

/* =========================
   Widgets and Charts
   ========================= */

.widget,
.plotly-chart {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 18px;
  margin: 28px 0;
}

.plotly-chart {
  min-height: 320px;
}

.widget .plotly-chart {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 20px 0 0;
}

.widget canvas {
  width: 100%;
  height: auto;
  display: block;
}

.slider-row {
  display: grid;
  grid-template-columns: 150px 1fr 70px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.slider-value {
  text-align: right;
  font-size: 14px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.output {
  color: var(--text);
  font-size: 14px;
  margin-bottom: 0;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {
  .home {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .home main {
    height: auto;
    min-height: 100vh;
  }

  .home-grid {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .home-links {
    padding-top: 0;
    justify-self: start;
    text-align: left;
  }

  .home-links a {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
    font-size: 16px;
  }
}

@media (max-width: 720px) {
  .top-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .ck-subheading {
    max-width: 320px;
    text-align: left;
    padding-top: 4px;
    padding-right: 0;
    font-size: 14px;
  }
}

@media (max-width: 660px) {
  .ck-heading {
    font-size: 56px;
  }

  body:not(.home) main {
    width: min(100% - 32px, 860px);
    padding-top: 24px;
  }

  .slider-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .slider-value {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .home-grid {
    margin-top: 36px;
  }

  .home-links a {
    padding-top: 0;
    justify-self: start;
    text-align: left;
    font-size: 14px;
  }

  .notes-section {
    width: auto;
  }

  .content-row {
    grid-template-columns: auto 20px 50px;
    column-gap: 10px;
    width: 350px;
    padding: 6px 0;
  }

  .content-title {
    font-size: 12px;
    white-space: normal;
  }

  .content-dash,
  .content-date {
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .ck-heading {
    font-size: 36px;
  }

  .home-grid {
    margin-top: 32px;
  }

  .content-row {
    display: block;
    width: fit-content;
    padding: 2px;
  }

  .content-dash,
  .content-date {
    display: none;
  }
}
