:root {
  --color-dark: #1a1a1a;
  --color-light: #fafafa;
  --color-gray: #a5a5a5;
  --text-color-dark: #000000;
  --text-color-light: #ffffff;
  --shadow-light: 0 0 1em var(--color-light), 0 0 2em var(--color-light);
  --shadow-dark: 0 0 1em var(--color-dark), 0 0 2em var(--color-dark);

  --color-primary: #0077b2;
  --color-primary-lighter: #53afdc;
  --color-primary-darker: #005179;

  --text-size-base: 1.1rem;
  --text-size-h6: 1.2rem;
  --text-size-h5: 1.44rem;
  --text-size-h4: 1.728rem;
  --text-size-h3: 2.074rem;
  --text-size-h2: 2.488rem;
  --text-size-h1: 2.986rem;
  --text-size-h0: 3.583rem;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--color-light);
  color: var(--text-color-dark);
  margin: 0;
  font-size: var(--text-size-base);
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
h5,
h6,
.site-name {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

h1 {
  font-size: var(--text-size-h1);
}
h2 {
  font-size: var(--text-size-h2);
}
h3 {
  font-size: var(--text-size-h3);
}
h4 {
  font-size: var(--text-size-h4);
}
h5 {
  font-size: var(--text-size-h5);
}
h6 {
  font-size: var(--text-size-h6);
}

/* Context-specific h3 styling for correct visual hierarchy */
.features-block-3 h3,
.section > ol > li > h3,
.two-column-block h3 {
  font-size: var(--text-size-h4);
  margin-top: 1.5em;
  margin-bottom: 1em;
}

.features-block-4 h3 {
  font-size: var(--text-size-h6);
  margin-top: 1.5em;
  margin-bottom: 1em;
}

button {
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

a {
  color: var(--color-primary);
  transition: color 0.05s ease;
}

a:visited {
  color: var(--color-primary-darker);
}

a:hover {
  color: var(--color-primary-lighter);
}

ol,
ul {
  list-style-type: none;
  padding: 0;
}

address {
  font-style: normal;
}

summary {
  cursor: pointer;
}

p,
summary,
dt,
ul > li,
ol > li {
  line-height: 1.6;
}

dt {
  font-weight: 700;
}

dd {
  margin-bottom: 1rem;
  margin-left: 0;
}

dd:before {
  content: "↪";
  margin-right: 0.4rem;
  margin-left: 0.25rem;
}

dd > p {
  display: inline;
  margin: 0;
  line-height: 1;
}

body {
  font-family: "Source Sans 3", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

body > nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: 5rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  pointer-events: none;
}

body > nav > * {
  pointer-events: auto;
}

body > footer > * {
  padding: 0 1rem;
}

/* Hero Section Styles */
.section.section-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.section.section-hero.section-hero-small {
  min-height: auto;
  padding-top: 8rem;
  padding-bottom: 0;
}

.section.section-hero.section-hero-medium {
  min-height: auto;
  padding-top: 16rem;
  padding-bottom: 0;
}

.visualization-container {
  position: absolute;
  inset: 0;
  overflow-x: clip;
  z-index: 0;
  pointer-events: none;
}

.visualization-container > .visualization {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max(105vw, 105vh);
  height: max(105vw, 105vh);
  padding: 0;
  pointer-events: auto;
}

.visualization-container > .visualization > svg {
  width: 100%;
  height: 100%;
}

/* Visualization Node and Edge Styles */
.visualization line {
  stroke: #d5d5d5;
}

.visualization circle {
  stroke: var(--color-light);
  cursor: pointer;
}

/* Tooltip */
.tooltip {
  position: fixed;
  background: var(--color-dark);
  color: var(--text-color-light);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-size: var(--text-size-base);
  max-width: 250px;
  pointer-events: none;
  z-index: 1000;
}

/* Hero Block Styles */

.hero-block {
  pointer-events: none;
}

.hero-block a,
.hero-block button {
  pointer-events: auto;
}

.hero-block > h1 {
  font-size: var(--text-size-h0);
  margin-bottom: 1rem;
}

.hero-block > p {
  font-size: var(--text-size-h5);
  font-weight: 500;
  margin-top: 1rem;
}

.hero-block > p.hero-cta {
  text-shadow: none;
}

.hero-block > p > a:visited,
.hero-block > p > a {
  color: var(--text-color-light);
  background: var(--color-dark);
  text-decoration: none;
  display: inline-block;
  border-radius: 0.25rem;
  transition: background-color 0.05s ease;
  padding: 1rem 2rem 1rem 1.5rem;
  position: relative;
}

.hero-block > p > a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--shadow-light);
  z-index: -1;
}

.hero-block > p > a:hover {
  background: var(--color-primary);
  color: var(--text-color-light);
}

.hero-block > p.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Section Block Styles */
.section {
  padding: 4rem 0 8rem;
  overflow-x: clip;
}

