body {
  margin: 0;
  padding: 0;
  background: #2a2543;
  line-height: 133%;
  font-size: 0.98em;
  font-family: "Open Sans", "Droid Sans", "Calibri", sans-serif;
}


/* Miscellaneous custom styling for various elements */
h1, h2, h3 {
  font-family: "Calibri";
}

a {
  color: rgb(108,105,173);
}

a:hover, a:focus {
  color: #2a2543;
  transition: ease-in 0.1s, ease-out 0.1s;
}

blockquote {
  border-left: rgb(108,105,173) 3px solid;
  background: #d8d4ec;
  padding: 0.1px 0.75rem;
  margin: 0 1.5rem;
}

hr {
  width: 75%;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}


/* Image gallery */
#image-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.thumbnail-image {
  width: 200px;
  height: 200px;
  margin: 10px;
  cursor: pointer;
  object-fit: cover;
}

#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
}

#lightbox-image {
  display: block;
  align-self: center;
  justify-self: center;
  margin: auto;
  max-width: auto;
  max-height: 100%;
  cursor: pointer;
}


/* Sticky navigation links at the top of the page */
.quick-nav {
  position: fixed;
  z-index: 999;
  width: 100%;
  background: rgba(10,0,10,1);
  text-align: right;
  color: #fff;
  font-size: 0.875em;
}

.navbar {
  padding: 1px 25px;
}

.navbar a {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  padding: 5px 4px;
  margin: 0 2px;
}

.navbar a:hover,
.footer a:hover,
.navbar a:focus,
.footer a:focus {
  color: rgb(220,218,255);
  transition: ease-in 0.1s, ease-out 0.1s;
}


/* Header image */
.header {
  height: 300px;
  background: url(/backgrounds/4.png);
  background-size: 25%;
}


/* Title bar with icon and title/tagline */
.title {
  color: #fff;
  background: #52587c;
  min-height: 60px;
  margin-bottom: -25px;
  text-align: right;
  border-top: 3px solid rgb(31,28,91);
}

.title-text,
.title-pic {
  padding: 0;
  margin: 0;
  display: inline-block;
  vertical-align: top;
}

/* Contains the text tagline */
.title-text {
  padding-right: 1em;
  width: calc(85vw - 110px);
  line-height: 167%;
  margin-top: -3px;
  padding-bottom: 15px;
}

.title-text h1 {
  padding: 0;
  font-size: 32px;
}

/* Contains the profile pic */
.title-pic {
  height: 100px;
  margin-right: 100px;
  margin-top: -25px;
  border: 5px solid rgb(31,28,91);
  border-radius: 10px;
}

.title-pic img {
  height: 100%;
  overflow: hidden;
}


/* Page wrapper */
.page-wrapper {
  padding: 0 100px;
  margin: 0 auto;
  background: url(/backgrounds/1.png);
  background-size: 15%;
  border-top: 3px solid rgb(31,28,91);
  position: relative;
}


/* Sidebar boxes */
.sidebar,
.rsidebar {
  width: 320px;
  margin: 50px 0;
  position: absolute;
}

.sidebar {
  left: 70px;
  top: 0;
}

.rsidebar {
  right: 70px;
  top: 0;
}

.sidebar a,
.rsidebar a {
  display: block;
  border: 3px solid rgb(31,28,91);
  background: rgb(220,218,255);
  padding: 5px;
  margin: 10px 0;
  color: #0e0718;
  text-decoration: none;
}

.sidebar h1,
.rsidebar h1 {
  font-size: 1.2rem;
  background: #696f92;
  color: #fff;
  padding: 12px 10px 10px 10px;
  margin: auto;
  border-bottom: 3px solid rgb(31,28,91);
}

.sidebar a:hover,
.sidebar a:focus,
.rsidebar a:hover,
.rsidebar a:focus {
  background: #99a1c7;
  transition: ease-in 0.1s, ease-out 0.1s;
}

.sidebar,
.main,
.rsidebar {
  display: inline-block;
}


