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

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

  /*========== Colors ==========*/
  /* HSL Values */
  --hue: 250;
  --sat: 66%;
  --lig: 75%;
  --first-color: hsl(var(--hue), var(--sat), var(--lig));
  --first-color-alt: hsl(var(--hue), var(--sat), 71%);
  --title-color: hsl(var(--hue), 12%, 15%);
  --text-color: hsl(var(--hue), 12%, 45%);
  --text-color-light: hsl(var(--hue), 8%, 65%);
  --body-color: hsl(var(--hue), 100%, 99%);
  --container-color: #fff;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);

  /*========== Font and typography ==========*/
  --body-font: 'Outfit', sans-serif;
  --big-font-size: 2rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1.125rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;
  --tiny-font-size: .625rem;

  /*========== Font weight ==========*/
  --font-light: 300;
  --font-medium: 500;
  --font-semi-bold: 700;

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

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

/*========== Variables Dark theme ==========*/
body.dark-theme {
  --title-color: hsl(var(--hue), 12%, 95%);
  --text-color: hsl(var(--hue), 12%, 75%);
  --body-color: hsl(var(--hue), 28%, 12%);
  --container-color: hsl(var(--hue), 29%, 16%);
  --glass-bg: rgba(31, 29, 43, 0.6);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/*========== Button Dark/Light ==========*/
.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  font-size: 1.25rem;
  color: var(--title-color);
  cursor: pointer;
  transition: .3s;
}

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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: .4s;
  overflow-x: hidden;
  position: relative;
}

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

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

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

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

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

.section__title {
  font-size: var(--h1-font-size);
  color: var(--first-color);
  text-align: center;
  margin-bottom: .25rem;
}

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

.main {
  overflow: hidden;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  border-radius: 1.5rem;
}

/* Dynamic Animated Background Blobs */
.blob {
  position: absolute;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  border-radius: 50%;
  animation: float 10s ease-in-out infinite alternate;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--first-color);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: hsl(200, 70%, 60%);
  bottom: 20%;
  right: -50px;
  animation-delay: -5s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(50px, 50px) scale(1.1);
  }
}

/*=============== HEADER & NAV ===============*/
.header {
  width: 100%;
  background: transparent;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  transition: .4s;
}

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

.nav__logo {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  font-size: 1.25rem;
  letter-spacing: 1px;
}

.nav__toggle,
.nav__close {
  color: var(--title-color);
  font-size: 1.25rem;
  cursor: pointer;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    padding: 2rem 1.5rem 4rem;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, .15);
    border-radius: 1.5rem 1.5rem 0 0;
    transition: .3s;
    z-index: var(--z-fixed);
  }
}

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

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

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

.nav__close {
  position: absolute;
  right: 1.3rem;
  bottom: .5rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--first-color);
}

.show-menu {
  bottom: 0;
}

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

