:root {
  --primary: #FCFCFC;
  --secondary: #FF3559;
  --dark: #1D1D1D;
}

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

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  background-color: var(--primary);
  position: relative;
  font-family: 'roboto', sans-serif;
}

/* Navbar */

.navbar {
  width: 100%;
  height: 60px;
  background-color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  padding: 0 10vw;
  z-index: 9;
}

.navbar-title {
  font-weight: 500;
  cursor: pointer;
}

.highlight {
  color: var(--secondary);
}

.navbar-list {
  display: flex;
  gap: 25px;
  list-style-type: none;
}

.navbar-link {
  color: black;
  padding-bottom: 5px;
  position: relative;
  text-decoration: none;
}

.navbar-link:hover,
.navbar-title,
.navbar-link {
  user-select: none;
}

.navbar-link:hover {
  color: var(--secondary);
}

.navbar-link::after {
  content: '';
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  transition: width 0.3s ease-in-out;
}

.navbar-link:hover::after {
  width: 100%;
}

/* Home */

.home {
  width: 100%;
  min-height: calc(100vh - 60px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 60px;
  padding: 0 10vw;
}

.home-content {
  width: 50%;
}

.home-title {
  font-size: 3.5rem;
  font-weight: 400;
  margin-bottom: 20px;
}

.home-title .nama {
  display: block;
  font-size: 4.5rem;
}

.home-description {
  margin-bottom: 30px;
  text-align: justify;
  line-height: 1.5;
}

.btn {
  min-width: 150px;
  height: 40px;
  color: white;
  background-color: var(--secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 30px;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s;
}

.btn:hover {
  background-color: #E62E4F;
}

.home-image-container {
  position: relative;
}

.home-background {
  position: relative;
  top: 30px;
}

.home-image {
  width: 300px;
  height: 420px;
  position: absolute;
  top: 45%;
  left: 55%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* About */

#about {
  padding: 60px 10vw;
  overflow: hidden;
}

.section-heading {
  font-size: 3.5rem;
  font-weight: 500;
  text-align: center;
}

.about-me-container {
  display: grid;
  grid-template-columns: 35% 65%;
  gap: 10px;
  margin: 40px 0 60px;
}

.about-image {
  width: 250px;
  height: 446px;
  margin-left: 20px;
  border-radius: 10px;
  box-shadow: 0 10px 10px rgba(0, 0, 0, .25);
}

.about-description {
  font-size: 1.1rem;
  text-align: justify;
  line-height: 1.75;
  margin-bottom: 25px;
}

.section-subheading {
  font-size: 2.3rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border: 1px solid black;
  border-radius: 50%;
  opacity: .7;
  transition: .3s;
}

.icon:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  opacity: 1;
}

.icon-path {
  transition: fill .3s;
}

.icon:hover .icon-path {
  fill: white;
}

.center {
  text-align: center;
}

.skill-container {
  width: 600px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 50px;
  margin: 50px auto 0;
}

.skill-card {
  width: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
  border: 1px solid silver;
  border-radius: 8px;
  box-shadow: 3px 3px 3px 0 rgba(0, 0, 0, .3);
}

.skill-card svg {
  filter: grayscale(1);
  transition: filter .5s;
}

.skill-card:hover svg {
  filter: grayscale(0);
}

.skill-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 20px;
}

/* Projects */

#project {
  position: relative;
  padding: 60px 10vw 0;
  overflow: hidden;
}

.project-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 50px;
}

.project-card {
  width: 500px;
  margin-bottom: 15px;
  padding: 15px;
}

.project-image-container {
  height: 250px;
  position: relative;
  border: 1px solid silver;
  border-radius: 5px;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter .7s;
}

.project-card:hover .project-image {
  filter: blur(5px);
}

.project-icon {
  display: flex;
  align-items: center;
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px;
  gap: 5px;
  opacity: 0;
  transition: opacity .7s;
}

.project-card:hover .project-icon {
  opacity: 1;
}

.project-btn-grp {
  width: 70%;
  display: flex;
  justify-content: center;
  gap: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .7s;
}

.project-card:hover .project-btn-grp {
  opacity: 1;
}

