/*=============== FONTS (self-hosted Poppins, latin) ===============*/
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  /*   
        Purple: hsl(250, 66%, 75%)
        Blue: hsl(207, 90%, 72%)
        Pink: hsl(356, 66%, 75%)
        Teal: hsl(174, 63%, 62%)
  */
  --first-hue: 250;
  --sat: 66%;
  --lig: 75%;
  --second-hue: 219;
  --first-color: hsl(var(--first-hue), var(--sat), var(--lig));
  --first-color-alt: hsl(var(--first-hue), var(--sat), 71%); /* -4% */
  --title-color: hsl(var(--second-hue), 15%, 95%);
  --text-color: hsl(var(--second-hue), 8%, 75%);
  --text-color-light: hsl(var(--second-hue), 4%, 55%);
  --body-color: #000000;
  --container-color: hsl(240, 5%, 7%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --biggest-font-size: 1.75rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;
  --smaller-font-size: 0.75rem;
  --tiny-font-size: 0.625rem;

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

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

  /*========== Background motion (dark) ==========*/
  /* HSL triplets are read by assets/js/bg-motion.js */
  --bg-node: 250, 45%, 82%;
  --bg-link: 250, 35%, 68%;
  --bg-pulse-a: 250, 90%, 78%;
  --bg-pulse-b: 200, 90%, 70%;
  --bg-node-alpha: 0.6;
  --bg-link-alpha: 0.2;
  --bg-glow: 1;
}

/* Responsive typography */
@media screen and (min-width: 968px) {
  :root {
    --biggest-font-size: 2.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  background-color: var(--body-color);
  color: var(--text-color);
  transition: 0.4s; /* for light mode animation */
}

/*=============== ACCESSIBILITY HELPERS ===============*/
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

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

/*=============== THEME ===============*/
.change__theme {
  font-size: 1.25rem;
  cursor: pointer;
  transition: 0.3s;
}

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

/*========== Variables light theme ==========*/
body.light-theme {
  --title-color: hsl(var(--second-hue), 15%, 15%);
  --text-color: hsl(var(--second-hue), 8%, 35%);
  --body-color: hsl(var(--second-hue), 100%, 99%);
  --container-color: #e9e9e9;

  /*========== Background motion (light) ==========*/
  --bg-node: 250, 50%, 58%;
  --bg-link: 245, 35%, 55%;
  --bg-pulse-a: 174, 72%, 36%;
  --bg-pulse-b: 214, 85%, 52%;
  --bg-node-alpha: 0.5;
  --bg-link-alpha: 0.16;
  --bg-glow: 0;
}

/*========== 
    Color changes in some parts of 
    the website, in light theme
==========*/
.light-theme .scroll-header {
  box-shadow: 0 2px 4px hsla(0, 0%, 1%, 0.1);
}

.light-theme .nav__menu {
  background-color: hsla(var(--second-hue), 32%, 90%, 0.8);
}

.light-theme .section__subtitle {
  color: var(--text-color);
}

.light-theme .home__social-link {
  box-shadow: 0 2px 16px hsla(var(--second-hue), 48%, 8%, 0.1);
}

.light-theme .home__social-link::after,
.light-theme .footer__social-link {
  background-color: var(--title-color);
}

.light-theme .home__social-link,
.light-theme .home__scroll,
.light-theme .button,
.light-theme .button:hover,
.light-theme .active-work,
.light-theme .footer__title,
.light-theme .footer__link,
.light-theme .footer__copy {
  color: var(--title-color);
}

.light-theme .about__box {
  box-shadow: 0 2px 16px hsla(var(--second-hue), 48%, 8%, 0.1);
}

.light-theme .button,
.light-theme .skills__content,
.light-theme .services__card,
.light-theme .work__card,
.light-theme .testimonial__card,
.light-theme .contact__card,
.light-theme .contact__form-div {
  box-shadow: 0 2px 16px hsla(var(--second-hue), 48%, 8%, 0.1);
}

.light-theme::-webkit-scrollbar {
  background-color: hsl(var(--second-hue), 8%, 80%);
}
/*=============== BACKGROUND MOTION ===============*/
.bg-motion {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-motion__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.bg-motion__canvas.is-ready {
  opacity: 1;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 968px;
  margin-left: 1rem;
  margin-right: 1rem;
}

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

.main {
  overflow: hidden;
}

.section {
  padding: 4.5rem 0 1rem;
}

.section__title,
.section__subtitle {
  text-align: center;
}

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

.section__subtitle {
  display: block;
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
}

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

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

.nav__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__logo {
  color: var(--first-color);
  font-weight: var(--font-medium);
  transition: 0.4s;
}

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

.glass-menu-button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.glass-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: url("#glass-filter-cv") saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  box-shadow:
    color-mix(in oklch, white 35%, transparent) 0px 0px 2px 1px inset,
    color-mix(in oklch, white 15%, transparent) 0px 0px 10px 4px inset,
    rgba(17, 17, 26, 0.05) 0px 4px 16px,
    rgba(17, 17, 26, 0.05) 0px 8px 24px,
    rgba(17, 17, 26, 0.05) 0px 16px 56px,
    rgba(17, 17, 26, 0.05) 0px 4px 16px inset,
    rgba(17, 17, 26, 0.05) 0px 8px 24px inset,
    rgba(17, 17, 26, 0.05) 0px 16px 56px inset;
  transition: opacity 0.26s ease-out, transform 0.26s ease-out;
}

.glass-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  z-index: -1;
}

