/*
Colors Used:
Outer Space: #3E4348 (background)
White: #fff (main text)
Carrot Orange: #f19a3e (links)
Indian Red: #db5461 (pop color 1)
Celestial Blue: #008dd5 (pop color 2)
*/
:root {
  --primary-color: #357b70;
  --secondary-color: #e0b354;
  --dark-grey: #2b2b2b;
}

body {
  background-color: #3E4348;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 16px;
  /* Sets the font size to 16px */
  line-height: 1.6;
  /* Sets the line-height to 1.6 */
}

* {
  box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Abril Fatface', serif;
  font-size: 30px;
  font-weight: 400;
}

h2 {
  font-size: 24px;
  font-weight: 400;
}

h3 {
  font-size: 18px;
  font-weight: 400;
}

a {
  color: #f19a3e
}

a:visited {
  /* visited link */
  color: #f19a3e;
}

a:hover,
a:focus {
  /* No underlining when hovering over a link */
  text-decoration: none;
}

a:active {
  /* selected link */
  color: #eead66;
}

button,
.button {
  /* overwrites browser defaults and resets the border */
  border: none;
  display: inline-block;
  /* takes the font from the outer container */
  font-family: inherit;
  /* styles the background color, font color, and text decoration (underline, etc.) of the button */
  background-color: #f19a3e;
  color: white;
  text-decoration: none;
  /*adds spacing to the button (this will be discussed more in-depth later) */
  padding: 10px;
  border-radius: 3px;
  /* gives the button a bottom border with a width of 2px, a type of solid, and a color in RGBA format */
  border-bottom: 2px solid rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s;
}

button:hover,
button:focus,
.button:hover,
.button:focus {
  /* lets the mouse appear as a hand when hovering over the button*/
  cursor: pointer;
  /* reduces the opacity of the button to 80% */
  opacity: 0.8;
}

.button_secondary {
  background-color: #db5461;
  color: #2b2b2b;
}

.navigation-list__item--active {
  text-decoration: none;
}

/* HOME PAGE STYLES */

/* Header Styles */
.page-header {
  display: flex;
  width: 100%;
  padding: 20px;
}

.page-header__item {
  flex: 0 1 200px;
}

/* Navigation Animation 
.navigation-list__item:before,
.navigation-list__item:after {
  position: absolute;
  left: 0px;
  width: 30%;
  height: 2px;
  background: #05676e;
  content: "";
  opacity: 1;
  transition: all 0.3s;
}

.navigation-list__item:before {
  top: 0px;
  transform: translateY(10px);
}

.navigation-list__item:after {
  bottom: 0px;
  transform: translateY(-10px);
}

.navigation-list__item:hover:before,
.navigation-list__item:hover:after {
  opacity: 1;
  transform: translateY(0px);
}

/* end navigation animation */

.page-header__item:last-child {
  flex-grow: 1;
  text-align: right;
}

.navigation-list {
  list-style-type: none;
}

.navigation-list li {
  display: inline-block;
  margin-left: 15px;
}

/* Profile Styles */
.profile {
  max-width: 700px;
  margin: 0 auto;
}

.profile__portrait {
  float: left;
  width: 250px;
  margin-right: 40px;
  border-radius: 50%;
}

/* Footer Styles */
.page-footer {
  clear: both;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.page-footer ul {
  list-style: none;
  padding-left: 0;

}

.page-footer li {
  display: inline-block;
}

/* ABOUT STYLES */
.about-content {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
}

.about-content li {
  list-style: none;
}

.sun {
  animation: 4s color-change infinite alternate linear;
}

@keyframes color-change {
  0% {
    fill: #edc655;
  }

  50% {
    fill: #fcffad;
  }

  100% {
    fill: #f76414;
  }
}

.cloud-front {
  animation: 30s cloud-move infinite alternate linear;
}

@keyframes cloud-move {
  from {
    transform: translate(0, 50px);
  }

  to {
    transform: translate(200px, 50px);
  }
}

.cloud-back {
  animation: 34s cloud-move-reverse infinite alternate linear;
}

@keyframes cloud-move-reverse {
  from {
    transform: translate(446px, 48px);
  }

  to {
    transform: translate(100px, 48px);
  }
}

/* WORK STYLES */

.grid__item a {
  color: #008dd5;
}

.grid__item a:visited {
  color: #008dd5;
}

/* start grid fallback */
.grid__item {
  padding: 20px;
  display: inline-block;
  width: 33%;
}

/* end grid fallback */

@supports (display: grid) {
  .grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 20px;
    margin: 0;
  }

  .grid__item {
    background-color: darkgray;
    width: auto;
    min-height: auto;
    margin: 0;
    transition: transform 0.2s ease;
    /* Add a smooth transition for the transform property */
  }

  /* Define the hover effect */
  .grid__item:hover {
    transform: scale(1.05);
    /* Increases the size by 5% on hover */
    cursor: pointer;
    /* Change the cursor to a pointing hand */
  }

  .grid__item:last-child {
    grid-column: 3 / 3;
    grid-row: 1 / 3;
  }
}

@media all and (max-width: 500px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media all and (min-width: 500px) and (max-width: 750px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media all and (max-width: 750px) {
  .grid {
    grid-gap: 10px;
  }

  .grid__item:last-child {
    grid-column: auto / auto;
    grid-row: auto / auto;
  }

  h1 {
    font-size: 22px;
  }
}