.scroll-header {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

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

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

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

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

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

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

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

.home__title {
  font-size: var(--big-font-size);
  line-height: 1.2;
}

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

.home__description {
  max-width: 400px;
  line-height: 1.6;
}

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

.home__images {
  display: flex;
  justify-content: center;
  position: relative;
}

.home__img-box {
  width: 250px;
  height: 350px;
  background: linear-gradient(135deg, var(--first-color) 0%, hsl(200, 70%, 60%) 100%);
  border-radius: 2rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.home__glass-card {
  position: absolute;
  top: 2rem;
  left: -2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: .75rem 1.25rem;
  border-radius: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: var(--font-medium);
  color: var(--title-color);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  animation: floatCard 4s ease-in-out infinite alternate;
}

.home__glass-card--2 {
  top: auto;
  bottom: 2rem;
  left: auto;
  right: -2rem;
  animation-delay: -2s;
}

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

@keyframes floatCard {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(15px);
  }
}

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

.about__data {
  text-align: center;
}

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

.about__box {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  text-align: center;
  padding: 1.25rem 1rem;
  transition: .3s;
}

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

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

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

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

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

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

.skills__content {
  padding: 1.5rem;
}

.skills__title {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  text-align: center;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .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: .5rem;
}

.skills__data i {
  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(--tiny-font-size);
}

/*=============== CERTIFICATIONS ===============*/
.certifications__container {
  grid-template-columns: 1fr;
  row-gap: 2rem;
}

.certifications__card {
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  transition: .3s;
}

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

.certifications__icon-box {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--first-color) 0%, hsl(200, 70%, 60%) 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.certifications__icon-box i {
  font-size: 2rem;
  color: #fff;
}

.certifications__title {
  font-size: var(--h3-font-size);
  margin-bottom: .25rem;
}

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

.certifications__description {
  font-size: var(--small-font-size);
  color: var(--text-color);
  line-height: 1.6;
}

/*=============== PROJECTS ===============*/
.projects__container {
  grid-template-columns: 1fr;
  gap: 2rem;
}

.projects__card {
  perspective: 1000px;
  background-color: transparent;
  transition: .3s;
}

.projects__card:hover {
  transform: translateY(-10px);
}

.projects__card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.projects__card.flipped .projects__card-inner {
  transform: rotateY(180deg);
}

.projects__card-front,
.projects__card-back {
  position: relative;
  /* ensure height matches content */
  width: 100%;
  min-height: 480px;
  /* Force minimum height to ensure content fits */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1.5rem;
  overflow: hidden;
  /* Only hide overflow on the faces, not the container! */
}

/* Ensure glass classes apply appropriately to faces */
.projects__card-front.glass-panel,
.projects__card-back.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.projects__card-front {
  text-align: left;
}

.projects__card-back {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
}

.projects__card-back-title {
  font-size: var(--h2-font-size);
  color: var(--first-color);
  margin-bottom: 1rem;
}

.projects__card-back-desc {
  font-size: var(--small-font-size);
  color: var(--text-color);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.projects__img-wrapper {
  overflow: hidden;
  border-radius: 1.5rem 1.5rem 0 0;
  height: 200px;
}

.projects__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .4s;
}

.projects__card:hover .projects__img {
  transform: scale(1.1);
}

.projects__content {
  padding: 1.5rem;
}

.projects__subtitle {
  font-size: var(--small-font-size);
  color: var(--text-color);
  margin-bottom: .25rem;
  display: block;
}

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

.projects__description {
  font-size: var(--small-font-size);
  margin-bottom: 1.25rem;
  color: var(--text-color-light);
}

.projects__button {
  color: var(--first-color);
  font-size: var(--small-font-size);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  cursor: pointer;
  transition: .3s;
  font-weight: var(--font-medium);
}

.projects__button:hover {
  gap: .5rem;
}

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

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

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

.contact__card-icon {
  font-size: 2rem;
  color: var(--title-color);
  margin-bottom: .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: .75rem;
  color: var(--text-color-light);
}

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

.contact__button:hover {
  gap: .5rem;
}

.contact__content {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 1.5rem;
}

.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: transparent;
  color: var(--text-color);
  outline: none;
  border-radius: .75rem;
  padding: 1.5rem;
  z-index: 1;
  font-family: var(--body-font);
}

.contact__form-tag {
  position: absolute;
  top: -.75rem;
  left: 1.25rem;
  font-size: var(--smaller-font-size);
  padding: .25rem;
  background: var(--body-color);
  z-index: 10;
  border-radius: .25rem;
  color: var(--title-color);
}

.contact__form-area {
  height: 11rem;
}

.contact__form-area input {
  resize: none;
}

.contact__form-input::placeholder {
  color: transparent;
  /* visually hide placeholder */
}

.contact__form-input:focus {
  border-color: var(--first-color);
}


/*=============== FOOTER ===============*/
.footer {
  background-color: var(--first-color);
}

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

.footer__title,
.footer__link {
  color: #fff;
}

.footer__title {
  margin-bottom: 2rem;
}

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

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

.footer__social-link {
  background-color: var(--first-color-alt);
  color: #fff;
  padding: .35rem;
  border-radius: .25rem;
  font-size: 1.25rem;
  display: inline-flex;
}

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

.footer__copy {
  display: block;
  margin-top: 4.5rem;
  color: #fff;
  font-size: var(--smaller-font-size);
}

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

.scrollup i {
  font-size: 1.5rem;
  color: #fff;
}

.scrollup:hover {
  opacity: 1;
}

.show-scroll {
  bottom: 3rem;
}

/* scroll bar */
::-webkit-scrollbar {
  width: .6rem;
  background-color: hsl(var(--hue), 8%, 22%);
  border-radius: .5rem;
}

::-webkit-scrollbar-thumb {
  background-color: hsl(var(--hue), 8%, 32%);
  border-radius: .5rem;
}

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

/*=============== BREAKPOINTS ===============*/
@media screen and (min-width: 576px) {
  .nav__list {
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
  }

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

  .contact__info {
    grid-template-columns: 300px;
    justify-content: center;
  }

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

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

  .contact__container {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    column-gap: 3rem;
  }
}

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

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

  .nav__close,
  .nav__toggle {
    display: none;
  }

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

  .nav__menu {
    margin-left: auto;
  }

  .home__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    padding-top: 8rem;
  }

  .home__img-box {
    width: 350px;
    height: 500px;
  }

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

  .about__data {
    text-align: left;
  }

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

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

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

  .footer__container {
    padding: 3rem 0;
  }

  .footer__copy {
    margin-top: 3rem;
  }
}

/* Add slight animations for reveal */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}