@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800&display=swap');

/* Box sizing rules & Remove default margin */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul,
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  position: relative;
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 28px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--neutral-dark-grayish-blue);
  background-color: var(--neutral-off-white);
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

:root {
  --primary-soft-orange: hsl(35, 77%, 62%);
  --primary-soft-red: hsl(5, 85%, 63%);
  --neutral-off-white: hsl(36, 100%, 99%);
  --neutral-grayish-blue: hsl(233, 8%, 79%);
  --neutral-dark-grayish-blue: hsl(236, 13%, 42%);
  --neutral-dark-blue: rgb(0, 0, 26);
}

.hidden{
  display: none;
}

body::after{
  content: '';
  transition: all 0.5s ease-in-out;
}

body.blur::after {
  position: fixed;
  top:0;
  width: 100vw;
  height: 100%;
  background-color: rgba(0, 0, 26, 0.55);
}

.container {
  padding: 2rem 1rem;
  max-width: 720px;
  margin: auto;
}

header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.logo {
  width: 3rem;
}

.toggle-btn {
  background-color:transparent;
  border: none;
  cursor: pointer;
}
.menu-btn{
  transition: all 0.3s ease-in-out;
}

.menu-btn:hover{
  transform: scale(1.2);
}

#nav {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  top: 0;
  right: -100%;
  height: 100vh;
  width: 60vw;
  padding: 1rem 1.5rem;
  background-color: var(--neutral-off-white);
  z-index: 5;
  transition: all 0.5s ease-in-out;
}

#nav.show{
  right: 0;
}

.close-btn {
  padding-top: 1rem;
  align-self: flex-end;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

#nav ul{
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

a{
  font-family: inherit;
  text-decoration: none;
  color: inherit;
}

nav a:hover{
  color: var(--primary-soft-red) ;
}

main{
  display: grid;
  grid-template-rows: auto;
  gap: 1.25rem;
  margin-bottom: 4rem;
}

h1{
  font-size: 2.5rem;
  line-height: 40px;
}

h1, .container > section h3{
  color: var(--neutral-dark-blue);font-weight: 800;
}

.btn{
  display: inline-block;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 5px;
  color: #ffffff;
  margin: 1.5rem 0;
  padding: 0.6rem 2rem;
  background-color: var(--primary-soft-red);
}

.btn:hover {
  color: #ffffff;
  background-color: var(--neutral-dark-blue);
}

main section{
  display: grid;
  grid-template-rows: auto;
  gap: 1.5rem;
  background-color: var(--neutral-dark-blue);
  color: var(--neutral-grayish-blue);
  font-weight: 400;
  padding: 1rem 1.2rem ;
}

h2{
  color: var(--primary-soft-orange);
  font-size: 2rem;
  align-self: center;
}

main > section h3{
  color: var(--neutral-off-white);
  padding-bottom: 0.5rem;
  font-weight: 800;
}

main > section a:hover{
  color: var(--primary-soft-orange);
}

main section  :not(h2, h3, :last-child){
  border-bottom: 1px solid var(--neutral-dark-grayish-blue) ;
  padding-bottom: 1rem;
}

.container > section{
  display: grid;
  grid-template-rows: auto;
  gap: 2rem;
  margin-bottom: 3rem;
}

.container > section > div{
  display: flex;
  gap: 1rem;
}

.container > section > div > img{
  width: 100px;
}

.container > section > div > div{
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

span {
  margin-bottom: 0.75rem;
  font-size: 36px;
  color: var(--neutral-grayish-blue);
  font-weight: 700;
}

.container > section > div a:hover, .attribution > a:hover{
  color:var(--primary-soft-red) ;
}

footer{
  position: absolute;
  width: 100%;
  max-width: 100vw;
  margin: auto;
  text-align: center;
  bottom: 0;
}

@media (min-width:1000px){
  body{
    line-height: 24px;
  }
  .container{
    max-width: 1024px;
    padding-top: 5rem;
  }
  header {
    margin-bottom: 3rem;
  }
  .toggle-btn {
    display: none;
  }
  #nav{
    position: relative;
    top: 0;
    right: 0;
    width: auto;
    height: auto;
  }
  #nav ul{
    flex-direction: row;
  }
  main{
    grid-template-columns: repeat(3, 1fr) ;
    /* grid-template-rows: repeat(1fr, 3); */
    grid-template-rows: auto;
    column-gap: 1.5rem;
    row-gap: 2.5rem;
  }
  picture{
    grid-column: 1 / span 2;
    grid-row: 1 / span 1;
  }
  h1{
    font-size: 3.5rem;
    line-height: 52px;
    grid-column: 1 / span 1;
    grid-row:2/ span 2 ;
    align-self: center;
  }
  main > div{
    grid-column: 2 / span 1;
    grid-row:2/ span 2 ;
    align-self: flex-end;
  }
  .btn {
    margin-bottom: 0;
  }
  main > section{
    padding: 1rem 1.2rem 0.5rem;
    width: 327px;
    grid-column: 3 / span 1;
    grid-row: 1 / span 3;
  }
  main section  :not(h2, h3, :last-child){
    padding-bottom: 0rem;
  }
  .container > section {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    column-gap: 0.7rem;
  }
  .container > section > div > img{
    width: 90px;
  }
}