* {
  scrollbar-width: none;
}

main {
  display: flex;
  flex-direction: column;
}

header.main-header {
  z-index: 1000;
  display: flex;
  flex-direction: row;
  
  align-items: center;
  justify-content: start;
  height: 5rem;
  box-sizing: border-box;

  background-color: white;
  border-bottom: 2px solid var(--knightly-blue);

  position: sticky;
  top: 0;
  left: 0;
  
  margin: 0;
  padding: 0 max(4rem, calc((100% - 96rem) / 2));

  user-select: none;
}

div.main-header-left-block {
  display: flex;
  flex-direction: row;
  align-items: center;
}

div.main-header-logo-block {
  margin-left: -1rem;
}

img.main-header-logo {
  height: 4rem;
}

div.main-header-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;

  margin: 0;
  padding: 0;
}

h1.main-header-title {
  font-family: var(--title-font);
  font-size: 2.5rem;
  font-weight: 700;
  margin: -0.5rem 0;
  padding: 0;
}

div.main-header-subtitle {
  font-family: var(--title-font);
  font-size: 1rem;
  font-weight: 700;
}

nav.main-header-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;

  flex-grow: 1;
  height: 100%;
}

nav.main-header-nav > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.5rem;

  color: var(--knightly-blue);
  font: bold 1.5rem var(--heading-font);
  text-decoration: none;
  transition: background-color 250ms;
}

nav.main-header-nav > a:hover {
  background-color: var(--knightly-white);
}

section.main-section {
  position: relative;
  scroll-margin-top: 5rem;

  margin: 0;
  padding: 2rem max(4rem, calc((100% - 96rem) / 2));
}

video.background-video {
  z-index: -10;
  position: absolute;
  aspect-ratio: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  background-attachment: fixed;
}

div.vignette {
  z-index: -1;
  position: absolute;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  background: radial-gradient(transparent, black);
  pointer-events: none;
}

section.section-expo {
  padding-top: 20rem;
  color: white; 
}

h2.expo-h2 {
  font-size: 4rem;
  color: white;
}

h2.section-heading {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

section.main-section > :is(p, ul, ol) {
  padding: 0 4rem;
}

section.main-section > :is(p, ul, ol), div.split-content-figure :is(p, ul, ol) {
  margin: 2rem 0;
}

div.split-content-figure {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  padding: 0 4rem;
}

div.split-figure-right {
  flex-direction: row-reverse;
}

.split-content {
  flex: 2 0 0;
}

.split-figure {
  flex: 0 0 40rem;
}

.video-embed, .figure-img {
  width: 40rem;
  max-width: 100%;
  height: auto;
  margin: 2rem 0;

  box-shadow: 0 0 1rem black;
}

.video-embed {
    aspect-ratio: 16 / 9;
}

div.bio-card-container {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  
  gap: 4rem;
  justify-content: center;
}

div.bio-card {
  display: flex;
  flex-direction: row;

  width: 36rem;
  height: 18rem;

  box-shadow: 0.25rem 0.25rem 1.5rem var(--knightly-blue);
}

div.bio-card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  
  flex: 0 0 12rem;
  padding-top: 2.5rem;
}

div.bio-card:nth-child(5n    ) > div.bio-card-left { background-color: var(--knightly-blue); }
div.bio-card:nth-child(5n + 1) > div.bio-card-left { background-color: var(--knightly-red); }
div.bio-card:nth-child(5n + 2) > div.bio-card-left { background-color: var(--knightly-green); }
div.bio-card:nth-child(5n + 3) > div.bio-card-left { background-color: var(--knightly-silver); }
div.bio-card:nth-child(5n + 4) > div.bio-card-left { background-color: var(--knightly-charcoal); }

img.bio-card-profile {
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  border: 2px solid var(--knightly-white);
}

div.bio-card-right {
  box-sizing: border-box;
  height: 100%;
  padding: 1rem;
  flex: 1 0 0; 
  background-color: white;
}

span.bio-card-name {
  font-size: 1.4em;
  font-weight: 600;
  display: block;
}

