/*===== 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 =====*/
  --hue-color: 224;
  --first-color: hsl(var(--hue-color), 89%, 60%);
  --second-color: hsl(var(--hue-color), 56%, 12%);
  --text-color: #333;
  --background-color: #f4f7f6;
  
  /*===== Typography =====*/
  --body-font: "Poppins", sans-serif;
  --big-font-size: 2.5rem;
  --h1-font-size: 2rem;
  --h2-font-size: 1.5rem;
  --normal-font-size: 1rem;
  --small-font-size: .875rem;
  
  /*===== Margins =====*/
  --mb-1: .5rem;
  --mb-2: 1rem;
  --mb-3: 1.5rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;
  
  /*===== z-index =====*/
  --z-back: -10;
  --z-fixed: 100;
}

@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 4rem;
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --normal-font-size: 1rem;
    --small-font-size: .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(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
}

h1, h2, h3, p {
  margin: 0;
}

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

a {
  text-decoration: none;
  color: inherit;
}

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-bottom: var(--mb-4);
  text-align: center;
}

.section-title::after {
  content: "";
  position: absolute;
  width: 64px;
  height: 4px;
  background-color: var(--first-color);
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.section {
  padding: var(--mb-6) 0;
}

/*===== LAYOUT =====*/
.bd-grid {
  max-width: 1024px;
  width: calc(100% - 2rem);
  margin-left: auto;
  margin-right: auto;
  display: grid;
}

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

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

.nav__logo {
  font-size: var(--h2-font-size);
  color: var(--second-color);
  font-weight: 700;
}

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

@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;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav__list {
    text-align: center;
  }

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

  .nav__link {
    font-size: var(--h2-font-size);
    color: #fff;
    padding: var(--mb-1);
    display: block;
    border-radius: .5rem;
    transition: background-color 0.3s;
  }

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

  .active-link {
    background-color: var(--first-color);
  }
}

/* Desktop navigation */
@media screen and (min-width: 768px) {
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  
  .nav__list {
    display: flex;
  }
  
  .nav__item {
    margin-left: var(--mb-4);
  }

  .nav__toggle {
    display: none;
  }

  .nav__link {
    position: relative;
    color: var(--second-color);
    padding-bottom: 0.5rem;
    transition: color 0.3s;
  }
  
  .nav__link:hover, .active-link {
    color: var(--first-color);
  }
  
  .nav__link:hover::after, .active-link::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--first-color);
    bottom: 0;
    left: 0;
    border-radius: 2px;
  }
}

.show {
  right: 0;
}

/*===== HOME =====*/
.home {
  padding-top: var(--mb-6);
  padding-bottom: var(--mb-6);
}

.home__data {
  text-align: center;
  margin-bottom: var(--mb-4);
}

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

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

.home__subtitle {
  font-size: var(--h2-font-size);
  font-weight: 400;
  margin-top: var(--mb-1);
  color: var(--text-color);
}

.home__social {
  display: flex;
  justify-content: center;
  gap: var(--mb-2);
  margin-top: var(--mb-4);
}

.home__social-icon {
  font-size: 2rem;
  color: var(--second-color);
  transition: color 0.3s;
}

.home__social-icon:hover {
  color: var(--first-color);
}

.home__img {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: var(--mb-4);
}

.home__img img {
    border-radius: 50%;
}

.home__blob {
  fill: var(--first-color);
  width: 300px;
  height: auto;
  opacity: 0.8;
  animation: blob-animate 5s ease-in-out infinite alternate;
}

