@import url(./variables.css);

/*BASE & RESET*/
html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

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

body,
button,
input,
textarea {
  font: var(--font-light) var(--normal-font-size) var(--body-font);
}

body {
  background-color: var(--body-color);
  color: var(--white-color);
}

button {
  outline: none;
  border: none;
}
h1,
h2,
h3,
h4 {
  font-weight: var(--font-semi-bold);
}
ul {
  list-style: none;
}
a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*REUSABLE CLASSES*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 1rem;
}

.section__title {
  text-align: center;
  font-size: var(--h1-font-size);
  color: var(--first-color);
  margin-bottom: 2.5rem;
  margin-top: 2rem;
}

/*HEADER & NAV*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background-color: var(--body-color);
  z-index: var(--z-fixed);
  transition: box-shadow 0.4s;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
}

.nav__logo {
  color: var(--white-color);
  font-size: var(--h2-font-size);
  font-weight: var(--font-semi-bold);
  transition: color 0.4s;
}

.nav__logo:hover {
  color: var(--first-color);
}
.nav__toggle,
.nav__close {
  font-size: 1.5rem;
  cursor: pointer;
}

.nav__list {
  text-align: center;
  display: flex;
  flex-direction: column;
  row-gap: 1.5rem;
}

.nav__link {
  position: relative;
  color: var(--white-color);
  font-size: var(--h2-font-size);
  font-weight: var(--font-medium);
  transition: color 0.4s;
}

.nav__link::after {
  content: "";
  width: 0;
  height: 2px;
  background-color: var(--first-color);
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  transition: width 0.4s;
}

.nav__link:hover {
  color: var(--first-color);
}
.nav__link:hover::after {
  width: 60%;
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}
.shadow-header {
  box-shadow: 0 2px 16px hsla(0, 0%, 0%, 0.5);
}

/*HOME*/
.home {
  position: relative;
  overflow: hidden;
}
.home__container {
  row-gap: 4rem;
  padding-block: 2.5rem 2rem;
}
.home__content {
  position: relative;
  justify-self: center;
}

.home__image {
  width: 240px;
  height: 240px;
  background-color: var(--white-color);
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 5px solid var(--first-color);
  box-shadow: rgba(240, 161, 59, 0.35) 0px 15px 25px;
  margin: 2rem;
}

.home__img {
  width: 200px;
  filter: drop-shadow(0 4px 16px hsla(36, 100%, 50%, 0.2));
}

.home__social {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -2.5rem;
  display: grid;
  align-content: center;
  row-gap: 1.5rem;
}

.home__link {
  color: var(--white-color);
  font-size: 2rem;
  transition:
    transform 0.4s,
    color 0.4s;
}

.home__link:hover {
  transform: translateX(-0.25rem);
  color: var(--first-color);
}
.home__data {
  text-align: center;
  row-gap: 1.5rem;
}
.home__subtitle {
  font-size: var(--h2-font-size);
}
.home__subtitle span {
  color: var(--first-color);
}
.home__title {
  font-size: var(--bigger-font-size);
  color: var(--first-color);
}
.home__description {
  font-size: var(--h2-font-size);
}

.home__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/*BUTTON*/
.button {
  display: inline-flex;
  justify-content: center;
  background-color: var(--first-color);
  color: var(--black-color);
  font-weight: var(--font-medium);
  font-size: var(--h2-font-size);
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  transition: transform 0.4s;
}

.button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(209, 171, 1, 0.5);
}

.button__ghost {
  background-color: var(--body-color);
  color: var(--white-color);
  border: 2px solid var(--first-color);
}

/*ABOUT*/
.about__container {
  row-gap: 3.5rem;
  align-items: center;
}
.about__image {
  position: relative;
  justify-self: center;
  width: 280px;
  height: 280px;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  background: linear-gradient(135deg, var(--first-color), #222);
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.about__data {
  text-align: center;
}
.about__description {
  margin-bottom: 2.5rem;
  line-height: 1.6;
  font-size: var(--h2-font-size);
  color: #ccc;
}
.about__skills-title {
  font-size: var(--bigger-font-size);
  margin-bottom: 1.5rem;
  color: var(--first-color);
  text-transform: uppercase;
}
.about__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.about__item {
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(240, 161, 59, 0.2);
  border-radius: 4px;
  font-size: var(--h2-font-size);
  transition: 0.3s;
}

.about__item:hover {
  background-color: var(--first-color);
  color: var(--black-color);
  transform: translateY(-3px);
}

/* PROJECTS*/
.projects__container {
  display: grid;
  gap: 2rem;
  justify-content: center;
}

.projects__card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.02);
}

