/* ---- GOOGLE FONTS ---- */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,500;0,600;0,800;0,900;1,300;1,400&family=Poppins:wght@400;500;600&display=swap");

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

  --first-hue: 250;
  --sat: 78%;
  --lig: 70%;
  --second-hue: 219;

  --first-color: hsl(var(--first-hue), var(--sat), var(--lig));
  --first-color-alt: hsl(var(--first-hue), var(--sat), 65%);
  --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%);

  /* ---- 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;
}

/* ---- 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);
}

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);
  transition: 0.3s all linear;
  scale: 1.1;
}

/* ---- LIGHT THEME VARIABLES*/
body.light-theme {
  --title-color: hsl(var(--second-hue), 15%, 15%);
  --text-color: hsl(var(--second-hue), 8%, 35%);
  --body-color: #f6f8fd;
  --container-color: #fff;
  --container-color-alt: #f5f5f5;
}

/* ---- Color changes in some parts of the website, in light theme ---- */

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

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

.light-theme .social .bx {
  color: var(--title-color);
  background: var(--container-color);
}

.light-theme .social .bx:hover {
  background: var(--container-color-alt);
}

.light-theme .skills-box h2 {
  color: var(--title-color);
}

.light-theme .skills-box .bx {
  border-radius: 5rem;
  border: 2px dashed var(--text-color);
}

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

.light-theme .item-link:hover {
  color: var(--first-color);
}

.light-theme .menu-active {
  color: var(--first-color);
}

.light-theme .scroll-top .bx {
  background: var(--container-color);
  color: var(--title-color);
  box-shadow: 0px 3px 3px rgba(3, 7, 18, 0.02),
    0px 12px 11px rgba(3, 7, 18, 0.03), 0px 27px 24px rgba(3, 7, 18, 0.05),
    0px 48px 42px rgba(3, 7, 18, 0.06), 0px 75px 66px rgba(3, 7, 18, 0.08);
}

.light-theme .scroll-top .bx:hover {
  background: var(--container-color-alt);
}

.light-theme .social-footer .bx {
  color: var(--title-color);
  background: var(--container-color);
}

.light-theme .social-footer .bx:hover {
  background: var(--container-color-alt);
}

/* ---- REUSABLE CSS CLASSES ---- */

.container {
  max-width: 960px;
  margin: auto;
  width: 100%;
  overflow: hidden;
}

.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);
  margin-top: 3rem;
}

/* ---- HEADER AND NAVBAR ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--body-color);
  z-index: var(--z-fixed);
}

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

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

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

.nav__menu {
  position: fixed;
  bottom: 1rem;
  background-color: hsla(var(--second-hue), 32%, 16%, 0.8);
  width: 83%;
  border-radius: 4rem;
  padding: 1rem 2.25rem;
  backdrop-filter: blur(10px);
}

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

.nav__link {
  color: var(--text-color);
  font-size: 1.25rem;
  padding: 0.4rem;
  display: flex;
  border-radius: 5rem;
}

/* Active Link */
.active-link {
  background: linear-gradient(
    180deg,
    hsla(var(--first-hue), var(--sat), var(--lig), 1),
    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));
  color: var(--title-color);
}

/* ---- SCROLL TOP ---- */
.scroll-top {
  position: fixed;
  bottom: -100%;
  right: 1.5rem;
}

.scroll-top .bx {
  padding: 8px;
  font-size: 1.3rem;
  color: var(--text-color);
  background: var(--first-color);
  border-radius: 0.2rem;
}

.scroll-top .bx:hover {
  background: var(--first-color-alt);
  transition: 0.3s;
}

.scroll-active {
  bottom: 2rem;
  transition: 0.3s;
}

/* ---- HOME ---- */
.home {
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 7rem;
}

.home-content {
  position: relative;
  max-width: 600px;
  width: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.home-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #98a7fc;
  overflow: hidden;
  margin-bottom: 2rem;
}

.home-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  object-position: center;
}

.home-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-text h3 {
  position: relative;
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
  font-size: 1.1rem;
  color: var(--first-color);
}

.home-text h3::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translate(-50%);
  left: -15px;
  width: 20px;
  height: 2px;
  background: var(--first-color);
}

.home-text h3::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translate(-50%);
  right: -35px;
  width: 20px;
  height: 2px;
  background: var(--first-color);
}

.home-text h2 {
  font-size: 3.5rem;
  line-height: 4.8rem;
}

.home-text p {
  font-size: 0.938rem;
  margin-bottom: 1.5rem;
}

.home-text .color {
  color: var(--text-color);
}

.social {
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
}

.social .bx {
  font-size: 1.3rem;
  padding: 10px;
  border-radius: 50%;
  color: var(--title-color);
  background: var(--first-color);
}

.social .bx:hover {
  background: var(--first-color-alt);
  transition: 0.3s all linear;
  scale: 1.1;
}

/* ---- SKILLS ---- */

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

.section__subtitle-skills {
  display: block;
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  text-align: center;
  margin-top: 3rem;
}

.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-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.skills-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px;
  background-color: var(--container-color);
  border-radius: 0.5rem;
  transition: 0.5s all cubic-bezier(0.075, 0.82, 0.165, 1);
}

.skills-box:hover {
  transform: scale(1.05);
  transition: 0.5s all cubic-bezier(0.075, 0.82, 0.165, 1);
}

