* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%;
}

body {
  --background: white;
  --color: #121712;
  --overlay-color: #ffffff;
  --overlay-color: white;
  --hover-link: #343434;
  --shadow: #979797;
  --list-background: rgb(255, 255, 255);
  --border: #c6c6c6;
  --box-shadow: rgb(90, 91, 92);
  --card-background: rgb(251, 251, 251);
  --card-shadow: rgba(120, 120, 120, 0.375);
}

body.dark {
  --background: #121712;
  --color: white;
  --overlay-color: #ffffff;
  --hover-link: #a0a0a0;
  --shadow: rgb(43, 43, 43);
  --list-background: rgba(100, 100, 100, 0.074);
  --border: rgb(43, 43, 43);
  --box-shadow: rgb(172, 172, 172);
  --card-background: rgb(27, 27, 27);
  --card-shadow: rgba(0, 0, 0, 0.375);
}

body {
  font-family: Montserrat;
  font-size: 2rem;
  line-height: 3rem;
  font-weight: 400;
  overflow-x: hidden;
  background-color: var(--background);
  color: var(--color);
}

button {
  cursor: pointer;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

a,
a:link,
a:visited,
a:active {
  text-decoration: none;
  color: var(--color);
  cursor: pointer;
}

nav.header-nav a::before {
  content: "\2192";
  visibility: hidden;
  transition: all .1s;
}

nav.header-nav a:hover::before {
  visibility: visible;
  margin-right: 8px;
}

header,
section,
footer {
  max-width: 140rem;
  width: 100%;
  margin: 0 auto;
  padding-inline: 2rem;
}

section:not(.hero) {
  padding-top: 5rem;
  margin-top: 25rem;
  animation: fade-in linear forwards;
  animation-timeline: view();
  animation-range: entry;
}

@media only screen and (max-width: 600px) {
  section:not(.hero) {
    margin-top: 10rem;
  }
}

/* UTILS */

.mt-xs {
  margin-top: 1rem !important;
}

.mt-sm {
  margin-top: 1.2rem !important;
}

.mt-6 {
  margin-top: 6.4rem !important;
}

@media only screen and (max-width: 600px) {
  .mt-6 {
    margin-top: 2rem !important;
  }
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.back-btn-wrapper {
  position: fixed;
  bottom: 8rem;
  right: 0;
  z-index: 99999;
  animation-name: fade-in;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  background-color: var(--background);
  color: var(--color);
  padding: 1rem;
  padding-right: 2rem;
}

.back-btn-wrapper a {
  text-transform: lowercase;
}

.back-btn-wrapper a::after {
  content: "\2191";
  margin-left: 8px;
}

/* HEADER */

header {
  height: 9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 99999;
  position: relative;
}

.switch {
  position: relative;
  display: inline-block;
  width: 4rem;
  height: 2.4rem;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color);
  border-radius: 2.8rem;
  transition: box-shadow .3s;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch:hover .slider {
  box-shadow: 0 0 8px var(--box-shadow);
}

.switch input:checked+.slider:before {
  transform: translateX(1.6rem);
}

.slider:before {
  content: "";
  position: absolute;
  background-color: var(--background);
  width: 1.6rem;
  height: 1.6rem;
  top: 4px;
  left: 4px;
  border-radius: 50%;
  transition: transform .2s;
}

nav ul {
  display: flex;
  gap: 2.5rem;
}

nav ul a {
  text-transform: lowercase;
}

button.menu-button {
  border: none;
  display: inline-block;
  position: absolute;
  right: 2rem;
  width: 2.5rem;
  height: 2rem;
  background-color: transparent;
  top: 3.5rem;
  z-index: 100000;
}

.menu-button::before {
  content: "";
  width: 100%;
  position: absolute;
  top: 4px;
  left: -1px;
  border: 2px solid var(--color);
  transition: transform .2s;

}

.menu-button::after {
  content: "";
  width: 100%;
  position: absolute;
  top: 12px;
  left: -1px;
  border: 2px solid var(--color);
  transition: transform .2s;
}

.menu-button.open {
  display: none;
}

.menu-button.open::before {
  transform: rotate(45deg);
}

.menu-button.open::after {
  transform: rotate(-45deg) translate(5.5px, -6px);
}

/* HERO SECTION */

section.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 8rem;
  margin-bottom: 30rem;
}

section.hero>div {
  height: 100%;
  padding-block: 4.8rem;
  display: flex;
  justify-content: space-between;
}

div.hero-upper {
  border-bottom: 2px solid var(--color);
  align-items: end;
}

a.hero-cta {
  padding-bottom: 8px;
  transition: transform .1s ease-in;
  opacity: 0;
  animation-name: fade-in;
  animation-delay: .8s;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

a.hero-cta::after {
  content: "\2192";
  margin-left: 8px;
}

a.hero-cta:hover,
.back-btn-wrapper:hover {
  border-bottom: 1px solid var(--color);
  transform: scale(1.1);
}

div.hero-lower {
  flex-direction: row-reverse;
}

ul.social-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  margin-top: 8rem;
  z-index: 2;
  opacity: 0;
  animation-name: fade-in;
  animation-delay: .5s;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

ul.social-links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

ul.social-links i {
  font-size: 2.5rem;
  text-align: center;
  width: 3rem;
}

div.hero-lower {
  z-index: 9999;
  mix-blend-mode: difference;
  color: var(--overlay-color);
}

div.hero-lower ul.social-links li a i,
div.hero-lower ul.social-links li a span {
  color: var(--overlay-color);
}

div.hero-lower div p {
  opacity: 0;
  max-width: 55rem;
  margin-top: 1.5rem;
  animation-name: fade-in;
  animation-delay: .5s;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

section.hero img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 5%);
  aspect-ratio: 1 / 1;
  max-width: 80rem;
  width: 100%;
  margin-top: -14rem;
  filter: drop-shadow(0px -8px 7px var(--shadow));
  z-index: 2;
}


section.hero h1,
section.hero h2 {
  max-width: 60rem;
}

section.hero h1 {
  animation-name: fade-in-slide-up;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

section.hero h2 {
  animation-name: fade-in-slide-down;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

.hero-heading,
.heading-primary {
  font-family: Clinton;
  text-transform: lowercase;
  font-weight: 900;
  z-index: 9;
  opacity: 0;
}

.heading-primary {
  font-size: 7rem;
  line-height: 8rem;
}

.hero-heading {
  font-size: 9.6rem;
  line-height: 12rem;
}

.heading-primary {
  opacity: 1;
}

.heading-tertiary {
  font-weight: 400;
  font-size: 3rem;
  line-height: 4rem;
}

.dev {
  color: var(--overlay-color);
}

@media only screen and (max-width: 1000px) {
  /* nav ul {
    display: none;
  } */

  nav.header-nav ul.open {
    animation: nav-animation-show .3s forwards;
  }

  nav.header-nav ul.close {
    animation: nav-animation-hide .3s forwards;
  }

  nav.header-nav ul {
    transform: translateX(-100%);
    position: fixed;
    display: flex;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
  }

  section:not(.hero) {
    padding-block: 10rem;
  }

  section.hero {
    margin: 12rem 0;
  }

  section.hero img {
    display: none;
  }

  div.hero-lower {
    mix-blend-mode: normal;
    color: var(--color);
  }

  div.hero-lower ul.social-links li a i,
  div.hero-lower ul.social-links li a span {
    color: var(--color);
  }

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

  .hero-cta {
    display: none;
  }

  section.hero .hero-lower {
    flex-direction: column;
    gap: 3rem;
  }
}

@media only screen and (max-width: 600px) {
  body {
    font-size: 1.2rem;
    line-height: 2rem;
  }

  section.hero>div {
    padding-block: 2rem;
  }

  section.hero h1,
  section.hero h2,
  .heading-primary {
    font-size: 3.4rem;
    line-height: 5rem;

  }

  section.hero h1,
  section.hero h2 {
    max-width: 25rem;
  }

  .heading-tertiary {
    font-size: 2.4rem;
    line-height: 3rem;
  }

  ul.social-links {
    margin-top: 0;
  }

  .social-links li a i {
    font-size: 1.6rem;
    width: 1rem;
  }
}

@keyframes nav-animation-show {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes nav-animation-hide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fade-in-slide-up {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-slide-down {
  from {
    opacity: 0;
    transform: translateY(-2rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SERVICE SECTION */

.services {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

.service {
  flex: 1 0 40rem;
  border: 1px solid var(--border);
  background: var(--list-background);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.service i {
  position: absolute;
  bottom: -2rem;
  right: -2rem;
  font-size: 10rem;
  color: var(--border);
}

.service p {
  position: relative;
  z-index: 4;
}

@media only screen and (max-width: 450px) {
  .service {
    flex: 1 0 20rem;
  }
}


/* PROJECT SECTION */

/* grid */

section.projects .grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  align-items: center;
  justify-content: center;
}

.grid .project {
  flex: 0 1 42.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 2rem;
  padding: 2rem;
  background: var(--card-background);
  box-shadow: 0 0 12px var(--card-shadow);
  border-radius: 4px;
}

.grid .project img {
  width: 100%;
  object-fit: cover;
  transition: transform .1s;
}

.grid .project a {
  overflow: hidden;
}

.grid .project img:hover {
  transform: scale(1.1);
}

.project-desc {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all .8s;
}

.project-desc ul {
  display: flex;
  gap: 8px;
}

.project-desc ul li {
  background-color: rgb(160, 160, 160);
  color: var(--background);
  font-size: 1.4rem;
  line-height: 2.5rem;
  font-weight: 500;
  border-radius: 4px;
  padding-inline: 1rem;
}


@media only screen and (max-width: 600px) {
  .grid {
    gap: 8rem;
  }

  .project-desc {
    gap: 8px;
  }

  .project-desc ul {
    gap: 4px;
  }

  .project-desc ul li {
    font-size: 1.2rem;
    line-height: 2rem;
  }

  h4 {
    font-size: 1.6rem;
    line-height: 2rem;
  }
}

/* EXPERIENCE SECTION */

.experience-block {
  max-width: 70rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-left: 8rem;
}

.experience-block .experience-row {
  border-left: 2px solid var(--box-shadow);
  padding-left: 1rem;
  display: flex;
  position: relative;
}

.experience-block .experience-row span {
  position: absolute;
  top: -1rem;
  left: -12rem;
  font-size: 4rem;
  font-weight: 700;
}

.experience-block .experience-row::before {
  content: "";
  width: 1rem;
  height: 1rem;
  display: block;
  position: absolute;
  top: 0;
  left: -1.1rem;
  border-radius: 50%;
  background-color: var(--background);
  box-shadow: var(--shadow) 0px 7px 29px 0px;
  border: 5px solid var(--box-shadow);
  z-index: 3;
  animation: circle-animation 1s infinite ease-in;
}

.experience-block .experience-row .experience-content {
  height: 100%;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.experience-content h4 {
  font-size: 2rem;
  line-height: 3rem;
}

.experience-content h5 {
  font-size: 1.8rem;
  line-height: 2.5rem;
  color: #7c7c7c;
  margin-bottom: 2rem;
}

@keyframes circle-animation {
  0% {
    box-shadow: rgb(100, 100, 111) 0px 7px 29px 0px;
  }

  50% {
    box-shadow: rgb(100, 100, 111) 0px 8px 35px 0px;
  }

  100% {
    box-shadow: rgb(100, 100, 111) 0px 10px 54px 0px;
  }
}

@media only screen and (max-width: 900px) {
  .experience-block {
    padding: 0;
  }

  .experience-block .experience-row span {
    display: none;
  }
}

@media only screen and (max-width: 600px) {
  .experience-block .experience-row .experience-content {
    padding: 3rem 1rem;
  }

  .experience-content h4 {
    font-size: 1.6rem;
    line-height: 2rem;
  }

  .experience-content h5 {
    font-size: 1.4rem;
    line-height: 2rem;
  }
}

/* CONTACT SECTION */
section.contact {
  margin-bottom: 20rem;
}

section.contact p a {
  text-decoration: underline;
}

.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.contact-details div {
  flex: 1 0 30rem;
}

.heading-quarternary {
  font-family: Clinton;
  font-size: 2.5rem;
  line-height: 3rem;
  text-transform: lowercase;
  margin-bottom: 1rem;
}

@media only screen and (max-width: 900px) {
  section.contact {
    margin-bottom: 10rem;
  }

  .contact-details {
    flex-direction: column;
  }

  .contact-details div {
    flex: 1;
  }

  .heading-quarternary {
    font-size: 2rem;
    line-height: 2.5rem;
  }
}

/* FOOTER SECTION */
footer {
  padding-block: 4rem;
  border-top: 1px solid gray;
}

footer p {
  font-size: 1.6rem;
}

footer p span {
  font-family: Clinton;
  font-weight: 900;
  text-transform: lowercase;
}

@media only screen and (max-width: 600px) {
  footer {
    padding-block: 2rem;
  }

  footer p {
    font-size: 1rem;
  }
}