/* Catalyst archive. A small rewrite of the look of "Paradigm Shift" by HTML5 UP
   (html5up.net, CCA 3.0), with no scripts. */

:root {
  --fg: #000a0a;
  --fg-bold: #003c3c;
  --fg-light: rgba(0, 92, 92, 0.7);
  --accent: #c2f39a;
  --accent-border: #5f9d57;
  --left: 33vw;
  --pad: 5rem;
  --sans: "Source Sans Pro", Helvetica, sans-serif;
  --heading: Raleway, Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 13pt; overflow-x: hidden; }
@media (min-width: 1921px) { html { font-size: 18pt; } }
body {
  margin: 0;
  background: #fff;
  color: var(--fg);
  font: 300 1rem/2 var(--sans);
  letter-spacing: 0.0375em;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }

a { color: var(--fg-bold); text-decoration: none; border-bottom: 1px dotted; }
a:hover { border-bottom-color: transparent; }
strong, b { font-weight: 600; color: var(--fg-bold); }
p, ul, ol { margin: 0 0 2rem; }
ul, ol { padding-left: 1.25rem; }
li { padding-left: 0.3rem; }
li > ul, li > ol { margin-bottom: 0; }
hr { border: 0; border-bottom: 2px solid rgba(0, 60, 60, 0.25); margin: 3rem 0; }

h1, h2, h3, h4 {
  color: var(--fg-bold);
  font-family: var(--heading);
  font-weight: 600;
  letter-spacing: 0.175em;
  line-height: 1.75;
  margin: 0 0 1.5rem;
  text-transform: uppercase;
}
h1 {
  font: 700 3.5rem/1.1 var(--sans);
  letter-spacing: -0.05em;
  text-transform: none;
}
h1 a { border: 0; color: inherit; }
h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 2rem; }
h3, h4 { font-size: 0.875rem; }

/* Two-column layout: green left column for headings, content on the right. */
#wrapper { position: relative; padding-bottom: calc(var(--pad) * 2); }
#wrapper::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--left);
  z-index: -1;
  background: var(--accent) url(img/pattern.svg) -50% 10% / 75% auto repeat-y fixed;
}

#wrapper > section {
  display: grid;
  grid-template-columns: var(--left) 1fr;
  margin-top: var(--pad);
  position: relative;
}
#wrapper > section:first-child { margin-top: 0; }

#wrapper > section > header {
  justify-self: end;
  text-align: right;
  width: calc(25rem + var(--pad) * 2);
  max-width: 100%;
  padding: 0 calc(var(--pad) * 2) 0 calc(var(--pad) / 2);
}
#wrapper > section > .content {
  max-width: 60rem;
  min-width: 0;
  padding: 0 var(--pad);
}

/* The vertical line, connectors and dots that link each heading. */
#wrapper > section > header::before {
  content: "";
  position: absolute;
  left: calc(var(--left) - var(--pad));
  top: 1rem;
  width: 2px;
  height: calc(100% + var(--pad));
  background: var(--accent-border);
}
#wrapper > section > header :is(h1, h2) { position: relative; }
#wrapper > section > header :is(h1, h2)::before,
#wrapper > section > header :is(h1, h2)::after {
  content: "";
  position: absolute;
  background: var(--accent-border);
}
#wrapper > section > header :is(h1, h2)::before {
  top: 1rem;
  right: calc(var(--pad) * -1);
  width: calc(var(--pad) / 2);
  height: 2px;
}
#wrapper > section > header :is(h1, h2)::after {
  top: 0.75rem;
  right: calc(var(--pad) / -2);
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}
#wrapper > section:last-of-type > header::before { height: 100%; }

/* Intro. */
.intro { align-items: start; }
.intro > header { padding-top: 3rem !important; max-width: 100%; }
#wrapper > .intro > header::before { top: 4rem; }
.intro h1 { margin-top: -2rem; }
.intro h1::before { top: 3rem !important; }
.intro h1::after { top: 2.75rem !important; }
.intro h2 { margin-bottom: 1rem; }
.intro h3 { margin: 0; }
.intro > .content { max-width: none !important; padding: 0 !important; }

.full-image { margin: 0 0 2rem; }
.intro > .full-image { margin: 0; }

/* Archive note at the top of the page. */
.archive-note p:last-child { margin-bottom: 0; }

/* Grids of short entries. */
.two-column-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}
.two-column-wrapper > div { background: #fff; padding: 1rem; }

/* Speakers: three across, or two across when there are four. */
.speakers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 12.5rem));
  justify-content: center;
  column-gap: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}
