/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  /* 
      Change favorite color
      Default: hsl(255, 90%, 60%)
      Orange: hsl(14, 90%, 60%) - Blue: hsl(210, 90%, 50%)
      Pink: hsl(356, 100%, 65%) - Green: hsl(162, 90%, 40%)
  */
  --hue: 148; /* Keeping your original hue for consistency */
  --first-color: hsl(var(--hue), 70%, 35%); /* Slightly desaturated for modern feel */
  --first-color-alt: hsl(var(--hue), 82%, 56%);
  --first-color-light: hsl(var(--hue), 60%, 85%); /* Lighter for subtle accents */
  --title-color: hsl(var(--hue), 24%, 16%);
  --text-color: hsl(var(--hue), 8%, 45%);
  --text-color-light: hsl(var(--hue), 8%, 60%);
  --white-color: hsl(0, 0%, 100%);
  --body-color: hsl(0, 0%, 100%);
  --container-color: hsl(0, 0%, 100%);
  --shadow-color: hsla(var(--hue), 90%, 30%, .15); /* Slightly stronger shadow */

  /*========== Font and typography ==========*/
  --body-font: "Syne", sans-serif;
  --biggest-font-size: 2.25rem; /* Slightly larger for impact */
  --h1-font-size: 1.75rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.125rem;
  --normal-font-size: 1rem;
  --small-font-size: .875rem;
  --smaller-font-size: .813rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 4.5rem;
    --h1-font-size: 2.5rem;
    --h2-font-size: 1.75rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1.125rem;
    --small-font-size: .938rem;
    --smaller-font-size: .875rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body,
input,
textarea,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background-color .4s;
}

input,
button,
textarea {
  border: none;
  outline: none;
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*=============== THEME ===============*/
.nav__actions {
  display: flex;
  align-items: center;
  column-gap: 1rem;
}

.change-theme {
  color: var(--white-color);
  font-size: 1.5rem; /* Slightly larger icon */
  cursor: pointer;
  transition: color .4s;
}

/*========== Variables Dark theme ==========*/
body.dark-theme {
  --title-color: hsl(var(--hue), 24%, 85%);
  --text-color: hsl(var(--hue), 8%, 70%);
  --body-color: hsl(var(--hue), 16%, 8%);
  --container-color: hsl(var(--hue), 16%, 12%);
  --shadow-color: hsla(var(--hue), 32%, 4.5rem, .4);
}

/*========== Color changes in some parts of the website, in dark theme ==========*/
.dark-theme .bg-header {
  box-shadow: 0 12px 24px var(--shadow-color);
}

.dark-theme .services__modal{
  background-color: hsla(var(--hue), 90%, 8%, .2);
}

.dark-theme::-webkit-scrollbar {
  background-color: hsl(var(--hue), 16%, 15%);
}

.dark-theme::-webkit-scrollbar-thumb {
  background-color: hsl(var(--hue), 16%, 25%);
}

.dark-theme::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--hue), 16%, 35%);
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 1rem;
}
.section__title {
  font-size: var(--h1-font-size);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: .5rem;
}
.section__title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--first-color);
  border-radius: 2px;
}

.perfil{
  width: 250px;
  height: 250px;
  background-color: var(--body-color);
  border: 8px solid var(--first-color);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color .4s, box-shadow .4s;
  box-shadow: 0 0 0 0 hsla(var(--hue), 90%, 30%, .3); /* Initial subtle glow */
}

.perfil:hover {
  box-shadow: 0 0 20px 5px hsla(var(--hue), 90%, 30%, .5); /* Enhanced glow on hover */
}

.perfil__content{
  width: 180px;
  height: 180px;
  border: 10px solid var(--first-color);
  border-radius: 50%;
  display: flex;
  overflow: hidden;
  justify-content: center;
  align-items: flex-end;
  background: linear-gradient(180deg,
  hsl(var(--hue), 90%, 80%),
  hsl(var(--hue), 90%, 30%));
}

.perfil__img {
  width: 150px;
}

