/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");
/*===== VARIABLES CSS =====*/
:root {
  --header-height: 3rem;
  --font-semi: 600;
  /*===== Colors =====*/
  /* Modern color palette */
  --hue-color: 210;
  --first-color: hsl(var(--hue-color), 70%, 50%);
  --second-color: hsl(var(--hue-color), 30%, 15%);
  --accent-color: hsl(35, 90%, 60%);
  --light-color: hsl(var(--hue-color), 30%, 95%);
  --dark-color: hsl(var(--hue-color), 30%, 8%);
  /*===== Font and typography =====*/
  --body-font: "Poppins", sans-serif;
  --big-font-size: 2.5rem;
  --h2-font-size: 1.5rem;
  --normal-font-size: 1rem;
  --smaller-font-size: 0.875rem;
  /*===== Margins =====*/
  --mb-2: 1rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;
  /*===== z index =====*/
  --z-back: -10;
  --z-fixed: 100;
  --second-color-rgb: 30, 42, 56;
  --first-color-rgb: 66, 135, 245;
}

@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 3.5rem;
    --h2-font-size: 2rem;
    --normal-font-size: 1rem;
    --smaller-font-size: 0.875rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--second-color);
  background-color: var(--light-color);
  line-height: 1.6;
}

h1, h2, p {
  margin: 0;
}

h1, h2, h3 {
  font-weight: var(--font-semi);
}

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

a {
  text-decoration: none;
  color: var(--second-color);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--first-color);
}

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

/*===== CLASS CSS ===== */
.section-title {
  position: relative;
  font-size: var(--h2-font-size);
  color: var(--first-color);
  margin-top: var(--mb-2);
  margin-bottom: var(--mb-4);
  text-align: center;
  letter-spacing: 0.05em;
}

.section-title::after {
  position: absolute;
  content: "";
  width: 64px;
  height: 0.18rem;
  left: 0;
  right: 0;
  margin: auto;
  top: 2rem;
  background-color: var(--first-color);
}

.section {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

/*===== LAYOUT =====*/
.bd-grid {
  max-width: 1200px;
  display: grid;
  margin-left: var(--mb-2);
  margin-right: var(--mb-2);
}

.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/*===== NAV =====*/
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: var(--font-semi);
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 80%;
    height: 100%;
    padding: 2rem;
    background-color: var(--second-color);
    transition: 0.5s;
    border-radius: 0 0 0 20px;
  }
}

.nav__item {
  margin-bottom: var(--mb-4);
}

.nav__link {
  position: relative;
  color: #fff;
  transition: all 0.3s ease;
}

.nav__link:hover {
  color: var(--accent-color);
}

.nav__link:hover::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 0.18rem;
  left: 0;
  top: 2rem;
  background-color: var(--accent-color);
}

.nav__logo {
  color: var(--second-color);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nav__toggle {
  color: var(--second-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/*Active menu*/
.active-link::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 0.18rem;
  left: 0;
  top: 2rem;
  background-color: var(--first-color);
}

/*=== Show menu ===*/
.show {
  right: 0;
}

/*===== HOME =====*/
.home {
  position: relative;
  row-gap: 5rem;
  padding: 4rem 0 5rem;
}

.home__data {
  align-self: center;
}

.home__title {
  font-size: var(--big-font-size);
  margin-bottom: var(--mb-5);
  font-weight: 700;
  line-height: 1.2;
}

.home__title-color {
  color: var(--first-color);
}

.home__social {
  display: flex;
  flex-direction: column;
}

.home__social-icon {
  width: max-content;
  margin-bottom: var(--mb-2);
  font-size: 1.5rem;
  color: var(--second-color);
  transition: all 0.3s ease;
}

.home__social-icon:hover {
  color: var(--first-color);
  transform: translateY(-3px);
}

.home__img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 260px;
}

.home__blob {
  fill: var(--first-color);
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.15));
}

.home__blob-img {
  width: 360px;
}

/*BUTTONS*/
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  padding: 0.75rem 2.5rem;
  font-weight: var(--font-semi);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.button:hover {
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
  background-color: hsl(var(--hue-color), 70%, 45%);
}

