/******************* Standards: *******************/

/*********** colors **********/

:root {
  --white: #fff;
  --gray: #7d7c84;
  --darkGray: #4d4d4d;
  --blue: #1a2236;
  --border: #98dede;
  --input: #dfdfe0;
}

/************ fonts **********/

html {
  font-size: 18px;
}

/* section title: */
.playfair {
  font-family: "Playfair Display", serif;
  font-size: 3.36rem;
  font-weight: 400;
  margin: 0 0 27px 18px;
  color: var(--blue);
}

/* paragraphs: */
.poppins {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--blue);
}

/* lists */

ul {
  list-style: none;
}

/********** buttons **********/
.btnBlue {
  display: inline-block;
  width: 100%;
  text-decoration: none;
  color: var(--white);
  background-color: var(--blue);
  text-align: center;
  font-size: 1.2rem;
  padding: 15px;
  border: 2px solid var(--white);
  cursor: pointer;
  transition: all 300ms ease-in-out;
}

.btnBlue:focus {
  outline: none;
  border: 2px solid var(--border);
  color: var(--blue);
  background-color: var(--white);
}

.btnBlue:hover {
  color: var(--blue);
  background-color: var(--white);
  border: 2px solid var(--gray);
}

.btnBlue:active {
  background-color: var(--white);
  border-color: var(--border);
  color: var(--blue);
}

.btnBlue:visited {
  border-color: var(--gray);
}

/*********** Reset ***********/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*:focus {
  outline: 2px solid var(--border);
  outline-offset: -2px;
}

body {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
}

input:focus,
textarea:focus {
  outline: none;
}

button {
  border: none;
}

/********************** Header ***********************/

header {
  display: flex;
  width: 100%;
  height: 74px;
  justify-content: space-between;
  background: var(--white);
}

.logo {
  width: 111px;
  height: 74px;
  background: url("images/deco/mobile/nav-logo.svg");
}

.menu-logo {
  background: url('images/deco/mobile/menu-top.svg');
}

/**** Display Menu Button ****/

.menu-btn {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 60px;
  padding: 36px 9px;
  align-items: center;
  cursor: pointer;
}

#menu-toggle {
  display: none;
}

.menu-label,
.menu-label::before,
.menu-label::after {
  display: block;
  background: var(--blue);
  position: absolute;
  height: 3px;
  width: 24px;
  border-radius: 2px;
  transition: all 300ms ease-in-out;
}

.menu-label::before {
  content: "";
  margin-top: -9px;
}

.menu-label::after {
  content: "";
  margin-top: 9px;
}

#menu-toggle:checked + .menu-label::before {
  margin-top: 0;
  transform: rotate(45deg);
}

#menu-toggle:checked + .menu-label {
  background: rgba(255, 255, 255, 0);
}

#menu-toggle:checked + .menu-label::after {
  margin-top: 0;
  transform: rotate(-45deg);
}

.menu-btn #menu-toggle:checked + .logo {
  background: url('images/deco/mobile/menu-top.svg') no-repeat;
}

/********* Nav Bar **********/

.mainNav {
  justify-content: space-between;
  display: block;
  position: absolute;
  top: 74px;
  width: 100vw;
  background:
    url('images/deco/mobile/four-dots.svg') 80% 0 no-repeat,
    url('images/deco/mobile/four-dots.svg') 20% calc(93% - 25vw) no-repeat,
    url('images/deco/mobile/menu-btm.svg') 100% 100% no-repeat,
    #fff;
  background-size: auto, auto, 100vw;
}

.mainNav.display {
  display: none;
}

.mainNav ul {
  position: relative;
  display: flex;
  flex-direction: column;
  top: 74px;
  width: 100%;
  align-items: center;
  justify-content: space-around;
}

.nav-item {
  padding-block: 9px;
  position: relative;
}

.nav-link {
  text-decoration: none;
  font-size: 1.2rem;
  color: var(--blue);
  outline: none;
}

.nav-link::after {
  position: absolute;
  top: 36px;
  left: 0;
  content: "";
  display: inline-block;
  width: 0;
  height: 2px;
  background-color: var(--border);
  transition: width 300ms ease-in-out;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

/****************** Headline *****************/

#headline {
  width: 100%;
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.headline-container {
  display: flex;
  flex-direction: column;
  height: calc(100% - 165px);
}

.headline-title {
  font-size: 3.6rem;
  font-weight: 400;
  line-height: 100%;
  margin: auto 0 27px 0;
}

#headline p {
  margin: 27px 0;
}

