/*
CSS RESETS:
 Border box reset:
https://www.paulirish.com/2012/box-sizing-border-box-ftw/
 62.5% Fix: https: //www.aleksandrhovhannisyan.com/blog/62-5-percent-font-size-trick/
*/

html {
  box-sizing: border-box;
  font-size: 62.5%;
}

*,
*:before,
*:after {
box-sizing: inherit;
margin: 0;
padding: 0;
}

html, 
body {
height: 100%;
font-size: 1.6rem;
/* same as 16px using 62.5% fix for rem */
line-height: 1.6;
}

/* ----- BODY ----- */
body {
background: rgb(255, 236, 190);
margin: 0;
font-family: 'Open Sans', sans-serif;
}

/* ----- THE DIVINE GRID ----- */

.grid {
  display: grid;
  grid-template-rows: 100vh;
  grid-template-columns: auto 60% auto;
  grid-template-areas: 
  'nav content aside';
}


/* ----- HEADER (inside of <nav>) ----- */

header{
color: rgb(52, 54, 52);
font-size: 3rem;
font-weight: 600;
margin: 0vh 0 2vh 0;
}

/* ----- NAVIGATION ----- */
.page-select {
  padding: 4vh 0 0 4vw;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  grid-area: 'nav';
}

.page-select a {
text-decoration: none;
/* background-color: blueviolet; */
color: inherit;
text-decoration: none;
display: block;
padding: 0px 30px;
}

.selected-page {
border: 7px solid black;
/* color: rgb(100, 0, 0); */
border-radius: 20px;
font-size: 3rem;
font-weight: 600;
margin: 15px 0;
}
.not-selected {
border: 7px solid black;
border-radius: 20px;
margin: 1vh;
/* padding: 0 15px; */
}
.selected-page:hover {
color: rgb(100, 0, 0);
border-color: rgb(100,0,0);
}
.not-selected:hover {
color: rgb(100,0,0);
border-color: rgb(100,0,0);
}

/* ------ PAGE CONTENT ----- */

.preview-img {
padding: 8vh 0 3vh 0;
grid-area: content;
column-count: 3;
}
.preview-img img {
max-width: 350px;
max-height: auto;
margin: 1% 7%;
border-radius: 10px;
transition: all 0.2s ease-in-out;
cursor: pointer;
}
.preview-img img:hover {
transform: scale(1.05);
opacity: 0.95;
}
/* ----- MISC ----- */
.modal-link {
  color: rgb(228, 151, 180);
}
.modal-link:hover {
  color: rgb(193, 159, 255);
}


/* ------ ABOUT PAGE ------ */
.about {
border-radius: 7px;
color: white;
background-color: rgba(54, 54, 54, 0.5);
padding: 5%;
margin: 5%;
justify-content: space-evenly;
grid-area: content;
}
.about h3 {
/* text-decoration: underline; */
margin: -3% 0 3% 0;
}
.about p {
font-family: 'IBM Plex Sans Condensed', 'Open Sans', sans-serif;
font-size: 1rem;
height: auto;
}
.about img {
border: solid 5px rgb(100, 0, 0);
border-radius: 20px;
margin: 5%;
float: right;
width: 30%;
}
footer {
z-index: 5;
margin: auto;
}

/* ----- MODAL // (POPUP IMAGES!) ------- */
.dialog-container {
  display: none;
}

dialog {
margin: 7%;
display: grid;
grid-template-columns: 2% auto 38% 4%;
grid-template-rows: 4% 92% 4%;
justify-items: center;
border-radius: 10px;

position: fixed;
width: auto;
height: auto;

background-color: rgba(0, 0, 0, .8);
outline: 0;
border: 0;
box-shadow: 0 0 1rem rgb(0, 0, 0, 0.9);
}
dialog button {
  font-size: 1rem;
  position: absolute;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: solid 0.1rem rgb(255, 255, 255, 0.5);
  border-radius: 5rem;
  display: flex;
  right: 0;
  padding: 0px 7px 2px 7px;
  margin: 1% 1%;
  cursor: pointer;
}
dialog button:hover {
  background: rgb(100, 0, 0);
}
.description {
  grid-area: 2 / 3;
}
dialog h3 {
  font-style: italic;
  text-align: center;
  padding: 5% 5% 2% 5%;
  color: white;
}
dialog p {
  text-align: center;
  font-size: 1rem;
  padding: 0% 5% 5% 5%;
  color: white;
}
dialog img {
  grid-area: 2 / 2;
  max-width: 100%;
  max-height: 100%;
  margin-top: auto;
  margin-bottom: auto;
}
dialog::backdrop {
background: rgba(0, 0, 0, 0.5);
}
/* 
.full-img {
max-width: 100%;
max-height: 100%;
transition: all 0.25s ease-out;
} */

