/*
font-family: 'Courgette', cursive;
font-family: 'Montserrat', sans-serif;
*/

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100vh;
  font-size: 20px;
  max-width: 100vw;
  font-family: "Roboto", sans-serif;
}

body {
  min-height: 100%;
  display: grid;
  grid-template-columns: auto;
  grid-template-rows: max-content 1fr max-content;
  grid: "header" "main" "footer";
  min-width: 360px;
  overflow-x: hidden;
}

/* header begin */
header {
  height: 80px;
  max-width: min(1024px, 90%);
  margin: 0 auto;
  width: 100%;
  grid-area: header;
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
}

.logo {
  font-family: "Pacifico", cursive;
  font-size: 40px;
  color: #4b0000;
}

nav,
.nav-icon {
  margin-left: auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2em;
  font-weight: 600;
  font-size: 0.8rem;
}

nav a {
  text-decoration: none;
  color: #695f69;
}

nav a:hover {
  color: #250000;
}

.nav-icon {
  display: none;
}

.nav-icon img {
  width: 35px;
}

/* header end */

/* main begin */
.align-center {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: min(1024px, 90%);
  margin: 0 auto;
  padding-bottom: 2rem;
}

.gray-bg {
  box-shadow:
    0 -3px 5px 0px #59484825,
    0 4px 5px 0px #59485925;
  background-color: #fff3f3;
}

main {
  grid-area: main;
  width: 100%;
}

.container {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: clamp(1rem, 1.5vw, 1rem);
  flex-wrap: wrap;
  justify-content: center;
}

.about-text {
  margin-left: calc(100% / 12);
  display: flex;
  flex-direction: column;
}

.portrait {
  padding-top: 2rem;
  width: max(40%, 300px);
  float: left;
}

h1 {
  margin: 0 auto;
  padding: 2rem 0;
  font-weight: 800;
  font-size: clamp(1rem, 5vw, 1.5rem);
  text-align: center;
  max-width: min(1024px, 90%);
  color: #695f69;
}

.about h1 {
  text-align: left;
  margin: 0;
}

.about a {
  margin: 2em 0;
  padding: 0.5em 1.5em;
  text-decoration: none;
  font-weight: 600;
  border-radius: 10px;
  background-color: #5f0202;
  width: max-content;
  color: rgb(255, 224, 224);
  transition: 300ms ease 150ms;
  font-size: clamp(0.8rem, 2vw, 1rem);
}

.about a:hover {
  background-color: #a15e78;
  box-shadow: 0 3px 5px 0 #695f6090;
  transition: 300ms ease;
}

.skill {
  display: flex;
  align-items: center;
  margin: 1em 0;
  width: clamp(280px, calc(100% / 4), 90%);
  height: 50px;
}

.contacts .skill {
  display: flex;
  align-items: center;
  width: 50px;
  height: 50px;
}

.icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background-color: #e9d7e9;
  margin-right: 0.5em;
  border: 1px solid #b88bb8;
  width: 60px;
  height: 60px;
}

.skill img {
  width: 30px;
  margin: 0.7rem;
}

.skill-caption {
  display: flex;
  flex-direction: column;
  width: 100%;
  transform: translateY(-10px);
}

.skill-name {
  font-weight: 800;
  margin-bottom: 0.5em;
}

.skill-level {
  border: 1px solid #db7c81;
  height: 10px;
  border-radius: 5px;
  position: relative;
  z-index: 1;
}

.range {
  height: 8px;
  border-radius: 4px;
  position: absolute;
  top: 0;
  left: 0;
  background-color: #790000;
}

/* main end */

/* галерея починається */

.portfolio a {
  width: clamp(300px, 30%, 400px);
  height: 200px;
  overflow: hidden;
  border-radius: 17px;
  position: relative;
}

a figcaption {
  position: absolute;
  bottom: 0;
  border-radius: 17px;
  background-color: rgba(0, 0, 0, 0.7);
  height: auto;
  width: 100%;
  transform: translateY(0);
  padding: 0.5rem 0.8rem;
  color: white;
  transition: all 300ms ease 150ms;
}

a img {
  width: 100%;
  transform: translateY(0) scale(100%, 100%);
  transition: all 300ms ease 150ms;
}

#portfolio h2 {
  font-size: 1rem;
  font-weight: 600;
  padding-bottom: 0.2rem;
}

a:hover figcaption {
  background-color: rgba(0, 0, 0, 0.4);
  transform: translateY(43%);
  transition: all 150ms ease;
}

a:hover img {
  transform: translateY(-10%) scale(110%, 110%);
  transition: all 300ms ease;
}

/* галерея закінчилась*/
/* підвал */
footer nav {
  margin: 2rem auto 0;
}

footer .container {
  flex-direction: column;
}

footer .copyright {
  margin-top: 1rem;
  font-size: 0.7rem;
  color: #a15e5e;
}
/* підвал */

@media only screen and (max-width: 650px) {
  /* header begin */
  .nav-icon {
    display: block;
  }

  #nav {
    visibility: hidden;
    opacity: 0;
    margin: 0;
    padding: 2em;
    box-shadow: 0px 2px 3px #695f69;
    position: absolute;
    top: 80px;
    right: 0;
    width: auto;
    background-color: white;
    border-radius: 10px;
    transition: all 300ms ease;
  }

  #nav.show {
    visibility: visible;
    opacity: 100;
    top: 100px;
    transition: all 300ms ease;
  }

  nav ul {
    flex-direction: column;
    row-gap: 2em;
  }
  /* main begin */
  .align-center {
    flex-direction: column;
    align-items: center;
    row-gap: 20px;
  }

  .about-text {
    align-items: center;
    margin: 0;
  }

  .about-text h1 {
    padding-top: 0;
  }

  .about a {
    width: max(50%, 200px);
    text-align: center;
  }

  .contacts .align-center {
    flex-direction: row;
  }

  /* main end */
  /* footer in media*/
  footer nav {
    display: none;
  }

  /* footer in media*/
}
/* header end */