.main {
  overflow: hidden;
}

/*=============== HEADER & NAV ===============*/
.header{
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background-color: transparent;
  z-index: var(--z-fixed);
  transition: background-color .4s, box-shadow .4s;
}

.nav{
  position: relative;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo{
  color: var(--white-color);
  font-weight: var(--font-semi-bold);
  transition: color .4s;
}

.nav__toggle, 
.nav__close {
  display: inline-flex;
  font-size: 1.5rem; /* Slightly larger icon */
  cursor: pointer;
}

.nav__toggle {
  color: var(--white-color);
  transition: color .4s;
}

.nav__close {
  color: var(--title-color);
}

/* Navigation for mobile devices */
@media screen and (max-width: 1150px) {
  .nav__menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    box-shadow: 0 12px 24px var(--shadow-color);
    padding-block: 5rem 4rem;
    transition: top .4s;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  row-gap: 2.5rem;
  text-align: center;
}

.nav__link {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  transition: color .4s, transform .3s; /* Added transform for subtle animation */
}

.nav__link:hover {
  color: var(--first-color);
  transform: translateY(-3px); /* Subtle lift effect */
}

.nav__close {
  position: absolute;
  top: 1.15rem;
  right: 1.5rem;
}

/* Show menu */
.show-menu {
  top: 0;
}

/* Change background header */
.bg-header {
  background-color: var(--body-color);
  box-shadow: 0 2px 16px var(--shadow-color);
}

.bg-header :is(.nav__logo, .nav__toggle, .change-theme) {
  color: var(--title-color);
}

/* Header background color of other pages */
.header-pages{
  background-color: var(--body-color);
}

.header-pages :is(.nav__logo, .nav__toggle, .change-theme) {
  color: var(--title-color);
}

/*=============== BUTTON ===============*/
.button {
  display: inline-flex;
  justify-content: center;
  padding: 1rem 2rem;
  color: var(--white-color);
  background-color: var(--first-color);
  font-weight: var(--font-semi-bold);
  border-radius: .5rem;
  transition: background-color .4s, box-shadow .4s, transform .3s; /* Added transform */
  transform: translateY(0); /* Initial state for animation */
}

.button:hover {
  background-color: var(--first-color-alt);
  box-shadow: 0 8px 24px hsla(var(--hue), 90%, 30%, .5);
  transform: translateY(-3px); /* Lift effect on hover */
}

/*=============== HOME ===============*/
.home {
  position: relative;
  border-bottom: 8px solid var(--first-color);
  overflow: hidden; /* Ensure background elements don't overflow */
}

.home__rectangle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 220px;
  background: linear-gradient(to right, hsl(var(--hue), 70%, 35%), hsl(var(--hue), 80%, 45%)); /* Subtle gradient */
  z-index: -1;
  transform: skewY(-3deg); /* Modern angled effect */
  transform-origin: top left;
}

.home__container{
  padding-block: 1rem 3rem;
}

.home__perfil {
  justify-self: center;
}

.home__content{
  row-gap: 3rem;
}

.home__data {
  row-gap: .75rem;
  text-align: center;
}

.home__name {
  font-size: var(--biggest-font-size);
  letter-spacing: .05em; /* Slightly increased letter spacing */
}

.home__profession {
  font-size: var(--h2-font-size);
  color: var(--first-color); /* Highlight profession */
}

.home__social {
  display: flex;
  justify-content: center;
  column-gap: 1.5rem; /* Increased gap */
  margin-top: 1rem; /* Added margin to create space from the name */
}


.home__social-link {
  color: var(--title-color);
  font-size: 1.8rem; /* Larger icons */
  transition: color .4s, transform .3s;
}

.home__social-link:hover {
  color: var(--first-color-alt);
  transform: translateY(-5px); /* More pronounced lift */
}

.home__button {
  justify-self: center;
}

/*=============== ABOUT ===============*/
.about__page{
  padding-bottom: 4rem;
}

.about__perfil{
  justify-self: center;
}

