/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

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

  /*========== Colors ==========*/
  --first-hue: 230;
  --sat: 94%;
  --lig: 65%;
  --second-hue: 220;

  --first-color: hsl(var(--first-hue), var(--sat), var(--lig));
  --first-color-alt: hsl(var(--first-hue), var(--sat), 60%);
  --first-color-light: hsl(var(--first-hue), var(--sat), 85%);
  --first-color-lighten: hsl(var(--first-hue), var(--sat), 95%);

  --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: hsl(var(--second-hue), 48%, 8%);
  --container-color: hsl(var(--second-hue), 32%, 12%);
  --border-color: hsl(var(--second-hue), 20%, 20%);

  /*========== Font and typography ==========*/
  --body-font: "Inter", sans-serif;
  --biggest-font-size: 2.75rem;
  --h1-font-size: 2.25rem;
  --h2-font-size: 1.75rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.813rem;
  --tiny-font-size: 0.75rem;

  /*========== Font weight ==========*/
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extra-bold: 800;

  /*========== Margins Bottom ==========*/
  --mb-0-25: 0.25rem;
  --mb-0-5: 0.5rem;
  --mb-0-75: 0.75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;
  --mb-3: 3rem;

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

  /*========== Transitions ==========*/
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 968px) {
  :root {
    --biggest-font-size: 3.5rem;
    --h1-font-size: 2.75rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1.125rem;
    --small-font-size: 1rem;
    --smaller-font-size: 0.875rem;
  }
}

/*=============== 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: var(--transition);
  line-height: 1.6;
}

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

ul {
  list-style: none;
}

a {
  text-decoration: none;
  transition: var(--transition);
}

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

/*=============== THEME ===============*/
.change-theme {
  color: var(--first-color);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}

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

/*========== Variables Light theme ==========*/
body.light-theme {
  --title-color: hsl(var(--second-hue), 15%, 15%);
  --text-color: hsl(var(--second-hue), 8%, 35%);
  --text-color-light: hsl(var(--second-hue), 4%, 55%);
  --body-color: hsl(var(--second-hue), 100%, 99%);
  --container-color: #fff;
  --border-color: hsl(var(--second-hue), 20%, 90%);
}

/*========== Light theme changes ==========*/
.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 8px hsla(var(--second-hue), 48%, 8%, 0.1);
}

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

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

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

.main {
  overflow: hidden;
}

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

.section__header {
  text-align: center;
  margin-bottom: var(--mb-3);
}

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

.section__title {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  font-weight: var(--font-bold);
  margin-bottom: var(--mb-0-75);
}

.section__subtitle {
  display: block;
  font-size: var(--small-font-size);
  color: var(--first-color);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

/*=============== BUTTONS ===============*/
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: var(--font-medium);
  transition: var(--transition);
  text-decoration: none;
  font-size: var(--normal-font-size);
}

.button--primary {
  background: linear-gradient(
    135deg,
    var(--first-color) 0%,
    var(--first-color-alt) 100%
  );
  color: #fff;
  box-shadow: 0 8px 32px hsla(var(--first-hue), var(--sat), var(--lig), 0.3);
}

.button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px hsla(var(--first-hue), var(--sat), var(--lig), 0.4);
}

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

.button--ghost:hover {
  background-color: var(--first-color);
  color: #fff;
}

/*=============== HEADER ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--body-color);
  z-index: var(--z-fixed);
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
}

.scroll-header {
  box-shadow: 0 1px 12px hsla(var(--first-hue), var(--sat), 15%, 0.15);
  backdrop-filter: blur(10px);
}

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

.nav__logo {
  color: var(--title-color);
  font-weight: var(--font-bold);
  font-size: var(--h3-font-size);
  display: flex;
  align-items: center;
}

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

.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: var(--container-color);
    box-shadow: 0 -1px 12px hsla(var(--first-hue), var(--sat), 15%, 0.15);
    width: 100%;
    height: 4rem;
    padding: 0 1rem;
    display: grid;
    align-content: center;
    border-radius: 1.25rem 1.25rem 0 0;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    z-index: var(--z-fixed);
  }

  /* Add padding bottom to body to prevent content overlap */
  body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  /* Ensure main content doesn't get covered */
  .main {
    flex-grow: 1;
  }

  /* Adjust section padding for mobile */
  .section {
    padding: 4rem 0 2rem;
  }

  /* Specific adjustment for last section */
  .contact.section {
    padding-bottom: 2rem;
  }
}

.nav__list,
.nav__link {
  display: flex;
}

.nav__link {
  flex-direction: column;
  align-items: center;
  row-gap: 4px;
  color: var(--title-color);
  font-weight: var(--font-medium);
  transition: var(--transition);
}

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

