::-moz-selection, ::selection {
  color: #222;
  background: #d6edff;
  text-shadow: none;
}

:root {
  --corner-radius: 10px;
  --background-image: url(../images/cover-image.jpg);
  --background-image-portrait: url(../images/cover-image-portrait.jpg);
  --odd-background: #dddddb;
  --even-background: #d4d6d6;
  --tertiary-color: #FFB92E;
  --font-color: #0c293d;
  --accent: #490f3a;
  --backdrop-color: rgb(189 189 189 / 80%);
  --off-white: #fcfbfa;
}

* {
  box-sizing: border-box;
  hyphens: none;
}

:focus-visible {
  outline: 3px solid var(--tertiary-color);
  box-shadow: 0 0 0 6px var(--font-color);
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 20px;
  height: 100vh;
  overflow: hidden;
}

body {
  height: 100vh;
  font-family: Outfit, sans-serif;
  line-height: 1.6em;
  background-color: black;
  margin: 0;
  color: var(--font-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

[data-loading] [id="wrapper"] {
  scroll-behavior: auto;
  visibility: hidden;
}

[id="wrapper"] {
  overflow: auto;
  scroll-behavior: smooth;
}

header {
  position: relative;
  min-height: 100vh;
  background: var(--background-image) no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  text-align: center;
}

[id="banner-wrapper"] {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}   

.backdrop {
  background-color: var(--backdrop-color);
  backdrop-filter: blur(3px);
}

[id="banner"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 1.5rem;
  padding: 2rem;
  justify-content: space-between;
  max-width: 100%;
  max-height: 100%;
  border-radius: calc(2 * var(--corner-radius));
}

[id="banner"] img {
  width: 200px;
}

h1 {
  font-weight: 600;
  line-height: 1.2em;
  margin: 0;
  font-size: 3rem;
}

h2,
h3,
h4 {
  font-weight: 500;
}

main h2 {
  color: var(--accent);
  margin-top: 0;
  line-height: 1.2em;
  text-indent: -2px;
  scroll-margin-top: 3rem;
}

h2:has(span:empty) {
  visibility: hidden;
}

h3 {
  line-height: 120%;
  margin-bottom: 0%;
}

a {
  color: inherit;
}

main a:hover:not(.image-link, .button) {
  background-color: var(--primary);
  outline: 1px solid currentColor;
}

a.image-link:hover {
  outline: 2px solid var(--font-color);
  outline-offset: 2px;
}

a.image-link img {
  display: block;
}

a.button {
  text-decoration: none;
  border-radius: var(--corner-radius);
  display: inline-block;
  margin-left: 0.2rem;
  margin-right: 0.2rem;
  overflow: visible;
  padding: 0.5rem 1rem;
  position: relative;
  margin-top: 0.5rem;
  cursor: pointer;
  font-weight: 400;
  color: var(--off-white);
  background-color: var(--font-color);
  text-align: center;
  width: 8rem;
}

a.button:hover, header a.button {
  background-color: var(--accent);
}

header a.button:hover {
  background-color: var(--font-color);
}

[id="banner-wrapper"] a.button:hover {
  outline: 5px solid var(--even-background);
  outline-offset: 0px;
  text-decoration: underline;
}

p,
ul,
ol {
  margin: 1em 0;
}

ol ol,
ul ul,
ul ol,
ol ul {
  margin: 0.4em 0;
}
 
header h2 {
  margin: 0;
  line-height: 1.5em;
  font-weight: 400;
}

span:empty {
  display: inline-block;
  min-height: 1em;
}

main > section {
  width: 100%;
  height: 100%;
  position: relative;
  border-bottom: 1px solid #EEEEEE;
}

section > .section-inner {
  position: relative;
  width: 80%;
  max-width: 900px;
  margin: 0rem auto;
  padding-bottom: 2rem;
  padding-top: 2rem;
  height: 70%;
  word-break: break-word;
  hyphens: auto;
}

.section h2 {
  margin: 0;
}

.section-content img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

footer {
  color: var(--off-white);
  position: relative;
  margin: 0rem 0 0 0;
  padding: 1rem 0;
  line-height: 1.5em;
  text-align: center;
  background-color: rgba(30,30,30,1);
}

.contact-list, .registration-list {
  margin-top: 0.5em;
  margin-bottom: 1.5em;
}

section:nth-child(even) {
  background: var(--even-background); 
}

section:nth-child(odd) {
  background: var(--odd-background);
}

section[id="contact"] .section-inner {
  hyphens: none;
}

.site-footer {
  color: #BBC7CC;
  background-color: var(--tertiary-color);
}

section .button {
  width: 18rem;
  max-width: 100%;
  padding-top: 1rem;
  padding-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.2rem;
  max-width: 100%;
  border: 4px solid #a0a4a8;
  border-radius: var(--corner-radius);
  text-align: center;
}

.venue-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 500px;
  max-width: 100%;
}

.logo-images {
  gap: 1em;
}

main ul {
  margin-left: 0;
}

main li {
  margin-left: 0;
}

.workshop-box li {
  margin-left: 1em;
}

main [id="main-speakers"] {
  margin-bottom: 3rem;
}

main [id="main-speakers"] li {
  margin-left: 0;
  scroll-margin-top: 3rem;
}

[id="main-speakers"] > ul {
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
}

.main-speaker {
  width: 100%;
  display: grid;
  grid-template-columns: 180px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: 
    "headshot bio"
    "headshot title";
  column-gap: 1rem;
}

.speaker-headshot {
  grid-area: headshot;
}

.speaker-bio {
  grid-area: bio;
}

.speaker-title {
  grid-area: title;
}

.sponsor-logos {
  display: grid;
  column-gap: 3rem;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 2rem;
  grid-template-areas:
    "jr jr . posit posit"
    "thinkr . dc . ncl"
    "crc . r-consort . rss";
}

.sponsor-logos a {
  width: 160px;
  max-width: 100%;
  align-self: center;
  justify-self: center;
}

.sponsor-logos [id="logo-jr"] {
  grid-area: jr;
  width: 220px;
  justify-self: end;
}

.sponsor-logos [id="logo-posit"] {
  grid-area: posit;
  width: 220px;
  justify-self: start;
}

.sponsor-logos [id="logo-thinkr"] {
  grid-area: thinkr;
}

.sponsor-logos [id="logo-dc"] {
  grid-area: dc;
}

.sponsor-logos [id="logo-ncl"] {
  grid-area: ncl;
}

.sponsor-logos [id="logo-crc"] {
  grid-area: crc;
}

.sponsor-logos [id="logo-r-consortium"] {
  grid-area: r-consort;
}

.sponsor-logos [id="logo-rss"] {
  grid-area: rss;
}

.sponsor-logos :is([id="logo-posit"], [id="logo-ncl"], [id="logo-crc"]) img {
  background-color: white;
}

.sponsor-logos [id="logo-posit"] img {
  padding: 1em;
}

.sponsor-logos [id="logo-crc"] img {
  padding: 0.25em;
}

.sponsor-logos img {
  width: 100%;
}

.committee-headshots {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  row-gap: 1.5rem;
}

.committee-headshots .committee-member {
  flex: 0 1 auto;
}

.committee-headshots .committee-member img {
  width: 180px;
}

.committee-headshots .committee-member figcaption {
  text-align: center;
  margin-top: 0.5em;
  line-height: 1.2em;
}

/* General table attributes */ 
table {
  border-collapse: collapse;
  margin-top: 1em;
  font-variant-numeric: tabular-nums;
}

tbody tr:nth-child(even) {
  background-color: var(--even-background);
}

thead th {
  border-bottom: 1px solid white;
  text-align: left;
}

th, strong {
  font-weight: 500;
}

tr th, tr td {
  border-right: 1px solid white;
  padding-left: 2rem;
  padding-right: 2rem;
}

tr th:last-child, tr td:last-child {
  border-right: none;
}

aside {
  padding: 0 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--corner-radius);
}