.section > * {
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.section-light {
  text-shadow: var(--shadow-light);
}
.section-dark {
  background: var(--color-dark);
  color: var(--text-color-light);
  text-shadow: var(--shadow-dark);
  position: relative;
  z-index: 1;
}

/* Reduce spacing between consecutive sections with same color */
.section-light:has(+ .section-light),
.section-dark:has(+ .section-dark) {
  padding-bottom: 4rem;
}

/* Features Block Styles */
.features-block + p {
  margin-top: 4rem;
}

/* Two Column Block Styles */
img.two-column-left,
img.two-column-right {
  width: 100%;
  border-radius: 50%;
  margin-top: 2rem;
}

footer.section {
  background: var(--color-dark);
  color: var(--text-color-light);
}

footer.section a,
footer.section a:visited {
  color: var(--color-gray);
}

footer.section a:hover {
  color: var(--text-color-light);
}

.site-name {
  font-size: var(--text-size-h2);
  text-decoration: none;
}

body > nav > .site-name {
  color: var(--color-gray);
  text-shadow: var(--shadow-light);
}

body > nav > .site-name:hover {
  color: var(--text-color-dark);
}

footer.section > a.site-name {
  display: block;
  color: var(--text-color-light);
}

footer.section > a.site-name:hover {
  color: var(--color-gray);
}

.section > ol > li {
  position: relative;
}

.section > ol > li > svg {
  position: absolute;
  left: 0;
  top: 20%;
  width: 80%;
  height: 180%;
}

/* Article List Styles */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.article-list article {
  display: flex;
  flex-direction: column;
}

.article-list .visualization {
  width: 100%;
  aspect-ratio: 1;
}

.article-content {
  flex: 1;
}

.hero-block {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.home-page .section.section-hero > .hero-block > p:nth-child(2) {
  position: relative;
}

.home-page .section.section-hero > .hero-block > p.tagline::before,
.home-page .section:nth-child(2) > *:nth-child(1)::before,
.article-page .section:nth-child(1) > *:nth-child(1)::before {
  content: "";
  position: absolute;
  inset: -20rem;
  backdrop-filter: brightness(1.2) blur(0.35rem);
  mask-image: radial-gradient(
    ellipse closest-side at center,
    #fff 50%,
    transparent 100%
  );
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}

.home-page .section:nth-child(2) > *:nth-child(1)::before,
.article-page .section:nth-child(1) > *:nth-child(1)::before {
  bottom: min(-75vw, -75vh);
}

.author-block {
  display: flex;
  flex-direction: column;
}
.author-avatar {
  max-width: 24rem;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  flex-shrink: 0;
}

.author-info {
  grid-column: span 2;
}

.author-name {
  font-weight: 700;
}

/* ==========================================================================
   Tablet (768px)
   ========================================================================== */
@media (min-width: 768px) {
  .home-page .section:nth-child(2) > *:nth-child(1)::before,
  .article-page .section:nth-child(1) > *:nth-child(1)::before {
    inset: -30rem;
  }

  .article-page article .section > * {
    max-width: 50rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-block > p.hero-cta {
    flex-direction: row;
    gap: 0.5rem;
  }

  .features-block-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  img.two-column-right {
    float: right;
    width: 50%;
  }

  img.two-column-left {
    float: left;
    width: 50%;
  }

  img.two-column-left,
  img.two-column-right {
    margin-top: 0rem;
  }

  /* Process Roadmap Block Styles */
  .section > ol {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  footer.section > section > div {
    grid-column: span 2;
  }

  footer.section > section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  footer.section > section > div:first-child {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .article-list article {
    flex-direction: row;
    gap: 4rem;
  }

  .article-list .visualization {
    width: 25%;
    flex-shrink: 0;
  }

  .section.section-hero.section-hero-medium {
    padding-top: 24rem;
  }

  .author-block {
    display: grid;
    grid-template-columns: 1fr calc((min(80rem, 100vw) - 6rem) / 3) 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   Desktop (1024px)
   ========================================================================== */
@media (min-width: 1024px) {
  .section > *,
  body > nav {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
  }

  .features-block-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .features-block-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  footer.section > section > div {
    grid-column: span 1;
  }

  footer.section > section {
    grid-template-columns: repeat(3, 1fr);
  }

  .section > ol {
    grid-template-columns: repeat(4, 1fr);
  }

  .section > ol > li:nth-child(1) {
    grid-column: 1 / span 2;
    grid-row: 1;
  }

  .section > ol > li:nth-child(2) {
    grid-column: 2 / span 2;
    grid-row: 2;
  }

  .section > ol > li:nth-child(3) {
    grid-column: 3 / span 2;
    grid-row: 3;
  }

  .section > ol > li:nth-child(4) {
    grid-column: 4;
    grid-row: 4;
  }
}