span.bio-card-title {
  font-size: 0.8em;
  display: block;
}

p.bio-card-desc {
  margin-top: 0.5rem;
  font-size: 0.9em;
}

div.expo-caption {
  background: rgba(0, 0, 0, 25%);
  backdrop-filter: blur(0.5rem);
  padding: 1rem;
  color: var(--knightly-white);
  font-size: 1.125em;
  max-width: min(50rem, 90%);
}

section.subsystems-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;

  padding: 0 max(0rem, calc((100% - 96rem) / 2));

  background-image: conic-gradient(#020617 90deg, #111827 90deg 180deg, #020617 180deg 270deg, #111827 270deg);
  box-shadow: 0 0 8rem black inset;

  background-size: 4rem 4rem;

  animation: 4s linear infinite scroll-checkers;
}

div.subsystem-card {
  min-width: 16rem;
  aspect-ratio: 1;

  box-shadow: 0 0 4rem black inset;
  user-select: none;
}

a.card-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  position: relative;
  width: 100%;
  height: 100%;
  
  background-color: rgba(0, 0, 0, 0.40);
  transition: opacity 500ms;
  opacity: 0;

  color: white;
  text-decoration: none;

  container-type: size;
}

a.card-link:hover {
  opacity: 1;
}

span.card-link-label {
  font: 700 12.5cqw var(--heading-font);
}

span.card-link-sub {
  font-size: 1.25em;
  font-weight: 400;
}

.gantry-bg {
  background-image: url(./assets/media/images/studio-gantry.png);
  background-position: center bottom;
  background-size: 400%;
}

.enclos-bg {
  background-image: url(./assets/media/images/enclosure.png);
  background-position: center;
  background-size: 300%;
}

.detect-bg {
  background-image: url(./assets/media/images/detection.png);
  background-position: center;
  background-size: 200%;
}

.pieces-bg {
  background-image: url(./assets/media/images/studio-white.jpg);
  background-position: center;
  background-size: 200%;
}

.electr-bg {
  background-image: url(./assets/media/images/studio-runway.jpg);
  background-position: 53% 0%;
  background-size: 375%;
}

.softwa-bg {
  background-image: url(./assets/media/images/code.png);
  background-size: 100% 100%;
}

section.main-section.section-functions {
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
}

body:has(.show-modal) {
  overflow: hidden;
}

section.modal {
  position: fixed;
  visibility: hidden;
  top: 5rem;
  left: 0;

  overflow-y: auto;

  width: 100%;
  height: calc(100% - 5rem);
  max-height: calc(100% - 5rem);
  
  z-index: 1000;

  opacity: 0;

  background-color: rgba(0, 0, 0, 0.75);

  transition: opacity 250ms, visibility 0s 250ms;
}

section.modal * {
  opacity: 0;
  transition: opacity 750ms 250ms;
}

div.modal-content {
  display:flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

section.modal.show-modal {
  visibility: visible;
  opacity: 1;
  transition: opacity 500ms, visibility 0s 0s;
}

section.modal.show-modal * {
  opacity: 1;
}

div.modal-text {
  flex: 0 0 50%;
  box-sizing: border-box;
  overflow-y: scroll;

  background-color: white;
  border-right: 2px solid black;

  min-height: 100%;

  padding: 4rem;

  display: flex;
  align-items: center;
}

div.modal-text h2 {
  font-size: 2em;
  margin-bottom: 0.5rem;
}

div.modal-text p {
  margin-bottom: 0.5rem;
}

div.modal-img {
  flex: 0 0 50%;
  box-sizing: border-box;

  text-align: center;
}

div.modal-img > img {
  width: 80%;

  border: 1px solid black;
  box-shadow: 0 0 1rem black;
}

span.acknowledgement {
  font-weight: 400;
}

p.center {
  text-align: center;
}

footer.main-footer {
  padding: 1rem;
  font-size: 1rem;
  text-align: center;

  background-color: white;
  border-top: 2px solid var(--knightly-blue);
}