/* Pricing table specifics */ 
[id="pricing-table"] tr th, [id="pricing-table"] tr td {
  text-align: right;
}

[id="pricing-table"] tr th:first-child, [id="pricing-table"] tr td:first-child {
  text-align: left;
}

[id="lightning-table"] tr td:first-child {
  text-wrap: nowrap;
  min-width: fit-content;
}

.headshot {
  flex: 0 0 auto;
}

.headshot img {
  width: 100%;
  display: block;
}

ul.no-list {
  list-style-type: none;
  padding: 0;
}

main .speaker {
  padding: 0px;
  display: flex;
  border: none;
  background: none;
  width: 100%;
  min-height: 20px;
  gap: 20px;
}

.speaker-social-icons {
  padding: 0px;
  display: flex;
  border: none;
  background: none;
  justify-content: left;
  column-gap: 0.2em;
}

.speaker-social-icons li {
  margin: 0;
}

.speaker-social-icons a {
  display: inline-block;
  padding: 0.1em 0.3em;
}

.sold-out {
  color: orange;
}

/* Hide a table...*/
table:has(tbody) {    /* only do this if :has is supported... */
  display: none;
}

/* ...until is has contents */
table:has(tbody tr) { /* ... because we need to use :has here... */
  display: table;
}

[id="schedule-table"] tbody td:last-child {
  text-wrap: nowrap;
}