.nav__list {
  justify-content: space-around;
}

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

.nav__icon {
  font-size: 1.25rem;
}

/*Active link*/
.active-link {
  position: relative;
  color: var(--first-color);
}

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

.home__content {
  grid-template-columns: 0.5fr 3fr;
  padding-top: 3.5rem;
  align-items: center;
}

.home__data {
  text-align: center;
}

.home__greeting {
  display: block;
  color: var(--text-color);
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  margin-bottom: var(--mb-0-25);
}

.home__name {
  font-size: var(--biggest-font-size);
  font-weight: var(--font-extra-bold);
  margin-bottom: var(--mb-0-75);
  line-height: 1.2;
}

.home__name-text {
  color: var(--title-color);
}

.home__name-highlight {
  background: linear-gradient(
    135deg,
    var(--first-color) 0%,
    var(--first-color-alt) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home__profession {
  font-size: var(--h3-font-size);
  color: var(--first-color);
  font-weight: var(--font-semibold);
  margin-bottom: var(--mb-1);
}

.home__description {
  color: var(--text-color);
  margin-bottom: var(--mb-2);
  line-height: 1.6;
}

.home__buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.home__handle {
  justify-self: center;
  width: 300px;
  height: 400px;
  position: relative;
}

.home__img-wrapper {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    hsla(var(--first-hue), var(--sat), var(--lig), 0.8),
    hsla(var(--first-hue), var(--sat), var(--lig), 0.2)
  );
  border-radius: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.home__img {
  width: 220px;
  height: auto;
}

.home__img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    hsla(var(--first-hue), var(--sat), var(--lig), 0.1) 100%
  );
}

.home__social,
.home__scroll {
  position: absolute;
}

.home__social {
  bottom: 5rem;
  left: 0;
}

.home__social-wrapper {
  display: grid;
  row-gap: 0.5rem;
}

.home__social-link {
  width: 3rem;
  height: 3rem;
  background-color: var(--container-color);
  color: var(--first-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  font-size: 1.25rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

.home__scroll {
  color: var(--first-color);
  right: 1rem;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.home__scroll-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.home__scroll-icon {
  font-size: 1.5rem;
  animation: scroll 2s ease-in-out infinite;
}

.home__scroll-name {
  font-size: var(--tiny-font-size);
  font-weight: var(--font-medium);
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* Mobile specific adjustments */
@media screen and (max-width: 767px) {
  .home__scroll {
    position: static;
    margin-top: 2rem;
    justify-self: center;
  }

  .home__scroll-name {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    transform: none;
  }
}

@keyframes scroll {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-0.5rem);
  }
  60% {
    transform: translateY(-0.25rem);
  }
}

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

.about__data {
  text-align: center;
}

.about__description {
  margin-bottom: var(--mb-2);
  line-height: 1.6;
}

.about__description strong {
  color: var(--first-color);
  font-weight: var(--font-semibold);
}

.about__info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: var(--mb-2-5);
}

.about__box {
  background-color: var(--container-color);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.about__box:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px hsla(var(--first-hue), var(--sat), 15%, 0.1);
}

.about__icon {
  font-size: 2rem;
  color: var(--first-color);
  margin-bottom: var(--mb-0-75);
}

.about__title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semibold);
  color: var(--title-color);
  margin-bottom: var(--mb-0-25);
}

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

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

.skills__content {
  background-color: var(--container-color);
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.skills__content:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px hsla(var(--first-hue), var(--sat), 15%, 0.1);
}

.skills__title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semibold);
  color: var(--title-color);
  text-align: center;
  margin-bottom: var(--mb-1-5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

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

.skills__box {
  display: flex;
  justify-content: center;
}

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

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

.skills__icon {
  width: 3rem;
  height: 3rem;
  background-color: var(--first-color-lighten);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--first-color);
}

.skills__info {
  flex: 1;
}

.skills__name {
  font-size: var(--normal-font-size);
  font-weight: var(--font-semibold);
  color: var(--title-color);
  margin-bottom: var(--mb-0-25);
}

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

/*=============== WORK ===============*/
.work__container {
  padding-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.work__card {
  background-color: var(--container-color);
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.work__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px hsla(var(--first-hue), var(--sat), 15%, 0.1);
}

.work__img-wrapper {
  position: relative;
  overflow: hidden;
}

.work__img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition);
}

.work__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    hsla(var(--first-hue), var(--sat), var(--lig), 0.8),
    hsla(var(--first-hue), var(--sat), var(--lig), 0.6)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

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

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

.work__overlay-content {
  display: flex;
  gap: 1rem;
}

