/*
 * Site header
 */

#site-header {
  background-color: var(--theme-bg-color);
  position: fixed;
  z-index: 10;
  width: 100%;
  height: var(--header-height);
  box-shadow: rgba(0, 0, 0, 0.13) 0 2px 16px;
}

#site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
}

@media (max-width: 1100px) {
  #site-header .container {
    padding-right: calc(var(--container-padding) / 2);
  }
}

#site-header nav {
  display: flex;
  align-items: center;
}

#site-header nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.7rem;
}

#site-header nav ul li {
  font-family: var(--font-stack-headings);
  font-size: 1.1rem;
  list-style: none;
  font-variation-settings: "opsz" 63;
  margin: 0;
  font-weight: 600;
}

@media (max-width: 1100px) {
  #site-header nav ul {
    gap: 1rem;
  }

  #site-header nav ul li {
    font-family: var(--font-stack-subheadings);
    font-size: 1rem;
    text-transform: uppercase;
    font-stretch: 69%;
    line-height: 1.2;
  }
}

#site-header nav ul li a {
  color: var(--theme-accent-2-color);
  text-decoration: none;
}

#site-header nav ul li a:hover {
  text-decoration: underline;
  text-decoration-color: var(--yellow);
}

@media (max-width: 550px) {
  #site-header nav ul li {
    font-size: 0.9rem;
  }
  #site-header nav ul li a[href="/"] {
    display: none;
  }
}

#site-logo {
  display: block;
  max-width: 120px;
  height: auto;
  margin-top: 0.1rem;
  margin-right: 1rem;
  flex-grow: 0;
  flex-shrink: 0;
}

#site-logo svg {
  width: 100%;
  height: auto;
}

#site-logo .logo-title {
  fill: var(--theme-accent-1-color);
}

#site-logo .logo-subtitle {
  fill: var(--theme-accent-2-color);
}

@media (max-width: 1100px) {
  #site-logo {
    margin-left: -5px;
    margin-right: 5px;
  }
}

@media (min-width: 551px) {
  #site-logo {
    max-width: 150px;
    margin-right: 2rem;
  }
}

@media (min-width: 1101px) {
  #site-logo {
    max-width: 225px;
    margin-right: 3rem;
  }
}

/* Submenu */

#site-header nav ul li.menu-item-has-children {
  position: relative;
}

#site-header nav li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 0.35rem;
  vertical-align: middle;
  position: relative;
  top: -2px;
  transition:
    transform 0.2s ease,
    top 0.2s ease;
}

#site-header nav li.open > a::after {
  transform: rotate(225deg);
  top: 1px;
}

#site-header nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  min-width: 160px;
  background-color: var(--theme-bg-color);
  box-shadow: rgba(0, 0, 0, 0.15) 0 4px 16px;
  border-radius: 0.4rem;
  padding: 0.4rem 0;
  z-index: 20;
  flex-direction: column;
  gap: 0;
}

#site-header nav .sub-menu.visible {
  display: flex;
  animation: fade-in 0.3s ease forwards;
}

#site-header nav .sub-menu.hiding {
  animation: fade-out 0.4s ease forwards;
}

#site-header nav .sub-menu li {
  width: 100%;
  font-size: 1rem;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  #site-header nav .sub-menu li {
    font-size: 0.9rem;
  }
  #site-header nav .nav-the-prefix {
    display: none;
  }
}

@media (max-width: 550px) {
  #site-header nav .sub-menu li {
    font-size: 0.9rem;
  }
}

#site-header nav .sub-menu li a {
  display: block;
  padding: 0.4rem 0.9rem;
}

#site-header nav .sub-menu li a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

/*
 * Home page corner swirls
 */

#corner-swirls {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  z-index: -1;
  pointer-events: none;
}

#corner-swirls svg {
  position: relative;
  width: auto;
  height: 100%;
}

#corner-swirls svg path {
  fill: var(--theme-accent-2-color);
}

#corner-swirls svg.corner-swirl-2 {
  transform: rotate(180deg);
}

@media (max-width: 800px) {
  #corner-swirls svg {
    height: 75%;
  }
  #corner-swirls svg.corner-swirl-1 {
    top: 25%;
  }
}

/*
 * Entry navigation elements (album on left, headings on right)
 */

.entry-nav {
  position: sticky;
  padding-top: 10px;
  padding-bottom: 75px;
  top: calc(var(--header-height) + 2.5rem);
  width: var(--entry-nav-width);
  flex-grow: 0;
  flex-shrink: 0;
}

@media (min-width: 1101px) {
  #entry-headings-nav,
  #entry-empty-column {
    margin-left: 10px;
  }
}

.entry-nav .contents {
  padding-bottom: 2rem;
}

.entry-nav .contents.overflow {
  max-height: calc(100vh - var(--header-height) - 60px);
  overflow-y: scroll;
  overflow-x: hidden;
}

@media (min-width: 1101px) {
  .entry-nav .contents.overflow {
    width: 100%;
    max-height: calc(100vh - var(--header-height) - 2.5rem - 15px);
  }
}

.entry-nav * {
  font-family: var(--font-stack-subheadings);
}

.entry-nav ul {
  margin: 0;
  padding: 0;
}

.entry-nav li {
  list-style: none;
  padding: 0.5rem;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 600;
}

