/* set colors */
:root {
  --main-white: white;
  --main-red: linear-gradient(40deg, #eb1111 10%, #240e3a 100%);
  --main-gray: linear-gradient(90deg, #1362b1 10%, #240e3a 100%);
  --main-gold: gold;
}

/* all base reset */
* {
  margin: 0;
  padding: 0;
}

html {
  box-sizing: border-box;
  /* Set font-size to rem calculation:
  default=16px; 1rem=10px; 100%=16px; (100%/16px)*10=62.5%, 1rem=10px=62.5% */
  font-size: 62.5%;
  /* scrolls in a smooth fashion*/
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* media query to set font size for different screen size. rem is more relative for size value of the document. As an example I used 992px or em unit for breakpoints (992px/16px=62em) */
@media (max-width: 62em) {
  html {
    font-size: 60%;
  }
}

/* 1220px/16px=76.25em */
@media (max-width: 76.25em) {
  html {
    font-size: 66%;
  }
}

/* 480px/16px=30em */
@media (max-width: 30em) {
  html {
    font-size: 29%;
  }
}

/* base styles for body */

body {
  font-family: 'Times new roman', serif;
  font-size: 2rem; /*or 20px */
  font-weight: 500;
  line-height: 1.5;
  color: var(--main-white);
}

h1, h2 {
  font-family: 'italic', sans-serif;
  font-weight: 900;
  text-align: center;
}

h1 {
  font-size: 7rem;
}

h2 {
  font-size: 4rem;
}

ul {
  list-style: none;
}

a {
  color: var(--main-white);
}

img {
  display: block;
  width: 100%;
}

/* set nav options */

.nav {
  display: flex;
  justify-content: flex-end;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--main-red);
  box-shadow: 2px 10px 30px rgba(5, 5, 5, 0.3);
  z-index: 1;
}

.nav-list {
  display: flex;
  margin-right: 6rem;
}

@media (max-width: 28.75em) {
  .nav {
    justify-content: center;
  }
  .nav-list {
    margin: 0 1rem;
  }
}

.nav-list a {
  display: block;
  font-size: 2.2rem;
  padding: 2rem;
}

/* Welcome section */

.welcome-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  text-align: center;
  background-color: #000;
  background-image: linear-gradient(90deg, #1362b1 10%, #240e3a 100%);
}

.welcome-section > p {
  font-size: 6rem;
  font-weight: 900;
  font-style: italic;
  color: var(--main-red);
}

/* Projects section */

.projects-section {
  text-align: center;
  padding: 10rem 2rem;
  background-image: url(https://aliakseimazheika.github.io/Personal_Portfolio_Webpage/office.jpg);
  background-size: cover;
}

.projects-section-header {
  max-width: 900px;
  margin: 0 auto 5rem auto;
  border-bottom: 1rem solid var(--main-white);
}

@media (max-width: 28.75em) {
  .projects-section-header {
    font-size: 5rem;
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 4rem;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  margin-bottom: 5rem;
}

@media (max-width: 31.25em) {
  .projects-section {
    padding: 6rem 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project {
  background: var(--main-gray);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  border-radius: 2px;
}

.code {
  color: var(--main-gold);
  transition: margin-right 0.4s ease-out;
}

.project:hover .code {
  color: #ff7f50;
}

.project-image {
  height: calc(100% - 7rem);
  width: 100%;
  object-fit: cover;
}

.project-title {
  font-size: 2rem;
  padding: 2rem 1rem;
}

.btn {
  display: inline-block;
  padding: 2rem 3rem;
  border-radius: 4px;
}

.btn-show-all {
  font-size: 2rem;
  background: var(--main-gold);
  transition: margin-left 0.3s ease-in-out;
}

.btn-show-all:hover {
  background: var(--main-red);
}

/* Contact section */

.contact-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 70vh;
  padding: 0 2rem;
  background: var(--main-gray);
}

.contact-section-header > h2 {
  font-size: 5rem;
}

@media (max-width: 28.75em) {
  .contact-section-header > h2 {
    font-size: 5rem;
  }
}

.contact-section-header > p {
  font-style: Georgia;
}

.contact-links {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1000px;
  margin-top: 4rem;
  flex-wrap: wrap;
}

.contact-details {
  font-size: 2.4rem;
  text-shadow: 2px 2px 1px #ce1313;
  transition: transform 0.3s ease-out;
}

.contact-details:hover {
  transform: translateY(8px);
}

/* Footer */

footer {
  font-weight: 300;
  display: flex;
  justify-content: space-evenly;
  padding: 2rem;
  background: var(--main-gray);
  border-top: 4px solid var(--main-red);
}

footer > p {
  margin: 2rem;
}

footer i {
  vertical-align: middle;
}

@media (max-width: 28.75em) {
  footer {
    flex-direction: column;
    text-align: center;
  }
}