.glass-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.5rem;
  border-radius: inherit;
  position: relative;
  z-index: 1;
}

.glass-line {
  width: 1.25rem;
  height: 2px;
  border-radius: 999px;
  background-color: var(--first-color);
  transition: transform 0.3s ease-linear;
}

.glass-menu-button:hover .glass-shell {
  transform: translateY(-1px);
}

.glass-menu-button:active .glass-shell {
  transform: translateY(0);
  opacity: 0.9;
}

.glass-menu-button.active .glass-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.glass-menu-button.active .glass-line:nth-child(2) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/*=============== WATERFALL SIDEBAR ===============*/
.nav-waterfall {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-fixed) + 10);
  pointer-events: none;
  visibility: hidden;
}

.nav-waterfall.is-open {
  pointer-events: auto;
  visibility: visible;
}

.nav-waterfall__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: hsla(240, 8%, 4%, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.nav-waterfall.is-open .nav-waterfall__backdrop {
  opacity: 1;
}

.nav-waterfall__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(22rem, 88vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.15rem 1.75rem;
  background:
    linear-gradient(
      165deg,
      hsla(var(--first-hue), var(--sat), var(--lig), 0.14),
      transparent 42%
    ),
    hsla(240, 8%, 8%, 0.92);
  border-left: 1px solid hsla(0, 0%, 100%, 0.08);
  box-shadow: -24px 0 64px hsla(240, 10%, 2%, 0.45);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  transform: translateX(108%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.nav-waterfall.is-open .nav-waterfall__panel {
  transform: translateX(0);
}

.nav-waterfall__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid hsla(0, 0%, 100%, 0.08);
}

.nav-waterfall__eyebrow {
  margin: 0 0 0.2rem;
  font-size: var(--tiny-font-size);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--first-color);
  font-weight: var(--font-semibold);
}

.nav-waterfall__label {
  margin: 0;
  font-size: var(--h2-font-size);
  color: var(--title-color);
  font-weight: var(--font-semibold);
  line-height: 1.2;
}

.nav-waterfall__close {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid hsla(0, 0%, 100%, 0.1);
  border-radius: 999px;
  background: hsla(0, 0%, 100%, 0.04);
  color: var(--title-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.nav-waterfall__close:hover {
  background: hsla(var(--first-hue), var(--sat), var(--lig), 0.22);
  border-color: hsla(var(--first-hue), var(--sat), var(--lig), 0.45);
  transform: rotate(90deg);
}

.nav-waterfall__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  scrollbar-width: thin;
}

.nav-waterfall__section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nav-waterfall__title {
  margin: 0;
  padding-inline: 0.65rem;
  font-size: var(--tiny-font-size);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-color-light);
  font-weight: var(--font-semibold);
}

.nav-waterfall__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-waterfall__item {
  opacity: 0;
  transform: translateY(-14px);
}

.nav-waterfall.is-open .nav-waterfall__item {
  animation: nav-waterfall-cascade 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.06s + var(--i, 0) * 0.055s);
}