.project-btn {
  width: 100%;
  padding: 10px;
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
}

.project-btn.github {
  color: white;
  background-color: black;
}

.project-btn.demo {
  color: black;
  background-color: white;
  border: 1px solid black;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 15px 0 10px;
}

.project-description {
  color: gray;
  font-size: 1rem;
  text-align: justify;
}

.coming-soon {
  color: white;
  font-size: 2.5rem;
  font-weight: 600;
}

.garis {
  border-top: 1px solid gray;
}

/* Contact */

#contact {
  position: relative;
  padding: 60px 10vw 0;
}

.contact-form {
  width: 100%;
  margin: 50px 0 150px;
  text-align: center;
}

.contact-form .name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.contact-form .name input {
  width: 49%;
  margin-bottom: 0;
}

.contact-form input {
  width: 100%;
  height: 50px;
  background-color: #F8F8FF;
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid silver;
  border-radius: 5px;
  outline: 0;
}

.contact-form .message {
  width: 100%;
  height: 200px;
  background-color: #F8F8FF;
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid silver;
  border-radius: 5px;
  outline: 0;
  resize: none;
}

.contact-form input::placeholder,
.contact-form .message::placeholder {
  color: rgba(0, 0, 0, .8)
}

.loading-btn {
  display: none;
}