.speakers-4 { grid-template-columns: repeat(2, minmax(0, 12.5rem)); column-gap: 3rem; }
.speaker { padding: 1rem 0; }
.speaker img { margin: 0 auto; border-radius: 50%; filter: url(#duotone); }
.speaker:hover img, .speaker:focus-within img { filter: none; }
.speaker a { border: 0; }
.speaker h4 { margin: 0.5rem 0 0; }
.speaker-title { display: block; font-size: 0.8rem; line-height: 1.5; }

/* Featured talks: speaker on the left, talk title beside it. */
.featured-talks { margin-bottom: 2rem; }
.featured-talk {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 22rem);
  column-gap: 2rem;
  align-items: center;
}
.featured-talk .speaker { text-align: center; }
.talk-title { font-size: 0.95rem; line-height: 1.6; }
.talk-title p { margin: 0; }

/* Testimonials. */
.testimonial { position: relative; z-index: 0; }
.testimonial .quote { margin-bottom: 0.5rem; }
.attribution { display: block; text-align: right; font-style: italic; }

.copyright {
  color: var(--fg-light);
  margin-left: var(--left);
  padding: 0 var(--pad);
}
.copyright a { color: inherit; }

/* Retrospective page: long-form text. */
.retro .content { max-width: 44rem; }
.retro .content h2 { font-size: 1.1rem; margin-top: 3rem; }
.retro .content h3 { margin-top: 2.5rem; }
.retro .content h4 { font-size: 0.8rem; margin-top: 2rem; }
.retro .content img { margin: 0 auto; }
.retro .content section { font-size: 0.85rem; }
.byline { font-size: 0.9rem; color: var(--fg-light); }

@media (max-width: 1280px) { :root { --pad: 4rem; } }

/* Single column: each heading becomes a green band above its content. */
@media (max-width: 1152px) {
  html { font-size: 14pt; }
  #wrapper { padding-bottom: 0; }
  #wrapper::before { display: none; }
  #wrapper > section { grid-template-columns: 1fr; margin: 0; }
  #wrapper > section > header {
    justify-self: stretch;
    text-align: left;
    width: auto;
    padding: var(--pad) !important;
    background: var(--accent) url(img/pattern.svg) 25% 50% / 40rem auto repeat-y;
  }
  #wrapper > section > header > * { max-width: 25rem; }
  #wrapper > section > header > :last-child { margin-bottom: 0; }
  #wrapper > section > header::before,
  #wrapper > section > header :is(h1, h2)::before,
  #wrapper > section > header :is(h1, h2)::after { display: none; }
  #wrapper > section > .content { padding: var(--pad); }
  .intro > header { padding-top: calc(var(--pad) * 2) !important; }
  .intro > header > * { max-width: 100% !important; }
  .intro h1 { margin-top: 0; }
  .copyright { margin: 0; padding: 0 var(--pad) var(--pad); }
}
@media (max-width: 736px) {
  html { font-size: 12pt; }
  :root { --pad: 2rem; }
  #wrapper > section > header { padding: 3rem var(--pad) !important; }
  #wrapper > section > .content { padding: 3rem var(--pad); }
  .intro > header { padding-top: 4rem !important; }
  h1 { font-size: 4.5rem; }
}
@media (max-width: 480px) {
  html { font-size: 11pt; }
  .two-column-wrapper { grid-template-columns: 1fr; }
  .speakers { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0; }
  .speakers .speaker { flex: 0 0 50%; padding: 1rem 0.5rem; }
  .featured-talk { grid-template-columns: 1fr; text-align: center; }
  .talk-title { padding: 0 1rem 1rem; }
}
@media (max-width: 360px) {
  :root { --pad: 1.5rem; }
  h1 { font-size: 3.75rem; }
}

/* Retrospective page header and title. */
.retro-intro > header { padding-bottom: 2rem !important; }
#wrapper > .retro-intro > .content { max-width: 44rem !important; padding: 3rem var(--pad) 0 !important; }
.retro-intro .byline { margin-bottom: 0; }
.retro-intro .retro-title { margin-top: 0; }
.retro-title {
  font: 600 1.6rem/1.4 var(--heading);
  letter-spacing: 0.05em;
  text-transform: none;
  margin-bottom: 1rem;
}

@media (max-width: 1152px) {
  #wrapper > .retro-intro > .content { padding: var(--pad) !important; }
}