.start {
  margin-block: 27px auto;
}

.headline-deco {
  width: 100vw;
  height: calc(53.28vw - 2px);
  margin-inline-start: -18px;
  background: url("images/deco/mobile/image_geometry-headline-mobile.svg") no-repeat;
  background-size: contain;
}

/*************** Projects *********************/

#works {
  width: 100%;
  min-height: calc(1273px + (58.75vw * 6));
}

.project {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.project-image {
  width: 100%;
  height: 58.75vw;
}

.project-description {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--blue);
  padding: 18px;
  color: var(--white);
  margin-top: -4px;
}

.project-title {
  font-weight: 300;
  font-size: 1.5rem;
  width: fit-content;
}

.tech-container {
  display: flex;
  font-weight: 300;
  list-style: none;
  margin-block: 18px 27px;
}

.tech-item {
  padding: 3px 6px;
  margin-right: 9px;
  background: var(--border);
  color: var(--blue);
  font-weight: 400;
  font-size: 0.9rem;
  text-align: center;
}

.seeProjBtn {
  width: fit-content;
  text-align: start;
  padding-right: 50px;
  background: url("images/icons/arrow.svg") 90% 50% no-repeat;
  background-size: 24px;
}

.seeProjBtn:hover {
  color: var(--blue);
  border: 2px solid var(--gray);
  background: url("images/icons/arrow-black.svg") 90% 50% no-repeat var(--white);
  background-size: 24px;
}

/**************** PopUp Window ****************/

.project-window {
  position: fixed;
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: var(--white);
  padding: 18px;
  z-index: 9;
  overflow-y: scroll;
}

.pW-header {
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.close-pW {
  border: none;
  background: var(--white);
  font-size: 150%;
  width: fit-content;
  cursor: pointer;
  align-self: flex-end;
}

.pW-title {
  width: fit-content;
  font-size: 6vw;
  font-weight: 600;
  margin-block: 3%;
  line-height: 100%;
}

.pW-tech-item {
  background-color: var(--white);
  border: 1px solid var(--blue);
}

.pW-img {
  width: 100%;
  height: 53.325641vw;
}

.pW-description {
  color: var(--blue);
  font-size: 1.2rem;
  margin-block: 18px;
}

.pW-btnsContainer {
  display: flex;
  flex-direction: column;
}

.pW-project-link {
  position: relative;
  display: flex;
  width: 90%;
  align-self: center;
  justify-content: center;
  text-decoration: none;
  background: var(--white);
  color: var(--blue);
  border: 1px solid var(--blue);
  padding: 9px 15px;
  margin-bottom: 18px;
  font-weight: 600;
}

.live {
  background: url('images/icons/open-in-new-window-icon-DarkBlue.svg') 93% 50% no-repeat;
}

.live:visited {
  border: 1px solid var(--gray);
}

.source {
  background: url('images/icons/GitHub-Dark.svg') 93% 50% no-repeat;
}

.source:visited {
  border: 1px solid var(--gray);
}

.pW-nav-ul {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-top: 18px;
}

.pW-nav-ul li {
  width: fit-content;
}

.project-nav {
  border: none;
  background-color: var(--white);
}

/*********************** About ***********************/

#about {
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.about-title {
  margin: 18px 0;
}

#about p {
  margin-bottom: 27px;
}

.getCV {
  display: flex;
  justify-content: center;
}

.download {
  display: inline-block;
  position: relative;
  width: 30px;
  height: 30px;
  background: url("images/icons/download-icon-1.svg") 80% 50% no-repeat;
  margin-left: 1rem;
  transition: background 300ms ease-in-out;
}

.getCV:hover .download {
  background: url("images/icons/download-icon.svg") 80% 50% no-repeat;
}

.tech-cards-container {
  display: grid;
  list-style: none;
  margin-top: 27px;
}

.tech-card {
  display: flex;
  flex-direction: column;
  padding: 3rem;
  color: var(--white);
  margin-block: 9px;
  height: 300px;
}

.tech-card h2 {
  margin-bottom: 2rem;
}

.tech {
  display: flex;
  flex-direction: column;
  list-style: none;
  font-weight: 600;
}