.skills-box .bx {
  font-size: 1.4rem;
  color: var(--first-color);
  padding: 10px;
  border-radius: 5rem;
  border: 2px dashed var(--body-color);
}

.skills-box h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0.5rem 0;
  color: var(--first-color);
}

.skills-box p {
  font-size: 0.9rem;
}

/* ---- PORTOFOLIO ---- */

.items-links {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.item-link {
  padding: 10px 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.4s ease;
  background: var(--container-color);
  color: var(--text-color);
}

.item-link:hover {
  color: var(--first-color);
  transition: 0.3s all linear;
  scale: 1.1;
}

.menu-active {
  border: 2px solid var(--first-color);
  background: var(--container-color);
  color: var(--first-color);
}

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

.project-img {
  position: relative;
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  animation: SclAnimation 0.4s ease;
}

@keyframes SclAnimation {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

.project-img:hover .overlay {
  top: 0;
}

.overlay {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(transparent, #25252570);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  transition: 0.4s ease;
}

.overlay h4 {
  font-size: 20px;
  color: #fff;
}

.overlay p {
  font-size: 14px;
  color: #fff;
  text-align: center;
  width: 90%;
}

.action-aria {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-block;
  width: fit-content;
  padding: 8px 16px;
  background: var(--container-color);
  border-radius: 8px;
  text-decoration: none;
  color: var(--first-color);
  font-size: 16px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: 0.4s ease;
}

.btn-light {
  background: transparent;
  border-color: var(--first-color);
  color: var(--first-color);
}

.btn:hover {
  background: transparent;
  border-color: var(--first-color);
  color: var(--first-color);
}

.btn-light:hover {
  background: var(--container-color);
  border: 1px solid transparent;
  color: var(--first-color);
}

.project-img:hover img {
  transform: scale(1.1);
}

img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: 0.4s ease;
}

/* ---- CONTACT ---- */
.contact-form {
  max-width: 600px;
  margin: auto;
  width: 100%;
  display: grid;
  row-gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  border: none;
  outline: none;
  font-size: 0.9rem;
  padding: 15px;
  color: var(--text-color);
  background: var(--container-color);
  border-radius: 0.4rem;
}

.contact-form .send-btn {
  width: 120px;
  font-size: 1rem;
  font-weight: 400;
  text-transform: capitalize;
  padding: 12px;
  background: var(--first-color);
  cursor: pointer;
  color: #fff;
}

.contact-form .send-btn:hover {
  background: var(--first-color-alt);
  transition: 0.3s all linear;
}

/* ---- FOOTER ---- */
.footer {
  margin-top: 4rem;
  display: flex;
  align-items: center;
  flex-direction: column;
  row-gap: 1.4rem;
  padding: 30px 0;
}

.social-footer {
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
}

.social-footer .bx {
  font-size: 1.3rem;
  padding: 10px;
  border-radius: 50%;
  color: var(--title-color);
  background: var(--first-color);
}

.social-footer .bx:hover {
  background: var(--first-color-alt);
  transition: 0.3s all linear;
  scale: 1.1;
}

.footer p {
  margin-top: 3rem;
  margin-bottom: 4rem;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  align-items: center;
  column-gap: 1rem;
}

.footer-links a {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-color);
}

.footer-links a:hover {
  color: var(--text-color-light);
}

/* ---- RESPONSIVE ---- */
@media screen and (max-width: 320px) {
  .nav__menu {
    padding: 1rem;
  }
}

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

@media screen and (max-width: 990px) {
  .container {
    margin: 0 auto;
    width: 90%;
    overflow-x: hidden;
  }
}

@media screen and (max-width: 892px) {
  section {
    padding: 2rem 0;
  }
}

@media screen and (max-width: 775px) {
  .nav {
    padding: 10px;
  }
  .nav__logo {
    font-size: 1.1rem;
  }
  .home {
    min-height: 500px;
    padding-top: 6rem;
  }
  .home-text h3 {
    font-size: 1rem;
  }
  .home-text h2 {
    font-size: 3rem;
    line-height: 3.8rem;
  }
  .home-text p {
    font-size: 0.825rem;
  }
  .skills-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 695px) {
  .scroll-active {
    bottom: 6rem;
    transition: 0.3s;
  }
  .portofolio-content {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 450px) {
  .home {
    min-height: 485px;
    padding-top: 5rem;
  }
  .home-img {
    width: 140px;
    height: 140px;
  }
  .home-img img {
    width: 140px;
    height: 140px;
  }
  .home-text h2 {
    font-size: 2.1rem;
    line-height: 3.2rem;
  }
  .skills-content,
  .portofolio-content {
    grid-template-columns: 1fr;
  }
  .footer-links {
    flex-direction: column;
    row-gap: 1rem;
  }
}

@media screen and (max-width: 325px) {
  .footer-links a {
    font-size: var(--small-font-size);
  }
  .footer p {
    font-size: var(--smaller-font-size);
  }
}

@media screen and (max-width: 1024px) {
  .items-links {
    width: 90%;
  }
}

@media screen and (max-width: 991px) {
  .items-links {
    width: 90%;
  }

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

@media screen and (max-width: 1000px) {
  .items-links {
    gap: 20px;
    flex-wrap: wrap;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
  .project-img {
    height: max-content;
  }
}