@keyframes nav-waterfall-cascade {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-waterfall__link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 1rem;
  color: var(--title-color);
  text-decoration: none;
  font-weight: var(--font-medium);
  font-size: var(--normal-font-size);
  background: hsla(0, 0%, 100%, 0.03);
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-waterfall__link i {
  font-size: 1.25rem;
  color: var(--first-color);
  transition: color 0.25s ease;
}

.nav-waterfall__link:hover {
  background: hsla(var(--first-hue), var(--sat), var(--lig), 0.16);
  border-color: hsla(var(--first-hue), var(--sat), var(--lig), 0.28);
  transform: translateX(-3px);
  box-shadow: 0 10px 28px hsla(240, 10%, 2%, 0.25);
}

.nav-waterfall__link:hover i {
  color: var(--title-color);
}

/* Light theme waterfall */
.light-theme .nav-waterfall__backdrop {
  background: hsla(var(--second-hue), 20%, 20%, 0.35);
}

.light-theme .nav-waterfall__panel {
  background:
    linear-gradient(
      165deg,
      hsla(var(--first-hue), var(--sat), 70%, 0.18),
      transparent 42%
    ),
    hsla(var(--second-hue), 32%, 96%, 0.94);
  border-left-color: hsla(var(--second-hue), 20%, 70%, 0.35);
  box-shadow: -18px 0 48px hsla(var(--second-hue), 30%, 20%, 0.18);
}

.light-theme .nav-waterfall__head {
  border-bottom-color: hsla(var(--second-hue), 20%, 70%, 0.35);
}

.light-theme .nav-waterfall__close {
  background: hsla(var(--second-hue), 30%, 92%, 0.9);
  border-color: hsla(var(--second-hue), 20%, 70%, 0.4);
  color: var(--title-color);
}

.light-theme .nav-waterfall__link {
  background: hsla(0, 0%, 100%, 0.55);
  color: var(--title-color);
}

.light-theme .nav-waterfall__link:hover {
  background: hsla(var(--first-hue), var(--sat), 75%, 0.22);
}

body.nav-waterfall-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .nav-waterfall__backdrop,
  .nav-waterfall__panel,
  .nav-waterfall__close,
  .nav-waterfall__link {
    transition: none;
  }

  .nav-waterfall.is-open .nav-waterfall__item {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.nav__menu {
  position: fixed;
  bottom: 1rem;
  background-color: hsla(240, 5%, 9%, 0.8);
  width: 90%;
  border-radius: 4rem;
  padding: 1rem 2.25rem;
  backdrop-filter: blur(10px);
  transition: 0.4s;
  left: 50%;
  transform: translateX(-50%);
}

.nav__list {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__link {
  color: var(--text-color);
  font-size: 1.25rem;
  padding: 0.4rem;
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: 0.4s;
  display: flex;
  border-radius: 5rem;
}

/* Active link */
.active-link {
  background: linear-gradient(
    180deg,
    hsla(var(--first-hue), var(--sat), var(--lig), 0.5),
    hsla(var(--first-hue), var(--sat), var(--lig), 0.2)
  );
  box-shadow: 0 0 16px hsla(var(--first-hue), var(--sat), var(--lig), 0.4);
  border-radius: 5rem;

  color: var(--title-color);
}

/* Change background header on scroll: make bar fully transparent, no bar/line */
.scroll-header {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.scroll-header .nav {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/*=============== HOME ===============*/
.home__container {
  position: relative;
  row-gap: 4.5rem;
  padding-top: 2rem;
}

.home__data {
  text-align: center;
}

.home__greeting,
.home__education {
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
}

.home__greeting {
  display: block;
  color: var(--title-color);
  margin-bottom: 0.25rem;
}

.home__education {
  color: var(--text-color);
  margin-bottom: 2.5rem;
}

.home__name {
  font-size: var(--biggest-font-size);
  color: var(--first-color);
}

.home__img {
  width: 160px;
}

.home__handle {
  justify-self: center;
  width: 200px;
  height: 300px;
  border: 1px solid transparent;
  background:
    radial-gradient(circle at 62% 26%, hsla(var(--first-hue), 70%, 72%, 0.35), transparent 55%) padding-box,
    linear-gradient(180deg, hsl(var(--first-hue), 38%, 26%) 0%, hsl(var(--first-hue), 30%, 11%) 58%, hsl(var(--first-hue), 20%, 4%) 100%) padding-box,
    linear-gradient(180deg, hsla(var(--first-hue), 80%, 85%, 0.65), hsla(var(--first-hue), 60%, 60%, 0.08) 70%) border-box;
  box-shadow: 0 24px 60px -24px hsla(var(--first-hue), 70%, 55%, 0.45);

  border-radius: 10rem 10rem 1rem 1rem;
  display: list-item;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.light-theme .home__handle {
  background:
    radial-gradient(circle at 62% 26%, hsla(var(--first-hue), 90%, 85%, 0.6), transparent 55%) padding-box,
    linear-gradient(180deg, hsla(var(--first-hue), var(--sat), var(--lig), 0.55), hsla(var(--first-hue), var(--sat), var(--lig), 0.12)) padding-box,
    linear-gradient(180deg, hsla(var(--first-hue), 70%, 60%, 0.55), hsla(var(--first-hue), 60%, 60%, 0.05) 70%) border-box;
  box-shadow: 0 24px 50px -28px hsla(var(--first-hue), 60%, 40%, 0.45);
}

/* Availability badge */
.home__status {
  position: absolute;
  left: 50%;
  bottom: 0.55rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: var(--tiny-font-size);
  font-weight: var(--font-medium);
  white-space: nowrap;
  color: hsl(240, 10%, 95%);
  background: hsla(240, 8%, 5%, 0.72);
  border: 1px solid hsla(var(--first-hue), 60%, 80%, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.home__status-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(145, 65%, 55%);
}

.home__status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: hsl(145, 65%, 55%);
  animation: status-pulse 2s ease-out infinite;
}

@keyframes status-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(3); opacity: 0; }
}

/* Portrait: coffee steam + typing fingers */
.home__portrait,
.home__portrait-body {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.home__portrait-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Typing fingers: slices of the same image clipped per finger.
   8s cycle = short typing bursts separated by pauses. */
.home__finger {
  position: absolute;
  inset: 0;
  background: url("../img/perfil.webp") center / 100% 100% no-repeat;
  animation: finger-type-a 8s ease-in-out infinite;
}

.home__finger--1 {
  clip-path: polygon(47.17% 70.9%, 39.21% 75.6%, 40.43% 76.95%, 49.01% 72.54%);
}

.home__finger--2 {
  clip-path: polygon(47.97% 73.68%, 40.13% 78.99%, 41.97% 80.54%, 50.05% 74.91%);
  animation-name: finger-type-b;
}

.home__finger--3 {
  clip-path: polygon(50.42% 74.91%, 43.19% 80.3%, 45.03% 81.6%, 52.26% 76.21%);
  animation-name: finger-type-b;
  animation-delay: 0.25s;
}

.home__finger--4 {
  clip-path: polygon(54.22% 76.01%, 47.79% 81.11%, 49.63% 82.14%, 56.06% 77.23%);
  animation-delay: 0.3s;
}

.home__portrait-steam {
  position: absolute;
  left: 80%;
  top: 77%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.home__portrait-steam i {
  position: absolute;
  left: -6px;
  bottom: 0;
  width: 12px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.8), transparent 70%);
  filter: blur(2px);
  opacity: 0;
  animation: portrait-steam 4.2s ease-out infinite;
}

.home__portrait-steam i:nth-child(2) {
  left: -9px;
  animation-delay: 1.4s;
  animation-duration: 4.8s;
}

.home__portrait-steam i:nth-child(3) {
  left: -1px;
  animation-delay: 2.8s;
  animation-duration: 4.5s;
}

/* Burst 1 at 0-15%, burst 2 at 45-55%, pauses in between */
@keyframes finger-type-a {
  0%, 3.4%, 6%, 9.4%, 12%, 15.4%, 45%, 48.4%, 51%, 54.4%, 100% { transform: translate(0, 0); filter: none; }
  1%, 7%, 13%, 46%, 52% { transform: translate(1px, -2.8px); filter: brightness(1.15); }
  2.2%, 8.2%, 14.2%, 47.2%, 53.2% { transform: translate(-1px, 1.8px); filter: brightness(0.85); }
}

@keyframes finger-type-b {
  0%, 3%, 6.4%, 9%, 12.4%, 48%, 51.4%, 100% { transform: translate(0, 0); filter: none; }
  4%, 10%, 49% { transform: translate(1px, -2.8px); filter: brightness(1.15); }
  5.2%, 11.2%, 50.2% { transform: translate(-1px, 1.8px); filter: brightness(0.85); }
}

@keyframes portrait-steam {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6, 0.5); }
  20% { opacity: 0.75; }
  60% { opacity: 0.4; transform: translate(4px, -26px) scale(1.1, 1); }
  100% { opacity: 0; transform: translate(-3px, -48px) scale(1.5, 1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .home__finger,
  .home__status-dot::after {
    animation: none;
  }

  .home__portrait-steam {
    display: none;
  }
}

.home__button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.home__social,
.home__scroll {
  position: absolute;
}

.home__social {
  bottom: 4rem;
  left: 0;
  display: grid;
  row-gap: 0.5rem;
}

.home__social-link {
  width: max-content;
  background-color: var(--container-color);
  color: var(--first-color);
  padding: 0.25rem;
  border-radius: 0.5rem;
  display: flex;
  font-size: 1rem;
  transition: 0.4s;
}

.home__social-link:hover {
  background-color: var(--first-color);
  color: #ffffff;
}

.home__social::after {
  content: "";
  width: 32px;
  height: 1px;
  background-color: var(--first-color);
  transform: rotate(90deg) translate(16px, 4px);
}

.home__scroll {
  color: var(--first-color);
  right: -1.5rem;
  bottom: 4rem;
  display: grid;
  row-gap: 2.25rem;
  justify-items: center;
}

.home__scroll-icon {
  font-size: 1.25rem;
}

.home__scroll-name {
  font-size: var(--smaller-font-size);
  transform: rotate(-90deg);
}

/*=============== BUTTONS ===============*/
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: var(--body-color);
  padding: 0.75rem 1rem;
  border-radius: 0.8rem;
  font-weight: var(--font-medium);
  transition: 0.4s;
}

.button:hover {
  background-color: var(--first-color-alt);
  color: var(--body-color);
}

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

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

.about__img {
  width: 220px;
  border-radius: 1.5rem;
  justify-self: center;
}

.about__data {
  text-align: center;
}

.about__info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.about__box {
  background-color: var(--container-color);
  border-radius: 0.75rem;
  padding: 0.75rem 0.5rem;
}

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

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

.about__subtitle {
  font-size: var(--tiny-font-size);
}

.about__description {
  margin-bottom: 2rem;
}

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

.skills__content {
  background-color: var(--container-color);
  padding: 1.5rem;
  border-radius: 1.25rem;
}

.skills__title {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  color: var(--first-color);
  text-align: center;
  margin-bottom: 1.5rem;
}

.skills__box {
  display: flex;
  justify-content: center;
  column-gap: 2.5rem;
}

.skills__group {
  display: grid;
  align-content: flex-start;
  row-gap: 1rem;
}

.skills__data {
  display: flex;
  column-gap: 0.5rem;
}

.skills .bxs-badge-check {
  font-size: 1rem;
  color: var(--first-color);
}

.skills__name {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  line-height: 18px;
}

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

/*=============== SERVICES ===============*/
.services__container {
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding-top: 1rem;
}

.services__card {
  background-color: var(--container-color);
  padding: 3rem 1.5rem 1.5em;
  border-radius: 1.25rem;
}

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

.services__button {
  color: var(--first-color);
  font-size: var(--small-font-size);
  display: flex;
  align-items: center;
  column-gap: 0.25rem;
  cursor: pointer;
}

.services__button:hover .services__icon {
  transform: translateX(0.25rem);
}

.services__icon {
  font-size: 1rem;
  transition: 0.4s;
}

/* Services modal */
.services__modal {
  position: fixed;
  inset: 0;
  background-color: hsla(240, 5%, 3%, 0.75);
  padding: 2rem 1rem;
  display: grid;
  place-items: center;
  transition: 0.4s;
  z-index: var(--z-modal);
  visibility: hidden;
  opacity: 0;
}

.services__modal-content {
  background-color: var(--body-color);
  padding: 4.5rem 1.5rem 2.5rem;
  border-radius: 1.5rem;
  position: relative;
}

.services__modal-title,
.services__modal-description {
  text-align: center;
}

.services__modal-title {
  font-size: var(--h3-font-size);
  color: var(--first-color);
  margin-bottom: 1rem;
}

.services__modal-description {
  font-size: var(--small-font-size);
  margin-bottom: 2rem;
}

.services__modal-list {
  display: grid;
  row-gap: 0.75rem;
}

.services__modal-item {
  display: flex;
  align-items: flex-start;
  column-gap: 0.5rem;
}

.services__modal-icon {
  font-size: 1.5rem;
  color: var(--first-color);
}

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

.services__modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: var(--first-color);
  cursor: pointer;
}
/*Active modal*/

.active-modal {
  visibility: visible;
  opacity: 1;
}

/*=============== WORK ===============*/

.work__container {
  padding-top: 1rem;
}

.work__filters {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 0.75rem;
  margin-bottom: 2rem;
}

.work__item {
  cursor: pointer;
  color: var(--title-color);
  padding: 0.25rem 0.75rem;
  font-weight: var(--font-medium);
  border-radius: 0.5rem;
}

.work__card {
  background-color: var(--container-color);
  padding: 1rem;
  border-radius: 1rem;
}

.work__img {
  border-radius: 1rem;
  margin-bottom: 0.75rem;
}

.work__title {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  margin-bottom: 0.25rem;
}

.work__button {
  width: max-content;
  color: var(--first-color);
  font-size: var(--small-font-size);
  display: flex;
  align-items: center;
  column-gap: 0.25rem;
  cursor: pointer;
}

.work__button:hover .work__icon {
  transform: translateX(0.25rem);
}

.work__icon {
  font-size: 1rem;
  transition: 0.4s;
}

.work__link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: 0.4s;
}

.work__link:hover {
  transform: translateY(-0.25rem);
}

/* Active item work*/
.active-work {
  background-color: var(--first-color);
  color: var(--body-color);
}

/*=============== TESTIMONIAL ===============*/
.testimonial__card {
  background-color: var(--container-color);
  padding: 1.25rem 1.5rem;
  border-radius: 1.5rem;
  margin-bottom: 3rem;
}

.testimonial__img {
  width: 60px;
  border-radius: 3rem;
  margin-bottom: 1rem;
}

.testimonial__name {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  margin-bottom: 0.25rem;
}

.testimonial__description {
  font-size: var(--small-font-size);
  margin-bottom: 0.15rem;
}

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

.contact__title {
  text-align: center;
  font-size: var(--h3-font-size);
  margin-bottom: 1.5rem;
}

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

.contact__card {
  background-color: var(--container-color);
  padding: 2rem 1rem;
  border-radius: 0.75rem;
  text-align: center;
}

.contact__card-icon {
  font-size: 2rem;
  color: var(--title-color);
  margin-bottom: 0.25rem;
}

.contact__card-title,
.contact__card-data {
  font-size: var(--small-font-size);
}

.contact__card-title {
  font-weight: var(--font-medium);
}

.contact__card-data {
  display: block;
  margin-bottom: 0.75rem;
}

.contact__button {
  color: var(--first-color);
  font-size: var(--small-font-size);
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 0.25rem;
  cursor: pointer;
}

.contact__button:hover .contact__button-icon {
  transform: translateX(0.25rem);
}

.contact__button-icon {
  font-size: 1rem;
  transition: 0.4s;
}

.contact__form-div {
  position: relative;
  margin-bottom: 2rem;
  height: 4rem;
}

.contact__form-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid var(--text-color-light);
  background: none;
  border-radius: 0.75rem;
  padding: 1.5rem;
  font-size: var(--normal-font-size);
  color: var(--text-color);
  outline: none;
  z-index: 1;
}

