@import url("https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Poppins:ital,wght@0,400;1,200&display=swap");
/* general styles */

:root {
  /* color palette */
  --main-dark-800: #222831;
  --main-dark-600: #393e46;
  --main-dark-400: #979fac;
  --main-dark-200: #e3e4e6;
  --contrast: #ffd369;
  --contrast-d: #ebbb4c;
  --light: #eeeeee;

  /* font styles */
  --ff-main: "Poppins", "Arial", sans-serif;
  --ff-accent: "Abril Fatface", serif;

  /* utility classes */
  --nav-height: 3rem;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-main);
  overflow-x: hidden;
}

h1 {
  font-family: var(--ff-accent);
  color: var(--contrast);
  text-shadow: 6px -5px 0px var(--main-dark-800);
  text-align: center;
  font-size: clamp(3.5rem, 3.3432rem + 4.8246vw, 8rem);
}

h1 .smaller {
  font-size: clamp(3.313rem, 2.7195rem + 2.6378vw, 4.5rem);
}

h2 {
  font-family: var(--ff-main);
  font-size: clamp(3.313rem, 2.7195rem + 2.6378vw, 4.5rem);
  font-weight: bold;
  color: var(--contrast);
}

h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

important {
  font-weight: bold;
}

section {
  padding: var(--nav-height) 2rem 2rem 2rem;
  min-height: 100vh;
}

@media (min-width: 600px) {
  section {
    padding: var(--nav-height) 4rem 0 4rem;
  }
}

/* link styled as a button */
.button {
  background-color: var(--contrast);
  padding: 0.7rem;
  text-align: center;
  border-radius: 999px;
  width: 300px;
  margin: 0 auto;
  font-weight: 600;
  line-height: 174%;
  letter-spacing: 0.045em;
  margin-bottom: 2rem;
}

.button:focus,
.button:hover,
.button:active {
  background-color: var(--contrast-d);
}

/********************************************/
/*** style and position the menu button *****/
/********************************************/
/* open */
#menuToggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1;
}

#menuToggle:hover,
#menuToggle:active {
  cursor: pointer;
}

/* hide burger on desktop */
@media screen and (min-width: 600px) {
  #menuToggle {
    display: none;
  }
}

#menuToggle span {
  display: block;
  width: 33px;
  height: 4px;
  margin-bottom: 5px;
  background: var(--contrast);
  border-radius: 3px;
  z-index: 1;
}

#myNav .closebtn {
  float: right;
  padding: 1.5rem;
}

#myNav .closebtn:hover,
#myNav .closebtn:active {
  background-color: unset;
}

/* close */
#myNav span {
  display: block;
  width: 33px;
  height: 4px;
  margin-bottom: 10px;
  border-radius: 3px;
  background: var(--contrast);
  transform-origin: 4px 0px;
}

#myNav span:first-child {
  transform: rotate(45deg) translate(-2px, -1px);
}

#myNav span:last-child {
  transform: rotate(-45deg) translate(-3px, -1px);
}

#myNav {
  width: 0;
}

/********************************************/
/***** style the flyout fullscreen menu *****/
/********************************************/
.overlay {
  position: fixed;
  z-index: 1;
  right: 0;
  top: 0;
  background-color: rgba(34, 40, 49, 0.95);
  overflow-x: hidden;
  transition: 0.5s;
}

.overlay-content {
  height: 100vh;
  width: 100vw;
  display: grid;
  justify-content: center;
  align-content: center;
  text-align: center;
}

.menu-links {
  display: grid;
}

.overlay a {
  padding: 0.5rem;
  text-decoration: none;
  font-size: 2.5rem;
  color: var(--contrast);
  transition: 0.3s;
}

.overlay a:hover,
.overlay a:focus,
.overlay a:active {
  color: var(--main-dark-800);
  background-color: #ffd369;
}

/* show topnav on desktop */
@media screen and (min-width: 600px) {
  #myNav {
    width: 100%;
  }

  .overlay {
    position: fixed;
    width: 100vw;
    height: var(--nav-height);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    overflow-y: hidden;
  }

  .overlay-content {
    display: block;
    position: absolute;
    height: unset;
  }

  .menu-links {
    display: flex;
    justify-content: flex-end;
  }

  .overlay a {
    font-size: 1.1rem;
    width: 150px;
  }

  /* hide x closing btn */
  .closebtn {
    display: none;
  }
}

/********************************************/
/************* home section **************/
/********************************************/

#home {
  height: 100vh;
  background-image: url("./assets/bg/home-bg-small.svg");
  background-repeat: no-repeat;
  background-size: cover;
  display: grid;
  text-align: center;
  align-items: center;
  color: var(--light);
  padding: var(--nav-height) 0;
}

/* animation for the main heading */
.tracking-in-expand {
  -webkit-animation: tracking-in-expand 2s cubic-bezier(0.215, 0.61, 0.355, 1)
    1s both;
  animation: tracking-in-expand 2s cubic-bezier(0.215, 0.61, 0.355, 1) 1s both;
}

