:root {
  --accent-color: rgb(100,10,10);  /* dark red */
  --main-font: "Reddit Mono", Sans-serif; /* font for basic text */
}

body {
  margin: 0;
  cursor: default;
}

/* HERO (header) */

#hero {
  height: 100vh;
  background-image: url('../img/pikslipea-taust.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center; /* up/down */
  justify-content: center; /* left/right */
}

#hero-text {
  z-index: 1;
  transform: translateX(100%);
}

#hero-text h1 {
  font-family: "Sedgwick Ave Display", sans-serif;
  font-size: 5rem;
}

#hero-text p {
  color: var(--accent-color);
  font-family: "Alumni Sans Pinstripe", sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  margin-top: -20%;
  margin-left: -27%;
}

/* MAIN */

#main-back {
  background-color: rgb(0,0,0);
}

#main {
  max-width: 1000px;
  margin: 0 auto;
  margin-top: 1rem;
  padding-bottom: 1rem;
}

/* nav */

#nav {
  display: flex;
  justify-content: space-between;
  align-items: left;
  padding: 2rem 0rem;
}

#nav button {
  padding: 0;
  border: none;
  cursor: pointer;
  background-color: transparent;
  color: rgb(255,255,255);
  font-family: var(--main-font);
  font-size: 1rem;
}

#nav button:last-child {
  margin-left: auto;
}

#nav button:hover {
  text-decoration: underline;
}

#nav button.active {
  color: var(--accent-color);
}

.separator {
  text-decoration: none;
  color: rgb(255,255,255);
  pointer-events: none;
  cursor: default;
  margin-left: 0.5rem;
  margin-right: 0.4rem;
  font-family: var(--main-font);
  font-size: 1rem;
}

/* projects */

#projects {
  column-count: 3;
  column-gap: 1rem;
  padding-bottom: 4rem;
}

#projects img {
  width: 100%;
  display: block;
  cursor: pointer;
  margin-bottom: 1rem;
}

/* modal */

#modal-back { /* background */
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%; /* make whole screen darker */
  height: 100%;
  background-color: rgb(0,0,0); /* if transparency doesn't work -> background just black */
  background-color: rgba(0,0,0,0.4);
}

.modal { /* window for project info */
  column-count: 2;
  column-gap: 3rem;
  max-width: 800px;
  overflow-wrap: break-word;
  overflow: hidden;
  height: auto;
  margin-top: 2rem;
  margin-bottom: 2rem;
  background-color: rgb(255,255,255);
  justify-content: center;
  padding: 3rem;
  position: relative;
}

.modal img {
  display: none;
  cursor: pointer;
  max-width: 20rem;
  max-height: 25rem;
  break-after: column;
}

.modal .slides-container { /* project images (slideshow) */
  position: relative;
  text-align: center;
}

.modal .previous {
  cursor: pointer;
  position: absolute;
  font-weight: bold;
  left:0;
  z-index: 100;
  top: 50%;
}

.modal .next {
  cursor: pointer;
  position: absolute;
  font-weight: bold;
  z-index: 100;
  top: 50%;
  right: 0;
}

.modal h3, h4, p, li, .modal-h4 {
  font-family: var(--main-font);
  text-wrap: wrap;
}

.modal h3 {
  font-family: "Saira Stencil One", sans-serif;
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.modal-h4 {
  font-size: 1rem;
  color: rgb(255,255,255);
  padding: 0rem 0.2rem;
  background-image: linear-gradient(to right, rgb(50,20,20), rgb(200,20,20));
}

.modal a {
  color: var(--accent-color);
}

.tech-stack {
  font-weight: bold;
}

.modal ul {
  padding-left: 0;
}

.modal li {
  list-style-type: none;
  margin-left: 0;
  padding-left: 2rem;
  position: relative;
  line-height: 2rem;
}

.modal li::before {
  content: "◈";
  position: absolute;
  left: 0;
  font-size: 1rem;
  color: var(--accent-color);
}

.modal .title {
  break-inside: avoid;
  page-break-inside: avoid;
}

#close-button {
  position: absolute;
  top: 1rem;
  right: 1.3rem;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

#close-button:hover {
  color: var(--accent-color);
}

/* blog */

#blog {
  display: none;
  background-color: var(--accent-color);
  padding: 1rem 3rem;
  border-radius: 10px;
  margin-bottom: 4rem;
}

#blog a {
  color: rgb(255,255,255);
  text-decoration: none;
  font-family: "Saira Stencil One", sans-serif;
  font-size: 1.3rem;
}

/* FOOTER*/

.footer {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.footer p {
  font-size: 1rem;
  font-family: var(--main-font);
  text-align: center;
}

.footer a {
  color: var(--accent-color);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* MOBILE RESPONSIVE */
@media screen and (max-width: 768px) {
  
  /* mobile hero */
  #hero {
	background-image: none;
    background-color: white;
  }
  
  #hero-text {
    transform: translateX(0%);
  }
  
  #hero-text h1 {
    font-size: 3rem;
  }

  #hero-text p {
    font-size: 2rem;
    margin-top: -15%;
	margin-left: 0%;
  }
  
  /* mobile nav */
  
  #show-blog {
    display: none;
  }
  
  #nav {
    align-items: center;
    padding: 2rem 0rem;
	justify-content: space-around;
  }

  #nav button {
    font-size: 0.9rem;
	align-items: center;
  }
  
  .separator {
    margin-left: 0;
    margin-right: 0;
    font-size: 0.6rem;
  }
  
  /* mobile projects */

  #projects {
    column-count: 1;
    padding: 0rem 2rem;
  }

  #projects img {
    width: 100%;
	margin-bottom: 3rem;
  }
  
  /* mobile footer */

  .footer {
    gap: 1rem;
  }

  .footer p {
    font-size: 0.7rem;
  }
  
  /* mobile modal */

  .modal { /* window for project info */
    column-count: 1;
	position: relative;
	overflow-y: auto;
    max-width: 80vw;
	max-height: 80vh;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
  }

  .modal img {
    max-width: 10rem;
    max-height: 20rem;
  }

  .modal h3 {
    font-family: "Saira Stencil One", sans-serif;
    font-size: 1.5rem;
  }

  .modal-h4 {
    font-size: 0.8rem;
  }

  .modal li {
    line-height: 1.5rem;
	font-size: 0.8rem;
  }
  
  .modal p {
	font-size: 0.7rem;
  }
  
  #close-button {
    z-index: 1000;
  }
}
