/* = Challenge by freeCodeCamp. 
    == Coded by Ievgeniia Abdulina. */

/* Main page styles rules */

/* === VARIABLES === */

:root {
    /* = FONTS = */
    --text-font-family: 'Noto Sans', sans-serif;
    --sub-title-font-family: 'Poppins', sans-serif;
    --title-font-family: 'Space Grotesk', sans-serif;
  
    /* = COLORS = */
    --main-color: #032d60;
    --secondary-color: #0176d3;
    --light-blue-color: #90d0fe; 
    --light-bg-color: #e8f2fe;
    --light-purple-color: #c2adfa;
    --black-color: #000;
    --white-color: #fff;
    --grey-color: #767676;
    --pink-color: #C701D3;
  }
  
  /* === MAIN PAGE STYLE === */
  
  *, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    width: 100vw;
    height: 100%;
    font-family: var(--text-font-family), sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--black-color);
    overflow-x: hidden;
    scroll-behavior: smooth;
    background: 
      linear-gradient(90deg, var(--light-bg-color) 21px, transparent 1%) center,
      linear-gradient(var(--light-bg-color) 21px, transparent 1%) center,
      var(--main-color);
    background-size: 22px 22px;
  }
  
  .main-container {
    height: auto;
    margin: 0 auto;
    margin-top: 70px;
  }
  
  @media screen and (max-width: 600px) {
    .main-container {
      margin-top: 190px;
    }
  }
  /* ------------------------------ */
  
  
  
  /* === NAVBAR SECTION STYLE === */
  
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 70px;
    font-family: var(--title-font-family);
    padding: 10px 20px;
    background-color: var(--white-color);
    color: var(--black-color);
    border-bottom: 1px solid var(--black-color);
    z-index: 999;
  }
  
  .header-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }
  
    /* --- profile style --- */
  
  .profile {
    display: flex;
    align-items: center;
  }
  
  .profile > img {
    width: 48px;
    height: 48px;
    margin-right: 20px;
    border-radius: 50%;
    background-color: var(--white-color);
    border: 1px solid var(--grey-color);
  }
  
  .profile-name > h1 {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
  }
  
  .profile-name > p {
    font-size: 0.85rem;
    font-weight: 400;
  }
  
    /* --- nav-bar style --- */
  
  nav > ul {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
  }
  
  nav > ul > li {
    margin-left: 20px;
  }
  
  nav a {
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    padding: 10px;
    color: var(--black-color);
  }
  
  nav a:hover {
    background-color: var(--black-color);
    border-radius: 4px;
    color: var(--white-color);
  }
  
  @media only screen and (max-width: 600px) {
  
    header {
      height: auto;
    }
  
    .header-container {
      justify-content: center;
    }
  
    .profile {
      width: 100%;
    }
  
    nav {
      width: 100%;
    }
  
    nav > ul {
      margin-top: 20px;
      display: flex;
      flex-direction: row;
      justify-content: space-evenly;
      align-items: center;
    }
  
    nav > ul > li {
      margin: 5px 0;
    }
  
    nav a {
      padding: 10px;
    }
  }
  /* ------------------------------ */
  
  
  
  /* ===  WELCOME SECTION STYLE === */

  .welcome-section {
    max-width: 1100px;
    height: 500px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  
  .wrap-title {
    flex: 1;
    order: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .wrap-img {
    flex: 1;
    order: 2;
  }

  .wrap-title > h1 {
    font-family: var(--sub-title-font-family), sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
  }

  .wrap-title > p {
    font-family: var(--sub-title-font-family);
    font-size: 1.75rem;
    font-weight: 400;
    font-style: italic;
    color: var(--light-purple-color);
  }

  @media only screen and (max-width: 600px) {
    .welcome-section {
      flex-direction: column;
      height: auto;
      padding: 20px;
    }
  
    .wrap-title > h1 {
      text-align: center;
      font-size: 2rem;
    }

    .wrap-title > p {
      text-align: center;
      font-size: 1.5rem;
    }

    .wrap-title {
      flex: 1 auto;
      order: 2;
    }

    .wrap-img {
      width: 100%;
      order: 1;
    }
  }

  @media only screen and (max-width: 780px) {
    .wrap-title > h1 {
      font-size: 1.75rem;
    }

    .wrap-title > p {
      font-size: 1.5rem;
    }
  }
   
  @media only screen and (max-width: 1100px) {
    .welcome-section {
      padding: 20px;
    }
  }
  
  /* ------------------------------ */
  
  
  
  /* === PROJECTS SECTION STYLE === */
  
  .projects-section {
    width: calc(100vw - 40px);
    max-width: 1100px;
    height: auto;
    margin: 0 auto;
  }
  
  .projects-section > h2 {
    font-family: var(--sub-title-font-family), sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--main-color);
    line-height: 4rem;
    text-align: center;
    padding-top: 100px;
  }
  
  @media only screen and (max-width: 600px) {
    .projects-section > h2 {
      font-size: 2rem;
      line-height: 2rem;
      /* padding-top: 240px; */
      padding-top: 60px;
    }
  }
  
  .projects-grid {
    width: 100%;
    height: auto;
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: calc((100% - (31.5% * 3)) / 3);
  } 
  
  @media only screen and (max-width: 900px) {
    .projects-grid {
      gap: calc((100% - (43% * 2)) / 2);
    }
  }
  
  .project-tile {
    height: 100%;
    min-height: 280px;
    min-width: 280px;
    flex: 0 0 31.5%;
    margin: 2rem 0.2rem;
  }
  
  .tile-panel {
    position: relative;
    height: 100%;
    min-height: 280px;
    min-width: 280px;
    border-radius: 8px;
    padding-left: 20px;
    background: transparent;
  }
  
  .tile-panel::before {
    content: "";
    display: block;
    position: absolute;
    width: 95%;
    height: 100%;
    border-radius: 8px;
    background-color: var(--main-color);
    transform: translate(-30px, 40px);
    z-index: -1;
  }
  
  @media only screen and (max-width: 900px) {
    .tile-panel::before {
      width: 100%
    }
  }
  
  .panel-inner {
    position: relative;
    height: 100%;
    min-height: 280px;
    min-width: 280px;
    border-radius: 8px;
    background-color: transparent;
    cursor: pointer;
  }
  
  .panel-front {
    height: 100%;
    min-height: 340px;
    position: relative;
    padding: 20px 15px;
    border: 1px solid var(--main-color);
    border-radius: 8px;
  }
  
  .project:nth-child(even) .panel-front {
    background-color: var(--light-blue-color);
  }
  
  .project:nth-child(odd) .panel-front:nth-child(odd) {
    background-color: var(--light-purple-color)
  } 
  
  .project img {
    position: relative;
    object-fit: cover;
    border: 1px solid var(--main-color);
    border-radius: 4px;
    width: 100%;
    height: 200px;
    transition: .3s 0s;
  }
  
  .visit {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    right: 0px;
    left: 0px;
    top: 35%;
    width: 100%;
    margin: auto;
    color: var(--white-color);
    z-index: 100;
    opacity: 0;
    transform: translate3d(0, -50%, 0);
    transition: .3s 0s;
  }

  .project:hover .visit {
    font-size: 1rem;
    opacity: 1;
    transition: .6s .3s;
  }

  .project:hover img {
    filter: brightness(50%);
  }

  .project-link {
    display: flex;
    align-items: baseline;
    text-decoration: none;
    color: var(--main-color);
  }

  .project-link span {
    margin-left: auto;
    transform: translateY(4px);
  }

  
.tooltip-text {
  visibility: hidden;
  position: absolute;
  text-align: center;
  z-index: 1;
  color: var(--white-color);
  font-size: 14px;
  background-color: var(--black-color);
  border-radius: 4px;
  padding: 10px 15px 10px 15px;
}
.hover-item:hover .tooltip-text {
  visibility: visible;
}
#bottom {
  top: 266px;
  right: 16px;
}