.contact__form-tag {
  position: absolute;
  top: -0.75rem;
  left: 1.25rem;
  font-size: var(--smaller-font-size);
  padding: 0.25rem;
  background-color: var(--body-color);
  z-index: 10;
}

.contact__form-area {
  height: 17rem;
}

.contact__form-area textarea {
  resize: none;
}
/*=============== FOOTER ===============*/
.footer {
  background-color: var(--first-color);
}

.footer__container {
  padding: 2rem 0 6rem;
}

.footer__title,
.footer__link {
  color: var(--body-color);
}

.footer__title {
  text-align: center;
  margin-bottom: 2rem;
}

.footer__list {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer__social {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 1.25rem;
}

.footer__social-link {
  background-color: var(--body-color);
  color: var(--first-color);
  padding: 0.35rem;
  border-radius: 0.25rem;
  font-size: 1rem;
  display: inline-flex;
}

.footer__copy {
  display: block;
  margin-top: 4.5rem;
  color: var(--container-color);
  text-align: center;
  font-size: var(--smaller-font-size);
  margin-bottom: 2rem;
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: 0.5rem;
  border-radius: 0.5rem;
  background-color: var(--container-color);
}

::-webkit-scrollbar-track {
  border-radius: 1.5rem;
}

::-webkit-scrollbar-thumb {
  background-color: var(--first-color);
  border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--first-color-alt);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
  .nav__menu {
    padding: 1rem 1.5rem;
  }

  .home__button {
    flex-direction: column;
  }

  .home__handle {
    width: 200px;
    height: 300px;
  }

  .home__img {
    width: 130px;
  }

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

  .skills__box {
    column-gap: 1rem;
  }

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

  .skills__level {
    font-size: var(--smaller-font-size);
  }

  .services__container {
    grid-template-columns: 145px;
    justify-content: center;
  }

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

  .work__filters {
    column-gap: 0.25rem;
  }
}