.projects__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.projects__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.projects__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(18, 18, 18, 0.95) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.projects__title {
  color: var(--first-color);
  font-size: var(--h2-font-size);
  margin-bottom: 0.5rem;
  transform: translateY(15px);
  transition: 0.5s;
}
.projects__description {
  color: var(--white-color);
  font-size: var(--h3-font-size);
  margin-bottom: 1.2rem;
  transform: translateY(15px);
  transition: 0.5s 0.1s;
}
.projects__buttons {
  display: flex;
  column-gap: 1rem;
  transform: translateY(15px);
  transition: 0.5s 0.2s;
}

.projects__card:hover .projects__overlay {
  opacity: 1;
}
.projects__card:hover .projects__img {
  transform: scale(1.1);
}
.projects__card:hover .projects__title,
.projects__card:hover .projects__description,
.projects__card:hover .projects__buttons {
  transform: translateY(0);
}

.projects__link {
  background-color: var(--black-color);
  color: var(--white-color);
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: var(--h3-font-size);
  display: flex;
  align-items: center;
  column-gap: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s;
}

.projects__link:hover {
  background-color: var(--first-color);
  color: var(--black-color);
}

/*CONTACTS*/

.contact__ container {
  row-gap: 4rem;
}

.contact__form {
  position: relative;
  row-gap: 1rem;
}

.contact__input {
  width: 100%;
  background: var(--body-color);
  color: var(--white-color);
  border: 2px solid var(--first-color);
  outline: none;
  padding: 1.25rem 1rem;
  border-radius: 0.5rem;
  font-size: var(--h2-font-size);
  font-weight: var(--font-medium);
}

.contact__input::placeholder {
  color: var(--gray-color);
  transition: color 0.4s;
}

.contact__input:focus::placeholder {
  color: var(--first-color);
}

.contact__input::autofill {
  transition:
    background-color 6000s,
    color 6000s;
}

.contact__area {
  height: 10rem;
  resize: none;
}

.contact__form .button {
  cursor: pointer;
}

.contact__message {
  position: absolute;
  bottom: -2rem;
  font-size: var(--small-font-size);
}

.contact__address {
  display: flex;
  align-items: center;
  column-gap: 1rem;
  font-style: initial;
}

.contact__address span {
  font-size: 1.2rem;
}

.contact__address i {
  font-size: 1.8rem;
  color: var(--first-color);
}

/*SHAPES*/
.shape {
  position: fixed;
  border: 3px solid var(--first-color);
  opacity: 0.2;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  filter: blur(4px);
}
.shape__big {
  width: 250px;
  height: 250px;
  top: 2rem;
  right: 2rem;
  animation: floating 6s infinite ease-in-out;
}
.shape__small {
  width: 150px;
  height: 150px;
  top: 15rem;
  left: 2rem;
  border-width: 2px;
  animation: floating 8s infinite ease-in-out;
  animation-delay: 2s;
}

@keyframes floating {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.main-footer {
  background-color: #1a1a1a; 
  font-size: var(--h3-font-size);
  color: #ffffff;
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid #333;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--gray-color);
}

.social-links a {
  color: var(--gray-color); 
  font-size: var(--h3-font-size);
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--first-color);
  text-decoration: underline;
}

/*MEDIA QUERIES */
@media screen and (max-width: 320px) {
  .container {
    margin-inline: 1rem;
  }
  .home__image {
    width: 200px;
    height: 200px;
  }
  .home__img {
    width: 170px;
  }
}

@media screen and (max-width: 1150px) {
  .nav__menu {
    position: fixed;
    top: -120%;
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    padding-block: 5rem 4rem;
    transition: top 0.6s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
  }
  .nav__menu.show-menu {
    top: 0;
  }

}
@media screen and (min-width: 768px) {
  .home__container,
  .about__container, 
  .projects__container,
  .contact__content { 
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    column-gap: 3rem; 
  }

  .home__data,
  .about__data,
  .section__title {
    text-align: left;
  }

  .section__title {
    margin-inline: 0; 
    max-width: 100%;
  }

  .home__buttons,
  .about__items {
    justify-content: flex-start;
  }

  .contact__container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 3rem;
    align-items: start;
  }
}

@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }
  .section__title {
    max-width: 1120px;
    margin-inline: auto;
    text-align: left;
  }

  .nav__toggle,
  .nav__close {
    display: none;
  }
  .nav__list {
    flex-direction: row;
    column-gap: 4rem;
  }

  .home__container {
    grid-template-columns: 450px 550px;
    column-gap: 8rem;
    padding-block: 10rem 4rem;
  }
  .projects__container {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1120px;
    margin-inline: auto;
    gap: 2.5rem;
  }
}
