/* ================= GOOGLE FONTS ================= */
:root {
  --header-height: 4rem;

  /*========== Colors ==========*/
  /* Default dark mode colors */
  --hue-color: 250; /* Purple/Blue accent */

  --first-color: hsl(var(--hue-color), 69%, 61%);
  --first-color-second: hsl(var(--hue-color), 69%, 61%);
  --first-color-alt: hsl(var(--hue-color), 57%, 53%);
  --first-color-lighter: hsl(var(--hue-color), 92%, 85%);
  --title-color: hsl(var(--hue-color), 8%, 95%);
  --text-color: hsl(var(--hue-color), 8%, 75%);
  --text-color-light: hsl(var(--hue-color), 8%, 65%);
  --input-color: hsl(var(--hue-color), 29%, 16%);
  --body-color: hsl(var(--hue-color), 28%, 12%);
  --container-color: hsl(var(--hue-color), 29%, 16%);
  /*========== Font and typography ==========*/
  --body-font: 'Poppins', sans-serif;
  --big-font-size: 2rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1.125rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/* Light mode variables */
body.light-mode {
  --first-color: hsl(var(--hue-color), 69%, 61%);
  --first-color-second: hsl(var(--hue-color), 69%, 61%);
  --title-color: hsl(var(--hue-color), 8%, 15%);
  --text-color: hsl(var(--hue-color), 8%, 45%);
  --text-color-light: hsl(var(--hue-color), 8%, 65%);
  --input-color: hsl(var(--hue-color), 70%, 96%);
  --body-color: hsl(var(--hue-color), 60%, 99%);
  --container-color: #fff;
}

/* Responsive typography */
@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 3rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 0 var(--header-height) 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: .3s;
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

/* ================= REUSABLE CSS CLASSES ================= */
.section {
  padding: 4rem 0 2rem;
}

.section__title {
  font-size: var(--h1-font-size);
  text-align: center;
}

.section__subtitle {
  display: block;
  font-size: var(--small-font-size);
  text-align: center;
  margin-bottom: 3rem;
  color: var(--first-color);
}

.container {
  max-width: 1024px;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

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

/* ================= HEADER ================= */
.header {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--body-color);
  box-shadow: 0 -1px 4px rgba(0,0,0,.15);
  transition: .3s;
}

/* Navigation */
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo, .nav__toggle {
  color: var(--title-color);
  font-weight: var(--font-medium);
}

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

.nav__toggle {
  font-size: 1.1rem;
  cursor: pointer;
}

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

.change-theme {
  font-size: 1.25rem;
  color: var(--title-color);
  margin-right: 1rem;
  cursor: pointer;
  transition: color 0.3s;
}

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

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    padding: 2rem 1.5rem 4rem;
    box-shadow: 0 -1px 4px rgba(0,0,0,.15);
    border-radius: 1.5rem 1.5rem 0 0;
    transition: .3s;
  }
}

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

.nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: var(--small-font-size);
  color: var(--title-color);
  font-weight: var(--font-medium);
  transition: color 0.3s;
}

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

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

.show-menu {
  bottom: 0;
}

/* ================= BUTTONS ================= */
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  padding: 1rem 1.75rem;
  border-radius: .5rem;
  font-weight: var(--font-medium);
  transition: .3s;
  cursor: pointer;
  border: none;
}