[id="schedule-table"] tr.not-speaker td:last-child {
  font-style: oblique;
}

dialog {
  padding: 1rem;
  color: var(--font-color);
  background-color: var(--odd-background);
  width: 90%;
  max-width: 1200px;
  max-height: 90%;
  flex-direction: column;
  border: 1px solid var(--font-color);
  border-radius: var(--corner-radius);
  row-gap: 1rem;
  overflow: hidden;
}

dialog[open] {
  display: flex;
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

dialog .close {
  text-align: right;
  line-height: 100%;
  font-size: 1.5rem;
}

dialog .content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--corner-radius);
  border-width: 0.5px;
  background-color: var(--even-background);
  filter: drop-shadow(10px 5px 4px #222222);
}

dialog .inner {
  height: 100%;
  padding: 1rem;
  display: grid;
  min-height: 200px;
  row-gap: 1rem;
  align-items: start;
  column-gap: 1rem;
  grid-template-columns: 3fr 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: 
    "title speakers"
    "abstract speakers";
}

dialog .close button {
  color: var(--odd-background);
  background-color: var(--font-color);
  font-size: inherit;
  font-family: inherit;
  border-radius: 25%;
  cursor: pointer;
}

dialog .close button:hover {
  background-color: var(--accent);
}

dialog .title {
  grid-area: title;
}

dialog h2 {
  margin: 0;
}

dialog .time {
  display: block;
  padding-top: 0.5rem;
}

dialog .speakers {
  grid-area: speakers;
  display: flex;
  flex-direction: column;
  row-gap: 2.5rem;
  align-self: center;
  padding: 1rem 0;
}

dialog .speaker {
  display: flex;
  flex-direction: column;
  line-height: 1.3rem;
}

dialog .speaker img {
  width: 150px;
  align-self: end;
  margin-bottom: 0.5rem;
}

dialog .abstract {
  grid-area: abstract;
  min-height: 100px;
  scrollbar-gutter: stable;
  height: 100%;
}

dialog .abstract-inner {
  height: 100%;
  overflow: auto;
  padding-right: 1rem;
}

dialog .abstract-inner > :first-child {
  margin-top: 0;
}

dialog .abstract-inner > :last-child {
  margin-bottom: 0;
}

dialog .speaker {
  text-align: right;
}