.entry-nav li:last-of-type {
  margin: 0;
}

.entry-nav li.caps {
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
  font-stretch: 70%;
  font-weight: 600;
  line-height: 120%;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.1rem;
  position: relative;
}

.entry-nav li a {
  display: block;
  position: relative;
  text-decoration: none;
  color: var(--gray);
}

.entry-nav li a:not(.current):hover {
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.3);
}

.entry-nav li a.current:after {
  content: "";
  position: absolute;
  width: calc(100% + 12px);
  height: calc(100% + 0.5rem);
  top: -0.25rem;
  left: -0.5rem;
  background-color: rgba(0, 0, 0, 0.06);
  border-radius: 0.4rem;
}

.entry-nav li ul {
  margin-left: 0;
  margin-top: 0.5rem;
}

.entry-nav p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-top: 0.5em;
  margin-bottom: 0.1em;
  color: var(--gray);
}

.entry-nav p strong {
  font-weight: 600;
}

.entry-nav button,
.entry-nav br {
  display: none;
}

/* Parent page nav */

#parent-page-nav h2 {
  line-height: 0.9;
  margin: 0;
  margin-bottom: 1rem;
}

#parent-page-nav h2 :is(span, a, em) {
  font-family: var(--font-stack-headings);
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-variation-settings: "opsz" 84;
  letter-spacing: -0.01em;
  color: var(--gray);
  text-decoration: none;
}

#parent-page-nav h2 em {
  font-style: normal;
  font-weight: 700;
}

#parent-page-nav h2 a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.25);
}

#parent-page-nav li.no-link:hover {
  cursor: default;
}

#parent-page-nav li.no-link:hover:after {
  content: "Coming Soon";
  position: absolute;
  background-image: url("../assets/coming-soon-chip.svg");
  background-size: 100%;
  background-position: center;
  width: 111px;
  height: 34px;
  left: 1rem;
  top: 80%;
  z-index: 20;
  text-align: center;
  padding-top: 10px;
  animation: fade-in 0.3s ease;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.6);
}

/* Entry headings nav */

body:not(.page-template-essay-compiled) #entry-headings-nav li ul li {
  font-weight: 400;
  margin-top: -0.3rem;
  font-stretch: 90%;
}

@media (min-width: 1101px) {
  body:not(.page-template-essay-compiled) #entry-headings-nav li ul li {
    font-size: clamp(14px, 0.8rem, 0.8rem);
  }
}

/* Mobile adjustments */

@media (max-width: 1100px) {
  .entry-nav {
    position: fixed;
    width: 50% !important;
    top: var(--header-height);
    padding-top: 0;
    z-index: 20;
  }
  #parent-page-nav {
    left: 0;
  }
  #entry-headings-nav {
    right: 0;
  }
  #entry-empty-column {
    display: none;
  }
  body.page-template-essay-compiled #parent-page-nav {
    display: none;
  }
  body.page-template-essay-compiled #entry-headings-nav {
    left: 0;
    width: 100% !important;
  }
  body.page-template-sessions-listing #parent-page-nav {
    width: 100% !important;
  }
  .entry-nav button {
    display: flex;
    align-items: center;
    font-stretch: 80%;
    letter-spacing: 0.02em;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    height: 2rem;
    appearance: none;
    border: none;
    background-color: var(--theme-bg-color);
    text-align: left;
    padding: 0.3rem var(--container-padding);
    box-shadow: rgba(0, 0, 0, 0.1) 0 1px 10px;
  }
  .entry-nav svg {
    display: block;
    width: 18px;
    flex-shrink: 0;
    margin-right: 5px;
  }
  .entry-nav svg * {
    fill: var(--theme-accent-1-color);
    stroke: var(--theme-accent-1-color);
  }
  .entry-nav button span {
    color: var(--theme-accent-1-color);
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.85rem;
    text-overflow: ellipsis;
  }
  .entry-nav > .contents {
    display: none;
    background-color: var(--tan);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    box-shadow: rgba(0, 0, 0, 0.1) 0 1px 10px;
  }
  .entry-nav > .contents.visible {
    display: block;
    animation: fade-in 0.3s ease forwards;
  }
  .entry-nav > .contents.hiding {
    animation: fade-out 0.4s ease forwards;
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.01);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/*
 * Site footer
 */

#site-footer {
  position: absolute;
  width: 100%;
  bottom: 0;
  padding-top: 10rem;
  padding-bottom: 1.5rem;
}

#site-footer.relative {
  position: relative;
  bottom: auto;
}

#site-footer p {
  font-family: var(--font-stack-subheadings);
  max-width: 350px;
  font-size: 0.7rem;
  font-stretch: 95%;
  margin-top: 0;
  margin-bottom: 0.3rem;
  color: rgba(0, 0, 0, 0.5);
}

#site-footer a {
  color: rgba(0, 0, 0, 0.5);
  text-decoration-color: rgba(0, 0, 0, 0.2);
}

#site-footer a:hover {
  text-decoration-color: rgba(0, 0, 0, 0.4);
}

@media (max-width: 1100px) {
  #site-footer p {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
  }
}

#footer-full-dimensional {
  height: 20px;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

@media (min-width: 1101px) {
  #footer-full-dimensional {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 2rem;
    margin-bottom: 0;
  }
}

#footer-file-under {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 200px;
  height: auto;
}