.work__overlay-link {
  width: 3rem;
  height: 3rem;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  transition: var(--transition);
}

.work__overlay-link:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.work__content {
  padding: 1.5rem;
}

.work__header {
  margin-bottom: var(--mb-1);
}

.work__title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semibold);
  color: var(--title-color);
  margin-bottom: var(--mb-0-5);
}

.work__tech-stack {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.work__tech {
  background-color: var(--first-color-lighten);
  color: var(--first-color);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: var(--smaller-font-size);
  font-weight: var(--font-medium);
}

.work__description {
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: var(--mb-1-5);
}

.work__button {
  color: var(--first-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}

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

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

.work__icon {
  font-size: 1rem;
  transition: var(--transition);
}

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

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

.contact__card {
  background-color: var(--container-color);
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.contact__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px hsla(var(--first-hue), var(--sat), 15%, 0.1);
}

.contact__card-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(
    135deg,
    var(--first-color) 0%,
    var(--first-color-alt) 100%
  );
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  flex-shrink: 0;
}

.contact__card-content {
  flex: 1;
}

.contact__card-title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semibold);
  color: var(--title-color);
  margin-bottom: var(--mb-0-25);
}

.contact__card-data {
  font-size: var(--small-font-size);
  color: var(--first-color);
  font-weight: var(--font-medium);
  margin-bottom: var(--mb-0-75);
  display: block;
}

.contact__card-description {
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: var(--mb-1);
}

.contact__button {
  color: var(--first-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}

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

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

.contact__button-icon {
  font-size: 1rem;
  transition: var(--transition);
}

/*=============== FOOTER ===============*/
.footer {
  background-color: var(--container-color);
  border-top: 1px solid var(--border-color);
}

.footer__container {
  padding: 2rem;
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--mb-2);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__brand {
  flex: 1;
}

.footer__logo {
  color: var(--title-color);
  font-weight: var(--font-bold);
  font-size: var(--h3-font-size);
  display: flex;
  align-items: center;
  margin-bottom: var(--mb-0-5);
}

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

.footer__description {
  color: var(--text-color);
  line-height: 1.6;
  max-width: 300px;
}

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

.footer__social-link {
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--first-color-lighten);
  color: var(--first-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  transition: var(--transition);
}

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

.footer__copy {
  text-align: center;
  padding-top: var(--mb-2);
  border-top: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: var(--small-font-size);
}

.footer__copy a {
  color: var(--first-color);
  font-weight: var(--font-medium);
}

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

.footer__heart {
  color: #e74c3c;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  50%,
  100% {
    transform: scale(1);
  }
  25%,
  75% {
    transform: scale(1.1);
  }
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: 0.6rem;
  border-radius: 0.5rem;
  background-color: hsl(var(--second-hue), 8%, 38%);
}

::-webkit-scrollbar-thumb {
  background-color: hsl(var(--second-hue), 8%, 26%);
  border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--second-hue), 8%, 20%);
}

/*=============== MEDIA QUERIES ===============*/
/* For small devices */
@media screen and (max-width: 350px) {
  .container {
    margin-left: var(--mb-1);
    margin-right: var(--mb-1);
  }

  .nav__menu {
    padding: 2rem 0.25rem 4rem;
  }

  .nav__list {
    column-gap: 0;
  }

  .home__content {
    grid-template-columns: 0.25fr 3fr;
  }

  .home__handle {
    width: 180px;
    height: 253px;
  }

  .home__img {
    width: 130px;
  }

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

  .skills__container {
    grid-template-columns: max-content;
    justify-content: center;
  }

  .work__container {
    grid-template-columns: 1fr;
  }

  .contact__info {
    grid-template-columns: 1fr;
  }
}

/* For medium devices */
@media screen and (min-width: 576px) {
  .nav__menu {
    width: 328px;
    left: 0;
    right: 0;
    margin: 0 auto;
  }

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

  .skills__container {
    justify-content: center;
  }

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

  .contact__info {
    grid-template-columns: 1fr;
    justify-content: center;
  }
}

@media screen and (min-width: 767px) {
  body {
    margin: 0;
  }

  .section {
    padding: 7rem 0 2rem;
  }

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

  .nav__menu {
    position: static;
    width: auto;
    height: auto;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    display: block;
  }

  .nav__list {
    flex-direction: row;
    column-gap: 3rem;
    justify-content: flex-end;
  }

  .nav__link {
    flex-direction: row;
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: var(--transition);
  }

  .nav__icon {
    display: none;
  }

  .nav__name {
    font-size: var(--normal-font-size);
  }

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

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

  .active-link:hover {
    background-color: var(--first-color-alt);
    color: #fff;
  }
}