.about__content {
  row-gap: 4rem;
}

.about__data {
  row-gap: 2rem;
}

.about__info {
  row-gap: .75rem;
  text-align: center;
}

.about__name {
  font-size: var(--h1-font-size);
}

.about__profession { /* Corrected typo from aboout__profession */
  font-size: var(--h2-font-size);
  color: var(--first-color);
}

.about__description {
  color: var(--text-color); /* Changed to text-color for better readability */
  line-height: 1.6; /* Improved readability */
}

.about__button {
  justify-self: center;
}

.about__skills-title {
  font-size: var(--h3-font-size);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: .5rem;
}
.about__skills-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background-color: var(--first-color);
  border-radius: 2px;
}

.about__skills-img {
  width: 45px; /* Slightly larger icons */
  transition: transform .4s, filter .4s;
  filter: grayscale(100%); /* Grayscale by default */
}

.about__skills-img:hover {
  transform: translateY(-.75rem) scale(1.1); /* More pronounced lift and slight scale */
  filter: grayscale(0%); /* Color on hover */
}

.about__skills-content {
  grid-template-columns: repeat(auto-fit, minmax(60px, max-content)); /* More flexible grid */
  justify-content: center;
  align-items: center;
  gap: 2rem 1.5rem;
}

/*=============== SERVICES ===============*/
.services__container {
  row-gap: 2rem;
}

.services__card {
  background-color: var(--container-color);
  padding: 3.5rem 1.5rem;
  box-shadow: 0 12px 24px var(--shadow-color);
  text-align: center;
  transition: background-color .4s, box-shadow .4s, transform .3s; /* Added transform */
  border-radius: 1rem; /* Slightly rounded corners */
  overflow: hidden; /* For potential inner animations */
  position: relative;
}

.services__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: var(--first-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease-out;
}

.services__card:hover::before {
  transform: scaleX(1);
}

.services__card:hover {
  transform: translateY(-8px); /* More pronounced lift */
  box-shadow: 0 18px 36px hsla(var(--hue), 90%, 30%, .25); /* Enhanced shadow on hover */
}

.services__icon {
  display: inline-block;
  font-size: 3.5rem; /* Larger icon */
  color: var(--first-color);
  margin-bottom: 1.5rem;
  transition: transform .3s;
}

.services__card:hover .services__icon {
  transform: scale(1.1); /* Icon subtle zoom on hover */
}

.services__title {
  font-size: var(--h2-font-size);
  margin-bottom: 1rem;
}

.services__description {
  margin-bottom: 2.5rem; /* Slightly reduced margin */
  line-height: 1.5;
}

.services__button {
  cursor: pointer;
  font-size: var(--small-font-size);
  padding: .75rem 1.5rem; /* Smaller button for card */
  background-color: var(--first-color-light); /* Lighter button */
  color: var(--title-color);
  border-radius: .25rem;
  transition: background-color .3s, color .3s;
}

.services__button:hover {
  background-color: var(--first-color);
  color: var(--white-color);
  box-shadow: none; /* Remove shadow for this button type */
  transform: translateY(0); /* No lift for this button */
}

.services__modal {
  position: fixed;
  inset: 0;
  background-color: hsla(var(--hue), 90%, 30%, .4); /* Slightly darker overlay */
  backdrop-filter: blur(12px); /* Increased blur */
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s;
}

.services__modal-content {
  max-height: 80vh; /* Max height for scrollability */
  width: 90%; /* Wider modal on smaller screens */
  max-width: 500px; /* Max width for larger screens */
  position: relative;
  background-color: var(--container-color);
  padding: 3.5rem 1.5rem;
  border-bottom: 6px solid var(--first-color);
  border-radius: 1rem; /* Rounded corners for modal */
  overflow: auto;
  box-shadow: 0 15px 30px hsla(var(--hue), 90%, 15%, .3);
  transform: scale(.9); /* Initial scale for animation */
  transition: transform .4s ease-out;
}

