/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Unbounded:wght@200..900&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;
  --hue: 180;
  --first-color: hsl(var(--hue), 80%, 48%);
  --first-color-alt: hsl(var(--hue), 80%, 44%);
  --white-color: hsl(var(--hue), 8%, 92%);
  --black-color: hsl(var(--hue), 4%, 8%);
  --gray-color: hsl(var(--hue), 4%, 50%);
  --body-color: hsl(var(--hue), 8%, 8%);
  --container-color: hsl(var(--hue), 8%, 12%);
  --body-font: "Unbounded", sans-serif;
  --bigger-font-size: 2rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --z-tooltip: 10;
  --z-fixed: 100;
}

/* Light mode */
:root {
  --body-color: #ffffff;
  --container-color: #f8f9fa;
  --container-color-alt: #ffffff;
}

body:not(.dark-theme) {
  color: black;
}

body:not(.dark-theme) .nav__link,
body:not(.dark-theme) .button__ghost,
body:not(.dark-theme) .nav__logo,
body:not(.dark-theme) .home__link,
body:not(.dark-theme) .contact__input,
body:not(.dark-theme) .contact__link,
body:not(.dark-theme) .footer__logo,
body:not(.dark-theme) .footer__link,
body:not(.dark-theme) .scrollup {
  color: black;
}

body:not(.dark-theme) .nav__link:hover,
body:not(.dark-theme) .button__ghost:hover,
body:not(.dark-theme) .nav__logo:hover,
body:not(.dark-theme) .home__link:hover,
body:not(.dark-theme) .contact__link:hover,
body:not(.dark-theme) .footer__logo:hover,
body:not(.dark-theme) .footer__link:hover {
  color: var(--first-color);
}

/* Dark mode */
body.dark-theme {
  --body-color: #0f0f0f;
  --container-color: #1a1a1a;
  --container-color-alt: #252525;
}

.change-theme {
  font-size: 1.25rem;
  cursor: pointer;
  transition: color .3s;
}

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

/* Responsive typography */
@media screen and (min-width: 1150px) {
  :root {
    --bigger-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;
  }
}

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

html {
  scroll-behavior: smooth;
}

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);
  position: relative;
}

#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

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: 1.5rem;
}

.main {
  overflow: hidden;
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  left: 0;
  top: 0;
  background-color: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(var(--body-color-rgb), 0.7);
  z-index: var(--z-fixed);
  transition: box-shadow .4s;
}

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

.nav__logo {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--first-color), #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: var(--font-semi-bold);
  transition: color .4s;
}

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

.nav__toggle,
.nav__close {
  font-size: 1.5rem;
  cursor: pointer;
}

.nav__toggle {
  position: relative;
  z-index: calc(var(--z-fixed) + 10);
}

/* Hide hamburger when menu is open */
.show-menu~.nav__toggle {
  display: none;
}

@media screen and (max-width: 1150px) {
  .nav__menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    box-shadow: 0 8px 16px hsla(0, 0%, 0%, .5);
    padding-block: 5rem 4rem;
    border-radius: 0 0 1.5rem 1.5rem;
    transform: translateY(-150%);
    transition: transform .4s ease;
    z-index: 99;
  }
}

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

.nav__link {
  position: relative;
  color: var(--white-color);
  font-weight: var(--font-medium);
  transition: color .4s, width .4s;
}

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

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

.nav__link:hover::after {
  width: 60%;
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

.show-menu {
  transform: translateY(0) !important;
}

.shadow-header {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.active-link::after {
  width: 60%;
}

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

.home__description {
  white-space: pre-line;
}

.floating {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.home__image {
  width: 250px;
  height: 250px;
  background-color: black;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 5px solid var(--first-color);
  box-shadow: 0 8px 32px hsla(var(--hue), 80%, 48%, .3);
}

.home__img {
  width: 400px;
  filter: drop-shadow(0 4px 16px hsla(0, 0%, 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: 1.5rem;
  transition: transform .4s, color .4s;
}

.home__link:hover {
  transform: translateY(-.25rem);
  color: var(--first-color);
}

.home__data {
  text-align: center;
  row-gap: 1rem;
}

.home__subtitle span {
  color: var(--first-color);
}

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

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

.home__buttons .button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.home__buttons .button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s;
  z-index: -1;
}

.home__buttons .button:hover::before {
  left: 0;
}

/*=============== BUTTON ===============*/
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--first-color);
  color: var(--black-color);
  font-weight: var(--font-medium);
  padding: 1rem 1.5rem;
  border-radius: .5rem;
  transition: box-shadow .4s, color .4s;
}

.button:hover {
  box-shadow: 0 8px 24px hsla(var(--hue), 80%, 48%, .3);
}

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

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

/*=============== ABOUT ===============*/
.about__container {
  row-gap: 4rem;
}

.about__content {
  display: grid;
  row-gap: 3rem;
}

.about__data {
  text-align: center;
}

.about__description {
  margin-bottom: 3rem;
  white-space: pre-line;
}

.about__subtitle {
  display: flex;
  align-items: center;
  column-gap: .5rem;
  font-size: var(--h3-font-size);
  color: var(--first-color);
  margin-bottom: 1rem;
}

.about__subtitle i {
  font-size: 1.5rem;
  font-weight: initial;
}

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

.about__item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(145deg, var(--first-color), #00a8b0);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: default;
}

.about__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 180, 180, 0.4);
}

