/* base reset */
* {
  margin: 0;
  padding: 0;
}

/* box-sizing and font sizing */
*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;

  /* Set font size for easy rem calculations
   * default document font size = 16px, 1rem = 16px, 100% = 16px
   * (100% / 16px) * 10 = 62.5%, 1rem = 10px, 62.5% = 10px
  */
  font-size: 62.5%;
  scroll-behavior: smooth;
}

/* Base styles */

body {
  font-family: "Poppins", sans-serif;
  font-size: 1.8rem; /* 18px */
  font-weight: 400;
  line-height: 1.4;
  color: #fff;
}

h1,
h2 {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  text-align: center;
}

h1 {
  font-size: 6rem;
}

h2 {
  font-size: 4.2rem;
}

ul {
  list-style: none;
}

a {
  color: #fff;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

/* nav */

.nav {
  display: flex;
  justify-content: center;
  position: fixed;
  width: 100%;
  background: #000;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.nav-list {
  display: flex;
  align-items: center;
}

.nav-list a {
  display: block;
  font-size: 3rem;
  padding: 1rem 1rem;
}

.nav-list li {
  margin: 0rem 1rem;
}
/* Welcome section */

.welcome-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  background-color: #000;
  background-image: linear-gradient(
    180deg,
    #000 50%,
    #00000e 55%,
    #00001c 60%,
    #00002a 65%,
    #000038 70%,
    #000046 75%,
    #000053 80%,
    #000061 85%,
    #00006f 90%,
    #00007d 95%,
    #00008b 100%
  );
}

.welcome > p {
  font-size: 3rem;
  font-weight: 300;
  font-style: italic;
  text-align: center;
  text-shadow: 0px 0px 15px rgba(255, 255, 255, 1);
}
.welcome-links {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 10%;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #fff;
}
.welcome-links > a {
  font-size: 3rem;
  margin: 0.5rem 2rem 0.5rem 1rem;
}

@media (max-width: 560px) {
}

/* Projects section */

.projects-section {
  text-align: center;
  padding: 10rem 2rem;
  background: #eee;
  border-top: 1px solid #000;
}

.projects-section-header {
  max-width: 640px;
  margin: 0 auto 6rem auto;
  border-bottom: 0.2rem solid #000;
  color: #000;
}

@media (max-width: 520px) {
  .projects-section-header {
    font-size: 3rem;
    margin: 0rem auto 3rem auto;
  }
  .welcome > p {
    font-size: 2rem;
  }
  .welcome-links > a {
    font-size: 2.7rem;
    margin: 0.7rem 1rem 0.5rem 0.9rem;
    width: 7%;
  }
  .nav-list a {
    font-size: 2.7rem;
  }
  .nav-list li {
    margin: 0rem 0.5rem;
  }
  h1 {
    font-size: 4.5rem;
  }
}

@media (max-width: 400px) {
  h1 {
    font-size: 3.7rem;
  }
  .welcome > p {
    font-size: 1.7rem;
  }
  .welcome-links > a {
    font-size: 2.5rem;
    margin: 0.5rem 0.7rem 0rem 0.5rem;
    width: 8%;
  }
  .nav-list a {
    font-size: 2.3rem;
  }
  .projects-grid > a > p {
    font-size: 1.5rem;
  }
  .btn-show-all {
    font-size: 1.5rem;
  }
}

@media (max-width: 320px) {
  h1 {
    font-size: 3.3rem;
  }
  .welcome > p {
    font-size: 1.5rem;
  }
  .welcome-links > a {
    font-size: 2.2rem;
    margin: 0.5rem 0.5rem 0rem 0.6rem;
    width: 8%;
  }
  .nav-list a {
    font-size: 2rem;
  }
}

/* "Automagic" image grid using no media queries */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 6rem;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  margin-bottom: 6rem;
}

@media (max-width: 30em) {
  .projects-section {
    padding: 6rem 3rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project {
  background: #000;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.6);
  border-radius: 2px;
  border: 2px solid #000;
}

.code {
  color: #000;
  transition: color 0.5s ease-out;
}

.project:hover .code {
  color: #fff;
}

.project-image {
  height: calc(100% - 6rem);
  width: 100%;
  object-fit: cover;
}

.project-title {
  font-size: 2rem;
  padding: 2rem 0rem;
}

.btn {
  margin: 1rem 0rem -1rem 0rem;
  display: inline-block;
  padding: 1.5rem 3rem;
  border-radius: 5px;
}

.btn-show-all {
  background: #000;
}

.btn-show-all > i {
  margin-left: 10px;
  transform: translateX(0);
  transition: transform 0.5s ease-out;
}

.btn-show-all:hover > i {
  transform: translateX(5px);
}

/* Contact section */

.contact-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 100vh;
  background: #eee;
  color: #000;
}

.contact-section-header > h2 {
  font-size: 6rem;
  padding-top: 8rem;
  border-top: 4px solid #000;
}

.contact-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 5rem 0rem;
}

@media (max-width: 640px) {
  .contact-section-header > h2 {
    padding-top: 8rem;
    font-size: 5rem;
  }
  .contact-links {
    width: 65%;
  }
}

@media (max-width: 520px) {
  .contact-section-header > h2 {
    padding-top: 6rem;
    font-size: 4rem;
  }
  .contact-links {
    flex-direction: column;
  }
}

.contact-details {
  font-size: 2rem;
  text-shadow: 1px 1px 1px #000;
  transition: transform 0.3s ease-out;
  color: #000;
  padding: 1rem 2rem;
}

.contact-details:hover {
  transform: translateY(8px);
}

/* Footer */

footer {
  display: flex;
  justify-content: space-evenly;
  text-align: center;
  background: #eee;
  color: #000;
  border-top: 4px solid #000;
  margin-top: -12rem;
}

footer > p {
  margin-top: 3rem;
  font-weight: 700;
}

@media (max-width: 420px) {
  footer > p {
    font-size: 1.4rem;
  }
  .contact-section-header > h2 {
    font-size: 3rem;
  }
}

@media (max-width: 320px) {
  footer > p {
    font-size: 1.3rem;
  }
  .contact-section-header > h2 {
    font-size: 3rem;
  }
}
