@import "./reset.css";
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary-bg-color: #f7fbfd;
  --primary-accent: #0c1618;
  --secondary-accent: #6f1d1b;

  --main-text-color: #0c1618;
  --supportive-text-color: #242d2f;
  --gray-text-color: #565a5b;

  --white-color: #fff;
  --gray-color: #e9e8e8;
  --gray-color-2: #c0c0c0;
  --gray-color-3: #e6e6e6;

  --color-preloader-bg: var(--white-color);
  --color-dots: #1a1a1a;
}

/* Common styles */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  color: var(--main-text-color);
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.15px;
}

.container {
  padding: 0 32px;
  max-width: 1200px;
  /* max-width: clamp(54.5rem, 38.125rem + 81.88vw, 120rem); */
  margin: 0 auto;
}

.container-lg {
  max-width: 1600px;
}

.title {
  font-size: 44px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 54px;
}

.btn {
  display: inline-block;
  height: 52px;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  line-height: 52px;
  padding: 0 36px;
  margin: 0 12px 16px 0;
  color: var(--white-color);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s;
  background-color: var(--primary-accent);
  border: 2px solid var(--primary-accent);
  transition: all 0.3s ease-in;
}

.btn:hover,
.btn:focus {
  background-color: var(--secondary-accent);
  border-color: var(--secondary-accent);
  color: var(--white-color);
  outline: 0;
}

.btn:active {
  background-color: #8b4a48;
}

.btn-white {
  background: transparent;
  font-weight: 700;
  border: 2px solid var(--primary-accent);
  color: var(--primary-accent);
  transition: all 0.3s ease-in;
}

.btn-white:hover,
.btn-white:focus {
  background: var(--primary-accent);
  border: 2px solid var(--primary-accent);
  color: var(--white-color);
}

.btn-white:active {
  background-color: #3c4446;
}

.btn-red {
  background: var(--secondary-accent);
  border: 2px solid var(--secondary-accent);
  color: var(--white-color);
  transition: all 0.3s ease-in;
}

.btn-red:hover,
.btn-red:focus {
  background: var(--primary-accent);
  border: 2px solid var(--primary-accent);
}

.btn-red:active {
  background-color: #3c4446;
}

h5 {
  font-size: 15px;
  letter-spacing: 2px;
  line-height: 23px;
  font-weight: 600;
  text-transform: uppercase;
}

.white {
  color: var(--white-color);
}

/* Header */
.header {
  z-index: 100;
  background-color: transparent;
  height: 90px;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
  height: 90px;
}

.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1999;
  background-color: rgba(255, 255, 255, 0.95);
  padding-top: 0;
  padding-bottom: 0;
  transition: all 0.3s ease-in-out;
}

.logo {
  position: relative;
  line-height: 1;
  font-weight: 400;
  font-size: clamp(1.125rem, 1.011rem + 0.57vw, 1.375rem);
  color: var(--main-text-color);
}

.nav-list {
  display: flex;
  column-gap: 46px;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.15px;
}

.nav-btn {
  display: none;
}

.nav-link {
  color: var(--main-text-color);
}

.nav-link.active {
  text-decoration: underline;
  text-decoration-color: var(--secondary-accent);
  text-decoration-thickness: 1.2px;
  text-underline-offset: 7px;
}

/* Hero section */
.hero {
  position: relative;
  padding-top: 180px;
  background-color: var(--primary-bg-color);
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
}

.hero-content {
  text-align: left;
  align-self: center;
  padding: 20px;
  flex-grow: 1;
}

.hero-greeting {
  font-size: clamp(1rem, 0.929rem + 0.36vw, 1.25rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--secondary-accent);
}

.hero-heading {
  margin: 5px 0;
  font-weight: 500;
  font-size: clamp(3.25rem, 2.75rem + 2.5vw, 5rem);
  line-height: 1.2;
}

.hero-heading-subtitle {
  font-size: clamp(1.125rem, 1.054rem + 0.36vw, 1.375rem);
  font-weight: 400;
}

.hero-img {
  display: flex;
  flex: 1 1 356px;
  justify-content: flex-end;
  margin-top: auto;
}

.hero-img img {
  display: block;
  position: relative;
}

.about-social-list {
  display: flex;
}

.social-links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 20px;
  margin: 40px 0 40px;
  height: 24px;

  img {
    height: 24px;
    width: 24px;
  }
}

.social-links-row a {
  filter: invert(35%) sepia(11%) saturate(160%) hue-rotate(145deg)
    brightness(88%) contrast(80%);
  transition: all 0.3s ease-in-out;
}

.social-links-row a:hover {
  filter: invert(0%) sepia(0%) saturate(7500%) hue-rotate(305deg)
    brightness(97%) contrast(103%);
}

/* About section */
.about {
  padding: 7rem 0;
}

.about-row {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr;
  justify-content: center;
  gap: 90px;
  margin-bottom: 80px;
  color: var(--supportive-text-color);
}

.about-descr {
  font-size: clamp(1rem, 0.964rem + 0.18vw, 1.125rem);
  line-height: 1.7;
  font-weight: 400;
  margin-bottom: 10px;
}

.skill {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 30px;
}

.skill-title,
.skill-percent {
  display: inline-block;
  font-size: 16px;
  font-weight: 400;
  /* text-transform: uppercase; */
  letter-spacing: 0px;
}