/*=============== CERTIFICATIONS ===============*/
.certifications__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
  max-width: 900px;
  margin-inline: auto;
}

.certification__card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 16px hsla(0, 0%, 0%, .5);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  justify-self: center;
}

.certification__card:hover {
  transform: scale(1.02) rotate(0.5deg);
  box-shadow: 0 20px 30px -10px rgba(0, 200, 200, 0.5);
}

.certification__img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.certification__title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: var(--white-color);
  padding: 1.5rem 1rem .75rem;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  text-align: center;
}

.certif-title {
  justify-content: center;
  text-align: center;
}

/*=============== PROJECTS ===============*/
.projects__container {
  row-gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.projects__card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0;
  box-shadow: 0 8px 16px hsla(0, 0%, 0%, .5);
  transition: box-shadow .4s;
  justify-self: center;
}

.projects__img {
  border-radius: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.projects__data {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  display: grid;
  place-content: center;
  row-gap: .5rem;
  text-align: center;
  padding: 0 1rem;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}

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

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

.projects__data .button {
  justify-self: center;
  background-color: hsla(var(--hue), 8%, 8%, .4);
  margin-top: .5rem;
}

.projects__card:hover {
  box-shadow: 0 8px 16px hsla(var(--hue), 80%, 48%, .2);
}

.projects__card:hover .projects__data {
  opacity: 1;
  pointer-events: initial;
}

/*=============== RESUME TIMELINE ===============*/
.resume__container {
  row-gap: 4rem;
}

.resume__content {
  row-gap: 1rem;
}

.resume__subtitle {
  display: flex;
  align-items: center;
  column-gap: .5rem;
  font-size: var(--h3-font-size);
  color: var(--first-color);
}

.resume__subtitle i {
  font-size: 1.5rem;
  font-weight: initial;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.3rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--first-color);
  border: 3px solid var(--body-color);
}

.timeline-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 0;
  border-radius: 10px;
}

.timeline-date {
  display: block;
  font-size: var(--small-font-size);
  color: var(--gray-color);
  margin: 0.25rem 0 0.5rem;
}

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

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

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

.form-group {
  position: relative;
}

.floating-label {
  position: absolute;
  left: 1rem;
  top: 1.2rem;
  color: var(--gray-color);
  transition: 0.2s ease all;
  pointer-events: none;
}

.contact__input:focus+.floating-label,
.contact__input:not(:placeholder-shown)+.floating-label {
  top: -0.5rem;
  left: 0.8rem;
  font-size: 0.75rem;
  background: var(--body-color);
  padding: 0 0.2rem;
  color: var(--first-color);
}

.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: .5rem;
  font-weight: var(--font-medium);
}

.contact__input::placeholder {
  color: transparent;
}

.contact__input:focus::placeholder {
  color: transparent;
}

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

.contact__form .button {
  cursor: pointer;
}

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

.contact__data {
  row-gap: 1rem;
}

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

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

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

.contact__link {
  color: var(--white-color);
  font-size: 1.5rem;
  transition: transform .4s, color .4s;
}

.contact__link:hover {
  transform: translateY(-.25rem);
  color: var(--first-color);
}

/*=============== FOOTER ===============*/
.footer {
  padding-block: 5rem 2rem;
}

.footer__container {
  row-gap: 2rem;
}

.footer__links,
.footer__social {
  display: flex;
  justify-content: center;
}

.footer__logo {
  color: var(--white-color);
  font-size: var(--h1-font-size);
  font-weight: var(--font-semi-bold);
  justify-self: center;
  margin-bottom: 1rem;
  transition: color .4s;
}

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

.footer__links {
  column-gap: 2rem;
}

.footer__link {
  color: var(--white-color);
  transition: color .4s;
}

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

.footer__social {
  column-gap: 1.5rem;
}

.footer__social-link {
  color: var(--first-color);
  font-size: 1.5rem;
  transition: transform .4s;
}

.footer__social-link:hover {
  transform: translateY(-.25rem);
}