@media screen and (min-width: 435px) {
  .work__container {
    justify-content: center;
    grid-template-columns: repeat(2, max-content);
  }

  .work__img {
    width: 165px;
  }
}

/* For medium devices */
@media screen and (min-width: 630px) {
  .nav__menu {
    width: 328px;
    left: 50%;
    transform: translateX(-50%);
  }

  .about__info {
    grid-template-columns: repeat(3, 180px);
    justify-content: center;
  }

  .about__description {
    padding: 1rem 5rem;
    width: 600px;
    margin: 0 auto 2rem auto;
  }

  .about__box {
    padding: 1.75rem 0.95rem;
  }

  .skills__container {
    justify-content: center;
  }

  .skills__content {
    padding: 4rem 8.8rem;
  }

  .skills__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1.5rem;
  }

  .skills__box {
    column-gap: 5.5rem;
  }

  .services__container {
    grid-template-columns: repeat(3, 177px);
    justify-content: center;
  }

  .services__modal-content {
    width: 500px;
    padding: 4.5rem 2.5rem 2.5rem;
  }

  .services__modal-description {
    padding: 0 3.5rem;
  }

  .work__container {
    justify-content: center;
    grid-template-columns: repeat(2, max-content);
  }

  .work__img {
    width: 250px;
  }

  .testimonial__container {
    width: 600px;
    margin: auto;
  }

  .contact__container {
    display: grid;
    grid-template-columns: 220px 340px;
    column-gap: 2rem;
    justify-content: center;
  }

  .contact__info {
    grid-template-columns: 200px;
    gap: 1rem;
  }

  .contact__form {
    width: 340px;
  }
  /* .contact__info {
    grid-template-columns: 350px;
    justify-content: center;
  }

  .contact__form {
    width: 360px;
    margin: 0 auto;
  } */
}

