:root {
  --darkblue: #395177;
  --blue: #031636;
  --softwhite: #eee;

  --block-color: #222;

  --theme-blue: #00649b;
  --theme-yellow: #e5b360;
  --theme-orange: #b26722;
  --theme-red: #9e421d;
  --theme-green: #50633b;
  --theme-grey: #c1c1c1;
  --theme-black: #171619;

  --2023-blue: #023859;
  --2023-grey: #8c8b88;
  --2023-orange: #8c4a32;
  --2023-yellow: #f2a35e;

  --theme-color: #023859;

  --size-300: clamp(0.78rem, calc(0.77rem + 0.03vw), 0.8rem);
  --size-400: clamp(0.94rem, calc(0.92rem + 0.11vw), 1rem);
  --size-500: clamp(1.13rem, calc(1.08rem + 0.22vw), 1.25rem);
  --size-600: clamp(1.35rem, calc(1.28rem + 0.37vw), 1.56rem);
  --size-700: clamp(1.62rem, calc(1.5rem + 0.58vw), 1.95rem);
  --size-800: clamp(1.94rem, calc(1.77rem + 0.87vw), 2.44rem);
  --size-900: clamp(2.33rem, calc(2.08rem + 1.25vw), 3.05rem);

  --radius: 4px;
}

html,
button {
  font-size: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

#home svg {
  height: 2rem;
}

body {
  font-size: 18px;
  margin: 0;
  background-color: var(--softwhite);
}

main {
  margin: 1.5rem;
}

figure {
  margin: 0;
}

.hidden {
  display: none;
}

/* VIEW TRANSITIONS */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: fade 0.3s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* COLOR PREFERENCE */

@media (prefers-color-scheme: dark) {
  :root {
  }

  body {
    background-color: var(--2023-blue);
    color: var(--softwhite);
  }

  a {
    color: var(--2023-yellow);
  }

  a:visited {
  }

  a:hover,
  a:focus {
    text-decoration: underline;
  }

  .collection__article {
    color: white;
    background-color: var(--theme-color, --theme-grey);
  }

  .collection a {
    color: white;
  }
}

@media (prefers-color-scheme: light) {
  :root {
  }

  body {
    background-color: var(--2023-grey);
    color: var(--theme-black);
  }

  a {
    color: var(--2023-blue);
  }

  a:visited {
  }

  a:hover,
  a:focus {
  }

  .collection__article {
  }
}

/* TYPOGRAPHY */

@media (min-width: 38rem) {
  h1,
  h2,
  h3,
  h4,
  h5 {
    font-weight: 100;
    margin-bottom: 0;
  }

  h1 {
    font-size: var(--size-900);
  }

  h2 {
    font-size: var(--size-800);
  }

  h3 {
    font-size: var(--size-700);
  }

  h4 {
    font-size: var(--size-600);
  }

  h5 {
    font-size: var(--size-500);
  }
}

@media (min-width: 60rem) {
  body {
    font-size: 20px;
  }
}

/* GLOBAL */

p {
  line-height: 1.5;
}

img {
  max-width: 100%;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--theme-grey);
  border-image: linear-gradient(45deg, transparent, white, transparent) 1;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border: 1px solid var(--theme-grey);
  padding: 0.5rem;
}

aside,
blockquote {
  border-top: solid 1px var(--theme-color);
  margin-top: 2rem;
  margin-bottom: 2rem;
  margin-left: 0;
  margin-right: 0;
  padding: 1rem;
}

article blockquote {
  border-top: 0;
  border-left: solid 1px var(--theme-color);
  border-image: linear-gradient(45deg, transparent, white, transparent) 1;
}

/* LAYOUT */

@media (min-width: 55rem) {
  main,
  .masthead {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 55rem) {
  article,
  #item__nav {
    display: grid;
    grid-template-columns: 1fr 1fr 75ch 1fr 1fr;
  }
  aside {
    width: 60ch;
    margin-left: auto;
    margin-right: auto;
  }

  #item__aside {
    grid-row: 2 / 100;
    grid-column: 2;
    /* rotate the text so its vertical */
    writing-mode: vertical-lr;
    width: fit-content;
  }
}

/* MASTHEAD / NAV */

.masthead {
  display: flex;
  flex-direction: column-reverse;
}

.masthead > * {
  display: block;
}

#masthead__img {
  max-width: 100%;
}

#masthead__img img {
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

