:root {
  --tc-projects: #14a2ae;
  --tc-writing: #2e8b6e;
  --tc-talks: #e24a3b;
  --tc-about: #a084d8;
}

.section-index-header {
  box-sizing: content-box;
  max-width: var(--tc-site-content-width, 1140px);
  margin: 0 auto;
  padding: 46px var(--tc-site-gutter, 44px);
}

.section-index-header__title {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  column-gap: 15px;
  align-items: center;
}

.section-index-header__title h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 46px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-index-header__mark {
  display: block;
  width: 44px;
  height: 44px;
  overflow: visible;
}

.section-index-header__mark path,
.section-index-header__mark rect {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-index-header__mark .mark-teal {
  fill: #14a2ae;
}

.section-index-header__mark .mark-gold {
  fill: #e1a81e;
}

.section-index-header__mark .mark-red {
  fill: #e24a3b;
}

.section-index-header__mark .mark-green {
  fill: #2e8b6e;
}

.section-index-header__mark .mark-paper {
  stroke: rgb(244 241 234 / 82%);
  stroke-width: 1;
}

.section-index-header__mark .mark-tile {
  stroke: var(--paper, #f4f1ea);
  stroke-width: 1;
}

.section-index-header__mark .mark-paper-rule {
  fill: none;
  stroke: rgb(244 241 234 / 82%);
  stroke-width: 1.25;
}

.section-index-header__mark .mark-writing-rule {
  fill: none;
  stroke: rgb(94 108 112 / 32%);
  stroke-width: .8;
}

.section-index-header__copy {
  max-width: 44ch;
  margin: 16px 0 0;
  color: var(--soft, #5e6c70);
  font-size: 18px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* Temporary, URL-addressable study for the five section index headers. */
.section-index-header[data-section-title] {
  position: relative;
  isolation: isolate;
}

.section-index-header[data-section-title] .section-index-header__title {
  max-width: calc(100% - 400px);
  transition: column-gap .28s ease, grid-template-columns .28s ease;
}

.section-index-header[data-section-title] .section-index-header__title h1,
.section-index-header[data-section-title] .section-index-header__copy {
  transition: font-size .28s ease, font-weight .28s ease, line-height .28s ease,
    margin .28s ease, max-width .28s ease;
}

.section-index-header__mark--animated {
  display: none;
}

.section-index-header__mark--dot {
  justify-self: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e1a81e;
  box-shadow: 0 0 0 6px color-mix(in srgb, #e1a81e 14%, transparent);
}

.section-title-variants {
  position: absolute;
  top: 20px;
  right: var(--tc-site-gutter, 44px);
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.section-title-variants__choice {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ink, #14202a) 20%, transparent);
  border-radius: 50%;
  color: var(--soft, #5e6c70);
  background: color-mix(in srgb, var(--paper, #f4f1ea) 94%, transparent);
  box-shadow: 0 2px 8px rgb(20 32 42 / 8%);
  font: 600 11px/1 "Space Grotesk", sans-serif;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease,
    box-shadow .16s ease, transform .16s ease;
}

.section-title-variants__choice:hover {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--ink));
  color: var(--ink, #14202a);
  box-shadow: 0 5px 14px rgb(20 32 42 / 12%);
  transform: translateY(-2px);
}

.section-title-variants__choice[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--paper, #f4f1ea);
  background: var(--accent);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 26%, transparent);
}

.section-title-variants__choice:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 62%, transparent);
  outline-offset: 3px;
}

.section-index-header[data-title-variant] .section-index-header__mark--legacy {
  display: none;
}

.section-index-header[data-title-variant] .section-index-header__mark--animated {
  display: block;
}

/* A: compact, quiet, and clearly subordinate to the homepage. */
.section-index-header[data-title-variant="A"] {
  padding-top: 42px;
  padding-bottom: 42px;
}

.section-index-header[data-title-variant="A"] .section-index-header__title {
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 14px;
}

.section-index-header[data-title-variant="A"] .section-index-header__mark--animated {
  width: 42px;
  height: 42px;
}

.section-index-header[data-title-variant="A"] .section-index-header__title h1 {
  font-size: 44px;
  font-weight: 400;
  line-height: 1.06;
}

.section-index-header[data-title-variant="A"] .section-index-header__copy {
  max-width: 44ch;
  margin-top: 14px;
  margin-left: 0;
}

/* B: a measured title with enough copy to establish the section. */
.section-index-header[data-title-variant="B"] {
  padding-top: 50px;
  padding-bottom: 50px;
}

.section-index-header[data-title-variant="B"] .section-index-header__title {
  grid-template-columns: 54px minmax(0, 1fr);
  column-gap: 17px;
}

.section-index-header[data-title-variant="B"] .section-index-header__mark--animated {
  width: 52px;
  height: 52px;
}

.section-index-header[data-title-variant="B"] .section-index-header__title h1 {
  font-size: 46px;
  font-weight: 400;
  line-height: 1.06;
}

.section-index-header[data-title-variant="B"] .section-index-header__copy {
  max-width: 52ch;
  margin-top: 18px;
  margin-left: 0;
}

/* C: the same ingredients pulled into a tighter typographic unit. */
.section-index-header[data-title-variant="C"] {
  padding-top: 46px;
  padding-bottom: 46px;
}

.section-index-header[data-title-variant="C"] .section-index-header__title {
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 16px;
}

.section-index-header[data-title-variant="C"] .section-index-header__mark--animated {
  width: 50px;
  height: 50px;
}

.section-index-header[data-title-variant="C"] .section-index-header__title h1 {
  font-size: 46px;
  font-weight: 400;
  line-height: 1.06;
}

.section-index-header[data-title-variant="C"] .section-index-header__copy {
  max-width: 44ch;
  margin-top: 10px;
  margin-left: 0;
  font-size: 18px;
}

/* D: a compact colour field with the longer section introduction. */
.section-index-header[data-title-variant="D"] {
  padding-top: 50px;
  padding-bottom: 50px;
}

.section-index-header[data-title-variant="D"] .section-index-header__title {
  grid-template-columns: 54px minmax(0, 1fr);
  column-gap: 18px;
}

.section-index-header[data-title-variant="D"] .section-index-header__mark--animated {
  width: 52px;
  height: 52px;
}

.section-index-header[data-title-variant="D"] .section-index-header__title h1 {
  font-size: 46px;
  font-weight: 400;
  line-height: 1.06;
}

.section-index-header[data-title-variant="D"] .section-index-header__copy {
  max-width: 52ch;
  margin-top: 18px;
  margin-left: 0;
  font-size: 18px;
}

/* D-F: three strengths and proportions of the muted colour-field idea. */
.section-index-header[data-title-variant="D"]::before,
.section-index-header[data-title-variant="E"]::before,
.section-index-header[data-title-variant="F"]::before {
  position: absolute;
  top: 0;
  bottom: 0;
  right: calc(50% - 50vw);
  left: calc(50% - 50vw);
  z-index: -1;
  content: "";
}

.section-index-header[data-title-variant="D"]::before {
  background: color-mix(in srgb, var(--accent) 9%, var(--paper));
}

.section-index-header[data-title-variant="E"]::before {
  background: color-mix(in srgb, var(--accent) 11%, var(--paper));
}

.section-index-header[data-title-variant="F"]::before {
  background: color-mix(in srgb, var(--accent) 7%, var(--paper));
}

.section-index-header[data-title-variant="D"]::after,
.section-index-header[data-title-variant="E"]::after,
.section-index-header[data-title-variant="F"]::after,
.section-index-header[data-title-variant="H"]::after {
  position: absolute;
  bottom: 0;
  right: calc(50% - 50vw);
  left: calc(50% - 50vw);
  border-bottom: 1px solid var(--line, #d6d1c2);
  content: "";
}

.section-index-header[data-title-variant="D"] + div > [data-stuckborder],
.section-index-header[data-title-variant="D"] + main > [data-stuckborder],
.section-index-header[data-title-variant="E"] + div > [data-stuckborder],
.section-index-header[data-title-variant="E"] + main > [data-stuckborder],
.section-index-header[data-title-variant="F"] + div > [data-stuckborder],
.section-index-header[data-title-variant="F"] + main > [data-stuckborder],
.section-index-header[data-title-variant="H"] + div > [data-stuckborder],
.section-index-header[data-title-variant="H"] + main > [data-stuckborder] {
  margin-top: 0 !important;
  border-top-color: transparent !important;
}

/* E retains the more assertive field as a useful reference point. */
.section-index-header[data-title-variant="E"] {
  padding-top: 64px;
  padding-bottom: 64px;
}

.section-index-header[data-title-variant="E"] .section-index-header__title {
  grid-template-columns: 74px minmax(0, 1fr);
  column-gap: 22px;
}

.section-index-header[data-title-variant="E"] .section-index-header__mark--animated {
  width: 72px;
  height: 72px;
}

.section-index-header[data-title-variant="E"] .section-index-header__title h1 {
  font-size: 58px;
  font-weight: 500;
  line-height: 1;
}

.section-index-header[data-title-variant="E"] .section-index-header__copy {
  max-width: 50ch;
  margin-top: 20px;
  margin-left: 96px;
  font-size: 18px;
}

/* F: the field treatment reduced to the site's normal proportions. */
.section-index-header[data-title-variant="F"] {
  padding-top: 46px;
  padding-bottom: 46px;
}

.section-index-header[data-title-variant="F"] .section-index-header__title {
  grid-template-columns: 46px minmax(0, 1fr);
  column-gap: 15px;
}

.section-index-header[data-title-variant="F"] .section-index-header__mark--animated {
  width: 44px;
  height: 44px;
}

.section-index-header[data-title-variant="F"] .section-index-header__title h1 {
  font-size: 46px;
  font-weight: 400;
  line-height: 1.06;
}

.section-index-header[data-title-variant="F"] .section-index-header__copy {
  max-width: 44ch;
  margin: 16px 0 0;
  font-size: 18px;
}

/* G: exactly the existing A composition, replacing only its static mark. */
.section-index-header[data-title-variant="G"] .section-index-header__mark--animated {
  width: 44px;
  height: 44px;
}

/* H: a full-width boundary without the colour wash. */
.section-index-header[data-title-variant="H"] {
  padding-top: 50px;
  padding-bottom: 50px;
}

.section-index-header[data-title-variant="H"] .section-index-header__title {
  grid-template-columns: 50px minmax(0, 1fr);
  column-gap: 16px;
}

.section-index-header[data-title-variant="H"] .section-index-header__mark--animated {
  width: 48px;
  height: 48px;
}

.section-index-header[data-title-variant="H"] .section-index-header__title h1 {
  font-size: 46px;
  font-weight: 400;
  line-height: 1.06;
}

.section-index-header[data-title-variant="H"] .section-index-header__copy {
  max-width: 52ch;
  margin-top: 18px;
  margin-left: 0;
  font-size: 18px;
}

/* I: G with a little more animation presence and regular-weight type. */
.section-index-header[data-title-variant="I"] {
  padding-top: 50px;
  padding-bottom: 50px;
}

.section-index-header[data-title-variant="I"] .section-index-header__title {
  grid-template-columns: 50px minmax(0, 1fr);
  column-gap: 16px;
}

.section-index-header[data-title-variant="I"] .section-index-header__mark--animated {
  width: 48px;
  height: 48px;
}

.section-index-header[data-title-variant="I"] .section-index-header__title h1 {
  font-size: 46px;
  font-weight: 400;
  line-height: 1.06;
}

.section-index-header[data-title-variant="I"] .section-index-header__copy {
  max-width: 48ch;
  margin: 18px 0 0;
}

.section-index-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family: "Space Grotesk", sans-serif;
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.section-index-page main {
  flex: 1;
}

.section-index-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  backdrop-filter: blur(7px);
}

.section-index-nav__inner {
  box-sizing: content-box;
  max-width: var(--tc-site-content-width, 1140px);
  margin: 0 auto;
  padding: 12px var(--tc-site-gutter, 44px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
}

.section-index-brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.section-index-brand svg {
  display: block;
  flex-shrink: 0;
}

.section-index-brand span {
  font-size: 21px;
  font-weight: 600;
}

.section-index-clock {
  justify-self: center;
}

.section-index-links {
  justify-self: end;
  display: flex;
  gap: 24px;
  align-items: baseline;
  font-size: 14px;
}

.section-index-links a {
  position: relative;
  padding-bottom: 4px;
  color: var(--ink);
  text-decoration: none;
  --section-link-color: var(--ink);
}

.section-index-links a[href="/projects/"] {
  --section-link-color: var(--tc-projects);
}

.section-index-links a[href="/talks/"] {
  --section-link-color: var(--tc-talks);
}

.section-index-links a[href="/writing/"] {
  --section-link-color: var(--tc-writing);
}

.section-index-links a[href="/about/"] {
  --section-link-color: var(--tc-about);
}

.section-index-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--section-link-color);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: opacity .16s ease, transform .16s ease;
}

.section-index-links a:hover::after,
.section-index-links a:focus-visible::after,
.section-index-links a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.section-index-links a:focus-visible {
  border-radius: 3px;
  outline: 2px solid color-mix(in srgb, var(--section-link-color) 55%, transparent);
  outline-offset: 5px;
}

.section-index-footer {
  border-top: 1px solid var(--line);
}

.section-index-footer__inner {
  box-sizing: content-box;
  max-width: var(--tc-site-content-width, 1140px);
  margin: 0 auto;
  padding: 22px var(--tc-site-gutter, 44px);
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.section-index-footer__identity,
.section-index-footer__dots {
  display: flex;
  align-items: center;
}

.section-index-footer__identity {
  gap: 16px;
}

.section-index-footer__dots {
  gap: 6px;
}

.section-index-footer__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.section-index-footer small,
.section-index-footer a {
  color: var(--soft);
  font-size: 12.5px;
}

.section-index-footer a {
  text-decoration: none;
}

@media (max-width: 700px) {
  .section-index-header {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .section-index-header[data-section-title] {
    display: block;
    padding-top: 30px;
    padding-bottom: 38px;
  }

  .section-index-header[data-section-title] .section-index-header__title {
    max-width: none;
  }

  .section-title-variants {
    position: relative;
    top: auto;
    right: auto;
    justify-content: flex-end;
    gap: 6px;
    margin: -8px 0 24px;
  }

  .section-title-variants__choice {
    width: 27px;
    height: 27px;
  }

  .section-index-header__title {
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 12px;
  }

  .section-index-header__title h1 {
    font-size: 40px;
  }

  .section-index-header__mark {
    width: 40px;
    height: 40px;
  }

  .section-index-header__copy {
    margin-top: 18px;
    font-size: 16px;
  }

  .section-index-header[data-title-variant] .section-index-header__title {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 14px;
  }

  .section-index-header[data-title-variant] .section-index-header__mark--animated {
    width: 46px;
    height: 46px;
  }

  .section-index-header[data-title-variant] .section-index-header__title h1 {
    font-size: 40px;
    font-weight: 400;
    line-height: 1.06;
  }

  .section-index-header[data-title-variant] .section-index-header__copy {
    max-width: 44ch;
    margin: 18px 0 0;
    font-size: 16px;
  }

  .section-index-nav__inner {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .section-index-clock {
    display: none;
  }

  .section-index-links {
    justify-self: start;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
  }
}