dialog button {
  color: var(--odd-background);
  background-color: var(--font-color);
}

.info-button {
  all: unset;
  cursor: pointer;
  display: inline-block;
  padding: 0.1em 0.3em;
}

.info-button:focus {
  outline: 3px solid var(--tertiary-color);
  box-shadow: 0 0 0 6px var(--font-color);
}

.info-button:hover i {
  color: var(--accent);
}

html [data-abstract-status],
html [data-speakers-status],
html [data-registration-status],
html [data-timetable-status],
html [data-modal-status] {
  display: none;
}

html[data-abstract-status="not-open"] [data-abstract-status="not-open"],
html[data-abstract-status="open"] [data-abstract-status="open"],
html[data-abstract-status="closed"] [data-abstract-status="closed"],
html[data-registration-status="open"] [data-registration-status="open"],
html[data-registration-status="closed"] [data-registration-status="closed"],
html[data-timetable-status="visible"] [data-timetable-status="visible"],
html[data-speakers-status="none"] [data-speakers-status="none"],
html[data-speakers-status="some"] [data-speakers-status="some"],
html[data-speakers-status="all"] [data-speakers-status="all"],
html:is([data-speakers-status="some"], [data-speakers-status="all"]) [data-speakers-status="some/all"],
html[data-modal-status="on"] [data-modal-status="on"] {
  display: unset;
}

details > summary {
  cursor: pointer;
  border-radius: 0 0 var(--corner-radius) var(--corner-radius);
  padding: 2px 6px;
  margin: 5px;
}

details > summary:hover, details[open] > summary {
  color: var(--odd-background);
  background-color: var(--accent);
}

details > p {
  border-radius: 0 0 var(--corner-radius) var(--corner-radius);
  padding: 2px 6px;
  margin: 0;
}

.workshop-box {
  margin: 10px;
  padding: 0px 5px 5px 10px;
  border: 2px solid #bbc7cc;
  border-radius: var(--corner-radius);
  margin-bottom: 1em;
}

.workshop-box > :last-child {
  margin-bottom: 1em;
}

.workshop-box > :last-child summary {
  margin-bottom: 0;
}

.workshop-box details > :last-child {
  margin-bottom: 1em;
}

.workshop-box > :last-child[open] summary {
  margin-bottom: unset;
}

.workshop-box > :last-child[open] > :last-child {
  margin-bottom: 0;
}

.workshop-box ul {
  padding-left: 0.5em;
  margin-top: unset;
}


@media (prefers-reduced-motion) {
  [id="wrapper"] {
    scroll-behavior: auto;
  }
}


@media (prefers-contrast: more) {
  .backdrop {
    background-color: var(--tertiary-color);
  }
}


@media (max-height: 750px) {
  dialog .speakers:not([data-speaker-count="1"]) .speaker img {
    display: none;
  }
}


@media (max-width: 1100px) {
  .sponsor-logos {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 5rem;
    grid-template-areas:
      "jr posit"
      "thinkr dc"
      "ncl crc"
      "r-consort rss";
  }

  .sponsor-logos a {
    width: 175px;
    max-width: 100%;
  }

  .sponsor-logos a:nth-child(odd) {
    justify-self: end;
  }

  .sponsor-logos a:nth-child(even) {
    justify-self: start;
  }
}


@media not (max-width: 950px) {
  [id="schedule-table"] th:first-child {
    text-align: center;
  }

  [id="schedule-table"] .timespan {
    display: inline-flex;
    justify-content: center;
    column-gap: 1rem;
  }
  
  .start-time, .end-time {
    width: 3rem;
  }

  tr.lightning-speaker {
    height: 70px;
  }
}