.langs {
  background: #1c528a url("images/deco/about/lang.svg") 100% 100% no-repeat;
}

.frames {
  background: #e2505c url("images/deco/about/Frameworks.svg") 100% 100% no-repeat;
}

.skills {
  background: #febf52 url("images/deco/about/skills.svg") 100% 100% no-repeat;
}

/******************** Contact Form ******************************/

#contact {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #f9f9fa url("images/deco/mobile/nav-logo.svg") no-repeat;
  padding-block: 93px 36px;
}

#contact p {
  margin-inline: 18px;
}

form {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 18px;
}

.input-container {
  position: relative;
  background: var(--white);
  margin-block: 9px;
  border-radius: 4px;
  width: 100%;
}

.input-container label {
  position: absolute;
  top: 9px;
  left: 18px;
  color: var(--darkGray);
  display: flex;
  font-size: 0.7rem;
  font-weight: 400;
}

abbr {
  text-decoration: none;
}

.input-container input,
#msg {
  background: var(--white);
  width: 100%;
  border: 1px solid var(--input);
  padding: 30px 18px 9px 18px;
  border-radius: 4px;
  color: var(--blue);
  font-size: 1rem;
}

.msgLbl {
  display: none;
}

#msg {
  min-height: 111px;
  padding: 18px;
}

.input-container input:focus,
#msg:focus {
  outline: 2px solid var(--border);
}

/* Input Validation */
.input-container .green,
.input-container .green:focus {
  border: none;
  outline: 2px solid #50e263;
  outline-offset: -2px;
}

.input-container .red,
.input-container .red:focus {
  border: none;
  outline: 2px solid #e2505c;
  outline-offset: -2px;
}

.errMsgContainer {
  visibility: hidden;
  display: block;
  position: absolute;
  left: 0;
  bottom: -31px;
  background-color: #f9f9fa;
  padding: 0.3rem;
  border: 1px solid var(--gray);
  border-radius: 3px;
  color: #e2505c;
  font-size: 0.9rem;
  align-self: center;
  z-index: 1;
}

.showErr {
  visibility: visible;
}

button[type='submit']:disabled,
button[type='submit']:disabled:hover {
  border-color: var(--input);
  background-color: var(--input);
  color: var(--white);
  cursor: not-allowed;
}

button[type='submit']:disabled:hover::after {
  content: 'Please fill in all fields';
  position: absolute;
  display: block;
  border: 1px solid var(--gray);
  background-color: var(--white);
  color: var(--darkGray);
  padding: 9px;
  border-radius: 4px;
}

/*********************** Footer *******************************/

footer {
  background: var(--blue);
  display: flex;
  flex-direction: column;
}

.open {
  text-decoration: none;
  color: var(--border);
  margin: 2rem 1rem;
  width: fit-content;
  padding-right: 45px;
  background: url("images/icons/open-in-new-window-icon-LightBlue.svg") 100% 50% no-repeat;
  transition: transform 300ms ease-in-out;
}

.open:focus {
  outline: none;
  transform: scale(1.2);
}

.social-container {
  display: flex;
  margin: 0 1rem 1rem 1rem;
  justify-content: space-between;
}

.social-icon {
  display: inline-block;
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: transform 300ms ease-in-out;
}

.social-icon:hover,
.social-link:focus,
.social-link:focus .social-icon {
  transform: scale(1.5);
  border: none;
  outline: none;
}

.m {
  margin-top: 6px;
}

/******************************** Desktop ******************************************/