/* ---------------------------------------- */
/*        animation tracking-in-expand      */
/* ---------------------------------------- */
@-webkit-keyframes tracking-in-expand {
  0% {
    letter-spacing: -0.5em;
    opacity: 0;
  }

  40% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

@keyframes tracking-in-expand {
  0% {
    letter-spacing: -0.5em;
    opacity: 0;
  }

  40% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

/* animation for the paragraph */
.scale-in-center {
  -webkit-animation: scale-in-center 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94)
    3s both;
  animation: scale-in-center 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 3s both;
}

/* ---------------------------------------- */
/*        animation scale-in-center      */
/* ---------------------------------------- */
@-webkit-keyframes scale-in-center {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
    opacity: 1;
  }

  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes scale-in-center {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
    opacity: 1;
  }

  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 1;
  }
}

@media screen and (min-width: 600px) {
  #home {
    background-image: url(./assets/bg/home-bg-big.svg);
  }
}

/********************************************/
/************* about me section **************/
/********************************************/

.article {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: center;
  justify-items: center;
}

figure {
  max-width: 700px;
  margin: auto;
  display: flex;
  flex-direction: column;
}

figure img {
  width: 100%;
  max-width: 450px;
  height: auto;
  margin: auto;
}

figcaption p {
  font-size: 1.2rem;
}

figcaption p + p {
  margin-top: 1rem;
}

.icon {
  width: 14px;
  height: 14px;
  fill: white;
}

/********************************************/
/************* gallery section **************/
/********************************************/

#gallery {
  background-color: var(--main-dark-800);
  color: var(--contrast);
  background-image: url("./assets/bg/magicpattern-blob-1676459660677.png");
  background-repeat: no-repeat;
  background-position: top -250px right -250px;
  background-size: 30%;
  padding-bottom: 2rem;
}

.img-gallery {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  margin: auto;
  max-width: 1400px;
}

@media (min-width: 790px) {
  .img-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .img-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

#gallery .button {
  color: var(--main-dark-800);
  margin-bottom: 2rem;
}

#gallery figure {
  transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

#gallery figure h3 {
  position: absolute;
  top: 0;
  left: 0;
  padding: 1rem;
  backdrop-filter: blur(10px);
  color: var(--contrast);
  text-shadow: 3px -2px 7px var(--main-dark-800);
  width: 100%;
  text-align: center;
  line-height: 1;
  transform: scale(1);
  transition: 0.25s ease;
  background-color: hsla(217, 10%, 25%, 50%);
}

#gallery figure:hover h3 {
  transform: scale(0.7);
}

#gallery figure img {
  transition: opacity 0s linear, padding 0s linear,
    transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0.5;
  padding: 100px;
}

#gallery figure img.loaded {
  opacity: 1;
  width: 100%;
  padding: unset;
}

#gallery figure:hover img {
  transform: scale(3);
}

#gallery figcaption {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  color: var(--light);
  position: absolute;
  width: 100%;
  bottom: -110px;
  padding: 0.5rem;
  transition: 0.25s ease;
  background-color: hsla(217, 10%, 25%, 50%);
  backdrop-filter: blur(10px);
  text-shadow: 3px -2px 7px var(--main-dark-800);
}

#gallery figure:hover figcaption {
  bottom: 0;
  background-color: hsla(217, 10%, 25%, 80%);
}

/********************************************/
/************* contact section **************/
/********************************************/

#contact {
  background-image: url("./assets/bg/corner-blob.png");
  background-repeat: no-repeat;
  background-position: bottom 0 right 0;
  background-size: 40%;
  background-color: var(--main-dark-600);
  color: var(--light);
}

@media screen and (min-width: 600px) {
  #contact {
    background-size: 20%;
  }
}

#contact-mail {
  display: grid;
  gap: 2rem;
  justify-content: center;
}

form,
fieldset {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  gap: 1rem;
}

.form-label {
  font-size: 1.2rem;
  color: var(--contrast);
}

input,
textarea {
  border: 1px solid var(--contrast);
  background-color: var(--main-dark-200);
  color: var(--main-dark-800);
  border-radius: 0.5rem;
  padding: 0.5rem;
  width: 100%;
}

input::placeholder,
textarea::placeholder {
  color: var(--main-dark-400);
}

#contact .button {
  color: var(--main-dark-800);
  margin-top: 1rem;
}

#contact a {
  color: var(--contrast);
}

#contact a:focus,
#contact a:hover,
#contact a:active {
  color: var(--contrast-d);
}

/********************************************/
/************* footer section **************/
/********************************************/

footer {
  background-color: var(--main-dark-800);
  text-align: center;
  color: var(--contrast);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  font-size: 0.9rem;
}

footer a:hover,
footer a:focus,
footer a:active {
  color: var(--contrast-d);
}