/* ===== ABOUT =====*/
.about__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media screen and (min-width: 768px) {
  .about__container {
    grid-template-columns: 350px 1fr;
    align-items: center;
  }
  
  .about__photo-container {
    width: 100%;
    margin: 0;
  }
  
  .about__data {
    padding-left: 1rem;
  }
}

.about__photo-container {
  position: relative;
  width: 280px;
  margin: 0 auto;
}

.about__img-container {
  position: relative;
}

.about__photo-container {
  position: relative;
  width: 280px;
  margin: 0 auto 3rem;
}

.about__img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease;
  width: 90%;
  margin: 0 auto;
  height: 380px;
}

.about__img-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(var(--first-color-rgb), 0.1),
    rgba(var(--first-color-rgb), 0.3)
  );
  z-index: 1;
}

.about__img-container:hover .about__img-wrapper {
  transform: translateY(-8px);
}

.about__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s ease;
}

.about__img-container:hover .about__img {
  transform: scale(1.08);
}

.about__experience {
  position: absolute;
  right: -20px;
  bottom: 30px;
  background-color: var(--first-color);
  color: #fff;
  padding: 1.2rem;
  border-radius: 0.8rem;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.about__img-container:hover .about__experience {
  transform: translateX(-5px) translateY(-5px);
}

.about__experience-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.about__experience-text {
  font-size: 0.8rem;
  text-align: center;
}

.about__education {
  position: absolute;
  right: -20px;
  bottom: 30px;
  background-color: var(--first-color);
  color: #fff;
  padding: 1.2rem;
  border-radius: 0.8rem;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.about__img-container:hover .about__education {
  transform: translateX(-5px) translateY(-5px);
}

.about__education-degree {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.about__education-text {
  font-size: 0.8rem;
  text-align: center;
}

.about__data {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about__info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__subtitle {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--second-color);
}

.about__name {
  color: var(--first-color);
  position: relative;
}

.about__name::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--first-color);
  border-radius: 5px;
}

.about__profession {
  color: hsl(var(--hue-color), 40%, 50%);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.about__text {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about__details {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.about__detail-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.about__detail-icon {
  color: var(--first-color);
  font-size: 1.2rem;
}

.about__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.button-light {
  background-color: transparent;
  border: 2px solid var(--first-color);
  color: var(--first-color);
}

.button-light:hover {
  background-color: var(--first-color);
  color: #fff;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.about__stat {
  background-color: #fff;
  padding: 1.25rem;
  border-radius: 0.8rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: all 0.3s ease;
}

.about__stat:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  background-color: var(--first-color);
  color: #fff;
}

.about__stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--first-color);
  transition: all 0.3s ease;
}

.about__stat:hover .about__stat-number {
  color: #fff;
}

.about__stat-text {
  font-size: 0.75rem;
  line-height: 1.3;
}

@media screen and (max-width: 576px) {
  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Transparent Shapes */
.shape {
  position: absolute;
  z-index: 5;
  opacity: 0.6;
}

.shape-1 {
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, transparent 50%, var(--accent-color) 50%);
  transform: rotate(45deg);
  animation: floatAnimation 6s ease-in-out infinite alternate;
}

.shape-2 {
  bottom: 30px;
  left: -25px;
  width: 80px;
  height: 80px;
  background-color: var(--first-color);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: floatAnimation 8s ease-in-out infinite alternate-reverse;
}

.shape-3 {
  top: 40%;
  right: -15px;
  width: 60px;
  height: 60px;
  background-color: var(--accent-color);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation: floatAnimation 7s ease-in-out infinite alternate;
}

/* Rectangular shapes in the background of the image container */
.about__shape {
  position: absolute;
  opacity: 0.4;
  z-index: -1;
}

.rect-shape-1 {
  top: -15px;
  right: -15px;
  width: 100px;
  height: 100px;
  background-color: var(--first-color);
  border-radius: 0.5rem;
  transform: rotate(15deg);
}

.rect-shape-2 {
  bottom: 20px;
  left: -20px;
  width: 80px;
  height: 120px;
  background-color: var(--accent-color);
  border-radius: 0.5rem;
  transform: rotate(-10deg);
}

.rect-shape-3 {
  top: 45%;
  right: -25px;
  width: 60px;
  height: 60px;
  border: 3px solid var(--first-color);
  background-color: transparent;
  border-radius: 0.25rem;
  transform: rotate(30deg);
}

/* Animations for the shapes */
@keyframes floatAnimation {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
  100% {
    transform: translateY(5px) rotate(-5deg);
  }
}

/* ===== SKILLS =====*/
.skills__container {
  row-gap: 2rem;
  text-align: center;
}

.skills__subtitle {
  margin-bottom: var(--mb-2);
  color: var(--first-color);
}

.skills__text {
  margin-bottom: var(--mb-4);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.skills__data {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(14, 36, 49, 0.1);
  background-color: #fff;
  transition: all 0.3s ease;
}

.skills__data:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(14, 36, 49, 0.15);
}

.skills__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--first-color);
}