@media screen and (min-width: 768px) {
  .btnBlue {
    padding-inline: 9%;
    width: fit-content;
  }

  header {
    justify-content: center;
    border-bottom: 1px solid #e5e5e5;
  }

  /****** Nav Bar ******/
  .hide {
    display: none;
  }

  .mainNav {
    position: static;
    display: block;
    margin-right: 99px;
    top: 0;
    height: auto;
    background: #fff;
  }

  .mainNav.display {
    display: block;
  }

  .mainNav ul {
    position: relative;
    display: flex;
    flex-direction: row;
    top: 0;
    height: 75px;
    justify-content: center;
    align-items: center;
  }

  .nav-item {
    margin-inline: 18px;
  }

  /****** Headline *****/

  #headline {
    position: relative;
    display: flex;
    flex-direction: row;
    height: fit-content;
    padding: 0;
    justify-content: flex-end;
  }

  .headline-container {
    flex-direction: column;
    width: 45.6vw;
    height: 64.946341vw;
    padding-inline: 3vw 6vw;
    align-items: flex-start;
    justify-content: center;
    background: url("images/deco/desktop/eight_dots.svg") right bottom no-repeat;
    background-size: calc(52vw / 4);
  }

  .headline-title {
    font-size: 9vw;
    margin-bottom: 18px;
  }

  .headline-container a {
    font-size: 1.2rem;
    width: fit-content;
  }

  .headline-deco {
    position: relative;
    right: 0;
    width: 52vw;
    height: calc(52vw * 1.249);
    margin: 0;
    background: url("images/deco/desktop/image-geometry_1.svg") no-repeat;
    background-size: cover;
  }

  /***************** Projects *****************/

  #works {
    display: grid;
    position: relative;
    grid-template-areas:
      "title p1 p1 p1"
      "p2 cntr cntr p5p6"
      "p3 p3  rght rght"
      "lft lft p4 p4";
    width: 100%;
    min-height: auto;
    height: 103.5vw;
    margin-top: 9vw;
  }

  .project-image {
    height: 100%;
  }

  #works-title {
    grid-area: title;
    position: absolute;
    display: flex;
    left: 4.9vw;
    top: -6.45vw;
    transform: rotate(-90deg);
    font-size: 6vw;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: 36vw;
    margin: 0;
    padding-bottom: 9vw;
    background: url("images/deco/desktop/eight_dots.svg") bottom right no-repeat;
    background-size: 12.1527vw;
  }

  .project {
    position: relative;
  }

  .p1 {
    grid-area: p1;
    top: 0.27vw;
    right: -1vw;
    width: 65.4vw;
  }

  .p2 {
    grid-area: p2;
    top: 4.689vw;
    width: 32.4vw;
    height: 18.99vw;
    z-index: 1;
  }

  .p3 {
    grid-area: p3;
    top: 0.2vw;
    width: 54.85vw;
    height: 32.35vw;
  }

  .p4 {
    grid-area: p4;
    top: 0.09vw;
    left: -0.03vw;
    width: 32.292vw;
  }

  .p5,
  .p6 {
    grid-area: p5p6;
    width: 32.5vw;
    height: 18.99vw;
  }

  .p5 {
    top: 18vw;
    z-index: 2;
  }

  .p6 {
    top: 0.12vw;
  }

  .deco {
    position: relative;
    display: inline-block;
  }

  .center {
    grid-area: cntr;
    top: 0.24vw;
    height: 23.5vw;
    z-index: 1;
    background: url("images/deco/desktop/work-center-deco.svg") no-repeat;
    background-size: 34.2vw;
  }

  .right {
    grid-area: rght;
    position: relative;
    top: 0.18vw;
    left: -0.05vw;
    width: 44.27vw;
    background: url("images/deco/desktop/work-right-deco.svg") bottom left no-repeat;
    background-size: contain;
  }

  .left {
    grid-area: lft;
    top: 0.18vw;
    width: 54.87vw;
    z-index: 1;
    background:
      url("images/deco/desktop/work-left-deco.svg") top left no-repeat,
      url("images/deco/desktop/single_drop.svg") top right no-repeat;
    background-size: 14.65vw 8.61vw, 6.04vw;
  }

  /*** Thumbnail ***/

  .project-description {
    position: absolute;
    bottom: 0;
    width: 100%;
    max-height: 100%;
    transform: scaleY(0);
    transform-origin: 0 100%;
    transition-duration: 360ms;
    transition-timing-function: ease-in-out;
    transition-property: transform, transform-origin;
  }

  .project:hover .project-description,
  .project:focus .project-description {
    transform: scaleY(1);
    transform-origin: 0 100%;
    z-index: 3;
  }

  .project-title {
    font-size: 1.44rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .tech-container {
    margin-block: 9px;
  }

  .tech-item {
    white-space: nowrap;
  }

  .tech-item:nth-of-type(3) {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .seeProjBtn {
    width: 198px;
    font-size: 1rem;
    padding: 9px 6px 9px 15px;
  }

  /************* PpoUp Window *****************/

  .close-pW {
    font-size: 2.4rem;
    border: 2px solid var(--white);
  }

  .close-pW:focus {
    outline: none;
    border: 2px solid var(--border);
  }

  .pW-title {
    width: fit-content;
    font-size: 3rem;
    margin-block: 0 3px;
  }

  .pW-img {
    width: 75%;
    height: auto;
    margin-inline: auto;
  }

  .pW-tech-container {
    font-size: 1.2rem;
    margin-block: 12px;
  }

  .pW-description {
    align-self: center;
    width: 70%;
    color: #1a2236;
  }

  .pW-btnsContainer {
    flex-direction: row;
    align-self: center;
    justify-content: space-around;
    width: 60%;
  }

  .pW-project-link {
    width: 21vw;
    margin: 9px;
    justify-content: left;
    cursor: pointer;
  }

  .live,
  .source {
    transition: all 300ms ease-in-out;
  }

  .live:hover,
  .live:focus {
    color: var(--white);
    background: url('images/icons/open-in-new-window-icon-LightBlue.svg') 93% 50% no-repeat var(--blue);
    border-color: var(--blue);
    transition: all 300ms ease-in-out;
  }

  .live:active {
    border: 1px solid var(--gray);
  }

  .source:hover,
  .source:focus {
    color: var(--white);
    background: url('images/icons/github-icon.svg') 93% 50% no-repeat var(--blue);
    border-color: var(--blue);
    transition: all 300ms ease-in-out;
  }

  .source:active {
    border: 1px solid var(--gray);
  }

  .prev-next-cont {
    display: block;
    margin: 1rem 0;
    width: 90%;
    align-self: center;
  }

  .project-nav {
    font-size: 1.2rem;
    cursor: pointer;
  }

  .pW-prev-btn {
    padding-left: 30px;
    background: url('images/icons/arrow-prev.svg') 0 50% no-repeat;
    background-size: 18px;
    border: 2px solid var(--white);
    transition: border 300ms ease-in-out;
  }

  .pW-prev-btn:focus {
    border: 2px solid var(--border);
  }

  .pW-next-btn {
    padding-right: 30px;
    background: url('images/icons/arrow-black.svg') 100% 50% no-repeat;
    background-size: 18px;
    border: 2px solid var(--white);
    transition: border 300ms ease-in-out;
  }

  .pW-next-btn:focus {
    border: 2px solid var(--border);
  }

  /********* About *************/

  #about {
    flex-direction: row-reverse;
    padding: 6vw;
    justify-content: space-between;
  }

  #about > div {
    flex: 1;
    padding-left: 3vw;
  }

  #about h1 {
    margin: 1.2vw 0;
    font-size: 6.3vw;
  }

  #about p {
    font-size: 1rem;
  }

  .getCV {
    width: fit-content;
    font-size: 1.2rem;
    padding: 9px 27px;
  }

  .tech-cards-container {
    flex: 1.2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 100%;
    margin: 0;
    padding-inline: 3vw;
  }

  .tech-card {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 15%;
    font-size: 1.2vw;
    background-size: 30%;
  }

  .tech-card h2 {
    margin-bottom: 1rem;
  }

  .about-deco {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: url("images/deco/desktop/about-deco.svg") bottom right no-repeat;
    background-size: 70%;
  }

  /********* Contact ****************/

  #contact {
    background:
      url("images/deco/desktop/form-deco-1.svg") top left no-repeat,
      url("images/deco/desktop/form-deco-2.svg") bottom right no-repeat,
      #f9f9fa;
    background-size: 18.26vw, 24.3vw;
    padding: 9vw 24.3vw;
  }

  #contact h1 {
    font-size: 7.2vw;
  }

  form {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #form_Ul {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }

  .input-container {
    background: none;
    width: 48%;
  }

  .input-container label {
    position: relative;
    top: 0;
    left: 0;
    margin-block: 3px;
  }

  .input-container input {
    width: 100%;
    padding: 15px 9px;
  }

  .showErr {
    bottom: auto;
    top: 100%;
  }

  .msgLbl {
    display: flex;
    align-self: flex-start;
    color: var(--darkGray);
    font-size: 0.7rem;
    font-weight: 400;
    margin-block: 6px;
  }

  .msg-container {
    width: 100%;
    margin-bottom: 18px;
  }

  textarea {
    height: 12vw;
  }

  /*********** Footer *****************/

  footer {
    flex-direction: row;
    justify-content: space-around;
  }

  .open {
    font-size: 1.2rem;
  }

  .social-container {
    width: 36%;
    margin: 1rem;
    align-items: center;
  }
}
