:root {
  --ff-primary: 'Poppins', sans-serif;
  --color-primary: hsl(0, 56%, 52%);
  --color-secondary: rgb(12, 12, 12);
  --header-height: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 67px;
}

body {
  margin: 0;
  padding: 0;
  background-color: black;
  font-family: var(--ff-primary);
  font-weight: 300;
  color: white;
}

body::before {
  display: block;
  content: '';
  height: var(--header-height);
}

img {
  max-width: 100%;
}

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

section {
  padding: 3rem;
}

.section__title {
  color: var(--color-primary);
  text-transform: uppercase;
  font-weight: 300;
  letter-spacing: 2px;
  margin-top: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

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

/* HEADER */

.header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 10%;
  color: white;
  background-color: black;
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 99;
}

.brand {
  display: none;
}

.mobile-nav-list {
  display: flex;
}

.desktop-nav-list {
  display: none;
}

.nav-item {
  cursor: pointer;
}

.nav-item + .nav-item {
  margin-left: 2rem;
}

.desktop-nav-list a {
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.desktop-nav-list a:hover,
.desktop-nav-list a:focus {
  color: var(--color-primary);
  transform: scale(1.05);
}

.desktop-nav-list a.active {
  color: var(--color-primary);
}

.header-icon {
  width: 30px;
  padding: 0.2em;
  outline: 1px solid white;
  outline-offset: 2px;
  border-radius: 4px;
  background-color: var(--color-primary);
  vertical-align: middle;
  transition: all 0.3s ease;
}

.header-icon:hover,
.header-icon:focus {
  color: var(--color-primary);
  transform: scale(1.2);
}

/* HOME */

.home {
  min-height: calc(100vh - var(--header-height));
  background-image: url('./assets/profile-image.png');
  background-position: right bottom;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 650px;
}

.home__slogan {
  text-align: center;
  font-size: 1.5rem;
}

.home__slogan h1 {
  font-size: clamp(1rem, 7vw, 2.5rem);
  margin-top: 0;
  margin-bottom: 0.5em;
}

.home__slogan span {
  color: var(--color-primary);
  font-weight: 200;
}

.home__slogan p {
  font-size: clamp(0.7rem, 5.5vw, 1.5rem);
  font-weight: 300;
  margin: 0;
}

.home__icons {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  justify-content: center;
}

.home__icon .icon {
  width: 30px;
  height: 30px;
  transition: scale 300ms ease;
  padding: 0.25em;
  border: 1px solid white;
  border-radius: 4px;
}

.home__icon .icon:is(:hover, :focus) {
  scale: 1.2;
}

/* ABOUT ME */

.about-me {
  background-color: var(--color-secondary);
  padding-inline: 1rem;
}

.about-me__title {
  text-align: center;
  font-size: 1.7rem;
  margin-bottom: 0;
}

.about-me__container {
  display: grid;
  gap: 5rem;
}

.info {
  text-align: center;
  max-width: 550px;
  margin-inline: auto;
}

.info p {
  line-height: 1.6;
  font-size: 0.85rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

.info a {
  display: inline-block;
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.5em 1.5em;
  border: 1px solid var(--color-primary);
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.info a:is(:hover, :focus) {
  background-color: rgb(0, 0, 0);
  scale: 1.1;
}

.download-icon {
  width: 1.2rem;
  vertical-align: middle;
  margin-left: 0.3rem;
}

.tabs {
  max-width: 500px;
  margin-inline: auto;
  text-align: center;
}

.tab-titles {
  padding-bottom: 0.5rem;
}

.tab-titles ul {
  display: flex;
  font-size: 0.9rem;
  justify-content: space-between;
}

.active-link {
  color: var(--color-primary);
  cursor: default;
}

.not-active-link {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  color: white;
}

.not-active-link::before {
  content: '';
  background-color: var(--color-primary);
  display: block;
  width: 30px;
  position: absolute;
  top: -3px;
  left: 0;
  height: 1px;
  transform: scale(0);
  transition: transform 0.5s ease;
  transform-origin: left;
}

.not-active-link:hover::before {
  transform: scale(1);
}

.underline {
  height: 1px;
  margin-bottom: 1.5rem;
  background: linear-gradient(0.25turn, var(--color-primary), transparent);
}

.tab-content {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease-out;
}

.active-tab {
  height: auto;
  opacity: 1;
}

.education,
.experience {
  font-size: 0.8rem;
}

.tab-item + .tab-item {
  margin-top: 1rem;
}

.tab-item span {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 400;
}

.technologies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  max-width: 350px;
  margin-inline: auto;
}

.technology {
  display: grid;
  grid-template-columns: 50px 1fr;
  place-items: center;
}

.technology + .technology {
  margin-top: 0.5em;
}

.technology span {
  font-size: 0.9rem;
}

.skills h3 {
  font-size: 1rem;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 0.2em;
  margin-top: 1.5em;
  letter-spacing: 1px;
}

.skills p {
  margin-top: 0;
  font-size: 0.85rem;
}

.circle {
  color: var(--color-primary);
}

.icon {
  height: 20px;
}

.express-icon {
  border-radius: 50%;
}

/* PROJECTS */

.projects {
  background-color: black;
  text-align: center;
  padding-inline: 1.5rem;
}

.projects__title {
  font-size: 1.9rem;
}

.projects__container {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.project {
  position: relative;
  transition: scale 350ms ease;
  border: 1px solid var(--color-primary);
  justify-items: center;
}

.projects__container:has(.project:hover) .project:not(:hover) {
  scale: 0.8;
}

.projects__container:has(.project:hover) .project:hover {
  scale: 1.1;
}

.project img {
  vertical-align: bottom;
}

.project__description {
  font-size: clamp(0.44rem, 2.2vw, 0.6rem);
  font-weight: 400;
  display: block;
  position: absolute;
  padding-inline: 1rem;
  margin: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

.project__description h4 {
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 1px;
  font-size: 0.8rem;
  margin-block: 0.4rem;
}

.project__description a {
  color: white;
}

.project__description button {
  font: inherit;
  background-color: var(--color-primary);
  color: white;
  border: 1px solid white;
  border-radius: 3px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
}

.project__description button a {
  text-decoration: none;
}

.project__description button:first-of-type {
  margin-right: 0.4rem;
}

.dark-background {
  opacity: 0.1;
  box-shadow: 0 0 4px 2px rgb(255, 255, 255);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.5s linear;
}

.white-line {
  width: 100%;
  height: 2px;
  background-color: white;
  padding: 0;
  margin-block: 0.5rem;
}

.hidden {
  display: none;
}

/* CONTACT */

.contact {
  background-color: var(--color-secondary);
  text-align: center;
}

.contact__title {
  font-size: 1.5rem;
}

.contact__form {
  max-width: 400px;
  margin: 0 auto;
  position: relative;
}

.form-input {
  display: block;
  padding: 0.5rem 1.5rem;
  font: inherit;
  background-color: transparent;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  color: white;
  width: 100%;
  margin-bottom: 1rem;
}

.form-input:focus {
  outline: none;
}

.form-input:focus:not(.invalid) {
  background-color: rgb(0, 0, 0);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.invalid {
  background-color: rgba(201, 64, 64, 0.3);
}

.submit-button {
  font: inherit;
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: 3px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-button:is(:hover, :focus) {
  transform: scale(1.05);
  background-color: rgb(0, 0, 0);
  outline: none;
}

.email-confirmation,
.loading {
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 300;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.animation {
  animation: fade 4000ms linear;
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media (min-width: 465px) {
  .header {
    justify-content: space-between;
  }

  .brand {
    display: inline;
    font-size: 1.5rem;
    cursor: default;
    color: var(--color-primary);
    font-weight: 200;
  }

  .about-me {
    padding: 3rem;
  }

  .tab-titles ul {
    justify-content: center;
    gap: 1.5rem;
  }

  .projects__container {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  }

  .project {
    max-width: 400px;
  }

  .project__description {
    font-size: 0.6rem;
    font-weight: 800;
  }

  .white-line {
    margin-block: 1rem;
  }
}

@media (min-width: 666px) {
  section {
    padding: 5rem;
  }

  .home {
    background-size: 800px;
  }

  .home__slogan {
    text-align: left;
    padding: 2rem;
  }

  .home__icons {
    justify-content: start;
  }
}

@media (min-width: 850px) {
  .brand {
    font-size: 2rem;
  }

  .header-icon {
    display: none;
  }

  .mobile-nav-list {
    display: none;
  }

  .desktop-nav-list {
    display: flex;
  }

  .home {
    background-size: 80%;
  }

  .home__slogan {
    padding: 4rem;
  }

  .home__icons {
    padding: 4rem;
  }
}

@media (min-width: 960px) {
  .about-me__container {
    grid-template-columns: 1fr 1fr;
    align-items: baseline;
  }

  .about-me__title {
    margin-bottom: 1rem;
  }

  .info {
    text-align: end;
  }

  .tabs {
    text-align: left;
    margin-left: 0;
  }

  .tab-titles ul {
    justify-content: start;
  }

  .technologies {
    grid-template-columns: auto 1fr;
    gap: 3rem;
    justify-items: start;
    margin-left: 0;
  }

  .technology {
    gap: 1rem;
  }

  .technology span {
    justify-self: start;
  }
}