/* @media screen and (min-width: 767px) {
  /* .work__container {
    grid-template-columns: repeat(2, max-content);
  } */

/* .contact__info {
    grid-template-columns: 300px;
  }

  .contact__container {
    grid-template-columns: repeat(2, 325px);
    justify-content: center;
  }
} */

/* For large devices */
@media screen and (min-width: 992px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }

  .section {
    padding: 6.5rem 0 1rem;
  }

  .section__title {
    margin-bottom: 3.5rem;
  }

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

  .home__handle {
    width: 240px;
    height: 360px;
  }

  .home__img {
    width: 220px;
  }
  .home__social-link {
    padding: 0.4rem;
    font-size: 1.25rem;
  }

  .home__social::after {
    transform: rotate(90deg) translate(16px, -1px);
  }

  .home__scroll-icon {
    font-size: 2rem;
  }

  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    column-gap: 4rem;
  }

  .about__img {
    width: 350px;
  }

  .about__data {
    text-align: initial;
  }

  .about__info {
    justify-content: initial;
    gap: 2rem;
  }

  .about__box {
    text-align: center;
    padding: 1rem 1.25rem;
  }

  .about__description {
    padding: 0 4rem 0 0;
    margin-bottom: 2.5rem;
  }

  .skills__container {
    grid-template-columns: repeat(2, 460px);
    column-gap: 3rem;
  }

  .skills__title {
    margin-bottom: 3.5rem;
  }

  .services__container {
    grid-template-columns: repeat(3, 300px);
    column-gap: 2rem;
  }

  .services__card {
    padding: 5rem 2rem 1.5rem;
  }

  .work__container {
    grid-template-columns: repeat(3, max-content);
    gap: 3rem;
  }

  .work__card {
    padding: 1.25rem;
  }

  .work__img {
    margin-bottom: 2rem;
  }

  .work__title {
    margin-bottom: 0.5rem;
  }

  .testimonial__container {
    width: 970px;
  }

  .testimonial__card {
    padding: 1.5rem 2rem;
  }

  .contact__info {
    grid-template-columns: 430px;
    gap: 1rem;
  }

  .contact__form {
    width: 430px;
  }

  .contact__form-area {
    height: 18rem;
  }

  .contact__container {
    grid-template-columns: repeat(2, 430px);
    column-gap: 6rem;
  }

  .footer__social-link {
    font-size: 1.25rem;
    padding: 0.4rem;
    border-radius: 0.5rem;
  }
  
}