.skill-percent {
  float: right;
}
.skill-bar__progress {
  background-color: var(--gray-color);
  border-radius: 5px;
  height: 4px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.skill-bar__fill {
  background-color: var(--secondary-accent);
  height: 4px;
  width: 0; /* Initial width is 0 */
  transition: width 1.5s ease-in-out; /* Smooth transition for the fill */
}

.about-download-btn {
  margin-top: 40px;
}

.services-row {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  justify-content: space-between;
}

.service-card {
  max-width: 300px;
}

.service-card-img {
  display: block;
  height: 50px;
  margin: 0 auto 20px;
  filter: invert(33%) sepia(7%) saturate(243%) hue-rotate(145deg)
    brightness(94%) contrast(81%);
}

.service-card-title {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: clamp(1.125rem, 1.089rem + 0.18vw, 1.25rem);
}

.service-card p {
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}

/* Works */
.projects {
  padding: 7rem 0;
  background-color: var(--primary-bg-color);
}

.projects-title {
  text-align: center;
}

.projects-row {
  display: flex;
  background-color: rgba(214, 212, 212, 0.623);
  border-radius: 5px;
  padding: 7px;
  justify-content: space-around;
  flex-wrap: nowrap;
}

.project-box {
  position: relative;
  overflow: hidden;
  display: block;
  max-width: 510px;
}

.project-box a {
  display: inline-block;
  margin: 7px;
}

.project-box:hover .project-mask {
  opacity: 1;
  visibility: visible;
}

.project-box:hover .project-mask .project-caption {
  bottom: 30px;
  opacity: 1;
}

.project-box:hover .project-img {
  transform: scale(1.1);
  transition: all 2s cubic-bezier(0.23, 1, 0.32, 1) 0s;
  width: 100%;
}

.project-img {
  transform: scale(1);
  width: 100%;
  transition: all 2s cubic-bezier(0.23, 1, 0.32, 1) 0s;
}

.project-mask {
  background: none repeat scroll 0 0 rgba(0, 0, 0, 0.7);
  height: 100%;
  position: absolute;
  transition: all 0.5s ease-in-out 0s;
  width: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
}

.project-mask p {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 400;
  margin-top: 0;
  text-align: left;
}

.project-mask .project-caption {
  position: absolute;
  bottom: -60px;
  left: 0;
  padding-left: 30px;
  padding-right: 30px;
  text-align: left;
  transition: all 0.5s ease-in-out 0s;
  opacity: 0;
}

.project-mask p {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 400;
  margin-top: 0;
  text-align: left;
}

/* Contact */
.contact {
  padding: 7rem 0;
  text-align: center;
}

.contact-button {
  margin-top: 20px;
}

/* Footer */
.footer {
  background-color: var(--primary-accent);
  color: var(--gray-color-3);
}

.footer-row {
  display: flex;
  flex-direction: column;
  column-gap: 20px;
  align-items: center;
  padding: 40px 0;
}

.footer-social {
  margin-top: 0;
}

.footer-social a:hover {
  filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg)
    brightness(102%) contrast(102%);
}

.footer-copyright {
  font-size: clamp(0.75rem, 0.679rem + 0.36vw, 1rem);
}

.response {
  position: fixed;
  display: inline-block;
  background-color: var(--primary-accent);
  color: var(--white-color);
  border: 1px solid var(--white-color);
  min-width: 280px;
  padding: 20px 40px;
  bottom: -100px;
  left: 50%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: all 0.3s ease-in-out;
  z-index: 5;
}

.response.open {
  bottom: 20px;
  opacity: 1;
  visibility: visible;
}

/* "go to top" button */
.goToTop {
  z-index: 599;
  position: fixed;
  width: 40px;
  height: 40px;
  background-color: var(--gray-color);
  top: auto;
  left: auto;
  right: 30px;
  bottom: 30px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  border-radius: 2px;
  transition: opacity 350ms, visibility 350ms;
}

.goToTop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  filter: invert(4%) sepia(23%) saturate(2306%) hue-rotate(148deg)
    brightness(91%) contrast(90%);
}

.goToTop img {
  height: 16px;
  width: 16px;
}

.goToTop:hover {
  filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg)
    brightness(102%) contrast(102%);
}

.goToTop.reveal {
  display: block;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition: all 0.3s;
}

/* Preloader with jumping dots */
#preloader {
  position: fixed;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  background: var(--color-preloader-bg);
  z-index: 3000;
  height: 100vh;
  width: 100vw;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.5s ease-out;
}

.jumping-dots {
  position: relative;
  width: 6px;
  height: 6px;
  padding: 0;
  display: inline-block;
}

.jumping-dots > div {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--color-dots);
  border-radius: 50%;
}

.jumping-dots > div:nth-of-type(1) {
  left: 20px;
}

.jumping-dots > div:nth-of-type(3) {
  left: -20px;
}

.jumping-dots > div {
  animation: jumping-dots 1.2s infinite ease;
  animation-delay: 0.2s;
}

.jumping-dots > div:nth-of-type(1) {
  animation-delay: 0.4s;
}

.jumping-dots > div:nth-of-type(3) {
  animation-delay: 0s;
}

@keyframes jumping-dots {
  0% {
    top: 0;
  }

  40% {
    top: -6px;
  }

  80% {
    top: 0;
  }
}
