* {
  box-sizing: border-box;
}

:root {
  --light: white;
  --semi-light: #f7f7f7;
  --dark: #212121;
  --semi-dark: #363535;
  --border-color: lightgray;
  --border-color-dark: #313131;
  --spacing: 30px;
  --spacing-large: 50px;
}

.container {
  padding: 40px 20%;
}

body {
  position: relative;
  box-sizing: border-box;
  font-family: "Comfortaa";
  transition: background-color 0.3s, color 0.3s;
  background: var(--light);
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  user-select: none;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h3 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
}

h4 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

h5 {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
}

h6 {
  font-size: clamp(1rem, 3vw, 1.5rem);
}

/* section {
  min-height: 100vh;
} */

.text-emphasis {
  background: #cf3b3b;
  background: linear-gradient(to right, #cf3b3b 30%, #cf6868 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-image {
  border-radius: 30px;
}

.greeting-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: auto;
  user-select: none;
}

.greeting {
  display: flex;
  align-items: center;
}

.greeting__title {
  margin: 0;
}

.greeting__image-container {
  position: relative;
}

.greeting__image {
  border-radius: 30px;
  height: 230px;
}

.greeting > *:not(:last-child) {
  margin-right: 30px;
}

.social-links-lg {
  position: absolute;
  bottom: -70px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  opacity: 0.7;
}

.social-links-lg > *:not(:last-child) {
  margin-right: var(--spacing);
}

.social-links-sm {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  opacity: 0.7;
  margin-top: var(--spacing);
}

.social-links-sm > *:not(:last-child) {
  margin-right: var(--spacing);
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 10px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
}

.nav {
  height: 50px;
  width: max-content;
  border-radius: 40px;
  top: 10px;
  background: var(--semi-light);
  border: 2px solid var(--border-color);
}

.dark .nav {
  background: var(--semi-dark);
}

.nav__links {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: auto;
  height: 100%;
  padding: 0 10px;
}

.nav__links a {
  margin: 0 10px;
  font-weight: 700;
}

a {
  color: var(--dark);
  text-decoration: none;
}

.dark a {
  color: var(--light);
}

.dark body {
  background-color: var(--dark);
  color: var(--light);
}

.form {
  width: 600px;
  display: flex;
  flex-direction: column;
}

.form > * {
  margin-bottom: var(--spacing);
}

.input-container {
  display: flex;
  flex-direction: column;
}

.input {
  height: 45px;
  width: 100%;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  font-weight: 500;
  font-size: 20px;
  padding: 0 10px;
  font-family: "Comfortaa";
  background: inherit;
  color: inherit;
}

.dark .input {
  border: 2px solid var(--border-color-dark);
}

.input__label {
  font-weight: 700;
  margin-bottom: 5px;
}

.text-area {
  height: 100px;
  width: 100%;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  font-weight: 500;
  font-size: 20px;
  padding: 10px;
  font-family: "Comfortaa";
  background: inherit;
  color: inherit;
}

.dark .text-area {
  border: 2px solid var(--border-color-dark);
}

.button {
  height: 45px;
  width: 220px;
  padding: 0 10px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background: linear-gradient(to right, #cf3b3b 30%, #cf6868 100%);
  color: white;
  font-size: 16px;
  font-family: "Comfortaa";
  font-weight: 700;
  cursor: pointer;
}

.dark .button {
  border: 2px solid var(--border-color-dark);
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-evenly;
}

.projects-container > * {
  margin-right: var(--spacing-large);
  margin-bottom: var(--spacing-large);
}

.card {
  /* margin: auto; */
  user-select: none;
  cursor: pointer;
  width: 270px;
  height: 350px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transform: rotate3d(0, 0, 0, 0deg);
  transition: 0.4s all;
}

.foil {
  width: 544px;
  height: 200px;
  background: linear-gradient(1deg, transparent, white);
  position: absolute;
  z-index: 2;
  opacity: 0.3;
  transform: rotate(30deg) translate(20px, -350px);
  transition: 0.4s all;
}

.foil--inverse {
  background: linear-gradient(1deg, transparent, #929292) !important;
}

.card:hover .foil {
  transform: rotate(30deg) translate(10px, -150px);
}

.card:hover .card__subtitle {
  opacity: 1;
}

.card:hover {
  transform: rotate3d(3, 0.5, 1, 20deg);
  box-shadow: -8px 18px 19px rgba(0, 0, 0, 0.294);
}

.dark .card:hover {
  box-shadow: -8px 18px 19px rgba(0, 0, 0, 0.527);
}

.dark .card {
  border: 3px solid var(--border-color-dark);
}

.card__img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  /* filter: grayscale(0.5) blur(0.7px); */
  opacity: 0.9;
  transition: 0.3s all;
  object-position: top;
}

/* .card:hover .card__img {
  filter: grayscale(0) blur(0);
} */

.card__text-container {
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  position: absolute;
  color: var(--light);
}

.card__title {
  font-size: 27px;
  padding: 5px 20px;
  background: black;
  border-radius: 11px;
  font-weight: 700;
  box-shadow: 0px 5px 6px rgba(0, 0, 0, 0.294);
}

.card__subtitle {
  position: absolute;
  top: 10px;
  background: black;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: 0.3s all;
  text-align: center;
  line-height: 1.5;
  top: 55px;
  height: max-content;
  width: max-content;
  box-shadow: 0px 5px 6px rgba(0, 0, 0, 0.294);
}

.about-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 50px;
}