.active-modal .services__modal-content {
  transform: scale(1); /* Scale to normal on active */
}

.services__modal-content::-webkit-scrollbar {
  width: .6rem;
}

.services__modal-content::-webkit-scrollbar-thumb {
  background-color: var(--text-color-light);
  border-radius: .5rem;
}

.services__modal-content::-webkit-scrollbar-thumb:hover {
  background-color: var(--first-color-light);
}

.services__modal-title  {
  font-size: var(--h2-font-size);
  margin-bottom: 2rem; /* Reduced margin */
  color: var(--first-color); /* Highlight modal title */
}

.services__modal-list {
  margin-left: 1.25rem; /* Slightly more indent */
  row-gap: .75rem;
}

.services__modal-item {
  text-align: initial;
  list-style: square;
  font-size: var(--normal-font-size);
  line-height: 1.4;
}

.services__modal-item::marker {
  color: var(--first-color);
}

.services__modal-close {
  position: absolute;
  top: 1rem; /* Adjusted position */
  right: 1rem; /* Adjusted position */
  font-size: 1.8rem; /* Larger close icon */
  color: var(--first-color);
  cursor: pointer;
  transition: transform .3s;
}

.services__modal-close:hover {
  transform: rotate(90deg); /* Rotate on hover */
}

/* Active modal */
.active-modal {
  opacity: 1;
  visibility: visible;
}

/*=============== WORK ===============*/
.work__container {
  row-gap: 2rem;
}

.work__card {
  background-color: var(--container-color);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 16px var(--shadow-color);
  transition: box-shadow .4s, transform .3s;
}

.work__card:hover {
  box-shadow: 0 12px 24px hsla(var(--hue), 90%, 30%, .2);
  transform: translateY(-5px);
}

.work__link {
  position: relative;
  display: block; /* Changed to block for full card link */
  overflow: hidden;
  margin-bottom: 0; /* Removed margin */
}

.work__img {
  filter: grayscale(1);
  transition: filter .5s, transform .5s;
}

.work__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: hsla(var(--hue), 90%, 30%, .7); /* Semi-transparent overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity .4s;
    padding: 1rem; /* Added padding */
}
.work__link:hover .work__overlay {
    opacity: 1;
}
.work__overlay .work__title,
.work__overlay .work__subtitle {
    color: var(--white-color);
    text-align: center;
    z-index: 2;
    margin-bottom: .5rem;
}
.work__overlay .work__subtitle {
    font-size: var(--small-font-size);
}


.work__icon{
  position: absolute;
  top: 1rem; /* Adjusted position */
  right: 1rem; /* Adjusted position */
  font-size: 2.2rem; /* Larger icon */
  color:  var(--white-color); /* Changed to white for contrast on overlay */
  transition: transform .4s, opacity .4s;
  opacity: 0; /* Hidden by default */
  z-index: 3; /* Ensure it's above overlay */
}

.work__link:hover .work__img {
  filter: none;
  transform: scale(1.1);
}

.work__link:hover .work__icon {
  transform: translateY(0) rotate(0); /* Reset transform on hover */
  opacity: 1; /* Show on hover */
}

.work__title {
  font-size: var(--h2-font-size);
  margin-bottom: .25rem;
  padding: 1rem; /* Added padding for text below image */
  text-align: center;
}

.work__subtitle {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  padding-bottom: 1rem;
  display: block; /* Ensure it takes full width */
  text-align: center;
}

.work__page {
  padding-bottom: 4rem;
}

/*=============== TESTIMONIAL ===============*/
.testimonial__container {
  position: relative;
}

.testimonial__swiper {
  padding-bottom: 2.5rem; /* Increased padding for pagination */
}

.testimonial__card {
  background-color: var(--container-color);
  padding: 2.5rem 1.5rem 3rem 1.5rem; /* Adjusted padding */
  border-inline: 8px solid var(--first-color);
  box-shadow: 0 12px 24px var(--shadow-color);
  text-align: center;
  transition: background-color .4s, box-shadow .4s;
  border-radius: 1rem; /* Rounded corners */
}