/* Main content area */
.main {
  margin: 50px 320px 50px 320px;
  width: auto;
  width: calc(100vw - 855px);
}

.main:not(.home) {
  margin: 50px 300px 50px 0px;
  width: auto;
  width: calc(100vw - 510px);
}


/* Content boxes */
.box {
  margin-bottom: 15px;
  border: 3px solid rgb(31,28,91);
}

.inner {
  background: rgb(220,218,255);
  padding: 10px 25px;
}

.inner img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

.box,
.title-pic img {
  border-radius: 5px;
  overflow: hidden;
}

/* Footer */
.footer {
  background: #050005;
  color: #fff;
  padding: 5px 20px 10px 20px;
  font-size: 0.75em;
  text-align: center;
}

.footer a {
  color: #fff;
}

.footer-column {
  width: 25%;
  margin: 5px 10px;
  display: inline-block;
  vertical-align: top;
}

/* Only show sidebar on home */
body:not(.home) .sidebar {
  display: none;
}


/* Only show right sidebar on art pages */
body.art .rsidebar,
body.design .rsidebar {
  display: block;
}

#gallery {
  column-count: 6;      /* number of columns */
  column-gap: 1em;      /* space between columns */
}

#gallery img {
  width: 100%;
  margin-bottom: 1em;
  display: block;
  break-inside: avoid;  /* prevents images from breaking weirdly */
}

/* --- Media Queries --- */

@media (max-width: 1200px) {
  #gallery { column-count: 4; }
}

/* Wide tablets */
@media (max-width: 900px) {
  .page-wrapper {
    padding: 0 50px;
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    width: 25vw;
    display: none;
  }

  .main {
    margin: 0 !important;
    width: 100% !important;
  }

  .main .inner {
    padding-left: 0 !important;
  }
  
  .inner h1 {
    padding-left: 30px;
  }

  .title-pic {
    margin-right: 7vw;
  }

  .title-text {
    padding-left: 1vw;
    padding-right: 2vw;
  }

  .rsidebar {
    position: static;
    width: 100%;
    order: -1;
    margin: 20px 0;
  }

  #gallery {
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    column-count: 3;
  }

}

/* Portrait mobile */
@media (orientation: portrait) {
  .page-wrapper {
    padding-top: 0.1px;
    padding-bottom: 0.1px;
  }

  .sidebar,
  .main {
    display: block;
    margin: 0 auto;
    position: static;
    width: 100% !important;
  }

  .sidebar, .rsidebar {
    margin-top: 50px;
  }

  .main {
    margin-top: 30px;
    margin-bottom: 30px;
  }

  #gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 4px !important;
  }

  .thumbnail-image {
    width: 48%;
    height: auto;
    display: block;
  }

  #lightbox-image {
    max-width: 100%;
    max-height: none;
    height: auto;
    width: auto;
  }
}

@media (max-width: 600px) {
  .main {
    display: block !important;
    width: 100% !important;
    min-height: 1px !important;
    overflow: visible !important;
  }

  .box, .inner {
    display: block !important;
    width: 100% !important;
    min-height: 1px !important;
    padding-left: 0 !important;
  }

  .inner h1 {
    padding-left: 30px;
  }

  .thumbnail-image {
    width: 50%;
    height: auto;
    display: block;
  }

  .header {
    height: 60vw;
  }

  .title {
    padding-right: 0;
    height: calc(auto - 25px);
  }

  .title-text {
    margin-top: -5px;
  }

  .title-text h1 {
    font-size: 6vw;
    line-height: 75%;
  }

  .page-wrapper {
    padding: 0.1px 7vw;
  }

  .footer-column {
    display: block;
    width: 100%;
    margin: 0 auto;
  }

  .thumbnail-image {
    width: 90% !important;
    height: auto;
    display: block !important;
  }

  #lightbox-image {
    max-width: 100%;
    max-height: none;
    height: auto;
    width: auto;
  }

  #gallery {
    column-count: 2;
    gap: 0 !important;
  }
}