#masthead__nav,
#item__nav {
  display: flex;
  flex-direction: column;
}

#masthead__nav a,
#item__nav a {
  display: block;
  margin: 0.5rem;
}

#item__nav a:has(img) {
  display: flex;
  flex-direction: row;
  align-items: center;
}

#masthead__first,
#masthead__last {
  font-size: 3rem;
  writing-mode: vertical-lr;
  padding-left: 50%;
}

#masthead__first {
  transform: rotate(180deg);
}

#masthead__last {
  margin-top: -120px;
}

#home__about {
  max-width: 60ch;
}

@media (min-width: 38rem) {
  .masthead {
    display: grid;
    grid-template-columns: 0 minmax(300px, 45vw) min-content 1fr 2rem;
    grid-template-rows: min-content min-content 1fr;
  }

  #masthead__img {
    grid-column: 2 / 3;
    grid-row: 2 / 4;
    max-width: 100%;
  }

  #masthead__first {
    grid-row: 1;
    grid-column: 2;
    font-size: 5rem;
    text-align: right;
    writing-mode: unset;
    transform: unset;
    padding-left: unset;
  }

  #masthead__last {
    grid-row: 2 / 4;
    grid-column: 3;
    writing-mode: vertical-lr;
    font-size: 5rem;
    padding-left: unset;
    margin-top: unset;
  }

  #masthead__intro {
    grid-row: 3;
    grid-column: 4;
    align-self: center;
  }

  #masthead__nav {
    grid-row: 2;
    grid-column: 4;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--theme-color);
    border-image: linear-gradient(90deg, white, transparent) 1;
  }

  #masthead__nav a {
    font-size: smaller;
    text-align: left;
  }
  #masthead__nav a:hover {
    text-decoration: underline;
  }
}

@media (min-width: 70rem) {
  #masthead__nav {
    display: block;
    flex-direction: row;
  }

  #masthead__nav a {
    display: inline;
  }
}

.nav {
  width: 100%;
}

.nav ul {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.nav li {
  list-style: none;
  padding-bottom: 0.5rem;
}

@media (min-width: 50rem) {
  .nav ul {
    flex-direction: row;
  }
  .nav li {
    padding-bottom: unset;
    padding-right: 1rem;
  }
}

/* ARTICLE */

#item__nav {
  display: flex;
  flex-direction: column;
}

#item__extra {
  border-bottom: 1px solid var(--theme-color);
  border-image: linear-gradient(90deg, white, transparent) 1;
  width: 45%;
  display: inline-block;
  height: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

article h1 + small {
  margin: 1.5rem 0 0 0;
}

@media (min-width: 38rem) {
  article > * {
    grid-column: 3 / 4;
  }

  article > img,
  article > picture,
  article > div {
    grid-column: 2 / 5;
    margin-left: auto;
    margin-right: auto;
  }

  article > div.cp_embed_wrapper {
    margin-left: unset;
    margin-right: unset;
  }

  #item__nav {
    flex-direction: row;
    align-items: center;
  }
}

.article--timeline ul {
  position: relative;
  display: flex;
  flex-direction: column;
  list-style-type: none;
  border-left: 1px solid var(--theme-yellow);
  padding-left: 0;
  margin-left: 0;
}

.article--timeline ul li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.article--timeline ul li > * {
  margin: 0 0.5rem;
}

/* make a little circle at each li */
.article--timeline ul li::before {
  position: absolute;
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--theme-orange);
  border-radius: 50%;
  margin-left: -0.25rem; /* half the width */
  margin-right: 0.5rem;
  margin-top: 0.75rem;
}

.chip {
  border-radius: var(--radius);
  color: var(--theme-blue);
  border: 1px solid var(--theme-yellow);
  text-transform: uppercase;
  font-size: var(--size-300);
  font-family: Arial, Helvetica, sans-serif;
  padding: 0.25rem 0.5rem;
  background-color: var(--theme-yellow);
}

.chip--hot {
  border-color: var(--theme-red);
  background-color: var(--theme-red);
  color: white;
}

.article--timeline .date {
  margin-right: 1rem;
}

.date,
.small-text {
  font-size: var(--size-300);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--theme-blue);
  text-transform: uppercase;
}

/* HOME */

/* LISTS */

.collection {
  margin-left: 0;
  padding-left: 0;
}

.collection__item {
  list-style-type: none;
}