.testimonial__border {
  width: 100px; /* Fixed size for consistency */
  height: 100px; /* Fixed size for consistency */
  border: 6px solid var(--first-color);
  overflow: hidden;
  border-radius: 50%; /* Circular border */
  margin: 0 auto 1.5rem; /* Adjusted margin */
  display: flex;
  justify-content: center;
  align-items: center;
}

.testimonial__img {
  width: 90px; /* Ensure image fits within border */
  height: 90px; /* Ensure image fits within border */
  object-fit: cover; /* Cover the area */
  border-radius: 50%; /* Circular image */
  filter: grayscale(1);
  transition: filter .4s;
}

.testimonial__name {
  font-size: var(--h2-font-size);
  margin-bottom: .75rem; /* Adjusted margin */
  color: var(--first-color); /* Highlight name */
}

.testimonial__description {
  font-size: var(--normal-font-size);
  line-height: 1.6;
  color: var(--text-color);
}

.testimonial__card:hover .testimonial__img {
  filter: none;
}

/* Swiper class */
.swiper-pagination-bullets.swiper-pagination-horizontal {
  bottom: 0; /* Adjusted position */
}

.swiper-pagination-bullet{
  background-color: var(--first-color-light);
  opacity: 1;
  width: 10px; /* Larger bullets */
  height: 10px;
  transition: background-color .3s, transform .3s;
}

.swiper-pagination-bullet-active {
  background-color: var(--first-color);
  transform: scale(1.2); /* Active bullet slightly larger */
}

/*=============== CONTACT ===============*/
.contact__container {
  padding-bottom: 4rem;
}

.contact__button  {
  justify-self: center;
}

.contact__page {
  padding-block: 1rem 4rem;
}

.contact__form {
  position: relative;
  background-color: var(--container-color);
  padding: 2.5rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 12px 24px var(--shadow-color);
}

.contact__group {
  display: grid;
  gap: 1.5rem;
}

.contact__box {
  position: relative;
  width: 100%;
  height: 58px;
}

.contact__input {
  width: 100%;
  height: 100%;
  background-color: var(--body-color);
  padding: .5rem 1.5rem;
  border: 2px solid var(--text-color-light); /* Thinner border */
  border-radius: .5rem; /* Rounded input fields */
  font-weight: var(--font-medium); /* Lighter font weight */
  color: var(--title-color);
  transition: border-color .4s, background-color .4s;
}

.contact__input:focus {
  border-color: var(--first-color); /* Highlight on focus */
}

.contact__input:-webkit-autofill {
  transition: background-color 6000s color 6000s;
}

.contact__label {
  position: absolute;
  top: -10px; /* Adjusted position */
  left: 15px; /* Adjusted position */
  font-size: var(--smaller-font-size); /* Smaller label */
  color: var(--text-color); /* Less prominent label */
  background-color: var(--body-color);
  font-weight: var(--font-regular);
  padding: 0 5px; /* Reduced padding */
  transition: background-color .4s, color .4s;
  z-index: 1; /* Ensure label is above input */
}

.contact__area  {
  height: 12rem; /* Taller textarea */
}

.contact__area textarea {
  resize: vertical; /* Allow vertical resize */
  padding-top: 1.25rem;
}

.contact__send  {
  padding-block: 1rem; /* Adjusted padding */
  cursor: pointer;
  font-size: var(--normal-font-size);
}

.contact__message {
  position: absolute;
  left: 0px;
  bottom: -2.5rem; /* Adjusted position */
  font-size: var(--small-font-size);
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  text-align: center;
  width: 100%;
}

/*=============== FOOTER ===============*/
.footer {
  background-color: var(--first-color);
  padding-top: 4rem; /* Increased padding */
}

.footer__container {
  padding-block: 2rem; /* Adjusted padding */
  text-align: center;
  row-gap: 3rem; /* Reduced gap */
}

.footer__content {
  row-gap: 1.5rem; /* Reduced gap */
}