/* dark mode switch */

.toggle-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.toggle-slot {
  cursor: pointer;
  position: relative;
  height: 30px;
  width: 65px;
  border: 2px solid #e4e7ec;
  border-radius: 30px;
  background-color: white;
  /* box-shadow: 0px 5px 15px #e4e7ec; */
  transition: background-color 250ms;
}

.dark .toggle-slot {
  background-color: #374151;
}

.toggle-button {
  transform: translate(38px, 4px);
  position: absolute;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background-color: #ffeccf;
  box-shadow: inset 0px 0px 0px 4px #ffbb52;
  transition: background-color 250ms, border-color 250ms,
    transform 500ms cubic-bezier(0.26, 2, 0.46, 0.71);
}

.dark .toggle-slot .toggle-button {
  background-color: #485367;
  box-shadow: inset 0px 0px 0px 4px white;
  transform: translate(5px, 4px);
}

.sun-icon {
  position: absolute;
  height: 20px;
  width: 20px;
  color: #ffbb52;
}

.sun-icon-wrapper {
  position: absolute;
  height: 22px;
  width: 22px;
  opacity: 1;
  transform: translate(4px, 3px) rotate(15deg);
  transform-origin: 50% 50%;
  transition: opacity 150ms, transform 500ms cubic-bezier(0.26, 2, 0.46, 0.71);
}

.dark .toggle-slot .sun-icon-wrapper {
  opacity: 0;
  transform: translate(12px, 4px) rotate(0deg);
}

.moon-icon {
  position: absolute;
  height: 22px;
  width: 22px;
  color: white;
}

.moon-icon-wrapper {
  position: absolute;
  height: 22px;
  width: 22px;
  opacity: 0;
  transform: translate(34px, 4px) rotate(0deg);
  transform-origin: 50% 50%;
  transition: opacity 150ms, transform 500ms cubic-bezier(0.26, 2.5, 0.46, 0.71);
}

.dark .toggle-slot .moon-icon-wrapper {
  opacity: 1;
  transform: translate(36px, 2px) rotate(-15deg);
}

/* dark mode switch end */

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  .greeting {
    flex-direction: column;
    align-items: center;
  }

  .greeting > * {
    margin-right: 0 !important;
  }

  .greeting__title {
    text-align: center;
    margin-top: var(--spacing);
  }

  .container {
    padding: 45px 20px 20px 20px;
  }

  nav {
    transform: scale(0.8);
  }

  /* .projects-container > * {
    margin-right: 0;
  } */

  .form {
    width: 100%;
  }
  .project-link {
    margin: var(--spacing) auto;
  }

  .social-links-lg {
    display: none;
  }
}

/* Small devices (phones in landscape, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .greeting {
    flex-direction: column;
    align-items: center;
  }
  .greeting > * {
    margin-right: 0 !important;
  }

  .greeting__title {
    text-align: center;
    margin-top: var(--spacing);
  }

  .container {
    padding: 45px 20px 20px 20px;
  }

  .form {
    width: 100%;
  }

  /* .projects-container > * {
    margin-right: 0;
  } */

  .project-link {
    margin: var(--spacing) auto;
  }

  .social-links-lg {
    display: none;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .greeting {
    flex-direction: column;
    align-items: center;
  }
  .greeting > * {
    margin-right: 0 !important;
  }

  .greeting__title {
    text-align: center;
    margin-top: var(--spacing);
  }

  .container {
    padding: 45px 10% 20px 10%;
  }

  .social-links-lg {
    display: none;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .container {
    padding: 20px 10%;
  }

  .social-links-sm {
    display: none;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .container {
    padding: 20px 10%;
  }

  .social-links-sm {
    display: none;
  }
}

/* Extra-extra large devices (wide screens, 1400px and up) */
@media (min-width: 1400px) {
  .social-links-sm {
    display: none;
  }
}