.collection__item:nth-child(even) .collection__article,
.s {
  border-image: linear-gradient(45deg, transparent, white, transparent) 1;
}

.collection__item:nth-child(odd) .collection__article {
  border-image: linear-gradient(-45deg, transparent, white, transparent) 1;
}

.collection__article {
  margin-top: 1rem;
  margin-bottom: 1rem;
  margin-left: 0;
  padding: 1rem 0.5rem;
  border-style: solid;
  border-width: 1px;
}

.collection__article--top {
  margin-top: 3rem; /*registration height*/
}

@media screen and (min-width: 55rem) {
  .collection__article {
    padding: 2rem 3rem;
  }
}

.collection__title {
  display: block;
  font-size: var(--size-700);
}

.collection__summary {
  display: block;
  font-style: italic;
}

.collection__tags {
  display: flex;
  flex-direction: row;
  padding-left: 0;
  margin-left: 0;
}

.pull--left {
  margin-right: auto;
}

.collection__tags li,
.tag__link {
  list-style-type: none;
  margin-left: 0.25rem;
}

/* WALL */
.wall {
  margin: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 100%;
}

.wall--fullbleed {
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

.wall__image {
  max-width: 100%;
}

.wall__link {
  text-decoration: none;
}

.wall__image,
.wall__caption {
  grid-column: 1;
  grid-row: 1;
}

.wall__caption {
  color: white;
  text-transform: uppercase;
  letter-spacing: 1vw;
  text-align: center;
  align-self: center;
  font-size: 7vw;
}

/* FOOTER */

.footer {
  margin-top: 12rem;
  padding-top: 12rem;
  background-image: url(/img/family.svg);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: top;
}

.footer__container,
.footer__bio,
.footer__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer__container,
.footer__colophon,
.footer__bio {
  padding: 1rem;
}

.footer__fact {
  margin-bottom: 1rem;
}

@media (min-width: 45rem) {
  .footer__container,
  #home__about {
    max-width: 80ch;
    margin-left: auto;
    margin-right: auto;
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
  .footer__container,
  .footer__bio {
    flex-direction: row;
  }
  .footer__container {
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer__intro {
    margin-left: 0.5rem;
    align-items: flex-start;
  }

  .footer__bio {
    padding: 0;
    flex-grow: 1;
  }

  .footer__colophon {
    margin-left: auto;
    max-width: 600px;
    padding: 0;
    padding-left: 1rem;
  }
}

.avatar {
  aspect-ratio: 1;
  max-width: 100%;
  padding: 1rem;
}

.avatar--inline {
  clip-path: circle(25px at center);
  width: 50px;
}

.footer__avatar {
  clip-path: circle(50px at center);
  width: 100px;
}

@media (min-width: 45rem) {
  h2 {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

.split-list {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 45rem) {
  .split-list {
    grid-template-columns: 1fr 1fr;
    grid-gap: 2rem;
  }
}

.card {
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card__name {
  margin-top: 0;
}

.card__image {
  width: 100%;
}

.cage {
  display: flex;
  width: 100%;
}

.cage .heart {
  width: 30px;
  margin: 1.5rem 0.25rem 0 0;
}

.book {
}

.book blockquote {
  padding-left: 0;
}

.book__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-bottom: 1px solid var(--theme-color);
  border-image: linear-gradient(45deg, transparent, white, transparent) 1;
}

.book__input {
  display: block;
  width: 100%;
}

.book__input input {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.25rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  color: var(--softwhite);
  font-size: 100%;
}

.book__signup {
  display: inline-block;
  background-color: var(--2023-orange);
  color: var(--softwhite);
  padding: 1rem;
  border: none;
  border-radius: var(--radius);
}

.book__signup:hover {
  cursor: pointer;
}

.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  background-color: white;
  padding: 1rem;
  overflow-x: scroll;
}

.logos img {
  /* aspect-ratio: 1; */
  padding: 0.1rem;
  margin: 0.1rem;
}

.logos ~ table {
  text-align: center;
  overflow-x: scroll;
}

/* stripe the table rows */
.logos ~ table tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

.logo-solo {
  margin: 1rem auto;
}

.rounded-all {
  border-radius: var(--radius);
}

/* Masonry Layout */
.masonry {
  column-count: 1;
  column-gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 640px) {
  .masonry {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .masonry {
    column-count: 3;
  }
}

.masonry img {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  break-inside: avoid;
  border-radius: var(--radius);
  display: block;
}
