/* TODO: media queries to handle smaller viewports */

/* FONTS */ 
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@100;200;300;400;700;900&display=swap');

/* CUSTOM PROPERTIES */
:root{
  --near-black:#555555;
}

/* ==============================
   FOUNDATIONAL / GLOBAL
   ============================== */

*{
  box-sizing: border-box;
}

html{
  box-sizing: border-box;
  padding: 5em;
  height: 100%;
  background-color: white;
  background-blend-mode: darken;
  animation: colorcycle 120s linear infinite;
}

body{
  margin: 0;
  height: 100%;
  font-family: "Lato", sans;
  font-size: 1.4rem;
  line-height: 1.8rem;
  font-weight: 300;
}

*::selection{
  background-color: var(--near-black);
  color: white;
}

/* ==============================
   ANIMATIONS & GRADIENTS
   ============================== */

@keyframes colorcycle {
  0%   { background-color: #FF9291; }
  25%  { background-color: #CFAFE4; }
  50%  { background-color: #B3EFDD; }
  75%  { background-color: #EDC884; }
  100% { background-color: #FF9291; }
}

/* ==============================
   TYPOGRAPHY
   ============================== */

p{
  text-align: justify;
  text-justify: inter-character;
  word-break: break-word;
  hyphens: auto;
  margin-top: 0;
}

strong{
  font-weight: 400;
}

h1{
  margin: -1.5rem 0 0 -1rem;
  color: white;
  font-optical-sizing: auto;
  font-weight: 100;
  font-style: normal;
  height: 100%;
  font-size: calc(18vh - 2rem);
  line-height: 1em;
  padding: 0;
  width: 30%;
  text-align: left;
}

h2{
  font-weight: 100;
  font-size: 6rem;
  line-height: 6rem;
  margin: 0;
}

h3{
  font-weight: 300;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

h4{
  font-weight: 300;
  margin-top: 0;
  font-size: 1.5rem;
}

.subhead{
  line-height: 0.8em;
  display: inline-block;
  margin: 0;
  font-weight: 300;
  color: white;
  font-optical-sizing: auto;
  font-size: 2.25rem;
  text-align: left;
}

/* ==============================
   LAYOUT - CONTAINERS
   ============================== */

.with-background{
  mix-blend-mode: multiply;
  overflow-x: clip;
  color: white;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #090909EE;
  box-sizing: border-box;
  padding: 3em;
  margin: 0;
  background-image: url(../img/starry_sky.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
}

.with-background.filler{
  width: 100%;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.with-background .filler-image{
  background-repeat: no-repeat;
  background-position: center;
  height: 100%;
  padding: 50%;
  background-size: contain;
}

.with-background .filler-image.smaller{
  background-size:80%;
}

.home .with-background{
  background-image: url(../img/starry_desk.jpg);
}

/* ==============================
   LAYOUT - GRID & FLEX
   ============================== */

.home header{
  flex-grow: 4;
}

.home footer{
  padding: 0;
  position: revert;
  flex-grow: 0;
}

.two-one-grid, .one-two-grid{
  height: 100%;
  display: block;
}

.grid{
  display: block;
}

.scrollable{
  overflow-y: scroll;
  overflow-x: hidden;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;      /* Firefox */
}

.scrollable::-webkit-scrollbar {
  display: none;
}

/*
.scrollable.projects::after {
  display: block;
  width: 15px;
  height: 15px;
  content: " ";
  position: absolute;
  bottom: 44px;
  border-right: 4px solid black;
  border-bottom: 4px solid black;
  transform: rotate(45deg);
  margin: 0 25%;
}


.scrollable.projects.at-end::after {
  display:none;
}
*/

.scroll-clue{
  position: relative;
  bottom: 44px;
  margin: 0 50%;
  top: 20px;
}

.at-end{
  display:none;
}

/* ==============================
   FOOTER & NAVIGATION
   ============================== */

footer{
  box-sizing: border-box;
  bottom: 0;
  left: 0;
  padding: 9;
  display: block;
  width: 100%;
}

footer .spacer{
  display: none;
}

nav{
  vertical-align: top;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-end;
}

nav ul{
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: stretch;
  margin-right: 0.5rem;
  min-width: 140px;
  width: 100%;
  padding: 0 0.5rem;
  border: 2px solid white;
}

nav li{
  padding: 0;
  position: relative;
  line-height: initial;
}

nav li a{
  text-decoration: none;
  padding: 0 0.75rem;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 3px;
  font-weight: 700;
  color: white;
}

nav a.selected {
  background-color: white;
  color: black;
}

nav a.selected:hover{
  text-decoration: none;
}

nav a:hover{
  color: unset;
}

nav .logomark{
  line-height: 0;
}

.nav-inverted{
  min-height: 110px;
}

.nav-inverted ul{
  border-color: black;
}

.nav-inverted ul a{
  color: black;
}

/* ==============================
   LINKS & TEXT DECORATION
   ============================== */

a{
  font-weight: 400;
  color: black;
  text-decoration-thickness: 2px;
}

a:hover{
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

a.external:after{
  content: " ";
  background-image: url(/img/arrow-up-right.svg);
  display: inline-block;
  position: relative;
  height: 1rem;
  width: 1rem;
  background-size: 0.6rem;
  top: 0.25rem;
  left: 0.25rem;
  background-repeat: no-repeat;
}

dd a{
  font-weight: 400;
  text-decoration: none;
  border-bottom: 2px solid black;
  padding-bottom: 2px;
}

dd a:hover{
  border-bottom: 2px solid rgba(238, 93, 92, 1);
}

/* ==============================
   PROJECT PAGES
   ============================== */

html:has(> body.project-page) {
  background: white;
  animation: none;
  height: unset;
}

.project-page{
  height: unset;
}

.project{
  max-width: 100rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto;
  grid-template-rows: auto;
  column-gap: 3rem;
  row-gap: 3rem;
}

.project-nav{
  grid-column-start: 1;
  grid-row-start: 1;
  width: 100%;
  background: white;
  padding-bottom: 1rem;
  color: black;
  font-size: 3rem;
  text-decoration: none;
}

.project-nav a{
  text-decoration: none;
}

.project-main{
  grid-column-start: 2;
}

.project-page .project-header h3{
  grid-row-start: 1;
  grid-column-start: 2;
  margin: 0;
}

.project-header{
  margin-bottom: 2rem;
}

.project-header a{
  text-decoration: none;
  font-weight: 300;
}

.project-page a:hover{
  color: rgba(238, 93, 92, 1);
}

.project-metadata{
  margin: 3rem 0;
}

.project-metadata h4{
  font-weight: 400;
  font-size: 1.25rem;
}

.projects-footer{
  margin: 3rem 0;
}

/* ==============================
   PROJECT LISTING
   ============================== */

.projects{
  overflow-y: scroll;
  overflow-x: hidden;
}

.project-preview{
  margin-top: 4rem;
}

.project-links{
  margin-bottom: 1rem;
}

/* ==============================
   IMAGES & MEDIA
   ============================== */

.project-thumb{
  width: 100%;
}

.project-page .project-banner{
  mix-blend-mode: none;
  filter: none;
  margin-bottom: 2rem;
}

.project-banner{
  width: 100%;
  filter: saturate(0) brightness(1.1) contrast(1.1);
  mix-blend-mode: multiply;
  transition: all 0.25s;
}

.project-preview:hover .project-banner{
  transition: all 0.25s;
  opacity: 100;
  filter: saturate(1) brightness(1) contrast(1);
}

.project-thumb.wide{
  grid-column-start: span 2;
}

/* ==============================
   GALLERIES
   ============================== */

figure{
  margin: 0;
}

figcaption{
  font-size: 1rem;
  font-weight: 400;
  border-bottom: 1px solid black;
}

.gallery{
  margin-bottom: 2rem;
  display: grid;
  justify-content: space-evenly;
  justify-items: stretch;
  grid-gap: 2rem;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

.gallery.medium-density{
  grid-template-columns: 1fr 1fr 1fr;
}

.gallery.high-density{
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* ==============================
   TEXT COLUMNS & MISC
   ============================== */

.text-with-columns{
  column-width: 25rem;
  column-gap: 2rem;
  margin-bottom: 2rem;
}

hr{
  border: 3px solid black;
  width: 100%;
}

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

dl{
  /* empty */
}

dt{
  margin-top: 2rem;
  font-size: 1rem;
  letter-spacing: 0.15rem;
  font-weight: 400;
}

dd{
  margin-left: 0;
}

/* ==============================
   MOBILE MENU
   ============================== */

.mobile-menu{
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
  padding: 1rem;
}

.menu-btn{
  display: none;
}

.menu-icon{
  line-height: 0;
  cursor: pointer;
}

.mini-header{
  font-size: 2rem;
  font-weight: 300;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 1rem;
  display: inline;
  margin: 0;
}

.mini-mark{
  /* empty */
}

/* ==============================
   MOON LOGO
   ============================== */

.logomark{
  line-height: 0;
}

#moon{
  /* empty */
}

.moon-mask{
  /* empty */
}

.moon-surface{
  /* empty */
}

/* ==============================
   RESPONSIVE: 56rem+
   ============================== */

@media (min-width: 56rem){
  .two-one-grid, .one-two-grid{
    display: grid;
    grid-gap: 3rem;
  }

  .two-one-grid{
    grid-template-columns: 2fr 1fr;
    grid-row-gap: 0;
  }

  .one-two-grid{
    grid-template-columns: 1fr 2fr;
  }

  footer{
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }

  .filler footer{
    display: block;
  }

  .filler footer .spacer{
    display: none;
  }

  nav li{
    line-height: 0;
  }

  .mobile-menu{
    display: none;
  }
}

/* ==============================
   RESPONSIVE: 90rem+
   ============================== */

@media (min-width: 90rem) {
  .filler footer{
    display: grid;
    grid-template-columns: 1fr;
  }

  .filler footer .spacer{
    display: block;
  }

  /*.two-one-grid{
    grid-template-columns: 7fr 5fr;
  }*/

  .one-two-grid{
    grid-template-columns: 5fr 7fr;
  }
}

/* ==============================
   RESPONSIVE: 101rem+
   ============================== */

@media (min-width: 101rem){
  /*.two-one-grid, */

  .one-two-grid{
    grid-template-columns: 1fr 2fr;
  }

  nav ul{
    width: 66%;
  }

  .project-page nav ul{
    width: 100%;
  }
}

/* ==============================
   RESPONSIVE: Mobile (<56rem)
   ============================== */

@media (max-width: 56rem){
  html{
    padding: 0;
  }

  h1{
    font-weight: 300;
  }

  .diagram, .filler-image{
    display: none;
  }

  .two-one-grid{
    grid-template-rows: min-content auto;
    display: grid;
  }

  body:not(.home) .with-background h2{
    display: none;
  }

  .scrollable{
    padding: 1rem;
    order: 2;
  }

  .filler{
    padding: 0;
    width: 100%;
    order: 1;
  }

  body:not(.home) footer{
    padding: 0;
    position: unset;
  }

  body:not(.home, .project-page) nav ul{
    border: none;
  }

  /* mobile menu toggle */
  .filler:has(.menu-btn:checked) nav {
    display: block;
  }

  .filler:has(.menu-btn) nav {
    display: none;
  }

  .menu-icon{
    line-height: 0;
    cursor: pointer;
  }

  body:not(.home, .project-page) nav{
    padding: 1rem;
  }

  body:not(.home, .project-page) nav .logomark{
    display: none;
  }

  .subhead{
    font-size: 2rem;
  }

  /* PROJECT PAGES ON MOBILE */
  .project-page{
    margin: 2rem;
  }

  .project-nav{
    margin-bottom: 2rem;
    padding: 0;
    font-size: 2rem;
  }

  .project{
    display: block;
  }

  .gallery.medium-density{
    grid-template-columns: 1fr 1fr;
  }
}