.button:hover {
  background-color: var(--first-color-alt);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.button__icon {
  margin-left: .5rem;
  transition: .3s;
}

.button:hover .button__icon {
  transform: translateX(5px);
}

.button--flex {
  display: inline-flex;
  align-items: center;
}

.button--ghost {
  background-color: transparent;
  color: var(--first-color);
  border: 2px solid var(--first-color);
}
.button--ghost:hover {
  background-color: var(--first-color);
  color: #fff;
}

/* ================= HOME ================= */
.home__container {
  gap: 1rem;
  padding-top: 2rem;
}

.home__content {
  grid-column: 1/3;
}

.home__title {
  font-size: var(--big-font-size);
  margin-bottom: .75rem;
}

.home__subtitle {
  font-size: var(--h3-font-size);
  color: var(--text-color);
  font-weight: var(--font-medium);
  margin-bottom: .75rem;
}

.home__description {
  margin-bottom: 2rem;
  line-height: 1.6;
}

.home__buttons {
  display: flex;
  gap: 1rem;
}

.home__img {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home__blob-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  animation: blob-bounce 5s infinite alternate;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border: 4px solid var(--first-color);
}

@keyframes blob-bounce {
  0% { transform: translateY(0) scale(1); border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;}
  100% { transform: translateY(-20px) scale(1.05); border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

/* ================= ABOUT ================= */
.about__img {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.about__image {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border: 3px solid var(--first-color);
}

.about__description {
  text-align: center;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* ================= BIG SECTION PADDING (OBJECTIVE) ================= */
.objective {
  background-color: var(--container-color);
  padding: 3rem 0;
  border-radius: 1rem;
  margin-top: 2rem;
}

.objective__content {
  text-align: center;
  padding: 0 2rem;
}

.quote-icon {
  font-size: 2rem;
  color: var(--first-color);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.objective__title {
  margin-bottom: 1rem;
}

.objective__text {
  font-style: italic;
  font-size: var(--h3-font-size);
  line-height: 1.8;
}

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

.skills__content {
  background-color: var(--container-color);
  padding: 1.5rem;
  border-radius: 1rem;
  transition: transform .3s;
}

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

.skills__header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

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

.skills__title {
  font-size: var(--h3-font-size);
}

.skills__list {
  row-gap: 1rem;
  padding-left: 2.25rem;
}

.skills__data {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.skills__data i {
  color: var(--first-color);
}

/* ================= SERVICES ================= */
.services__container {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.services__content {
  position: relative;
  background-color: var(--container-color);
  padding: 3rem 1.5rem 1.5rem;
  border-radius: 1rem;
  text-align: center;
  transition: .3s;
}

.services__content:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.services__icon {
  display: block;
  font-size: 2.5rem;
  color: var(--first-color);
  margin-bottom: 1rem;
}

.services__title {
  font-size: var(--h3-font-size);
  margin-bottom: 1rem;
}

.services__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--first-color-lighter);
  color: var(--first-color);
  font-size: var(--smaller-font-size);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: var(--font-medium);
}

/* ================= PROJECTS ================= */
.projects__container {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.project__card {
  background-color: var(--container-color);
  border-radius: 1rem;
  overflow: hidden;
  transition: .3s;
}

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

.project__imgbox {
  background-color: var(--first-color-lighter);
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--first-color);
}

.project__content {
  padding: 1.5rem;
}

.project__title {
  font-size: var(--h3-font-size);
  margin-bottom: .5rem;
}

.project__description {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

/* ================= EXPERIENCE ================= */
.experience__timeline {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.experience__timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--first-color);
}

.timeline__item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2rem;
}

.timeline__dot {
  position: absolute;
  left: 10px;
  top: 5px;
  width: 12px;
  height: 12px;
  background-color: var(--first-color);
  border-radius: 50%;
}

.timeline__date {
  font-size: var(--small-font-size);
  color: var(--first-color);
  margin-bottom: .5rem;
  font-weight: var(--font-medium);
}

.timeline__title {
  font-size: var(--h3-font-size);
  margin-bottom: .5rem;
}

.timeline__text {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

/* ================= CONTACT ================= */
.contact__container {
  row-gap: 3rem;
}

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

.contact__card {
  background-color: var(--container-color);
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
  transition: .3s;
}

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

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

.contact__card-title, .contact__social-title {
  font-size: var(--h3-font-size);
  margin-bottom: .5rem;
}

.contact__card-data {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

.contact__social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.contact__social-link {
  background-color: var(--container-color);
  color: var(--first-color);
  font-size: 1.25rem;
  padding: .75rem;
  border-radius: .5rem;
  display: inline-flex;
  transition: .3s;
}

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

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

.contact__content {
  background-color: var(--container-color);
  border-radius: .5rem;
  padding: .75rem 1rem .25rem;
  margin-bottom: 1.5rem;
}

.contact__label {
  font-size: var(--smaller-font-size);
  color: var(--title-color);
}

.contact__input {
  width: 100%;
  background-color: transparent;
  color: var(--text-color);
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  border: none;
  outline: none;
  padding: .25rem .5rem .5rem 0;
}

/* ================= FOOTER ================= */
.footer__bg {
  background-color: var(--container-color);
  padding: 2rem 0 3rem;
}

.footer__title {
  font-size: var(--h1-font-size);
  margin-bottom: .25rem;
}

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

.footer__copy {
  font-size: var(--smaller-font-size);
  text-align: center;
  color: var(--text-color-light);
  margin-top: 3rem;
}

/* ================= SCROLL UP ================= */
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -20%;
  background-color: var(--first-color);
  opacity: .8;
  padding: 0 .3rem;
  border-radius: .4rem;
  z-index: var(--z-tooltip);
  transition: .4s;
}

.scrollup:hover {
  background-color: var(--first-color-alt);
  opacity: 1;
}

.scrollup__icon {
  font-size: 1.5rem;
  color: #fff;
  padding: 5px;
}

.show-scroll {
  bottom: 5rem;
}
@media screen and (min-width: 968px) {
  .show-scroll {
    bottom: 3rem;
  }
}

/* ================= ANIMATIONS ================= */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

/* ================= MEDIA QUERIES ================= */
/* For small devices */
@media screen and (max-width: 350px) {
  .container {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .nav__menu {
    padding: 2rem .25rem 4rem;
  }
  .nav__list {
    column-gap: 0;
  }
  .home__content {
    grid-column: 1/3;
  }
}

/* For medium devices */
@media screen and (min-width: 568px) {
  .home__content {
    grid-column: initial;
  }
  .home__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact__inputs {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 768px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
  body {
    margin: 0;
  }

  .header {
    top: 0;
    bottom: initial;
    padding: 0 1rem;
  }

  .nav {
    height: calc(var(--header-height) + 1.5rem);
    column-gap: 1rem;
  }

  .nav__icon, .nav__toggle {
    display: none;
  }

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

  .nav__menu {
    margin-left: auto;
    margin-right: 2rem;
  }

  .change-theme {
    margin: 0;
  }

  .home__container {
    row-gap: 5rem;
    padding-top: 5.5rem;
  }

  .about__container {
    column-gap: 5rem;
  }

  .about__description {
    text-align: left;
  }

  .contact__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: flex-start;
  }

  .footer__container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer__bg {
    padding: 3rem 0 3.5rem;
  }
}

/* For large devices */
@media screen and (min-width: 1024px) {
  .header {
    padding: 0;
  }
  .home__img {
    width: 300px;
    height: 300px;
  }
  .home__blob-img {
    width: 300px;
    height: 300px;
  }
  .about__image {
    width: 300px;
    height: 300px;
  }
  .contact__form {
    width: 460px;
  }
}