.skills__names {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skills__img {
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(14, 36, 49, 0.15);
}

/* ===== WORK =====*/
.work__filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--mb-4);
  gap: 0.5rem;
}

.work__filter-button {
  background-color: transparent;
  border: 1px solid var(--first-color);
  color: var(--first-color);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: var(--smaller-font-size);
  font-weight: var(--font-semi);
  cursor: pointer;
  transition: all 0.3s ease;
}

.work__filter-button.active, .work__filter-button:hover {
  background-color: var(--first-color);
  color: #fff;
}

.work__container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.work__card {
  position: relative;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(14, 36, 49, 0.1);
  overflow: hidden;
  background-color: #fff;
  transition: all 0.3s ease;
}

.work__card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(14, 36, 49, 0.2);
}

.work__img-container {
  position: relative;
  overflow: hidden;
}

.work__img {
  transition: 0.5s;
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.work__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(var(--second-color-rgb), 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s ease;
}

.work__card:hover .work__overlay {
  opacity: 1;
}

.work__card:hover .work__img {
  transform: scale(1.1);
}

.work__overlay-content {
  display: flex;
  gap: 1rem;
}

.work__overlay-icon {
  background-color: var(--first-color);
  color: #fff;
  font-size: 1.5rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.work__card:hover .work__overlay-icon {
  transform: translateY(0);
  opacity: 1;
}

.work__card:hover .work__overlay-icon:nth-child(1) {
  transition-delay: 0.1s;
}

.work__card:hover .work__overlay-icon:nth-child(2) {
  transition-delay: 0.2s;
}

.work__overlay-icon:hover {
  background-color: var(--accent-color);
  transform: translateY(-5px);
}

.work__data {
  padding: 1.5rem;
}

.work__title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--second-color);
}

.work__description {
  margin-bottom: 1rem;
  color: hsl(var(--hue-color), 20%, 50%);
  font-size: var(--smaller-font-size);
}

.work__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.work__button {
  display: inline-flex;
  align-items: center;
  color: var(--first-color);
  font-size: var(--smaller-font-size);
  font-weight: var(--font-semi);
  transition: all 0.3s ease;
}

.work__button:hover {
  color: var(--accent-color);
}

.work__button:hover i {
  transform: translateX(5px);
}

.work__button i {
  margin-left: 0.3rem;
  transition: all 0.3s ease;
}

.work__button-github i {
  margin-right: 0.3rem;
  margin-left: 0;
}

.work__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.work__tech-item {
  background-color: var(--light-color);
  color: var(--second-color);
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* ===== CONTACT =====*/
.contact__input {
  width: 100%;
  font-size: var(--normal-font-size);
  font-weight: var(--font-semi);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1.5px solid var(--second-color);
  outline: none;
  margin-bottom: var(--mb-4);
  transition: all 0.3s ease;
}

.contact__input:focus {
  border-color: var(--first-color);
  box-shadow: 0 0 8px rgba(var(--first-color), 0.2);
}

.contact__button {
  display: block;
  border: none;
  outline: none;
  font-size: var(--normal-font-size);
  cursor: pointer;
  margin-left: auto;
}

.contact__container {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.contact__subtitle {
  margin-bottom: var(--mb-2);
  color: var(--first-color);
  font-size: 1.2rem;
}

.contact__text {
  margin-bottom: 2rem;
}

.contact__info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact__card {
  background-color: #fff;
  padding: 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 10px rgba(14, 36, 49, 0.1);
  display: flex;
  align-items: center;
  column-gap: 1rem;
  transition: all 0.3s ease;
}

.contact__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(14, 36, 49, 0.15);
}

.contact__card-icon {
  font-size: 2rem;
  color: var(--first-color);
}

.contact__card h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--second-color);
}