.footer__content a,
.footer__copy {
  color: var(--white-color);
}

.footer__logo{
  font-size: var(--h1-font-size);
  font-weight: var(--font-semi-bold);
  justify-self: center;
}

.footer__links,
.footer__social {
  display: flex;
  justify-content: center;
}

.footer__links{
  flex-wrap: wrap;
  gap: 1.5rem; /* Reduced gap */
}

.footer__link {
  font-weight: var(--font-medium); /* Lighter font weight */
  transition: text-decoration .3s;
}

.footer__logo:hover,
.footer__link:hover {
  text-decoration: underline;
}

.footer__social{
  column-gap: 1.25rem; /* Slightly increased gap */
}

.footer__social-link {
  font-size: 1.8rem; /* Larger icons */
  transition: transform .4s, color .3s;
  color: var(--white-color);
}

.footer__social-link:hover {
  transform: translateY(-.5rem) scale(1.1); /* More pronounced lift and scale */
  color: var(--first-color-light); /* Subtle color change */
}

.footer__copy {
  font-size: var(--smaller-font-size); /* Smaller copy text */
  font-weight: var(--font-regular);
  opacity: .8;
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: .75rem; /* Wider scrollbar */
  background-color: hsl(var(--hue), 20%, 90%); /* Lighter background */
  border-radius: .5rem;
}

::-webkit-scrollbar-thumb {
  background-color: hsl(var(--hue), 20%, 70%); /* Lighter thumb */
  border-radius: .5rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--hue), 20%, 60%); /* Slightly darker on hover */
}

/*=============== SCROLL UP ===============*/
.scrollup{
  position: fixed;
  bottom: -50%;
  right: 1.5rem; /* Adjusted position */
  background-color: var(--container-color);
  box-shadow: 0 8px 16px var(--shadow-color);
  color: var(--title-color);
  display: inline-flex;
  font-size: 1.5rem; /* Larger icon */
  padding: 8px; /* Increased padding */
  border-radius: .5rem; /* Rounded corners */
  z-index: var(--z-tooltip);
  cursor: pointer;
  transition: bottom .4s, transform .4s, background-color .4s, border .3s;
}

.scrollup:hover {
  border: 2px solid var(--first-color);
  transform: translateY(-.75rem) scale(1.1); /* More pronounced lift and scale */
  background-color: var(--first-color-light); /* Subtle background change */
  color: var(--first-color); /* Color change */
}

/* Show Scroll Up */
.show-scroll {
  bottom: 3rem;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
  .container {
    margin-inline: 1rem;
  }

  .services__modal {
    padding-inline: .5rem;
  }

  .about__skills-content {
    grid-template-columns: repeat(4, max-content);
  }
}

/* For medium devices */
@media screen and (min-width: 576px) {
  .services__container {
    grid-template-columns: 320px;
    justify-content: center;
  }

  .services__modal-content {
    width: 450px; /* Slightly wider modal */
  }

  .work__container {
    grid-template-columns: 350px;
    justify-content: center;
  }

  .about__container {
    grid-template-columns: 400px;
    justify-content: center;
  }
}

@media screen and (min-width: 768px) {
  .services__container {
    grid-template-columns: repeat(2, 320px);
  }

  .work__container {
    grid-template-columns: repeat(2, 350px);
  }

  .testimonial__container {
    max-width: 700px;
    margin-inline: auto;
  }
  .testimonial__description {
    width: 470px;
    margin-inline: auto;
  }

  .contact__page {
    grid-template-columns: 670px;
    justify-content: center;
  }

  .contact__group {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem; /* Increased gap */
  }

  .contact__area {
    height: 18rem;
  }

  .contact__message {
    bottom: 5rem;
    justify-content: center;
  }

  .contact__send {
    justify-self: center;
    margin-top: 1.5rem;
  }
}