.spinner {
  width: 20px;
  height: 20px;
  display: inline-block;
  margin-right: 10px;
  border: 3px solid rgba(255, 255, 255, .3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.alert {
  display: none;
  color: #155724;
  background-color: #D4EDDA;
  position: relative;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #C3E6CB;
  border-radius: 5px;
}

.close-btn {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.garis {
  width: 90%;
  display: block;
  margin: 0 auto;
  opacity: 0;
}

/* Footer */

.footer {
  color: white;
  background-color: #18181B;
  padding: 80px 0 50px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 200px;
  margin-bottom: 50px;
}

.footer-name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-section p {
  margin-bottom: 10px;
}

.footer-section h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-section ul {
  list-style-type: none;
}

.footer-section a {
  color: rgba(255, 255, 255, .8);
  margin-bottom: 10px;
}

.footer-section a {
  display: inline-block;
  text-decoration: none;
}

.footer-section a:hover,
.author:hover {
  color: var(--secondary);
  transition: .3s;
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid gray;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.footer-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  border: 1px solid white;
  border-radius: 50%;
}

.footer-icon:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  transition: background-color 0.5s, border-color 0.5s;
}

.footer-icon svg {
  fill: white
}

.copyright {
  font-size: 1rem;
}

.author {
  font-weight: 500;
}

/* Dark Mode */

.dark-mode {
  color: white;
  background-color: var(--dark);
}

.dark-mode .hamburger-menu span {
  background-color: white;
}

.dark-mode .navbar {
  background-color: var(--dark);
}

.dark-mode .navbar-list {
  color: white;
  background-color: var(--dark);
}

.dark-mode .navbar-link {
  color: white;
}

.dark-mode .navbar-link:hover {
  color: var(--secondary);
}


.dark-mode .icon {
  fill: white;
  border: 1px solid white;
  opacity: 100%;
}

.dark-mode .icon:hover {
  background-color: var(--secondary);
  border: 1px solid var(--secondary);
}

.dark-mode .skill-card {
  box-shadow: 3px 3px 3px 0 rgba(255, 255, 255, .3)
}

.dark-mode .project-image-container {
  border: 1px solid var(--dark);
}

.dark-mode .project-title {
  color: white;
}

.dark-mode .project-description {
  color: gray;
}

.dark-mode .contact-form input,
.dark-mode .message {
  color: white;
  background-color: black;
  border: none;
}

.dark-mode .contact-form input::placeholder,
.dark-mode .contact-form .message::placeholder {
  color: rgba(255, 255, 255, 0.8)
}

.dark-mode .alert {
  color: whitesmoke;
  background-color: #18181B;
  border: none;
}

.dark-mode .garis {
  opacity: 1;
}

.dark-mode .footer {
  background-color: var(--dark);
}

/* Responsive Styles */

@media (min-width:992px) and (max-width:1249px) {

  html {
    font-size: 16px;
  }

  .footer-container {
    width: 90%;
  }

  .footer-content {
    gap: 150px;
  }
}

@media (min-width:768px) and (max-width:991px) {
  html {
    font-size: 14px;
  }

  .footer-container {
    width: 80%;
  }

  .footer-content {
    gap: 70px;
  }

  .footer-icon svg {
    width: 15px;
  }
}

@media (min-width:576px) and (max-width:767px) {
  html {
    font-size: 14px
  }

  .footer-container {
    width: 80%;
  }

  .footer-content {
    flex-direction: column;
    gap: 10px;
  }

  .footer-icon svg {
    width: 15px;
  }
}

/* Tablet View */

@media (max-width:991px) {
  html {
    font-size: 14px;
  }

  /* Hamburger Menu */

  .hamburger-menu {
    width: 40px;
    height: 40px;
    position: absolute;
    right: 10vw;
    cursor: pointer;
  }

  .hamburger-menu span {
    width: 100%;
    height: 2px;
    background-color: black;
    position: absolute;
    top: 30%;
    transition: .5s;
  }

  .hamburger-menu span:nth-child(2) {
    top: 60%;
  }

  .hamburger-menu span:nth-child(3) {
    top: 90%;
  }

  .hamburger-menu.active span:first-child {
    top: 50%;
    transform: rotate(45deg);
  }

  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active span:nth-child(3) {
    top: 50%;
    transform: rotate(-45deg);
  }

  /* Links */

  .navbar-list {
    width: 100%;
    background-color: var(--primary);
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    padding: 0 10vw;
    opacity: 0;
    pointer-events: none;
    transition: .5s;
  }

  .navbar-list.show {
    opacity: 1;
    pointer-events: all;
  }

  .navbar-link {
    height: 50px;
    display: block;
    margin-left: auto;
    text-align: center;
  }

  /* Home */

  .home {
    height: fit-content;
    flex-direction: column-reverse;
    justify-content: space-evenly;
    align-items: center;
    padding-bottom: 50px;
  }

  .home-content {
    width: 70%;
    min-width: 350px;
    text-align: center;
  }

  .home-title {
    font-size: 3rem;
  }

  .home-title .nama {
    font-size: 4.5rem;
  }

  .home-content .home-description {
    text-align: center;
  }

  .home .home-background {
    top: 50px;
    left: -10px;
  }

  .home .home-image {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  /* About */

  .about-me-container {
    grid-template-columns: 1fr;
  }

  .about-image-container {
    margin: 0 auto 20px;
  }

  .about-image {
    margin: 0 auto;
  }

  .skill-container {
    width: 400px;
  }

  .section-subheading {
    font-size: 2rem;
  }
}

/* Mobile View */

@media (max-width:575px) {
  html {
    font-size: 12px;
  }

  /* Hamburger Menu */

  .hamburger-menu {
    width: 25px;
    height: 25px;
  }

  /* Home */

  .home {
    gap: 20px;
    overflow: hidden;
  }

  .home-title {
    font-size: 3rem;
  }

  .home-title .nama {
    font-size: 4rem;
  }

  .home .home-background {
    top: 30px;
    width: 350px;
    height: 350px;
  }

  .home-image {
    width: 220px;
    height: 308px;
  }

  /* About */

  .about-image {
    margin: 0;
    width: 200px;
    height: 357px;
  }

  .section-subheading {
    font-size: 2.2rem;
  }

  .skill-container {
    width: 250px;
  }

  .skill-card {
    width: 130px;
  }

  .skill-card svg {
    width: 70px;
    height: 70px;
  }

  /* Project */

  .project-btn {
    padding: 8px;
    font-size: 1em;
  }

  .project-icon svg {
    width: 30px;
  }

  .coming-soon {
    font-size: 2rem;
  }

  /* Contact */

  .contact-form .name {
    flex-direction: column;
  }

  .contact-form .name input {
    width: 100%;
  }

  .first-name {
    margin-bottom: 30px !important;
  }

  /* Footer */

  .footer-container {
    width: 70%;
  }

  .footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .footer-icon svg {
    width: 15px;
  }
}