.contact__card span {
  font-size: var(--smaller-font-size);
  color: hsl(var(--hue-color), 20%, 50%);
}

.contact__social {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background-color: var(--first-color);
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.contact__social-link:hover {
  background-color: var(--accent-color);
  transform: translateY(-5px);
  color: #fff;
}

.contact__form-container {
  background-color: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(14, 36, 49, 0.1);
}

.contact__form-div {
  position: relative;
  margin-bottom: 1.5rem;
}

.contact__form-area {
  height: auto;
}

.contact__input {
  width: 100%;
  font-size: 0.9rem;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--hue-color), 20%, 85%);
  outline: none;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
}

.contact__input:focus {
  border-color: var(--first-color);
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.1);
}

.contact__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
}

.contact__button-icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.contact__button:hover .contact__button-icon {
  transform: translateX(5px);
}

/* ===== FOOTER =====*/
.footer {
  background-color: var(--second-color);
  color: #fff;
  text-align: center;
  font-weight: var(--font-semi);
  padding: 2rem 0;
}

.footer__title {
  font-size: 2rem;
  margin-bottom: var(--mb-4);
}

.footer__social {
  margin-bottom: var(--mb-4);
}

.footer__icon {
  font-size: 1.5rem;
  color: #fff;
  margin: 0 var(--mb-2);
  transition: all 0.3s ease;
}

.footer__icon:hover {
  color: var(--accent-color);
  transform: translateY(-5px);
}

.footer__copy {
  font-size: var(--smaller-font-size);
  opacity: 0.7;
}

/* ===== MEDIA QUERIES=====*/
@media screen and (max-width: 320px) {
  .home {
    row-gap: 2rem;
  }
  .home__img {
    width: 200px;
  }
}
@media screen and (min-width: 576px) {
  .home {
    padding: 4rem 0 2rem;
  }
  .home__social {
    padding-top: 0;
    padding-bottom: 2.5rem;
    flex-direction: row;
    align-self: flex-end;
  }
  .home__social-icon {
    margin-bottom: 0;
    margin-right: var(--mb-4);
  }
  .home__img {
    width: 300px;
    bottom: 25%;
  }
  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
  }
  .skills__container {
    grid-template-columns: 0.7fr;
    justify-content: center;
    column-gap: 1rem;
  }
  .contact__form {
    width: 360px;
    padding-top: 2rem;
  }
  .contact__container {
    justify-items: center;
  }
}
@media screen and (min-width: 768px) {
  body {
    margin: 0;
  }
  .section {
    padding-top: 4rem;
    padding-bottom: 3rem;
  }
  .section-title {
    margin-bottom: var(--mb-6);
  }
  .section-title::after {
    width: 80px;
    top: 3rem;
  }
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  .nav__list {
    display: flex;
    padding-top: 0;
  }
  .nav__item {
    margin-left: var(--mb-6);
    margin-bottom: 0;
  }
  .nav__toggle {
    display: none;
  }
  .nav__link {
    color: var(--second-color);
  }
  .home {
    padding: 8rem 0 2rem;
  }
  .home__img {
    width: 400px;
    bottom: 10%;
  }
  .about__container {
    padding-top: 2rem;
  }
  .about__img img {
    width: 300px;
  }
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
    align-items: center;
    text-align: initial;
  }
}
@media screen and (min-width: 992px) {
  .bd-grid {
    margin-left: auto;
    margin-right: auto;
  }
  .home {
    padding: 10rem 0 2rem;
  }
  .home__img {
    width: 450px;
  }
}