.project-link:hover {
    color: var(--secondary-color);
  }
  
  .panel-front:hover {
    box-shadow: 0px 0px 8px 0px rgba(66, 68, 90, .5);
    transition: transform .3s ease-out;
    transform: translate(0, -4px);
  }
  
  .project p {
    font-family: var(--sub-title-font-family);
    font-size: 1.5rem;
    font-weight: 700;
    padding: 10px 0;
  }
  
  @media only screen and (max-width: 900px) {
  .project p {
    font-size: 1rem;
  }
  
  .panel-front {
    min-height: 280px;
  }
  }
  
  /* ------------------------------ */
  
  
  
  /* === CONTACT SECTION STYLE === */
  
  .contact-section {
    width: 100%;
    height: auto;
    margin: 0 auto;
    margin-top: 60px;
    padding: 0 20px;
    border-top: 1px solid var(--black-color);
    border-bottom: 1px solid var(--black-color);
    background-color: var(--white-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .contact-section-header {
    width: 100%;
    padding: 40px 0;
    text-align: center;
  }
  
  .contact-section-header > h2 {
    font-family: var(--sub-title-font-family), sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--main-color);
    line-height: 4rem;
  }
  
  .contact-section-header > p {
    font-family: var(--sub-title-font-family);
    font-size: 1.5rem;
    font-weight: 200;
    font-style: italic;
    color: var(--pink-color);
  }
  
  @media only screen and (max-width: 600px) {
    .contact-section-header {
      padding-top: 14rem;
    }
  
    .contact-section-header > h2 {
      font-size: 2rem;
      line-height: 2rem;
    }
  
    .contact-section-header > p {
      font-size: 1rem;
      line-height: 3rem;
    }
  }
  
  .contact-section-links {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-bottom: 60px;
  }
  
  #contact .link {
    margin: 0 20px;
  }
  
  #contact a {
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--main-color);
  }
  
  #contact a:hover {
    color: var(--pink-color);
  }
  
  .contact-section-links > .link:hover {
    transition: transform 0.5s ease-out;
    transform: translateY(4px);
  }
  
  #contact .link i {
    width: 24px;
    height: 24px;
    text-align: center;
    font-size: 1.5rem;
    margin-right: 5px;
  }
  
  @media only screen and (max-width: 600px) {
    .contact-section-links {
      flex-direction: column;
    }
  
    #contact .link {
      margin: 10px 0;
    }
  }
  /* ------------------------------ */
  
  
  
  /* === FOOTER SECTION STYLE === */
  
  footer {
    width: 100vw;
    height: auto;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    color: var(--grey-color);
    font-family: var(--text-font-family);
    font-size: 0.8rem;
    line-height: 2rem;
    background: var(--white-color);
  }
  
  footer a {
    color: var(--pink-color);
    font-weight: 700;
  }

  .attribute-img {
    font-weight: 400;
    color: var(--grey-color);
  }
  
  footer a:hover {
    color: var(--secondary-color);
  }
  
  @media only screen and (max-width: 900px) {
    footer {
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      padding: 2rem;
    }
  }
  /* ------------------------------ */