.footer__copy {
  display: block;
  margin-top: 5rem;
  text-align: center;
  font-size: var(--small-font-size);
  color: var(--gray-color);
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: .6rem;
  background-color: hsl(0, 0%, 15%);
  border-radius: .5rem;
}

::-webkit-scrollbar-thumb {
  background-color: hsl(0, 0%, 25%);
  border-radius: .5rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(0, 0%, 35%);
}

/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: 3rem;
  background: var(--first-color);
  color: white;
  padding: 0.5rem;
  border-radius: 50%;
  box-shadow: 0 4px 16px hsla(0, 0%, 0%, 0.3);
  display: inline-flex;
  font-size: 1.25rem;
  z-index: var(--z-tooltip);
  transition: 0.3s;
  opacity: 0;
  pointer-events: none;
}

.scrollup:hover {
  background: var(--first-color-alt);
  transform: translateY(-5px);
}

.show-scroll {
  bottom: 100px;
  opacity: 1;
  pointer-events: auto;
}

/*=============== BREAKPOINTS ===============*/
@media screen and (max-width: 320px) {
  .container {
    margin-inline: 1rem;
  }

  .home__image {
    width: 200px;
    height: 200px;
  }

  .home__img {
    width: 170px;
  }

  .projects__data {
    padding-inline: .5rem;
  }

  .projects__data .button {
    padding: .5rem .75rem;
  }

  .home__description,
  .about__description {
    white-space: pre-line;
  }
}

@media screen and (min-width: 540px) {

  .home__container,
  .about__container,
  .projects__container,
  .resume__container,
  .contact__container {
    grid-template-columns: 400px;
    justify-content: center;
  }
}

@media screen and (min-width: 768px) {

  .home__container,
  .about__container {
    grid-template-columns: repeat(2, 350px);
    align-items: center;
  }

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

  .home__buttons {
    justify-content: initial;
  }

  .projects__container,
  .resume__container,
  .contact__container {
    grid-template-columns: repeat(2, 350px);
  }

  .certifications__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact__content {
    align-content: flex-start;
  }

  .contact__form {
    order: 1;
  }

  .home__description,
  .about__description {
    white-space: pre-line;
  }
}

@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }

  .section {
    padding-block: 7rem 2rem;
  }

  .section__title {
    margin-bottom: 3rem;
  }

  .nav {
    height: calc(var(--header-height) + 2rem);
  }

  .nav__toggle,
  .nav__close {
    display: none;
  }

  .nav__list {
    flex-direction: row;
    column-gap: 4rem;
  }

  .home__container {
    grid-template-columns: 400px 480px;
    column-gap: 7rem;
    padding-block: 8rem 3rem;
  }

  .home__image {
    width: 250px;
    height: 250px;
    border-width: 8px;
  }

  .home__img {
    width: 400px;
  }

  .home__social {
    left: -4rem;
  }

  .home__data {
    row-gap: 1.5rem;
  }

  .home__buttons {
    margin-top: 3.5rem;
    column-gap: 1.5rem;
  }

  .about__container {
    grid-template-columns: 540px 400px;
    column-gap: 6rem;
    padding-block: 5rem 3rem;
  }

  .about__content {
    row-gap: 5rem;
  }

  .about__data .section__title {
    margin-bottom: 1.5rem;
  }

  .projects {
    padding-block: 8rem 4rem;
  }

  .projects__container {
    grid-template-columns: repeat(2, 350px);
    gap: 3rem 2rem;
  }

  .projects__data .button {
    margin-top: 1rem;
  }

  .resume {
    padding-block: 8rem 4rem;
  }

  .resume__container {
    grid-template-columns: repeat(2, 465px);
    column-gap: 7rem;
  }

  .resume__content {
    row-gap: 1.5rem;
  }

  .contact {
    padding-block: 8rem 4rem;
  }

  .contact__container {
    grid-template-columns: 310px 450px;
    column-gap: 10rem;
  }

  .contact__content {
    row-gap: 2rem;
  }

  .contact__data {
    row-gap: 1.5rem;
  }

  .contact__form .button {
    justify-self: center;
    margin-top: 1rem;
  }

  .contact__area {
    height: 14rem;
  }

  .footer__container {
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
  }

  .footer__logo {
    font-size: var(--h2-font-size);
    justify-self: flex-start;
    margin-bottom: 0;
  }

  .footer__links {
    column-gap: 3rem;
  }

  .footer__social {
    justify-self: flex-end;
  }

  .scrollup {
    right: 35px;
  }

  .home__description,
  .about__description {
    white-space: pre-line;
  }
}

@media screen and (min-width: 2048px) {
  body {
    zoom: 1.2;
  }
}