@keyframes blob-animate {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.home__blob-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  object-fit: cover;
  clip-path: url(#mask0);
  border-radius: 50%;
}

/* Desktop Home Layout */
@media screen and (min-width: 768px) {
  .home {
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
  }
  .home__data {
    text-align: left;
  }
  .home__social {
    justify-content: flex-start;
    margin-top: var(--mb-3);
  }
  .home__img {
    margin-top: 0;
    justify-content: flex-end;
  }
  .home__blob {
    width: 400px;
  }
}

/*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: transform 0.3s, box-shadow 0.3s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ===== ABOUT =====*/
.about__container {
  text-align: center;
}

.about__img {
  margin-bottom: var(--mb-3);
  display: flex;
  justify-content: center;
}

.about__img img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--first-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Desktop About Layout */
@media screen and (min-width: 768px) {
  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: left;
    column-gap: var(--mb-6);
  }
  .about__text-content {
    text-align: center;
  }
  .about__img {
    justify-content: flex-end;
  }
  .about__img img {
    width: 300px;
    height: 300px;
  }
}

/* ===== SKILLS =====*/
.skills__container {
  text-align: center;
}

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

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

.skills__data {
  display: flex;
  align-items: center;
  position: relative;
  font-weight: var(--font-semi);
  padding: 1rem;
  margin-bottom: var(--mb-2);
  border-radius: 0.5rem;
  background-color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

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

.skills__names {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

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

.skills__percentage {
  color: var(--text-color);
}

.skills__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  background-color: var(--first-color);
  height: 0.5rem;
  border-radius: 0.5rem;
  z-index: var(--z-back);
  transition: width 1s ease-in-out;
}

.skills__html { width: 95%; }
.skills__css { width: 85%; }
.skills__js { width: 65%; }
.skills__ux { width: 90%; }
.skills__figma { width: 95%; }
.skills__research { width: 80%; }

.skills__img-container {
  display: flex;
  justify-content: center;
  margin-top: var(--mb-4);
}

.skills__img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Desktop Skills Layout */
@media screen and (min-width: 768px) {
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: left;
    column-gap: var(--mb-6);
  }
  .skills__img {
    max-width: 450px;
    justify-self: center;
  }
}

/* ===== WORK =====*/
.work__intro-text{
  text-align: center;
}

.work__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--mb-4);
  justify-content: center;
}

.work__img {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

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

.work__img:hover {
  transform: translateY(-5px);
}

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

.work__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(var(--first-color-rgb), 0.8);
  color: #5b8dce;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s;
}

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

/* ===== CONTACT =====*/
.contact__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--mb-4);
}

.contact__info {
  text-align: center;
}

.contact__details {
  margin-top: var(--mb-4);
}

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

.contact__details p {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--mb-1);
}

.contact__details p i {
  font-size: 1.2rem;
  margin-right: var(--mb-1);
}

.contact__social-links {
  margin-top: var(--mb-4);
}

.contact__social-links h3 {
  margin-bottom: var(--mb-2);
  color: var(--first-color);
}

.contact__link {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--mb-1);
  color: var(--text-color);
  transition: color 0.3s;
}

.contact__link:hover {
  color: var(--first-color);
}

.contact__link i {
  font-size: 1.2rem;
  margin-right: var(--mb-1);
}

.contact__form {
  display: grid;
  gap: var(--mb-2);
  background-color: #fff;
  padding: var(--mb-4);
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.contact__input {
  width: 100%;
  font-family: var(--body-font);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  outline: none;
  font-size: var(--normal-font-size);
}

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

.contact__button {
  margin-top: var(--mb-2);
  border: none;
  cursor: pointer;
  width: auto;
  justify-self: center;
}

/* Desktop Contact Layout */
@media screen and (min-width: 768px) {
  .contact__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: flex-start;
    text-align: left;
  }

  .contact__info {
    text-align: left;
  }

  .contact__details p, .contact__link {
    justify-content: flex-start;
  }
}

/* ===== FOOTER =====*/
.footer {
  background-color: var(--second-color);
  color: #fff;
  text-align: center;
  padding: var(--mb-4) 0;
}

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

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

.footer__icon:hover {
  color: var(--first-color);
}

.footer__copy {
  font-size: var(--small-font-size);
}