/* For large devices */
@media screen and (min-width: 1150px) {
  .container {
    margin-inline:auto;
  }

  .section {
    padding-block: 7rem 2rem;
  }

  .section__title {
    margin-bottom: 3.5rem;
  }
  .section__title::after {
    width: 80px; /* Wider underline */
  }

  .nav{
    height: calc(var(--header-height) + 2rem);
    column-gap: 3rem;
  }

  .nav__toggle,
  .nav__close {
    display: none;
  }
  .nav__menu {
    margin-left: auto;
  }

  .nav__list {
    flex-direction: row;
    align-items: center;
    column-gap: 3rem;
  }

  .change-theme{
    color: var(--title-color);
  }

  .perfil {
    width: 500px;
    height: 500px;
    border-width: 15px;
  }

  .perfil__content {
    width: 360px;
    height: 360px;
    border-width: 20px;
  }

  .perfil__img {
    width: 300px;
  }

  .home__rectangle {
    width: 30vw;
    height: 100%;
    transform: skewX(-3deg); /* Adjusted skew for desktop */
    transform-origin: top right;
  }

  .home__container {
    position: relative;
    grid-template-columns: 500px 300px;
    align-items: center;
    column-gap: 4rem;
    padding-block: 3.5rem 8rem;
  }

  .home__content {
    row-gap: 4rem;
  }
  .home__data {
    row-gap: 1rem;
    text-align: initial;
  }

  .home__social {
    flex-direction: column;
    row-gap: 1.5rem;
    position: absolute;
    top: -4rem;
    bottom: 0;
    right: 0;
  }

  .home__social-link {
    color: var(--first-color);
  }

  .home__button {
    justify-self: flex-start;
  }

  .services__container {
    grid-template-columns: repeat(3, 345px);
  }

  .services__card {
    padding: 4.5rem;
  }

  .services__modal-content {
    max-height: 480px;
    padding: 5.5rem 2rem;
  }

  .services__modal-close{
    font-size: 2rem;
  }

  .work__container{
    grid-template-columns: repeat(3, 350px);
    row-gap: 4rem;
  }
  
  .testimonial__card{
    padding-block: 3rem 3.5rem;
  }

  .testimonial__border{
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
  }

  .contact__container {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    align-items: center;
    column-gap: 25rem;
    padding-block: 1rem 5rem;
  }

  .contact__container .section__title {
    text-align: initial;
    margin-bottom: 0;
  }
  .contact__container .section__title::after {
    left: 0;
    transform: translateX(0);
  }

  .footer__container {
    padding-block: 3.5rem;
    row-gap: 6rem;
  }

  .footer__content {
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
  }

  .footer__logo {
    font-size: var(--h2-font-size);
  }

  .footer__links {
    column-gap: 3rem;
  }

  .footer__social {
    column-gap: 1.5rem;
  }

  .scrollup {
    right: 3rem;
  }

  .about__container {
    grid-template-columns: 500px 440px;
    align-items: center;
    padding-top: 2rem;
    column-gap: 8rem;
  }

  .about__data {
    row-gap: 3.5rem;
  }

  .about__info {
    text-align: initial;
  }

  .about__button {
    justify-self: flex-start;
  }

  .about__skills-title {
    text-align: initial;
  }
  .about__skills-title::after {
    left: 0;
    transform: translateX(0);
  }

  .about__skills-content {
    grid-template-columns: repeat(7, max-content);
    justify-content: initial;
  }

  .about__skills-img {
    width: 50px; /* Larger icons on desktop */
  }
}

@media screen and (min-width: 1500px) {
  .home__rectangle {
    width: 33vw;
  }
}

@media screen and (min-width: 2048px) {
  .home__rectangle {
    width: 40vw;
  }
}

.work__img-rectangle {
    width: 100%; /* Full width for rectangle */
    height: auto; /* Maintain aspect ratio */
}

@media screen and (max-width: 768px) {
    .work__img-rectangle {
        display: none; /* Hide rectangle on smaller screens */
    }

    .work__img {
        width: 100%; /* Full width for square */
        height: auto; /* Maintain aspect ratio */
    }
}

