:root {
  --primary-bg-color: #fcddd6;
  --dark-green: #2c6e49;
  --light-green: #4c956c;
  --orange: #d68c45;
  --purple: #b655e7;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--primary-bg-color);
  margin: 0;
}

.hide {
  display: none;
}

a { 
  text-decoration: none;
}

.flex-mobile-column {
  display: flex;
  flex-direction: row;
}

p, a, h1, h2, h3, h4, h5, h6, input {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
}

h1, h2 {
  color: var(--light-green);
}

h3 {
  color: var(--orange);
}

p, a {
  color: var(--dark-green);
  font-weight: 600;
  font-size: 1.2rem;
}

#role {
  color: var( --purple);
  transition: opacity 0.5s ease;
  opacity: 1;
}
.fade-out {
  opacity: 0 !important;
}

/* menu */
.menu-container {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.nav-menu.active { 
  display: flex;
}

.menu-list {
  width: 80vw;
  display: flex;
  flex-direction: row;
  list-style: none;
  transition: 1s ease;
}

.nav-menu a {
  text-decoration: none;
  padding: 2rem;
}

.menu-item {
  position: absolute;
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
  pointer-events: none;
}

#nav-menu.active .menu-item {
  position: relative;
  transform: translateX(0);
  opacity: 1;
  transition: transform 1s ease-out, opacity 0.5s ease-out;
  pointer-events: all;
}

.burger-menu {
  --button-color: #4c956c;
  overflow: hidden;
  background: transparent;
  border: none;
}

@media (max-width: 481px) {
  .burger-menu {
    overflow: unset;
  }
}

.burger-menu .burger {
  transition: translate 1s, rotate 1s;
}

.burger-menu[aria-expanded="true"] .burger {
  translate: 10px -10px;
  rotate: 0.125turn;
}

.burger-menu .line {
  transition: 1s;
  stroke-dasharray: 60 31 60 300;
}

.burger-menu[aria-expanded="true"] .line {
  stroke-dasharray: 60 105 60 300;
  stroke-dashoffset: -90;
}
/* menu end */

/* about */
.about img {
  height: 15rem;
}

/* Works */
img.work.in-progress {
  width: 15rem;
  margin: 0 3rem;
}

.work-2 {
  width: 25rem;
}

.work-item {
  display: flex;
  flex-direction: row;
  width: 90vw;
  justify-content: space-around;
}

@media (max-width: 481px) {
  .work-item {
    flex-direction: column;
  }
}
/* works end */

/* section */
.section {
  margin: 3rem;
}

@media (max-width: 479px) {
  .section {
    margin: 1rem;
  }
}

footer {
  background-image: url(assets/footer-bg.png);
  background-size: cover;
  background-position: center;
  height: 45rem;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}

.footer-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

footer p {
  color: var(--primary-bg-color);
  padding: 3rem;
}

/* button animation */
.btn {
  width: 18rem;
  height: 5rem;
  background: var(--purple);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  transition: all 0.5s ease;
}

.btn a { color: #fafafa; }

.btn p {
  font-size: 1.2rem;
  position: relative;
  z-index: 2;
}

.btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    0deg, 
    transparent, 
    transparent 30%, 
    rgba(44,110,73,0.6)
  );
  transform: rotate(-45deg);
  transition: all 0.5s ease;
  opacity: 0;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(44,110,73,0.8);
}

.btn:hover::before {
  opacity: 1;
  transform: rotate(-45deg) translateY(100%);
}

/* work stuff */
.work-cards, .skills-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  grid-gap: 15px;
  margin: 0 auto;
}

.card {
  position: relative;
  width: 25rem;
  height: 350px;
  margin: 0 auto;
  margin-bottom: 3rem;
  background: #fff;
  box-shadow: 0 15px 60px rgba(0,0,0, .5);
  border-radius: 15px;
}

.card .face {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card img {
  max-width: 100%;
}

.card .face.face1 {
  box-sizing: border-box;
  padding: 20px;
}

.card .face.face1 h2{
  margin: 0;
  padding: 0;
}

.card .face.face1 .content {
  font-size:1.2em;
  margin:0;
  padding:0 0 1em 0;
  font-weight:500;
}

.work-cards .card .face.face1 .content p {
  font-size: 0.9rem;
}

.card .face.face2 {
  background: #111;
  transition: 0.5s;
}

.card:nth-child(1) .face.face2,
.card:nth-child(5) .face.face2,
.card:nth-child(9) .face.face2 {
  background: linear-gradient(45deg, #2c6e49, #fefee3);
  border-radius: 15px;
}

.card:nth-child(2) .face.face2,
.card:nth-child(6) .face.face2,
.card:nth-child(7) .face.face2 {
  background: linear-gradient(45deg, #fefee3, #d68c45);
  border-radius: 15px;
}

.card:nth-child(3) .face.face2,
.card:nth-child(4) .face.face2,
.card:nth-child(8) .face.face2 {
  background: linear-gradient(45deg, #d68c45, #b655e7);
  border-radius: 15px;
}

.card:hover .face.face2 {
  height: 10px;
  border-radius: 0 0 15px 15px;
}

.card .face.face2:before {
  content:'';
  position: absolute;
  top:0;
  left:0;
  width: 50%;
  height: 100%;
  background: rgba(255,255,255, 0.1);
  border-radius: 15px 0 0 15px;
}

.card .face.face2 h2 {
  margin: 0;
  padding: 0;
  font-size: 2.5rem;
  color: #fff;
  text-align: center;
  transition: 0.5s;
  text-shadow: 0 2px 5px rgba(0,0,0, .2);
}

.card:hover .face.face2 h2{
  font-size: 1rem;
  font-weight: 200;
}

.card:hover .face.face2 img {
  height: 0;
}

.work-cards .card:hover .face.face1 p {
  font-size: 0.9rem;
}

#backToTopBtn {
  display: none; 
  position: fixed; 
  bottom: 20px; 
  right: 30px; 
  z-index: 99; 
  border: none; 
  outline: none; 
  background-color: var(--purple); 
  color: white; 
  cursor: pointer; 
  padding: 15px; 
  border-radius: 30px; 
  font-size: 18px; 
}

#backToTopBtn:hover {
  background-color: var(--dark-green);
}

form.form {
  display: flex;
  flex-direction: column;
  width: 50%;
}

.form input, .form textarea {
  border: 1px solid var(--orange);
  border-radius: 20px;
  margin: 1rem;
  padding: 1rem;
}

.form button {
  margin: 1rem auto;
  color: #fafafa;
  border: 1px solid var(--orange);
}

.contact {
  justify-content: space-around;
  width: 100%;
}

.contact-container {
  align-items: center;
  justify-content: center;
}

.contact-item {
  margin: 1rem;
}

.contact-item:hover {
  transform: scale(1.2);
}

@media (max-width: 481px) {
  .menu-list {
    width: unset;
  }
}

@media (max-width: 481px) {
  .card {
    max-width: 20rem;
  }

  .card .face.face1 h2, .card .face.face1 p {
    font-size: 1rem;
  }
}


@media (max-width: 481px) {
  form.form {
    width: 100%;
  }
}

@media (max-width: 481px) {
  .flex-mobile-column {
    flex-direction: column;
  }
}