@media screen and (min-width: 767px) {
  .home__container {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    column-gap: 4rem;
    row-gap: 2rem;
    padding-top: 2rem;
  }

  .home__content {
    grid-column: 1;
    order: 1;
  }

  .home__handle {
    grid-column: 2;
    order: 2;
    justify-self: center;
  }

  .home__data {
    text-align: left;
  }

  .home__buttons {
    justify-content: flex-start;
  }

  .home__social {
    position: static;
    grid-column: 1;
    order: 3;
    margin-top: 2rem;
  }

  .home__social-wrapper {
    display: flex;
    column-gap: 1rem;
    row-gap: 0;
  }

  .home__scroll {
    position: static;
    grid-column: 2;
    order: 4;
    justify-self: center;
    margin-top: 2rem;
  }

  .home__scroll-content {
    flex-direction: row;
    align-items: center;
  }

  .home__scroll-name {
    transform: none;
    margin-left: 0.5rem;
  }
}

@media screen and (max-width: 767px) {
  .home__container {
    grid-template-areas:
      "content"
      "handle"
      "social"
      "scroll";
    justify-items: center;
    text-align: center;
    gap: 2rem;
  }

  .home__content {
    grid-area: content;
  }

  .home__handle {
    grid-area: handle;
  }

  .home__social {
    grid-area: social;
    position: static;
    margin: 0;
  }

  .home__social-wrapper {
    display: flex;
    justify-content: center;
    gap: 1rem;
  }

  .home__scroll {
    grid-area: scroll;
  }
}

@media screen and (min-width: 767px) {
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 4rem;
  }

  .skills__group {
    row-gap: 2rem;
  }

  .skills__data {
    gap: 1.5rem;
  }
}

@media screen and (min-width: 767px) {
  .work__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

@media screen and (min-width: 1200px) {
  .work__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
  }

  .work__card {
    max-width: none;
  }
}

@media screen and (min-width: 767px) {
  .contact__info {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
  }

  .contact__card {
    padding: 2.5rem;
  }
}

@media screen and (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }

  .section {
    padding: 8rem 0 3rem;
  }

  .home__container {
    column-gap: 6rem;
    padding-top: 3rem;
  }

  .home__handle {
    width: 350px;
    height: 450px;
  }

  .home__img {
    width: 280px;
  }

  .home__name {
    font-size: 4rem;
  }

  .home__profession {
    font-size: 1.75rem;
  }

  .home__description {
    font-size: 1.125rem;
    max-width: 500px;
  }

  .about__container {
    column-gap: 6rem;
  }

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

  .skills__container {
    column-gap: 6rem;
    max-width: 1000px;
    margin: 0 auto;
  }

  .skills__content {
    padding: 3rem;
  }

  .contact__info {
    max-width: 900px;
  }

  .contact__card {
    padding: 3rem;
  }
}

@media screen and (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }

  .home__container {
    column-gap: 8rem;
  }

  .home__name {
    font-size: 4.5rem;
  }

  .section__title {
    font-size: 3rem;
  }

  .work__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
    max-width: 1200px;
  }

  .skills__container {
    max-width: 1200px;
  }
}

@media screen and (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }

  .home__container {
    column-gap: 8rem;
  }

  .home__name {
    font-size: 4.5rem;
  }

  .section__title {
    font-size: 3rem;
  }

  .work__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
    max-width: 1200px;
  }

  .skills__container {
    max-width: 1200px;
  }
}

@media screen and (max-width: 767px) {
  .home__container {
    grid-template-areas:
      "content"
      "handle"
      "social"
      "scroll";
    row-gap: 1.5rem; /* Mengurangi ruang antar elemen */
    padding-top: 1rem;
  }

  .home__handle {
    width: 100%;
    height: auto;
    max-width: 280px;
    margin: 0 auto;
  }

  .home__img-wrapper {
    height: auto;
    aspect-ratio: 3/4; /* Mempertahankan rasio aspek */
    padding-bottom: 0;
  }

  .home__img {
    width: 600px;
    height: 350px;
  }

  .home__content {
    padding-top: 1rem;
  }

  .home__name {
    font-size: 2.5rem;
  }

  .home__profession {
    font-size: 1.25rem;
  }
}

/* Mobile navigation adjustments */
@media screen and (max-width: 767px) {
  /* Add safe area for navigation */
  .home__container,
  .about__container,
  .skills__container,
  .work__container,
  .contact__container {
    margin-bottom: 2rem;
  }

  /* Adjust scroll behavior for mobile */
  html {
    scroll-padding-bottom: 5rem;
  }
}