@media (max-width: 950px) {
  .main-speaker {
    grid-template-rows: unset;
    row-gap: 1rem;
    align-items: start;
    grid-template-areas: 
      "headshot bio"
      "title title";
    border-bottom: 1px solid var(--font-color);
    align-items: center;
    padding: 1rem;
    padding-top: 0;
  }

  table {
    margin-top: 2em;
  }

  table, thead, tbody, th, td, tr { 
		display: block;
	}

  thead tr { 
		position: absolute;
		top: -9999px;
		left: -9999px;
	}

  table[id] tr td {
    border-right: none;
    text-align: left;
  }

  td:nth-of-type(1) {
    font-weight: bold;
  }

  tr {
    border-bottom: 1px solid white;
    padding: 0.5em 0 0.5em 0;
    line-height: 1.4em;
  }

  tr:first-child {
    border-top: 1px solid white;
  }

  [id="pricing-table"] td:nth-of-type(2):before {
    content: "Conference only: ";
  }

  [id="pricing-table"] td:nth-of-type(3):before {
    content: "Workshop and conference: ";
  }

  [id="schedule-table"] tr.not-speaker td:last-child::after {
    content: unset;
  }

  [id="schedule-table"] tr :is(:not(th:last-child, td:last-child)) {
    text-align: left;
  }

  [id="schedule-table"] tr:not(.not-speaker) {
    background-color: var(--even-background);
  }

  [id="schedule-table"] tr.not-speaker {
    background-color: var(--odd-background);
  }

  [id="schedule-table"] tr.not-speaker :is(td:nth-child(2)) {
    text-align: left;
  }

  li:first-child .main-speaker {
    border-top: 1px solid var(--font-color);
    padding-top: 1rem;
  }
  
  dialog .inner {
    display: block;
    overflow: auto;
  }

  dialog .title {
    margin-bottom: 1rem;
  } 

  dialog .speakers {
    row-gap: 1rem;
    align-self: unset;
  }

  dialog .speaker {
    text-align: left;
  }

  dialog .speaker img {
    display: none;
  }

  dialog .abstract-inner {
    overflow: visible;
  }
}


@media (max-width: 790px) {
  header {
    background-image: var(--background-image-portrait);
    height: unset;
    min-height: 100vh; /* Fallback for older browsers */
    min-height: 100dvh; /* For mobile: remove nav bar from full-height calculation */
  }

  [id="banner-wrapper"], [id="banner"] {
    min-height: 100%;
  }

  [id="banner-wrapper"] {
    height: 100%;
    display: block;
  }

  [id="banner"] {
    width: 100vw;
    min-height: 100vh;
    border-radius: 0;
    justify-content: space-evenly;
  }

  [id="banner"] img {
    width: 100px;
  }

  .button-group {
    display: flex;
    flex-direction: column;
    row-gap: 0.5rem;
  }
}


@media (max-width: 650px) {
  .sponsor-logos {
    display: flex;
    flex-direction: column;
    row-gap: 2.5rem;
    width: 200px;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .committee-headshots {
    grid-template-columns: 1fr 1fr;
  }
}


@media (max-width: 599px) {
  html {
    font-size: 18px;
  }

  .main-speaker {
    padding-top: 1em;
    border-bottom: 1px solid white;
  }

  main .speakers .speaker:first-child {
    border-top: 1px solid white;
  }
}


@media (max-width: 550px) {
  [id="main-speakers"] > ul {
    row-gap: 0;
  }

  .main-speaker {
    row-gap: 0.5rem;
    grid-template-columns: 100%;
    grid-template-areas: 
      "headshot"
      "bio"
      "title";
  }
}


@media (max-width: 500px) {
  section a.button {
    padding-left: 0px;
    padding-right: 0px;
    margin-top: 16px;
  }

  section > .section-inner {
    width: auto;
    margin-left: 1em;
    margin-right: 1em;
    line-height: 1.6em;
    padding-top: 1em;
    padding-bottom: 1em;
  }

  a.button {
    margin-top: 10px;
  }

  h1,
  h2 {
    line-height: 1.1em;
  }

  main .speaker {
    margin-left: 0;
  }

  main .speaker .headshot {
    width: 120px;
  }
}