/* ----- DISCLAIMER ----- */
.disclaimer {
  position: absolute;
  right: 0;
  bottom: 0;
  direction: rtl;
  padding: 0 1%;
  font-size: 0.6rem;
  color: rgb(100, 0, 0, 0.2);
}

/* ----- @media RESPONSIVE ----- */

@media screen and (max-width: 1770px) {
.grid {
  grid-template-columns: auto 55% auto;
}
.preview-img img {
  max-width: 450px;
}
.preview-img {
  column-count: 2;
}
}
@media screen and (max-width: 1635px) {
.preview-img img {
  max-width: 400px;
}
}
@media screen and (max-width: 1480px) {
.about h3 {
  font-size: 1.2rem;
}
.about p {
  font-size: 0.8rem;
}
.preview-img img {
  max-width: 350px;
}
}
@media screen and (max-width: 1370px) {
  header{
    font-size: 2.5rem;
  }
.selected-page {
  font-size: 2.6rem;
  }
  .not-selected {
    font-size: 1.4rem;
    } 
}
@media screen and (max-width: 1270px) {
.preview-img img {
  max-width: 300px;
}
}
@media screen and (max-width: 1160px) {
  dialog {
    padding: 5%;
    grid-template-columns: 3% auto 3%;
    grid-template-rows: 4% 60vh auto 0%;
  }
  dialog img {
    margin-top: 0;
    margin-bottom: 0;
  }
  dialog .description {
    top: 0;
    grid-area: 3 / 2;
  }
  header {
    font-size: 2rem;
  }
  .selected-page {
    font-size: 2rem;
    }
  .not-selected {
    font-size: 1.1rem;
    } 
}
@media screen and (max-width: 1090px) {
  .preview-img img {
    max-width: 250px;
  }
}
@media screen and (max-width: 980px) {
  dialog {
    grid-template-rows: 4% max-content auto 0%;
  }
  .grid {
    grid-template-columns: auto 50% auto;
  }
  .preview-img img {
    max-width: 200px;
  }
}
@media screen and (max-width: 880px) {
  .preview-img {
    margin-left: 4%;
    padding: 8vh 10vw 3vh 0;
  }
  .preview-img img {
    max-width: 300px;
  }
  .disclaimer {
    padding: 2% 2% 0 6%;
    direction: ltr;
  }
  .about h3 {
    font-size: 1rem;
  }
  .about p {
    font-size: 0.7rem;
  }
  .grid {
    display: grid;
    grid-template-rows: auto auto;
    grid-template-columns: 100%;
    grid-template-areas:
    'nav'
    'content';
  }
  .page-select {
    padding: 1vh 0 0 4vw;
  }
}
@media screen and (max-width: 730px) {
  .preview-img img {
    max-width: 250px;
  }
  dialog h3 {
    font-size: 1.4rem;
  }
}
@media screen and (max-width: 630px) {
  dialog p {
    font-size: 0.8rem;
  }
  header {
    margin: 0;
    font-size: 1.9rem;
  }
  .preview-img img {
    max-width: 200px;
  }
}
@media screen and (max-width: 460px) {
  dialog button {
    font-size: 0.8rem;
    padding: 0% 1.5%;
  }
  dialog h3 {
    font-size: 1rem;
  }
  dialog p {
    font-size: 0.6rem;
  }
  .preview-img img {
    max-width: 150px;
  }
  .preview-img {
    padding: 3vh 14vw 3vh 0;
  }
}
@media screen and (max-width: 360px) {
  .preview-img img {
    max-width: 135px;
  }
  header {
    font-size: 1.7rem;
  }
  .selected-page {
    font-size: 1.7rem;
    }
  .not-selected {
    font-size: 0.9rem;
    } 
}